blob: dd778fe53fb0bac3c08e989998aeeb8c9a6660b4 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Skip Montanarob9820a32004-01-17 00:16:12 +00002# From configure.in Revision: 1.442 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Skip Montanaro6dead952003-09-25 14:50:04 +00004# Generated by GNU Autoconf 2.57 for python 2.4.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +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.
26if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
27 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
45 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
46 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.
228as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
229
230# Sed expression to map a string onto a valid variable name.
231as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
232
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
Skip Montanaro6dead952003-09-25 14:50:04 +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 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'
313ac_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 \
671 localstatedir libdir includedir oldincludedir infodir mandir
672do
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\(.*[^/]\)//*[^/][^/]*/*$' \| \
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
715echo 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
806 [$ac_default_prefix]
807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
808 [PREFIX]
809
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
848 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
849 --enable-ipv6 Enable ipv6 (with ipv4) support
850 --disable-ipv6 Disable ipv6 support
851 --enable-unicode[=ucs[24]]
852 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853
854Optional Packages:
855 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
856 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000857 --without-gcc never use gcc
858 --with-cxx=<compiler> enable C++ support
859 --with-suffix=.exe set executable suffix
860 --with-pydebug build with Py_DEBUG defined
861 --with-libs='lib1 ...' link against additional libs
862 --with-signal-module disable/enable signal module
863 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
864 --with(out)-threads[=DIRECTORY]
865 disable/enable thread support
866 --with(out)-thread[=DIRECTORY]
867 deprecated; use --with(out)-threads
868 --with-pth use GNU pth threading libraries
869 --with(out)-universal-newlines
870 disable/enable foreign newlines
871 --with(out)-doc-strings disable/enable documentation strings
872 --with(out)-pymalloc disable/enable specialized mallocs
873 --with-wctype-functions use wctype.h functions
874 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
875 --with-dl-dld=DL_DIR GNU dynamic linking
876 --with-fpectl enable SIGFPE catching
877 --with-libm=STRING math library
878 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000879
880Some influential environment variables:
881 CC C compiler command
882 CFLAGS C compiler flags
883 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
884 nonstandard directory <lib dir>
885 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
886 headers in a nonstandard directory <include dir>
887 CPP C preprocessor
888
889Use these variables to override the choices made by `configure' or to help
890it to find libraries and programs with nonstandard names/locations.
891
892_ACEOF
893fi
894
895if test "$ac_init_help" = "recursive"; then
896 # If there are subdirs, report their specific --help.
897 ac_popdir=`pwd`
898 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
899 test -d $ac_dir || continue
900 ac_builddir=.
901
902if test "$ac_dir" != .; then
903 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
904 # A "../" for each directory in $ac_dir_suffix.
905 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
906else
907 ac_dir_suffix= ac_top_builddir=
908fi
909
910case $srcdir in
911 .) # No --srcdir option. We are building in place.
912 ac_srcdir=.
913 if test -z "$ac_top_builddir"; then
914 ac_top_srcdir=.
915 else
916 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
917 fi ;;
918 [\\/]* | ?:[\\/]* ) # Absolute path.
919 ac_srcdir=$srcdir$ac_dir_suffix;
920 ac_top_srcdir=$srcdir ;;
921 *) # Relative path.
922 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
923 ac_top_srcdir=$ac_top_builddir$srcdir ;;
924esac
925# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
926# absolute.
927ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +0000928ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000929ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
930ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
931
932 cd $ac_dir
933 # Check for guested configure; otherwise get Cygnus style configure.
934 if test -f $ac_srcdir/configure.gnu; then
935 echo
936 $SHELL $ac_srcdir/configure.gnu --help=recursive
937 elif test -f $ac_srcdir/configure; then
938 echo
939 $SHELL $ac_srcdir/configure --help=recursive
940 elif test -f $ac_srcdir/configure.ac ||
941 test -f $ac_srcdir/configure.in; then
942 echo
943 $ac_configure --help
944 else
945 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
946 fi
947 cd $ac_popdir
948 done
949fi
950
951test -n "$ac_init_help" && exit 0
952if $ac_init_version; then
953 cat <<\_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000954python configure 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +0000955generated by GNU Autoconf 2.57
Martin v. Löwis11437992002-04-12 09:54:03 +0000956
957Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
958Free Software Foundation, Inc.
959This configure script is free software; the Free Software Foundation
960gives unlimited permission to copy, distribute and modify it.
961_ACEOF
962 exit 0
963fi
964exec 5>config.log
965cat >&5 <<_ACEOF
966This file contains any messages produced by compilers while
967running configure, to aid debugging if configure makes a mistake.
968
Fred Drake9bd44622003-07-30 17:39:48 +0000969It was created by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +0000970generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000971
972 $ $0 $@
973
974_ACEOF
975{
976cat <<_ASUNAME
977## --------- ##
978## Platform. ##
979## --------- ##
980
981hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
982uname -m = `(uname -m) 2>/dev/null || echo unknown`
983uname -r = `(uname -r) 2>/dev/null || echo unknown`
984uname -s = `(uname -s) 2>/dev/null || echo unknown`
985uname -v = `(uname -v) 2>/dev/null || echo unknown`
986
987/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
988/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
989
990/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
991/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
992/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
993hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
994/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
995/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
996/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
997
998_ASUNAME
999
1000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1001for as_dir in $PATH
1002do
1003 IFS=$as_save_IFS
1004 test -z "$as_dir" && as_dir=.
1005 echo "PATH: $as_dir"
1006done
1007
1008} >&5
1009
1010cat >&5 <<_ACEOF
1011
1012
1013## ----------- ##
1014## Core tests. ##
1015## ----------- ##
1016
1017_ACEOF
1018
1019
1020# Keep a trace of the command line.
1021# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001022# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001023# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001024# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001025ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001026ac_configure_args0=
1027ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001028ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001029ac_must_keep_next=false
1030for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001031do
Skip Montanaro6dead952003-09-25 14:50:04 +00001032 for ac_arg
1033 do
1034 case $ac_arg in
1035 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1036 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1037 | -silent | --silent | --silen | --sile | --sil)
1038 continue ;;
1039 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1040 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1041 esac
1042 case $ac_pass in
1043 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1044 2)
1045 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1046 if test $ac_must_keep_next = true; then
1047 ac_must_keep_next=false # Got value, back to normal.
1048 else
1049 case $ac_arg in
1050 *=* | --config-cache | -C | -disable-* | --disable-* \
1051 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1052 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1053 | -with-* | --with-* | -without-* | --without-* | --x)
1054 case "$ac_configure_args0 " in
1055 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1056 esac
1057 ;;
1058 -* ) ac_must_keep_next=true ;;
1059 esac
1060 fi
1061 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1062 # Get rid of the leading space.
1063 ac_sep=" "
1064 ;;
1065 esac
1066 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001067done
Skip Montanaro6dead952003-09-25 14:50:04 +00001068$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1069$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 +00001070
1071# When interrupted or exit'd, cleanup temporary files, and complete
1072# config.log. We remove comments because anyway the quotes in there
1073# would cause problems or look ugly.
1074# WARNING: Be sure not to use single quotes in there, as some shells,
1075# such as our DU 5.0 friend, will then `close' the trap.
1076trap 'exit_status=$?
1077 # Save into config.log some information that might help in debugging.
1078 {
1079 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001080
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 cat <<\_ASBOX
1082## ---------------- ##
1083## Cache variables. ##
1084## ---------------- ##
1085_ASBOX
1086 echo
1087 # The following way of writing the cache mishandles newlines in values,
1088{
1089 (set) 2>&1 |
1090 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1091 *ac_space=\ *)
1092 sed -n \
1093 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1094 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1095 ;;
1096 *)
1097 sed -n \
1098 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1099 ;;
1100 esac;
1101}
1102 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001103
1104 cat <<\_ASBOX
1105## ----------------- ##
1106## Output variables. ##
1107## ----------------- ##
1108_ASBOX
1109 echo
1110 for ac_var in $ac_subst_vars
1111 do
1112 eval ac_val=$`echo $ac_var`
1113 echo "$ac_var='"'"'$ac_val'"'"'"
1114 done | sort
1115 echo
1116
1117 if test -n "$ac_subst_files"; then
1118 cat <<\_ASBOX
1119## ------------- ##
1120## Output files. ##
1121## ------------- ##
1122_ASBOX
1123 echo
1124 for ac_var in $ac_subst_files
1125 do
1126 eval ac_val=$`echo $ac_var`
1127 echo "$ac_var='"'"'$ac_val'"'"'"
1128 done | sort
1129 echo
1130 fi
1131
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 if test -s confdefs.h; then
1133 cat <<\_ASBOX
1134## ----------- ##
1135## confdefs.h. ##
1136## ----------- ##
1137_ASBOX
1138 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001139 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 echo
1141 fi
1142 test "$ac_signal" != 0 &&
1143 echo "$as_me: caught signal $ac_signal"
1144 echo "$as_me: exit $exit_status"
1145 } >&5
1146 rm -f core core.* *.core &&
1147 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1148 exit $exit_status
1149 ' 0
1150for ac_signal in 1 2 13 15; do
1151 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1152done
1153ac_signal=0
1154
1155# confdefs.h avoids OS command line length limits that DEFS can exceed.
1156rm -rf conftest* confdefs.h
1157# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1158echo >confdefs.h
1159
1160# Predefined preprocessor variables.
1161
1162cat >>confdefs.h <<_ACEOF
1163#define PACKAGE_NAME "$PACKAGE_NAME"
1164_ACEOF
1165
1166
1167cat >>confdefs.h <<_ACEOF
1168#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1169_ACEOF
1170
1171
1172cat >>confdefs.h <<_ACEOF
1173#define PACKAGE_VERSION "$PACKAGE_VERSION"
1174_ACEOF
1175
1176
1177cat >>confdefs.h <<_ACEOF
1178#define PACKAGE_STRING "$PACKAGE_STRING"
1179_ACEOF
1180
1181
1182cat >>confdefs.h <<_ACEOF
1183#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1184_ACEOF
1185
1186
1187# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188# Prefer explicitly selected file to automatically selected ones.
1189if test -z "$CONFIG_SITE"; then
1190 if test "x$prefix" != xNONE; then
1191 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1192 else
1193 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1194 fi
1195fi
1196for ac_site_file in $CONFIG_SITE; do
1197 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1199echo "$as_me: loading site script $ac_site_file" >&6;}
1200 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 . "$ac_site_file"
1202 fi
1203done
1204
1205if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 # Some versions of bash will fail to source /dev/null (special
1207 # files actually), so we avoid doing that.
1208 if test -f "$cache_file"; then
1209 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1210echo "$as_me: loading cache $cache_file" >&6;}
1211 case $cache_file in
1212 [\\/]* | ?:[\\/]* ) . $cache_file;;
1213 *) . ./$cache_file;;
1214 esac
1215 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216else
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1218echo "$as_me: creating cache $cache_file" >&6;}
1219 >$cache_file
1220fi
1221
1222# Check that the precious variables saved in the cache have kept the same
1223# value.
1224ac_cache_corrupted=false
1225for ac_var in `(set) 2>&1 |
1226 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1227 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1228 eval ac_new_set=\$ac_env_${ac_var}_set
1229 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1230 eval ac_new_val="\$ac_env_${ac_var}_value"
1231 case $ac_old_set,$ac_new_set in
1232 set,)
1233 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1234echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1235 ac_cache_corrupted=: ;;
1236 ,set)
1237 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1238echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1239 ac_cache_corrupted=: ;;
1240 ,);;
1241 *)
1242 if test "x$ac_old_val" != "x$ac_new_val"; then
1243 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1244echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1245 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1246echo "$as_me: former value: $ac_old_val" >&2;}
1247 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1248echo "$as_me: current value: $ac_new_val" >&2;}
1249 ac_cache_corrupted=:
1250 fi;;
1251 esac
1252 # Pass precious variables to config.status.
1253 if test "$ac_new_set" = set; then
1254 case $ac_new_val in
1255 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1256 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1257 *) ac_arg=$ac_var=$ac_new_val ;;
1258 esac
1259 case " $ac_configure_args " in
1260 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1261 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1262 esac
1263 fi
1264done
1265if $ac_cache_corrupted; then
1266 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1267echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1268 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1269echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1270 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271fi
1272
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001275ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1276ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1277ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279
Michael W. Hudson54241132001-12-07 15:38:26 +00001280
1281
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282
Martin v. Löwis11437992002-04-12 09:54:03 +00001283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
Martin v. Löwis88afe662002-10-26 13:47:44 +00001296
1297
1298
1299
1300
1301
1302
1303
1304
Skip Montanaro6dead952003-09-25 14:50:04 +00001305
1306 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309
1310
1311
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001312
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001313
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001314# We don't use PACKAGE_ variables, and they cause conflicts
1315# with other autoconf-based packages that include Python.h
1316grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1317rm confdefs.h
1318mv confdefs.h.new confdefs.h
1319
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001320
Fred Drake9bd44622003-07-30 17:39:48 +00001321VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001322
Martin v. Löwis1142de32002-03-29 16:28:31 +00001323
1324SOVERSION=1.0
1325
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001326# The later defininition of _XOPEN_SOURCE disables certain features
1327# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1328
1329cat >>confdefs.h <<\_ACEOF
1330#define _GNU_SOURCE 1
1331_ACEOF
1332
1333
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001334# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1335# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1336# them.
1337
1338cat >>confdefs.h <<\_ACEOF
1339#define _NETBSD_SOURCE 1
1340_ACEOF
1341
1342
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001343# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1344# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1345# them.
1346
1347cat >>confdefs.h <<\_ACEOF
1348#define __BSD_VISIBLE 1
1349_ACEOF
1350
1351
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001352define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001353
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001354# Arguments passed to configure.
1355
1356CONFIG_ARGS="$ac_configure_args"
1357
Jack Jansene578a632001-08-15 01:27:14 +00001358# Check whether --enable-framework or --disable-framework was given.
1359if test "${enable_framework+set}" = set; then
1360 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
Jack Jansene578a632001-08-15 01:27:14 +00001362 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001363 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001364 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001365 esac
1366 case $enableval in
1367 no)
1368 PYTHONFRAMEWORK=
1369 PYTHONFRAMEWORKDIR=no-framework
1370 PYTHONFRAMEWORKPREFIX=
1371 PYTHONFRAMEWORKINSTALLDIR=
1372 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001373 ;;
1374 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001375 PYTHONFRAMEWORK=Python
1376 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001377 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001378 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1379 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001380 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
Guido van Rossum563e7081996-09-10 18:20:48 +00001382else
Martin v. Löwis11437992002-04-12 09:54:03 +00001383
Jack Jansene578a632001-08-15 01:27:14 +00001384 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001385 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001386 PYTHONFRAMEWORKPREFIX=
1387 PYTHONFRAMEWORKINSTALLDIR=
1388 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001389
Martin v. Löwis11437992002-04-12 09:54:03 +00001390fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001391
1392
1393
1394
Jack Jansene578a632001-08-15 01:27:14 +00001395
1396##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001397## AC_HELP_STRING(--with-dyld,
1398## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001399##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001400# Set name for machine-dependent library files
1401
Martin v. Löwis11437992002-04-12 09:54:03 +00001402echo "$as_me:$LINENO: checking MACHDEP" >&5
1403echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001404if test -z "$MACHDEP"
1405then
Guido van Rossum563e7081996-09-10 18:20:48 +00001406 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001407 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1408 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001409 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001410 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001411 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001412 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001413 ac_md_system=`echo $ac_sys_system |
1414 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1415 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001416 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001417 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001418
Guido van Rossum07397971997-04-29 21:49:50 +00001419 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001420 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001421 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001422 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001423 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001424 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001425 esac
1426fi
Guido van Rossum91922671997-10-09 20:24:13 +00001427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001428# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1429# disable features if it is defined, without any means to access these
1430# features as extensions. For these systems, we skip the definition of
1431# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1432# some feature, make sure there is no alternative way to access this
1433# feature. Also, when using wildcards, make sure you have verified the
1434# need for not defining _XOPEN_SOURCE on all systems matching the
1435# wildcard, and that the wildcard does not include future systems
1436# (which may remove their limitations).
1437case $ac_sys_system/$ac_sys_release in
1438 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1439 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001440 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1441 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001442 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001443 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1444 # of union __?sigval. Reported by Stuart Bishop.
1445 SunOS/5.6)
1446 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001447 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1448 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1449 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1450 define_xopen_source=no;;
1451 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001452 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001453 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001454 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001455 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1456 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1457 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1458 # This should hopefully be fixed in FreeBSD 4.9
1459 FreeBSD/4.8* | Darwin/6* )
1460 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001461 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1462 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1463 # has another value. By not (re)defining it, the defaults come in place.
1464 AIX/4)
1465 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001466esac
1467
1468if test $define_xopen_source = yes
1469then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001470
1471cat >>confdefs.h <<\_ACEOF
1472#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001473_ACEOF
1474
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001475
1476 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1477 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1478 # several APIs are not declared. Since this is also needed in some
1479 # cases for HP-UX, we define it globally.
1480
1481
1482cat >>confdefs.h <<\_ACEOF
1483#define _XOPEN_SOURCE_EXTENDED 1
1484_ACEOF
1485
1486
1487cat >>confdefs.h <<\_ACEOF
1488#define _POSIX_C_SOURCE 200112L
1489_ACEOF
1490
1491
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001492fi
1493
Guido van Rossum91922671997-10-09 20:24:13 +00001494#
1495# SGI compilers allow the specification of the both the ABI and the
1496# ISA on the command line. Depending on the values of these switches,
1497# different and often incompatable code will be generated.
1498#
1499# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1500# thus supply support for various ABI/ISA combinations. The MACHDEP
1501# variable is also adjusted.
1502#
1503
1504if test ! -z "$SGI_ABI"
1505then
1506 CC="cc $SGI_ABI"
1507 LDFLAGS="$SGI_ABI $LDFLAGS"
1508 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001510echo "$as_me:$LINENO: result: $MACHDEP" >&5
1511echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001512
Jack Jansen83f898c2002-12-30 22:23:40 +00001513# And add extra plat-mac for darwin
1514
Jack Jansen7b59b422003-03-17 15:44:10 +00001515
Jack Jansen83f898c2002-12-30 22:23:40 +00001516echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1517echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1518if test -z "$EXTRAPLATDIR"
1519then
1520 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001521 darwin)
1522 EXTRAPLATDIR="\$(PLATMACDIRS)"
1523 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1524 ;;
1525 *)
1526 EXTRAPLATDIR=""
1527 EXTRAMACHDEPPATH=""
1528 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001529 esac
1530fi
1531echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1532echo "${ECHO_T}$EXTRAPLATDIR" >&6
1533
Guido van Rossum627b2d71993-12-24 10:39:16 +00001534# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001535
1536# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1537# for debug/optimization stuff. BASECFLAGS is for flags that are required
1538# just to get things to compile and link. Users are free to override OPT
1539# when running configure or make. The build should not break if they do.
1540# BASECFLAGS should generally not be messed with, however.
1541
1542# XXX shouldn't some/most/all of this code be merged with the stuff later
1543# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001544echo "$as_me:$LINENO: checking for --without-gcc" >&5
1545echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1546
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001547# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001548if test "${with_gcc+set}" = set; then
1549 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
Guido van Rossum7f43da71994-08-01 12:15:30 +00001551 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001552 no) CC=cc
1553 without_gcc=yes;;
1554 yes) CC=gcc
1555 without_gcc=no;;
1556 *) CC=$withval
1557 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001558 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001559else
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001561 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001562 AIX*) CC=cc_r
1563 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001564 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001565 case $BE_HOST_CPU in
1566 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001567 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001568 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001569 BASECFLAGS="$BASECFLAGS -export pragma"
1570 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001571 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001572 ;;
1573 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001574 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001575 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001576 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001577 ;;
1578 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1580echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1581 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001582 ;;
1583 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001584 AR="\$(srcdir)/Modules/ar_beos"
1585 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001586 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001587 Monterey*)
1588 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001589 without_gcc=;;
1590 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001591 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001592fi;
1593echo "$as_me:$LINENO: result: $without_gcc" >&5
1594echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001595
1596
Guido van Rossum95012191999-12-16 17:50:52 +00001597
Fred Drakea1a84e72001-03-06 05:52:16 +00001598MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001599echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1600echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1601
Guido van Rossum95012191999-12-16 17:50:52 +00001602# Check whether --with-cxx or --without-cxx was given.
1603if test "${with_cxx+set}" = set; then
1604 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001605
Martin v. Löwis22352952000-12-13 17:37:02 +00001606 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001607 case $withval in
1608 no) CXX=
1609 with_cxx=no;;
1610 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001611 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001612 with_cxx=$withval;;
1613 esac
1614else
Martin v. Löwis11437992002-04-12 09:54:03 +00001615
Guido van Rossum95012191999-12-16 17:50:52 +00001616 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001617 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001618
Martin v. Löwis11437992002-04-12 09:54:03 +00001619fi;
1620echo "$as_me:$LINENO: result: $with_cxx" >&5
1621echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001622
1623if test "$with_cxx" = "yes"
1624then
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1626echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1627 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001628fi
1629
1630
1631
1632
Martin v. Löwis11437992002-04-12 09:54:03 +00001633if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001634then
1635 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1636do
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 # 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 +00001638set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001639echo "$as_me:$LINENO: checking for $ac_word" >&5
1640echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1641if test "${ac_cv_prog_CXX+set}" = set; then
1642 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001643else
1644 if test -n "$CXX"; then
1645 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1646else
Martin v. Löwis11437992002-04-12 09:54:03 +00001647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1648for as_dir in $PATH
1649do
1650 IFS=$as_save_IFS
1651 test -z "$as_dir" && as_dir=.
1652 for ac_exec_ext in '' $ac_executable_extensions; do
1653 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1654 ac_cv_prog_CXX="$ac_prog"
1655 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1656 break 2
1657 fi
1658done
1659done
1660
Martin v. Löwis22352952000-12-13 17:37:02 +00001661fi
1662fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001663CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001664if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001665 echo "$as_me:$LINENO: result: $CXX" >&5
1666echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001667else
Martin v. Löwis11437992002-04-12 09:54:03 +00001668 echo "$as_me:$LINENO: result: no" >&5
1669echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001670fi
1671
Martin v. Löwis11437992002-04-12 09:54:03 +00001672 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001673done
1674test -n "$CXX" || CXX="notfound"
1675
1676 if test "$CXX" = "notfound"
1677 then
1678 CXX=
1679 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001680 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001681ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1685 cat >conftest.$ac_ext <<_ACEOF
1686#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001687/* confdefs.h. */
1688_ACEOF
1689cat confdefs.h >>conftest.$ac_ext
1690cat >>conftest.$ac_ext <<_ACEOF
1691/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001692
Martin v. Löwis11437992002-04-12 09:54:03 +00001693int
1694main ()
1695{
Michael W. Hudson54241132001-12-07 15:38:26 +00001696
Martin v. Löwis11437992002-04-12 09:54:03 +00001697 ;
1698 return 0;
1699}
1700_ACEOF
1701ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001702ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001703# Try to create an executable without -o first, disregard a.out.
1704# It will help us diagnose broken compilers, and finding out an intuition
1705# of exeext.
1706echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1707echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1708ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1709if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1710 (eval $ac_link_default) 2>&5
1711 ac_status=$?
1712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1713 (exit $ac_status); }; then
1714 # Find the output, starting from the most likely. This scheme is
1715# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1716# resort.
1717
1718# Be careful to initialize this variable, since it used to be cached.
1719# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1720ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001721# b.out is created by i960 compilers.
1722for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1723do
1724 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001726 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1727 ;;
1728 conftest.$ac_ext )
1729 # This is the source file.
1730 ;;
1731 [ab].out )
1732 # We found the default executable, but exeext='' is most
1733 # certainly right.
1734 break;;
1735 *.* )
1736 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1737 # FIXME: I believe we export ac_cv_exeext for Libtool,
1738 # but it would be cool to find out if it's true. Does anybody
1739 # maintain Libtool? --akim.
1740 export ac_cv_exeext
1741 break;;
1742 * )
1743 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 esac
1745done
1746else
1747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001748sed 's/^/| /' conftest.$ac_ext >&5
1749
1750{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1751See \`config.log' for more details." >&5
1752echo "$as_me: error: C++ compiler cannot create executables
1753See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001755fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001756
1757ac_exeext=$ac_cv_exeext
1758echo "$as_me:$LINENO: result: $ac_file" >&5
1759echo "${ECHO_T}$ac_file" >&6
1760
1761# Check the compiler produces executables we can run. If not, either
1762# the compiler is broken, or we cross compile.
1763echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1764echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1765# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1766# If not cross compiling, check that we can run a simple program.
1767if test "$cross_compiling" != yes; then
1768 if { ac_try='./$ac_file'
1769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1770 (eval $ac_try) 2>&5
1771 ac_status=$?
1772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1773 (exit $ac_status); }; }; then
1774 cross_compiling=no
1775 else
1776 if test "$cross_compiling" = maybe; then
1777 cross_compiling=yes
1778 else
1779 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001780If you meant to cross compile, use \`--host'.
1781See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001782echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001783If you meant to cross compile, use \`--host'.
1784See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001785 { (exit 1); exit 1; }; }
1786 fi
1787 fi
1788fi
1789echo "$as_me:$LINENO: result: yes" >&5
1790echo "${ECHO_T}yes" >&6
1791
Skip Montanaro6dead952003-09-25 14:50:04 +00001792rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001793ac_clean_files=$ac_clean_files_save
1794# Check the compiler produces executables we can run. If not, either
1795# the compiler is broken, or we cross compile.
1796echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1797echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1798echo "$as_me:$LINENO: result: $cross_compiling" >&5
1799echo "${ECHO_T}$cross_compiling" >&6
1800
1801echo "$as_me:$LINENO: checking for suffix of executables" >&5
1802echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1803if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1804 (eval $ac_link) 2>&5
1805 ac_status=$?
1806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1807 (exit $ac_status); }; then
1808 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1809# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1810# work properly (i.e., refer to `conftest.exe'), while it won't with
1811# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001812for ac_file in conftest.exe conftest conftest.*; do
1813 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001814 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001815 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001816 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1817 export ac_cv_exeext
1818 break;;
1819 * ) break;;
1820 esac
1821done
1822else
Skip Montanaro6dead952003-09-25 14:50:04 +00001823 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1824See \`config.log' for more details." >&5
1825echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1826See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001827 { (exit 1); exit 1; }; }
1828fi
1829
1830rm -f conftest$ac_cv_exeext
1831echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1832echo "${ECHO_T}$ac_cv_exeext" >&6
1833
1834rm -f conftest.$ac_ext
1835EXEEXT=$ac_cv_exeext
1836ac_exeext=$EXEEXT
1837
1838 ac_ext=c
1839ac_cpp='$CPP $CPPFLAGS'
1840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1842ac_compiler_gnu=$ac_cv_c_compiler_gnu
1843
1844
Martin v. Löwis22352952000-12-13 17:37:02 +00001845
1846 fi
1847fi
1848
Guido van Rossum8b131c51995-03-09 14:10:13 +00001849# If the user switches compilers, we can't believe the cache
1850if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1851then
Martin v. Löwis11437992002-04-12 09:54:03 +00001852 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1853(it is also a good idea to do 'make clean' before compiling)" >&5
1854echo "$as_me: error: cached CC is different -- throw away $cache_file
1855(it is also a good idea to do 'make clean' before compiling)" >&2;}
1856 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001857fi
1858
Martin v. Löwis11437992002-04-12 09:54:03 +00001859ac_ext=c
1860ac_cpp='$CPP $CPPFLAGS'
1861ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1862ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1863ac_compiler_gnu=$ac_cv_c_compiler_gnu
1864if test -n "$ac_tool_prefix"; then
1865 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1866set dummy ${ac_tool_prefix}gcc; ac_word=$2
1867echo "$as_me:$LINENO: checking for $ac_word" >&5
1868echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1869if test "${ac_cv_prog_CC+set}" = set; then
1870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001871else
1872 if test -n "$CC"; then
1873 ac_cv_prog_CC="$CC" # Let the user override the test.
1874else
Martin v. Löwis11437992002-04-12 09:54:03 +00001875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1876for as_dir in $PATH
1877do
1878 IFS=$as_save_IFS
1879 test -z "$as_dir" && as_dir=.
1880 for ac_exec_ext in '' $ac_executable_extensions; do
1881 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1882 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1883 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1884 break 2
1885 fi
1886done
1887done
1888
Jack Jansendd19cf82001-12-06 22:36:17 +00001889fi
1890fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001891CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001892if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001893 echo "$as_me:$LINENO: result: $CC" >&5
1894echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001895else
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 echo "$as_me:$LINENO: result: no" >&5
1897echo "${ECHO_T}no" >&6
1898fi
1899
1900fi
1901if test -z "$ac_cv_prog_CC"; then
1902 ac_ct_CC=$CC
1903 # Extract the first word of "gcc", so it can be a program name with args.
1904set dummy gcc; ac_word=$2
1905echo "$as_me:$LINENO: checking for $ac_word" >&5
1906echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1907if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1908 echo $ECHO_N "(cached) $ECHO_C" >&6
1909else
1910 if test -n "$ac_ct_CC"; then
1911 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1912else
1913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1914for as_dir in $PATH
1915do
1916 IFS=$as_save_IFS
1917 test -z "$as_dir" && as_dir=.
1918 for ac_exec_ext in '' $ac_executable_extensions; do
1919 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1920 ac_cv_prog_ac_ct_CC="gcc"
1921 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1922 break 2
1923 fi
1924done
1925done
1926
1927fi
1928fi
1929ac_ct_CC=$ac_cv_prog_ac_ct_CC
1930if test -n "$ac_ct_CC"; then
1931 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1932echo "${ECHO_T}$ac_ct_CC" >&6
1933else
1934 echo "$as_me:$LINENO: result: no" >&5
1935echo "${ECHO_T}no" >&6
1936fi
1937
1938 CC=$ac_ct_CC
1939else
1940 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001941fi
1942
Jack Jansendd19cf82001-12-06 22:36:17 +00001943if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001944 if test -n "$ac_tool_prefix"; then
1945 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1946set dummy ${ac_tool_prefix}cc; ac_word=$2
1947echo "$as_me:$LINENO: checking for $ac_word" >&5
1948echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1949if test "${ac_cv_prog_CC+set}" = set; then
1950 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001951else
1952 if test -n "$CC"; then
1953 ac_cv_prog_CC="$CC" # Let the user override the test.
1954else
Martin v. Löwis11437992002-04-12 09:54:03 +00001955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1956for as_dir in $PATH
1957do
1958 IFS=$as_save_IFS
1959 test -z "$as_dir" && as_dir=.
1960 for ac_exec_ext in '' $ac_executable_extensions; do
1961 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1962 ac_cv_prog_CC="${ac_tool_prefix}cc"
1963 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1964 break 2
1965 fi
1966done
1967done
1968
1969fi
1970fi
1971CC=$ac_cv_prog_CC
1972if test -n "$CC"; then
1973 echo "$as_me:$LINENO: result: $CC" >&5
1974echo "${ECHO_T}$CC" >&6
1975else
1976 echo "$as_me:$LINENO: result: no" >&5
1977echo "${ECHO_T}no" >&6
1978fi
1979
1980fi
1981if test -z "$ac_cv_prog_CC"; then
1982 ac_ct_CC=$CC
1983 # Extract the first word of "cc", so it can be a program name with args.
1984set dummy cc; ac_word=$2
1985echo "$as_me:$LINENO: checking for $ac_word" >&5
1986echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1987if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1988 echo $ECHO_N "(cached) $ECHO_C" >&6
1989else
1990 if test -n "$ac_ct_CC"; then
1991 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1992else
1993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1994for as_dir in $PATH
1995do
1996 IFS=$as_save_IFS
1997 test -z "$as_dir" && as_dir=.
1998 for ac_exec_ext in '' $ac_executable_extensions; do
1999 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2000 ac_cv_prog_ac_ct_CC="cc"
2001 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2002 break 2
2003 fi
2004done
2005done
2006
2007fi
2008fi
2009ac_ct_CC=$ac_cv_prog_ac_ct_CC
2010if test -n "$ac_ct_CC"; then
2011 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2012echo "${ECHO_T}$ac_ct_CC" >&6
2013else
2014 echo "$as_me:$LINENO: result: no" >&5
2015echo "${ECHO_T}no" >&6
2016fi
2017
2018 CC=$ac_ct_CC
2019else
2020 CC="$ac_cv_prog_CC"
2021fi
2022
2023fi
2024if test -z "$CC"; then
2025 # Extract the first word of "cc", so it can be a program name with args.
2026set dummy cc; ac_word=$2
2027echo "$as_me:$LINENO: checking for $ac_word" >&5
2028echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2029if test "${ac_cv_prog_CC+set}" = set; then
2030 echo $ECHO_N "(cached) $ECHO_C" >&6
2031else
2032 if test -n "$CC"; then
2033 ac_cv_prog_CC="$CC" # Let the user override the test.
2034else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002035 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2037for as_dir in $PATH
2038do
2039 IFS=$as_save_IFS
2040 test -z "$as_dir" && as_dir=.
2041 for ac_exec_ext in '' $ac_executable_extensions; do
2042 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2043 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2044 ac_prog_rejected=yes
2045 continue
2046 fi
2047 ac_cv_prog_CC="cc"
2048 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2049 break 2
2050 fi
2051done
2052done
2053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002054if test $ac_prog_rejected = yes; then
2055 # We found a bogon in the path, so make sure we never use it.
2056 set dummy $ac_cv_prog_CC
2057 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002058 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002059 # We chose a different compiler from the bogus one.
2060 # However, it has the same basename, so the bogon will be chosen
2061 # first if we set CC to just the basename; use the full file name.
2062 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002063 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002064 fi
2065fi
2066fi
2067fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002068CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002069if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002070 echo "$as_me:$LINENO: result: $CC" >&5
2071echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002072else
Martin v. Löwis11437992002-04-12 09:54:03 +00002073 echo "$as_me:$LINENO: result: no" >&5
2074echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002075fi
2076
Martin v. Löwis11437992002-04-12 09:54:03 +00002077fi
2078if test -z "$CC"; then
2079 if test -n "$ac_tool_prefix"; then
2080 for ac_prog in cl
2081 do
2082 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2083set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2084echo "$as_me:$LINENO: checking for $ac_word" >&5
2085echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2086if test "${ac_cv_prog_CC+set}" = set; then
2087 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002088else
2089 if test -n "$CC"; then
2090 ac_cv_prog_CC="$CC" # Let the user override the test.
2091else
Martin v. Löwis11437992002-04-12 09:54:03 +00002092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2093for as_dir in $PATH
2094do
2095 IFS=$as_save_IFS
2096 test -z "$as_dir" && as_dir=.
2097 for ac_exec_ext in '' $ac_executable_extensions; do
2098 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2099 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2100 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2101 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002102 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002103done
2104done
2105
2106fi
2107fi
2108CC=$ac_cv_prog_CC
2109if test -n "$CC"; then
2110 echo "$as_me:$LINENO: result: $CC" >&5
2111echo "${ECHO_T}$CC" >&6
2112else
2113 echo "$as_me:$LINENO: result: no" >&5
2114echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002115fi
2116
Martin v. Löwis11437992002-04-12 09:54:03 +00002117 test -n "$CC" && break
2118 done
2119fi
2120if test -z "$CC"; then
2121 ac_ct_CC=$CC
2122 for ac_prog in cl
2123do
2124 # Extract the first word of "$ac_prog", so it can be a program name with args.
2125set dummy $ac_prog; ac_word=$2
2126echo "$as_me:$LINENO: checking for $ac_word" >&5
2127echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2128if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2129 echo $ECHO_N "(cached) $ECHO_C" >&6
2130else
2131 if test -n "$ac_ct_CC"; then
2132 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2133else
2134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2135for as_dir in $PATH
2136do
2137 IFS=$as_save_IFS
2138 test -z "$as_dir" && as_dir=.
2139 for ac_exec_ext in '' $ac_executable_extensions; do
2140 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2141 ac_cv_prog_ac_ct_CC="$ac_prog"
2142 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2143 break 2
2144 fi
2145done
2146done
Jack Jansendd19cf82001-12-06 22:36:17 +00002147
Martin v. Löwis11437992002-04-12 09:54:03 +00002148fi
2149fi
2150ac_ct_CC=$ac_cv_prog_ac_ct_CC
2151if test -n "$ac_ct_CC"; then
2152 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2153echo "${ECHO_T}$ac_ct_CC" >&6
2154else
2155 echo "$as_me:$LINENO: result: no" >&5
2156echo "${ECHO_T}no" >&6
2157fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002158
Martin v. Löwis11437992002-04-12 09:54:03 +00002159 test -n "$ac_ct_CC" && break
2160done
Michael W. Hudson54241132001-12-07 15:38:26 +00002161
Martin v. Löwis11437992002-04-12 09:54:03 +00002162 CC=$ac_ct_CC
2163fi
2164
2165fi
2166
2167
Skip Montanaro6dead952003-09-25 14:50:04 +00002168test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2169See \`config.log' for more details." >&5
2170echo "$as_me: error: no acceptable C compiler found in \$PATH
2171See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002172 { (exit 1); exit 1; }; }
2173
2174# Provide some information about the compiler.
2175echo "$as_me:$LINENO:" \
2176 "checking for C compiler version" >&5
2177ac_compiler=`set X $ac_compile; echo $2`
2178{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2179 (eval $ac_compiler --version </dev/null >&5) 2>&5
2180 ac_status=$?
2181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182 (exit $ac_status); }
2183{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2184 (eval $ac_compiler -v </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
2194cat >conftest.$ac_ext <<_ACEOF
2195#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002196/* confdefs.h. */
2197_ACEOF
2198cat confdefs.h >>conftest.$ac_ext
2199cat >>conftest.$ac_ext <<_ACEOF
2200/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002201
Martin v. Löwis11437992002-04-12 09:54:03 +00002202int
2203main ()
2204{
2205
2206 ;
2207 return 0;
2208}
2209_ACEOF
2210ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002211ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002212# Try to create an executable without -o first, disregard a.out.
2213# It will help us diagnose broken compilers, and finding out an intuition
2214# of exeext.
2215echo "$as_me:$LINENO: checking for C compiler default output" >&5
2216echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2217ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2218if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2219 (eval $ac_link_default) 2>&5
2220 ac_status=$?
2221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2222 (exit $ac_status); }; then
2223 # Find the output, starting from the most likely. This scheme is
2224# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2225# resort.
2226
2227# Be careful to initialize this variable, since it used to be cached.
2228# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2229ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002230# b.out is created by i960 compilers.
2231for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2232do
2233 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002234 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002235 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2236 ;;
2237 conftest.$ac_ext )
2238 # This is the source file.
2239 ;;
2240 [ab].out )
2241 # We found the default executable, but exeext='' is most
2242 # certainly right.
2243 break;;
2244 *.* )
2245 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2246 # FIXME: I believe we export ac_cv_exeext for Libtool,
2247 # but it would be cool to find out if it's true. Does anybody
2248 # maintain Libtool? --akim.
2249 export ac_cv_exeext
2250 break;;
2251 * )
2252 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002253 esac
2254done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002255else
Martin v. Löwis11437992002-04-12 09:54:03 +00002256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002257sed 's/^/| /' conftest.$ac_ext >&5
2258
2259{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2260See \`config.log' for more details." >&5
2261echo "$as_me: error: C compiler cannot create executables
2262See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002263 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002264fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002265
Martin v. Löwis11437992002-04-12 09:54:03 +00002266ac_exeext=$ac_cv_exeext
2267echo "$as_me:$LINENO: result: $ac_file" >&5
2268echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002269
Martin v. Löwis11437992002-04-12 09:54:03 +00002270# Check the compiler produces executables we can run. If not, either
2271# the compiler is broken, or we cross compile.
2272echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2273echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2274# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2275# If not cross compiling, check that we can run a simple program.
2276if test "$cross_compiling" != yes; then
2277 if { ac_try='./$ac_file'
2278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2279 (eval $ac_try) 2>&5
2280 ac_status=$?
2281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2282 (exit $ac_status); }; }; then
2283 cross_compiling=no
2284 else
2285 if test "$cross_compiling" = maybe; then
2286 cross_compiling=yes
2287 else
2288 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002289If you meant to cross compile, use \`--host'.
2290See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002291echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002292If you meant to cross compile, use \`--host'.
2293See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002294 { (exit 1); exit 1; }; }
2295 fi
2296 fi
2297fi
2298echo "$as_me:$LINENO: result: yes" >&5
2299echo "${ECHO_T}yes" >&6
2300
Skip Montanaro6dead952003-09-25 14:50:04 +00002301rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002302ac_clean_files=$ac_clean_files_save
2303# Check the compiler produces executables we can run. If not, either
2304# the compiler is broken, or we cross compile.
2305echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2306echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2307echo "$as_me:$LINENO: result: $cross_compiling" >&5
2308echo "${ECHO_T}$cross_compiling" >&6
2309
2310echo "$as_me:$LINENO: checking for suffix of executables" >&5
2311echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2312if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2313 (eval $ac_link) 2>&5
2314 ac_status=$?
2315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2316 (exit $ac_status); }; then
2317 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2318# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2319# work properly (i.e., refer to `conftest.exe'), while it won't with
2320# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002321for ac_file in conftest.exe conftest conftest.*; do
2322 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002323 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002324 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002325 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2326 export ac_cv_exeext
2327 break;;
2328 * ) break;;
2329 esac
2330done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002331else
Skip Montanaro6dead952003-09-25 14:50:04 +00002332 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2333See \`config.log' for more details." >&5
2334echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2335See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002336 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002337fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002338
Martin v. Löwis11437992002-04-12 09:54:03 +00002339rm -f conftest$ac_cv_exeext
2340echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2341echo "${ECHO_T}$ac_cv_exeext" >&6
2342
2343rm -f conftest.$ac_ext
2344EXEEXT=$ac_cv_exeext
2345ac_exeext=$EXEEXT
2346echo "$as_me:$LINENO: checking for suffix of object files" >&5
2347echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2348if test "${ac_cv_objext+set}" = set; then
2349 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002350else
Martin v. Löwis11437992002-04-12 09:54:03 +00002351 cat >conftest.$ac_ext <<_ACEOF
2352#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002353/* confdefs.h. */
2354_ACEOF
2355cat confdefs.h >>conftest.$ac_ext
2356cat >>conftest.$ac_ext <<_ACEOF
2357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002358
Martin v. Löwis11437992002-04-12 09:54:03 +00002359int
2360main ()
2361{
2362
2363 ;
2364 return 0;
2365}
2366_ACEOF
2367rm -f conftest.o conftest.obj
2368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2369 (eval $ac_compile) 2>&5
2370 ac_status=$?
2371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2372 (exit $ac_status); }; then
2373 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2374 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002375 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002376 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2377 break;;
2378 esac
2379done
2380else
2381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002382sed 's/^/| /' conftest.$ac_ext >&5
2383
2384{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2385See \`config.log' for more details." >&5
2386echo "$as_me: error: cannot compute suffix of object files: cannot compile
2387See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002388 { (exit 1); exit 1; }; }
2389fi
2390
2391rm -f conftest.$ac_cv_objext conftest.$ac_ext
2392fi
2393echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2394echo "${ECHO_T}$ac_cv_objext" >&6
2395OBJEXT=$ac_cv_objext
2396ac_objext=$OBJEXT
2397echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2398echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2399if test "${ac_cv_c_compiler_gnu+set}" = set; then
2400 echo $ECHO_N "(cached) $ECHO_C" >&6
2401else
2402 cat >conftest.$ac_ext <<_ACEOF
2403#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002404/* confdefs.h. */
2405_ACEOF
2406cat confdefs.h >>conftest.$ac_ext
2407cat >>conftest.$ac_ext <<_ACEOF
2408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002409
Martin v. Löwis11437992002-04-12 09:54:03 +00002410int
2411main ()
2412{
2413#ifndef __GNUC__
2414 choke me
2415#endif
2416
2417 ;
2418 return 0;
2419}
2420_ACEOF
2421rm -f conftest.$ac_objext
2422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2423 (eval $ac_compile) 2>&5
2424 ac_status=$?
2425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2426 (exit $ac_status); } &&
2427 { ac_try='test -s conftest.$ac_objext'
2428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2429 (eval $ac_try) 2>&5
2430 ac_status=$?
2431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2432 (exit $ac_status); }; }; then
2433 ac_compiler_gnu=yes
2434else
2435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002436sed 's/^/| /' conftest.$ac_ext >&5
2437
Martin v. Löwis11437992002-04-12 09:54:03 +00002438ac_compiler_gnu=no
2439fi
2440rm -f conftest.$ac_objext conftest.$ac_ext
2441ac_cv_c_compiler_gnu=$ac_compiler_gnu
2442
2443fi
2444echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2445echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2446GCC=`test $ac_compiler_gnu = yes && echo yes`
2447ac_test_CFLAGS=${CFLAGS+set}
2448ac_save_CFLAGS=$CFLAGS
2449CFLAGS="-g"
2450echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2451echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2452if test "${ac_cv_prog_cc_g+set}" = set; then
2453 echo $ECHO_N "(cached) $ECHO_C" >&6
2454else
2455 cat >conftest.$ac_ext <<_ACEOF
2456#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002457/* confdefs.h. */
2458_ACEOF
2459cat confdefs.h >>conftest.$ac_ext
2460cat >>conftest.$ac_ext <<_ACEOF
2461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002462
Martin v. Löwis11437992002-04-12 09:54:03 +00002463int
2464main ()
2465{
2466
2467 ;
2468 return 0;
2469}
2470_ACEOF
2471rm -f conftest.$ac_objext
2472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2473 (eval $ac_compile) 2>&5
2474 ac_status=$?
2475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2476 (exit $ac_status); } &&
2477 { ac_try='test -s conftest.$ac_objext'
2478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2479 (eval $ac_try) 2>&5
2480 ac_status=$?
2481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2482 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002483 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002484else
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002486sed 's/^/| /' conftest.$ac_ext >&5
2487
Martin v. Löwis11437992002-04-12 09:54:03 +00002488ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002490rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002491fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002492echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2493echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002494if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002496elif test $ac_cv_prog_cc_g = yes; then
2497 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002498 CFLAGS="-g -O2"
2499 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002500 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002501 fi
2502else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002503 if test "$GCC" = yes; then
2504 CFLAGS="-O2"
2505 else
2506 CFLAGS=
2507 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002508fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002509echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2510echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2511if test "${ac_cv_prog_cc_stdc+set}" = set; then
2512 echo $ECHO_N "(cached) $ECHO_C" >&6
2513else
2514 ac_cv_prog_cc_stdc=no
2515ac_save_CC=$CC
2516cat >conftest.$ac_ext <<_ACEOF
2517#line $LINENO "configure"
2518/* confdefs.h. */
2519_ACEOF
2520cat confdefs.h >>conftest.$ac_ext
2521cat >>conftest.$ac_ext <<_ACEOF
2522/* end confdefs.h. */
2523#include <stdarg.h>
2524#include <stdio.h>
2525#include <sys/types.h>
2526#include <sys/stat.h>
2527/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2528struct buf { int x; };
2529FILE * (*rcsopen) (struct buf *, struct stat *, int);
2530static char *e (p, i)
2531 char **p;
2532 int i;
2533{
2534 return p[i];
2535}
2536static char *f (char * (*g) (char **, int), char **p, ...)
2537{
2538 char *s;
2539 va_list v;
2540 va_start (v,p);
2541 s = g (p, va_arg (v,int));
2542 va_end (v);
2543 return s;
2544}
2545int test (int i, double x);
2546struct s1 {int (*f) (int a);};
2547struct s2 {int (*f) (double a);};
2548int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2549int argc;
2550char **argv;
2551int
2552main ()
2553{
2554return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2555 ;
2556 return 0;
2557}
2558_ACEOF
2559# Don't try gcc -ansi; that turns off useful extensions and
2560# breaks some systems' header files.
2561# AIX -qlanglvl=ansi
2562# Ultrix and OSF/1 -std1
2563# HP-UX 10.20 and later -Ae
2564# HP-UX older versions -Aa -D_HPUX_SOURCE
2565# SVR4 -Xc -D__EXTENSIONS__
2566for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2567do
2568 CC="$ac_save_CC $ac_arg"
2569 rm -f conftest.$ac_objext
2570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2571 (eval $ac_compile) 2>&5
2572 ac_status=$?
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); } &&
2575 { ac_try='test -s conftest.$ac_objext'
2576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2577 (eval $ac_try) 2>&5
2578 ac_status=$?
2579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2580 (exit $ac_status); }; }; then
2581 ac_cv_prog_cc_stdc=$ac_arg
2582break
2583else
2584 echo "$as_me: failed program was:" >&5
2585sed 's/^/| /' conftest.$ac_ext >&5
2586
2587fi
2588rm -f conftest.$ac_objext
2589done
2590rm -f conftest.$ac_ext conftest.$ac_objext
2591CC=$ac_save_CC
2592
2593fi
2594
2595case "x$ac_cv_prog_cc_stdc" in
2596 x|xno)
2597 echo "$as_me:$LINENO: result: none needed" >&5
2598echo "${ECHO_T}none needed" >&6 ;;
2599 *)
2600 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2601echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2602 CC="$CC $ac_cv_prog_cc_stdc" ;;
2603esac
2604
Martin v. Löwis11437992002-04-12 09:54:03 +00002605# Some people use a C++ compiler to compile C. Since we use `exit',
2606# in C++ we need to declare it. In case someone uses the same compiler
2607# for both compiling C and C++ we need to have the C++ compiler decide
2608# the declaration of exit, since it's the most demanding environment.
2609cat >conftest.$ac_ext <<_ACEOF
2610#ifndef __cplusplus
2611 choke me
2612#endif
2613_ACEOF
2614rm -f conftest.$ac_objext
2615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2616 (eval $ac_compile) 2>&5
2617 ac_status=$?
2618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2619 (exit $ac_status); } &&
2620 { ac_try='test -s conftest.$ac_objext'
2621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2622 (eval $ac_try) 2>&5
2623 ac_status=$?
2624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2625 (exit $ac_status); }; }; then
2626 for ac_declaration in \
2627 ''\
2628 '#include <stdlib.h>' \
2629 'extern "C" void std::exit (int) throw (); using std::exit;' \
2630 'extern "C" void std::exit (int); using std::exit;' \
2631 'extern "C" void exit (int) throw ();' \
2632 'extern "C" void exit (int);' \
2633 'void exit (int);'
2634do
2635 cat >conftest.$ac_ext <<_ACEOF
2636#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002637/* confdefs.h. */
2638_ACEOF
2639cat confdefs.h >>conftest.$ac_ext
2640cat >>conftest.$ac_ext <<_ACEOF
2641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002642#include <stdlib.h>
2643$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002644int
2645main ()
2646{
2647exit (42);
2648 ;
2649 return 0;
2650}
2651_ACEOF
2652rm -f conftest.$ac_objext
2653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2654 (eval $ac_compile) 2>&5
2655 ac_status=$?
2656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2657 (exit $ac_status); } &&
2658 { ac_try='test -s conftest.$ac_objext'
2659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2660 (eval $ac_try) 2>&5
2661 ac_status=$?
2662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2663 (exit $ac_status); }; }; then
2664 :
2665else
2666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002667sed 's/^/| /' conftest.$ac_ext >&5
2668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669continue
2670fi
2671rm -f conftest.$ac_objext conftest.$ac_ext
2672 cat >conftest.$ac_ext <<_ACEOF
2673#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002674/* confdefs.h. */
2675_ACEOF
2676cat confdefs.h >>conftest.$ac_ext
2677cat >>conftest.$ac_ext <<_ACEOF
2678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002679$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002680int
2681main ()
2682{
2683exit (42);
2684 ;
2685 return 0;
2686}
2687_ACEOF
2688rm -f conftest.$ac_objext
2689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2690 (eval $ac_compile) 2>&5
2691 ac_status=$?
2692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2693 (exit $ac_status); } &&
2694 { ac_try='test -s conftest.$ac_objext'
2695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2696 (eval $ac_try) 2>&5
2697 ac_status=$?
2698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2699 (exit $ac_status); }; }; then
2700 break
2701else
2702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002703sed 's/^/| /' conftest.$ac_ext >&5
2704
Martin v. Löwis11437992002-04-12 09:54:03 +00002705fi
2706rm -f conftest.$ac_objext conftest.$ac_ext
2707done
2708rm -f conftest*
2709if test -n "$ac_declaration"; then
2710 echo '#ifdef __cplusplus' >>confdefs.h
2711 echo $ac_declaration >>confdefs.h
2712 echo '#endif' >>confdefs.h
2713fi
2714
2715else
2716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002717sed 's/^/| /' conftest.$ac_ext >&5
2718
Martin v. Löwis11437992002-04-12 09:54:03 +00002719fi
2720rm -f conftest.$ac_objext conftest.$ac_ext
2721ac_ext=c
2722ac_cpp='$CPP $CPPFLAGS'
2723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2725ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002727
2728# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002729
2730ac_ext=c
2731ac_cpp='$CPP $CPPFLAGS'
2732ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2733ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2734ac_compiler_gnu=$ac_cv_c_compiler_gnu
2735echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2736echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002737# On Suns, sometimes $CPP names a directory.
2738if test -n "$CPP" && test -d "$CPP"; then
2739 CPP=
2740fi
2741if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 if test "${ac_cv_prog_CPP+set}" = set; then
2743 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002744else
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 # Double quotes because CPP needs to be expanded
2746 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2747 do
2748 ac_preproc_ok=false
2749for ac_c_preproc_warn_flag in '' yes
2750do
2751 # Use a header file that comes with gcc, so configuring glibc
2752 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002753 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2754 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002755 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002756 # not just through cpp. "Syntax error" is here to catch this case.
2757 cat >conftest.$ac_ext <<_ACEOF
2758#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002759/* confdefs.h. */
2760_ACEOF
2761cat confdefs.h >>conftest.$ac_ext
2762cat >>conftest.$ac_ext <<_ACEOF
2763/* end confdefs.h. */
2764#ifdef __STDC__
2765# include <limits.h>
2766#else
2767# include <assert.h>
2768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 Syntax error
2770_ACEOF
2771if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2772 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2773 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002774 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 rm -f conftest.er1
2776 cat conftest.err >&5
2777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2778 (exit $ac_status); } >/dev/null; then
2779 if test -s conftest.err; then
2780 ac_cpp_err=$ac_c_preproc_warn_flag
2781 else
2782 ac_cpp_err=
2783 fi
2784else
2785 ac_cpp_err=yes
2786fi
2787if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002788 :
2789else
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002791sed 's/^/| /' conftest.$ac_ext >&5
2792
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 # Broken: fails on valid input.
2794continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002795fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002796rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002797
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 # OK, works on sane cases. Now check whether non-existent headers
2799 # can be detected and how.
2800 cat >conftest.$ac_ext <<_ACEOF
2801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002802/* confdefs.h. */
2803_ACEOF
2804cat confdefs.h >>conftest.$ac_ext
2805cat >>conftest.$ac_ext <<_ACEOF
2806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002807#include <ac_nonexistent.h>
2808_ACEOF
2809if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2810 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2811 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002812 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002813 rm -f conftest.er1
2814 cat conftest.err >&5
2815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2816 (exit $ac_status); } >/dev/null; then
2817 if test -s conftest.err; then
2818 ac_cpp_err=$ac_c_preproc_warn_flag
2819 else
2820 ac_cpp_err=
2821 fi
2822else
2823 ac_cpp_err=yes
2824fi
2825if test -z "$ac_cpp_err"; then
2826 # Broken: success on invalid input.
2827continue
2828else
2829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002830sed 's/^/| /' conftest.$ac_ext >&5
2831
Martin v. Löwis11437992002-04-12 09:54:03 +00002832 # Passes both tests.
2833ac_preproc_ok=:
2834break
2835fi
2836rm -f conftest.err conftest.$ac_ext
2837
2838done
2839# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2840rm -f conftest.err conftest.$ac_ext
2841if $ac_preproc_ok; then
2842 break
2843fi
2844
2845 done
2846 ac_cv_prog_CPP=$CPP
2847
2848fi
2849 CPP=$ac_cv_prog_CPP
2850else
2851 ac_cv_prog_CPP=$CPP
2852fi
2853echo "$as_me:$LINENO: result: $CPP" >&5
2854echo "${ECHO_T}$CPP" >&6
2855ac_preproc_ok=false
2856for ac_c_preproc_warn_flag in '' yes
2857do
2858 # Use a header file that comes with gcc, so configuring glibc
2859 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002860 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2861 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002862 # On the NeXT, cc -E runs the code through the compiler's parser,
2863 # not just through cpp. "Syntax error" is here to catch this case.
2864 cat >conftest.$ac_ext <<_ACEOF
2865#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002866/* confdefs.h. */
2867_ACEOF
2868cat confdefs.h >>conftest.$ac_ext
2869cat >>conftest.$ac_ext <<_ACEOF
2870/* end confdefs.h. */
2871#ifdef __STDC__
2872# include <limits.h>
2873#else
2874# include <assert.h>
2875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002876 Syntax error
2877_ACEOF
2878if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2879 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2880 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002881 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002882 rm -f conftest.er1
2883 cat conftest.err >&5
2884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2885 (exit $ac_status); } >/dev/null; then
2886 if test -s conftest.err; then
2887 ac_cpp_err=$ac_c_preproc_warn_flag
2888 else
2889 ac_cpp_err=
2890 fi
2891else
2892 ac_cpp_err=yes
2893fi
2894if test -z "$ac_cpp_err"; then
2895 :
2896else
2897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002898sed 's/^/| /' conftest.$ac_ext >&5
2899
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 # Broken: fails on valid input.
2901continue
2902fi
2903rm -f conftest.err conftest.$ac_ext
2904
2905 # OK, works on sane cases. Now check whether non-existent headers
2906 # can be detected and how.
2907 cat >conftest.$ac_ext <<_ACEOF
2908#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002909/* confdefs.h. */
2910_ACEOF
2911cat confdefs.h >>conftest.$ac_ext
2912cat >>conftest.$ac_ext <<_ACEOF
2913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002914#include <ac_nonexistent.h>
2915_ACEOF
2916if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2917 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2918 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002919 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002920 rm -f conftest.er1
2921 cat conftest.err >&5
2922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2923 (exit $ac_status); } >/dev/null; then
2924 if test -s conftest.err; then
2925 ac_cpp_err=$ac_c_preproc_warn_flag
2926 else
2927 ac_cpp_err=
2928 fi
2929else
2930 ac_cpp_err=yes
2931fi
2932if test -z "$ac_cpp_err"; then
2933 # Broken: success on invalid input.
2934continue
2935else
2936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002937sed 's/^/| /' conftest.$ac_ext >&5
2938
Martin v. Löwis11437992002-04-12 09:54:03 +00002939 # Passes both tests.
2940ac_preproc_ok=:
2941break
2942fi
2943rm -f conftest.err conftest.$ac_ext
2944
2945done
2946# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2947rm -f conftest.err conftest.$ac_ext
2948if $ac_preproc_ok; then
2949 :
2950else
Skip Montanaro6dead952003-09-25 14:50:04 +00002951 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2952See \`config.log' for more details." >&5
2953echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2954See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002955 { (exit 1); exit 1; }; }
2956fi
2957
2958ac_ext=c
2959ac_cpp='$CPP $CPPFLAGS'
2960ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2961ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2962ac_compiler_gnu=$ac_cv_c_compiler_gnu
2963
2964
Skip Montanaro6dead952003-09-25 14:50:04 +00002965echo "$as_me:$LINENO: checking for egrep" >&5
2966echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2967if test "${ac_cv_prog_egrep+set}" = set; then
2968 echo $ECHO_N "(cached) $ECHO_C" >&6
2969else
2970 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2971 then ac_cv_prog_egrep='grep -E'
2972 else ac_cv_prog_egrep='egrep'
2973 fi
2974fi
2975echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2976echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2977 EGREP=$ac_cv_prog_egrep
2978
2979
Martin v. Löwis11437992002-04-12 09:54:03 +00002980
2981echo "$as_me:$LINENO: checking for AIX" >&5
2982echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2983cat >conftest.$ac_ext <<_ACEOF
2984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002985/* confdefs.h. */
2986_ACEOF
2987cat confdefs.h >>conftest.$ac_ext
2988cat >>conftest.$ac_ext <<_ACEOF
2989/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002990#ifdef _AIX
2991 yes
2992#endif
2993
Martin v. Löwis11437992002-04-12 09:54:03 +00002994_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002996 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002997 echo "$as_me:$LINENO: result: yes" >&5
2998echo "${ECHO_T}yes" >&6
2999cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003001_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003002
3003else
Martin v. Löwis11437992002-04-12 09:54:03 +00003004 echo "$as_me:$LINENO: result: no" >&5
3005echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003006fi
3007rm -f conftest*
3008
Michael W. Hudson54241132001-12-07 15:38:26 +00003009
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003010
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003011# Check for unsupported systems
3012case $ac_sys_system/$ac_sys_release in
3013SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3014 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3015 echo See README for details.
3016 exit 1;;
3017esac
3018
Michael W. Hudson54241132001-12-07 15:38:26 +00003019
Martin v. Löwis11437992002-04-12 09:54:03 +00003020echo "$as_me:$LINENO: checking for --with-suffix" >&5
3021echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003022
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003023# Check whether --with-suffix or --without-suffix was given.
3024if test "${with_suffix+set}" = set; then
3025 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003026
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003027 case $withval in
3028 no) EXEEXT=;;
3029 yes) EXEEXT=.exe;;
3030 *) EXEEXT=$withval;;
3031 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003032fi;
3033echo "$as_me:$LINENO: result: $EXEEXT" >&5
3034echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003035
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003036# Test whether we're running on a non-case-sensitive system, in which
3037# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003038
Martin v. Löwis11437992002-04-12 09:54:03 +00003039echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3040echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003041if test ! -d CaseSensitiveTestDir; then
3042mkdir CaseSensitiveTestDir
3043fi
3044
3045if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003046then
Martin v. Löwis11437992002-04-12 09:54:03 +00003047 echo "$as_me:$LINENO: result: yes" >&5
3048echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003049 BUILDEXEEXT=.exe
3050else
Martin v. Löwis11437992002-04-12 09:54:03 +00003051 echo "$as_me:$LINENO: result: no" >&5
3052echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003053 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003054fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003055rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003056
Guido van Rossumdd997f71998-10-07 19:58:26 +00003057case $MACHDEP in
3058bsdos*)
3059 case $CC in
3060 gcc) CC="$CC -D_HAVE_BSDI";;
3061 esac;;
3062esac
3063
Guido van Rossum24b1e751997-08-21 02:29:16 +00003064case $ac_sys_system in
3065hp*|HP*)
3066 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003067 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003068 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003069Monterey*)
3070 case $CC in
3071 cc) CC="$CC -Wl,-Bexport";;
3072 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003073SunOS*)
3074 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003075
3076cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003077#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003078_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003079
3080 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003081esac
3082
Michael W. Hudson54241132001-12-07 15:38:26 +00003083
3084
Martin v. Löwis11437992002-04-12 09:54:03 +00003085echo "$as_me:$LINENO: checking LIBRARY" >&5
3086echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003087if test -z "$LIBRARY"
3088then
3089 LIBRARY='libpython$(VERSION).a'
3090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003091echo "$as_me:$LINENO: result: $LIBRARY" >&5
3092echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003093
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003094# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003095# name of the library into which to insert object files). BLDLIBRARY is also
3096# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3097# is blank as the main program is not linked directly against LDLIBRARY.
3098# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3099# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3100# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3101# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003102#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003103# RUNSHARED is used to run shared python without installed libraries
3104#
3105# INSTSONAME is the name of the shared library that will be use to install
3106# on the system - some systems like version suffix, others don't
3107
3108
Michael W. Hudson54241132001-12-07 15:38:26 +00003109
3110
3111
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003112
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003113LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003114BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003115INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003116DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003117LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003118RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003119
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003120# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003121# If CXX is set, and if it is needed to link a main function that was
3122# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3123# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003124# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003125# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003126
Martin v. Löwis11437992002-04-12 09:54:03 +00003127echo "$as_me:$LINENO: checking LINKCC" >&5
3128echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003129if test -z "$LINKCC"
3130then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003131 if test -z "$CXX"; then
3132 LINKCC="\$(PURIFY) \$(CC)"
3133 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003134 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003135 $CXX -c conftest.$ac_ext 2>&5
3136 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3137 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3138 then
3139 LINKCC="\$(PURIFY) \$(CC)"
3140 else
3141 LINKCC="\$(PURIFY) \$(CXX)"
3142 fi
3143 rm -fr conftest*
3144 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003145 case $ac_sys_system in
3146 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003147 exp_extra="\"\""
3148 if test $ac_sys_release -ge 5 -o \
3149 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3150 exp_extra="."
3151 fi
3152 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003153 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003154 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003155 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003156 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003157 esac
3158fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003159echo "$as_me:$LINENO: result: $LINKCC" >&5
3160echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003161
Martin v. Löwis11437992002-04-12 09:54:03 +00003162echo "$as_me:$LINENO: checking for --enable-shared" >&5
3163echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003164# Check whether --enable-shared or --disable-shared was given.
3165if test "${enable_shared+set}" = set; then
3166 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003167
Martin v. Löwis11437992002-04-12 09:54:03 +00003168fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003169
3170if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003171then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003172 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003173 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003174 enable_shared="yes";;
3175 *)
3176 enable_shared="no";;
3177 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003179echo "$as_me:$LINENO: result: $enable_shared" >&5
3180echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003181
3182
Martin v. Löwis11437992002-04-12 09:54:03 +00003183echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3184echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003185
Guido van Rossumb8552162001-09-05 14:58:11 +00003186# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3187# library that we build, but we do not want to link against it (we
3188# will find it with a -framework option). For this reason there is an
3189# extra variable BLDLIBRARY against which Python and the extension
3190# modules are linked, BLDLIBRARY. This is normally the same as
3191# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003192if test "$enable_framework"
3193then
3194 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003195 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003196 BLDLIBRARY=''
3197else
3198 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003199fi
Jack Jansene578a632001-08-15 01:27:14 +00003200
Martin v. Löwis1142de32002-03-29 16:28:31 +00003201# Other platforms follow
3202if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003203
3204cat >>confdefs.h <<\_ACEOF
3205#define Py_ENABLE_SHARED 1
3206_ACEOF
3207
Martin v. Löwis1142de32002-03-29 16:28:31 +00003208 case $ac_sys_system in
3209 BeOS*)
3210 LDLIBRARY='libpython$(VERSION).so'
3211 ;;
3212 CYGWIN*)
3213 LDLIBRARY='libpython$(VERSION).dll.a'
3214 DLLLIBRARY='libpython$(VERSION).dll'
3215 ;;
3216 SunOS*)
3217 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003218 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003219 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003220 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003221 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003222 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003223 LDLIBRARY='libpython$(VERSION).so'
3224 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003225 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003226 INSTSONAME="$LDLIBRARY".$SOVERSION
3227 ;;
3228 hp*|HP*)
3229 LDLIBRARY='libpython$(VERSION).sl'
3230 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003231 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003232 ;;
3233 OSF*)
3234 LDLIBRARY='libpython$(VERSION).so'
3235 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003236 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003237 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003238 atheos*)
3239 LDLIBRARY='libpython$(VERSION).so'
3240 BLDLIBRARY='-L. -lpython$(VERSION)'
3241 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3242 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003243 esac
3244 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3245 case $MACHDEP in
3246 dguxR4)
3247 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003248 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003249 ;;
3250 esac
Jason Tishler30765592003-09-04 11:04:06 +00003251else # shared is disabled
3252 case $ac_sys_system in
3253 CYGWIN*)
3254 BLDLIBRARY='$(LIBRARY)'
3255 LDLIBRARY='libpython$(VERSION).dll.a'
3256 ;;
3257 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003258fi
3259
Martin v. Löwis11437992002-04-12 09:54:03 +00003260echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3261echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003262
Martin v. Löwis11437992002-04-12 09:54:03 +00003263if test -n "$ac_tool_prefix"; then
3264 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3265set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3266echo "$as_me:$LINENO: checking for $ac_word" >&5
3267echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3268if test "${ac_cv_prog_RANLIB+set}" = set; then
3269 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003270else
3271 if test -n "$RANLIB"; then
3272 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3273else
Martin v. Löwis11437992002-04-12 09:54:03 +00003274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3275for as_dir in $PATH
3276do
3277 IFS=$as_save_IFS
3278 test -z "$as_dir" && as_dir=.
3279 for ac_exec_ext in '' $ac_executable_extensions; do
3280 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3281 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3282 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3283 break 2
3284 fi
3285done
3286done
3287
Guido van Rossum627b2d71993-12-24 10:39:16 +00003288fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003289fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003290RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003291if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003292 echo "$as_me:$LINENO: result: $RANLIB" >&5
3293echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003294else
Martin v. Löwis11437992002-04-12 09:54:03 +00003295 echo "$as_me:$LINENO: result: no" >&5
3296echo "${ECHO_T}no" >&6
3297fi
3298
3299fi
3300if test -z "$ac_cv_prog_RANLIB"; then
3301 ac_ct_RANLIB=$RANLIB
3302 # Extract the first word of "ranlib", so it can be a program name with args.
3303set dummy ranlib; ac_word=$2
3304echo "$as_me:$LINENO: checking for $ac_word" >&5
3305echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3306if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3307 echo $ECHO_N "(cached) $ECHO_C" >&6
3308else
3309 if test -n "$ac_ct_RANLIB"; then
3310 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3311else
3312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3313for as_dir in $PATH
3314do
3315 IFS=$as_save_IFS
3316 test -z "$as_dir" && as_dir=.
3317 for ac_exec_ext in '' $ac_executable_extensions; do
3318 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3319 ac_cv_prog_ac_ct_RANLIB="ranlib"
3320 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3321 break 2
3322 fi
3323done
3324done
3325
3326 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3327fi
3328fi
3329ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3330if test -n "$ac_ct_RANLIB"; then
3331 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3332echo "${ECHO_T}$ac_ct_RANLIB" >&6
3333else
3334 echo "$as_me:$LINENO: result: no" >&5
3335echo "${ECHO_T}no" >&6
3336fi
3337
3338 RANLIB=$ac_ct_RANLIB
3339else
3340 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003341fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003342
3343
Guido van Rossum7f43da71994-08-01 12:15:30 +00003344for ac_prog in ar aal
3345do
Martin v. Löwis11437992002-04-12 09:54:03 +00003346 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003347set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003348echo "$as_me:$LINENO: checking for $ac_word" >&5
3349echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3350if test "${ac_cv_prog_AR+set}" = set; then
3351 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003352else
3353 if test -n "$AR"; then
3354 ac_cv_prog_AR="$AR" # Let the user override the test.
3355else
Martin v. Löwis11437992002-04-12 09:54:03 +00003356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3357for as_dir in $PATH
3358do
3359 IFS=$as_save_IFS
3360 test -z "$as_dir" && as_dir=.
3361 for ac_exec_ext in '' $ac_executable_extensions; do
3362 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3363 ac_cv_prog_AR="$ac_prog"
3364 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3365 break 2
3366 fi
3367done
3368done
3369
Guido van Rossum7f43da71994-08-01 12:15:30 +00003370fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003371fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003372AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003373if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003374 echo "$as_me:$LINENO: result: $AR" >&5
3375echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003376else
Martin v. Löwis11437992002-04-12 09:54:03 +00003377 echo "$as_me:$LINENO: result: no" >&5
3378echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003379fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003380
Martin v. Löwis11437992002-04-12 09:54:03 +00003381 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003382done
3383test -n "$AR" || AR="ar"
3384
Michael W. Hudson54241132001-12-07 15:38:26 +00003385
Neil Schemenauera42c8272001-03-31 00:01:55 +00003386case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003387bsdos*|hp*|HP*)
3388 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003389 if test -z "$INSTALL"
3390 then
3391 INSTALL="${srcdir}/install-sh -c"
3392 fi
3393esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003394ac_aux_dir=
3395for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3396 if test -f $ac_dir/install-sh; then
3397 ac_aux_dir=$ac_dir
3398 ac_install_sh="$ac_aux_dir/install-sh -c"
3399 break
3400 elif test -f $ac_dir/install.sh; then
3401 ac_aux_dir=$ac_dir
3402 ac_install_sh="$ac_aux_dir/install.sh -c"
3403 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003404 elif test -f $ac_dir/shtool; then
3405 ac_aux_dir=$ac_dir
3406 ac_install_sh="$ac_aux_dir/shtool install -c"
3407 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003408 fi
3409done
3410if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3412echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3413 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003414fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003415ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3416ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3417ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003418
3419# Find a good install program. We prefer a C program (faster),
3420# so one script is as good as another. But avoid the broken or
3421# incompatible versions:
3422# SysV /etc/install, /usr/sbin/install
3423# SunOS /usr/etc/install
3424# IRIX /sbin/install
3425# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003426# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003427# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3428# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3429# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3430# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003431echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3432echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003433if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003434if test "${ac_cv_path_install+set}" = set; then
3435 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003436else
Martin v. Löwis11437992002-04-12 09:54:03 +00003437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3438for as_dir in $PATH
3439do
3440 IFS=$as_save_IFS
3441 test -z "$as_dir" && as_dir=.
3442 # Account for people who put trailing slashes in PATH elements.
3443case $as_dir/ in
3444 ./ | .// | /cC/* | \
3445 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3446 /usr/ucb/* ) ;;
3447 *)
3448 # OSF1 and SCO ODT 3.0 have their own names for install.
3449 # Don't use installbsd from OSF since it installs stuff as root
3450 # by default.
3451 for ac_prog in ginstall scoinst install; do
3452 for ac_exec_ext in '' $ac_executable_extensions; do
3453 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3454 if test $ac_prog = install &&
3455 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3456 # AIX install. It has an incompatible calling convention.
3457 :
3458 elif test $ac_prog = install &&
3459 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3460 # program-specific install script used by HP pwplus--don't use.
3461 :
3462 else
3463 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3464 break 3
3465 fi
3466 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003467 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 done
3469 ;;
3470esac
3471done
3472
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003473
3474fi
3475 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003477 else
3478 # As a last resort, use the slow shell script. We don't cache a
3479 # path for INSTALL within a source directory, because that will
3480 # break other packages using the cache if that directory is
3481 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003483 fi
3484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003485echo "$as_me:$LINENO: result: $INSTALL" >&5
3486echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003487
3488# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3489# It thinks the first close brace ends the variable substitution.
3490test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3491
Martin v. Löwis11437992002-04-12 09:54:03 +00003492test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003493
3494test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3495
Michael W. Hudson54241132001-12-07 15:38:26 +00003496
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003497# Not every filesystem supports hard links
3498
3499if test -z "$LN" ; then
3500 case $ac_sys_system in
3501 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003502 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003503 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003504 *) LN=ln;;
3505 esac
3506fi
3507
Fred Drake109d9862001-07-11 06:27:56 +00003508# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003509echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3510echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3511
Fred Drake109d9862001-07-11 06:27:56 +00003512# Check whether --with-pydebug or --without-pydebug was given.
3513if test "${with_pydebug+set}" = set; then
3514 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003515
Fred Drake109d9862001-07-11 06:27:56 +00003516if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003517then
3518
3519cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003520#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003521_ACEOF
3522
3523 echo "$as_me:$LINENO: result: yes" >&5
3524echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003525 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003526else echo "$as_me:$LINENO: result: no" >&5
3527echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003528fi
3529else
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 echo "$as_me:$LINENO: result: no" >&5
3531echo "${ECHO_T}no" >&6
3532fi;
Fred Drake109d9862001-07-11 06:27:56 +00003533
Skip Montanarodecc6a42003-01-01 20:07:49 +00003534# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3535# merged with this chunk of code?
3536
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003537# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003538# ------------------------
3539# (The following bit of code is complicated enough - please keep things
3540# indented properly. Just pretend you're editing Python code. ;-)
3541
3542# There are two parallel sets of case statements below, one that checks to
3543# see if OPT was set and one that does BASECFLAGS setting based upon
3544# compiler and platform. BASECFLAGS tweaks need to be made even if the
3545# user set OPT.
3546
3547# tweak OPT based on compiler and platform, only if the user didn't set
3548# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003549
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003550if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003551then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003552 case $GCC in
3553 yes)
3554 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003555 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003556 if test "$Py_DEBUG" = 'true' ; then
3557 # Optimization messes up debuggers, so turn it off for
3558 # debug builds.
3559 OPT="-g -Wall -Wstrict-prototypes"
3560 else
3561 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003562 fi
3563 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003564 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003565 OPT="-O3 -Wall -Wstrict-prototypes"
3566 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003567 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003568 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003569 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3570 ;;
3571 esac
Fred Drake109d9862001-07-11 06:27:56 +00003572 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003573
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003574 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003575 OPT="-O"
3576 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003577 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003578
3579 # The current (beta) Monterey compiler dies with optimizations
3580 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003581 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003582 Monterey*)
3583 OPT=""
3584 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003585 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003586
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003587fi
3588
Skip Montanarodecc6a42003-01-01 20:07:49 +00003589
3590# tweak BASECFLAGS based on compiler and platform
3591case $GCC in
3592yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003593 # Python violates C99 rules, by casting between incompatible
3594 # pointer types. GCC may generate bad code as a result of that,
3595 # so use -fno-strict-aliasing if supported.
3596 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3597echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3598 ac_save_cc="$CC"
3599 CC="$CC -fno-strict-aliasing"
3600 if test "$cross_compiling" = yes; then
3601 ac_cv_no_strict_aliasing_ok=no
3602else
3603 cat >conftest.$ac_ext <<_ACEOF
3604#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003605/* confdefs.h. */
3606_ACEOF
3607cat confdefs.h >>conftest.$ac_ext
3608cat >>conftest.$ac_ext <<_ACEOF
3609/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003610int main() { return 0; }
3611_ACEOF
3612rm -f conftest$ac_exeext
3613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3614 (eval $ac_link) 2>&5
3615 ac_status=$?
3616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3617 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3619 (eval $ac_try) 2>&5
3620 ac_status=$?
3621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3622 (exit $ac_status); }; }; then
3623 ac_cv_no_strict_aliasing_ok=yes
3624else
3625 echo "$as_me: program exited with status $ac_status" >&5
3626echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003627sed 's/^/| /' conftest.$ac_ext >&5
3628
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003629( exit $ac_status )
3630ac_cv_no_strict_aliasing_ok=no
3631fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003632rm -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 +00003633fi
3634 CC="$ac_save_cc"
3635 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3636echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3637 if test $ac_cv_no_strict_aliasing_ok = yes
3638 then
3639 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3640 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003641 case $ac_sys_system in
3642 SCO_SV*)
3643 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3644 ;;
3645 # is there any other compiler on Darwin besides gcc?
3646 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003647 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003648 ;;
3649 esac
3650 ;;
3651
3652*)
3653 case $ac_sys_system in
3654 OpenUNIX*|UnixWare*)
3655 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3656 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003657 OSF*)
3658 BASECFLAGS="$BASECFLAGS -ieee -std"
3659 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003660 SCO_SV*)
3661 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3662 ;;
3663 esac
3664 ;;
3665esac
3666
Fred Drakee1ceaa02001-12-04 20:55:47 +00003667if test "$Py_DEBUG" = 'true'; then
3668 :
3669else
3670 OPT="-DNDEBUG $OPT"
3671fi
3672
Guido van Rossum563e7081996-09-10 18:20:48 +00003673if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003674then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003675 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003676fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003677
Martin v. Löwis11437992002-04-12 09:54:03 +00003678echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3679echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3680if test "${ac_cv_opt_olimit_ok+set}" = set; then
3681 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003682else
3683 ac_save_cc="$CC"
3684CC="$CC -OPT:Olimit=0"
3685if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003686 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003687else
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 cat >conftest.$ac_ext <<_ACEOF
3689#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003690/* confdefs.h. */
3691_ACEOF
3692cat confdefs.h >>conftest.$ac_ext
3693cat >>conftest.$ac_ext <<_ACEOF
3694/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003695int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003696_ACEOF
3697rm -f conftest$ac_exeext
3698if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3699 (eval $ac_link) 2>&5
3700 ac_status=$?
3701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3702 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3704 (eval $ac_try) 2>&5
3705 ac_status=$?
3706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3707 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003708 ac_cv_opt_olimit_ok=yes
3709else
Martin v. Löwis11437992002-04-12 09:54:03 +00003710 echo "$as_me: program exited with status $ac_status" >&5
3711echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003712sed 's/^/| /' conftest.$ac_ext >&5
3713
Martin v. Löwis11437992002-04-12 09:54:03 +00003714( exit $ac_status )
3715ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003716fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003717rm -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 +00003718fi
Guido van Rossum91922671997-10-09 20:24:13 +00003719CC="$ac_save_cc"
3720fi
3721
Martin v. Löwis11437992002-04-12 09:54:03 +00003722echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3723echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003724if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003725 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003726 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3727 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3728 # environment?
3729 Darwin*)
3730 ;;
3731 *)
3732 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3733 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003734 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003735else
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3737echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3738 if test "${ac_cv_olimit_ok+set}" = set; then
3739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003740else
3741 ac_save_cc="$CC"
3742 CC="$CC -Olimit 1500"
3743 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003744 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003745else
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 cat >conftest.$ac_ext <<_ACEOF
3747#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003748/* confdefs.h. */
3749_ACEOF
3750cat confdefs.h >>conftest.$ac_ext
3751cat >>conftest.$ac_ext <<_ACEOF
3752/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003753int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003754_ACEOF
3755rm -f conftest$ac_exeext
3756if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3757 (eval $ac_link) 2>&5
3758 ac_status=$?
3759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3760 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3762 (eval $ac_try) 2>&5
3763 ac_status=$?
3764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3765 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003766 ac_cv_olimit_ok=yes
3767else
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 echo "$as_me: program exited with status $ac_status" >&5
3769echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003770sed 's/^/| /' conftest.$ac_ext >&5
3771
Martin v. Löwis11437992002-04-12 09:54:03 +00003772( exit $ac_status )
3773ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003774fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003775rm -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 +00003776fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003777 CC="$ac_save_cc"
3778fi
3779
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3781echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003782 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003783 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003784 fi
3785fi
3786
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003787# On some compilers, pthreads are available without further options
3788# (e.g. MacOS X). On some of these systems, the compiler will not
3789# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3790# So we have to see first whether pthreads are available without
3791# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003792echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3793echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3794if test "${ac_cv_pthread_is_default+set}" = set; then
3795 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003796else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003797 if test "$cross_compiling" = yes; then
3798 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003799else
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 cat >conftest.$ac_ext <<_ACEOF
3801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003802/* confdefs.h. */
3803_ACEOF
3804cat confdefs.h >>conftest.$ac_ext
3805cat >>conftest.$ac_ext <<_ACEOF
3806/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003807
Martin v. Löwis130fb172001-07-19 11:00:41 +00003808#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003809
3810void* routine(void* p){return NULL;}
3811
3812int main(){
3813 pthread_t p;
3814 if(pthread_create(&p,NULL,routine,NULL)!=0)
3815 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003816 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003817 return 0;
3818}
3819
Martin v. Löwis11437992002-04-12 09:54:03 +00003820_ACEOF
3821rm -f conftest$ac_exeext
3822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3823 (eval $ac_link) 2>&5
3824 ac_status=$?
3825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3826 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3828 (eval $ac_try) 2>&5
3829 ac_status=$?
3830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3831 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003832
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003833 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003834 ac_cv_kthread=no
3835 ac_cv_pthread=no
3836
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003837else
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 echo "$as_me: program exited with status $ac_status" >&5
3839echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003840sed 's/^/| /' conftest.$ac_ext >&5
3841
Martin v. Löwis11437992002-04-12 09:54:03 +00003842( exit $ac_status )
3843ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003844fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003845rm -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 +00003846fi
3847
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003848fi
3849
Martin v. Löwis11437992002-04-12 09:54:03 +00003850echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3851echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003852
Michael W. Hudson54241132001-12-07 15:38:26 +00003853
Martin v. Löwis11437992002-04-12 09:54:03 +00003854if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003855then
3856 ac_cv_kpthread=no
3857else
3858# -Kpthread, if available, provides the right #defines
3859# and linker options to make pthread_create available
3860# Some compilers won't report that they do not support -Kpthread,
3861# so we need to run a program to see whether it really made the
3862# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003863echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3864echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3865if test "${ac_cv_kpthread+set}" = set; then
3866 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003867else
3868 ac_save_cc="$CC"
3869CC="$CC -Kpthread"
3870if test "$cross_compiling" = yes; then
3871 ac_cv_kpthread=no
3872else
Martin v. Löwis11437992002-04-12 09:54:03 +00003873 cat >conftest.$ac_ext <<_ACEOF
3874#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003875/* confdefs.h. */
3876_ACEOF
3877cat confdefs.h >>conftest.$ac_ext
3878cat >>conftest.$ac_ext <<_ACEOF
3879/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003880
3881#include <pthread.h>
3882
3883void* routine(void* p){return NULL;}
3884
3885int main(){
3886 pthread_t p;
3887 if(pthread_create(&p,NULL,routine,NULL)!=0)
3888 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003889 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003890 return 0;
3891}
3892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893_ACEOF
3894rm -f conftest$ac_exeext
3895if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3896 (eval $ac_link) 2>&5
3897 ac_status=$?
3898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3899 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3901 (eval $ac_try) 2>&5
3902 ac_status=$?
3903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3904 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003905 ac_cv_kpthread=yes
3906else
Martin v. Löwis11437992002-04-12 09:54:03 +00003907 echo "$as_me: program exited with status $ac_status" >&5
3908echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003909sed 's/^/| /' conftest.$ac_ext >&5
3910
Martin v. Löwis11437992002-04-12 09:54:03 +00003911( exit $ac_status )
3912ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003913fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003914rm -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 +00003915fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003916CC="$ac_save_cc"
3917fi
3918
Martin v. Löwis11437992002-04-12 09:54:03 +00003919echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3920echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003921fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003922
Skip Montanarod8d39a02003-07-10 20:44:10 +00003923if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003924then
3925# -Kthread, if available, provides the right #defines
3926# and linker options to make pthread_create available
3927# Some compilers won't report that they do not support -Kthread,
3928# so we need to run a program to see whether it really made the
3929# function available.
3930echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3931echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3932if test "${ac_cv_kthread+set}" = set; then
3933 echo $ECHO_N "(cached) $ECHO_C" >&6
3934else
3935 ac_save_cc="$CC"
3936CC="$CC -Kthread"
3937if test "$cross_compiling" = yes; then
3938 ac_cv_kthread=no
3939else
3940 cat >conftest.$ac_ext <<_ACEOF
3941#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003942/* confdefs.h. */
3943_ACEOF
3944cat confdefs.h >>conftest.$ac_ext
3945cat >>conftest.$ac_ext <<_ACEOF
3946/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003947
3948#include <pthread.h>
3949
3950void* routine(void* p){return NULL;}
3951
3952int main(){
3953 pthread_t p;
3954 if(pthread_create(&p,NULL,routine,NULL)!=0)
3955 return 1;
3956 (void)pthread_detach(p);
3957 return 0;
3958}
3959
3960_ACEOF
3961rm -f conftest$ac_exeext
3962if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3963 (eval $ac_link) 2>&5
3964 ac_status=$?
3965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3966 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3968 (eval $ac_try) 2>&5
3969 ac_status=$?
3970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3971 (exit $ac_status); }; }; then
3972 ac_cv_kthread=yes
3973else
3974 echo "$as_me: program exited with status $ac_status" >&5
3975echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003976sed 's/^/| /' conftest.$ac_ext >&5
3977
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003978( exit $ac_status )
3979ac_cv_kthread=no
3980fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003981rm -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 +00003982fi
3983CC="$ac_save_cc"
3984fi
3985
3986echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3987echo "${ECHO_T}$ac_cv_kthread" >&6
3988fi
3989
Skip Montanarod8d39a02003-07-10 20:44:10 +00003990if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003991then
3992# -pthread, if available, provides the right #defines
3993# and linker options to make pthread_create available
3994# Some compilers won't report that they do not support -pthread,
3995# so we need to run a program to see whether it really made the
3996# function available.
3997echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3998echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3999if test "${ac_cv_thread+set}" = set; then
4000 echo $ECHO_N "(cached) $ECHO_C" >&6
4001else
4002 ac_save_cc="$CC"
4003CC="$CC -pthread"
4004if test "$cross_compiling" = yes; then
4005 ac_cv_pthread=no
4006else
4007 cat >conftest.$ac_ext <<_ACEOF
4008#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004009/* confdefs.h. */
4010_ACEOF
4011cat confdefs.h >>conftest.$ac_ext
4012cat >>conftest.$ac_ext <<_ACEOF
4013/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004014
4015#include <pthread.h>
4016
4017void* routine(void* p){return NULL;}
4018
4019int main(){
4020 pthread_t p;
4021 if(pthread_create(&p,NULL,routine,NULL)!=0)
4022 return 1;
4023 (void)pthread_detach(p);
4024 return 0;
4025}
4026
4027_ACEOF
4028rm -f conftest$ac_exeext
4029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4030 (eval $ac_link) 2>&5
4031 ac_status=$?
4032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4033 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4035 (eval $ac_try) 2>&5
4036 ac_status=$?
4037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4038 (exit $ac_status); }; }; then
4039 ac_cv_pthread=yes
4040else
4041 echo "$as_me: program exited with status $ac_status" >&5
4042echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004043sed 's/^/| /' conftest.$ac_ext >&5
4044
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004045( exit $ac_status )
4046ac_cv_pthread=no
4047fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004048rm -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 +00004049fi
4050CC="$ac_save_cc"
4051fi
4052
4053echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4054echo "${ECHO_T}$ac_cv_pthread" >&6
4055fi
4056
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004057# If we have set a CC compiler flag for thread support then
4058# check if it works for CXX, too.
4059ac_cv_cxx_thread=no
4060if test ! -z "$CXX"
4061then
4062echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4063echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4064ac_save_cxx="$CXX"
4065
4066if test "$ac_cv_kpthread" = "yes"
4067then
4068 CXX="$CXX -Kpthread"
4069 ac_cv_cxx_thread=yes
4070elif test "$ac_cv_kthread" = "yes"
4071then
4072 CXX="$CXX -Kthread"
4073 ac_cv_cxx_thread=yes
4074elif test "$ac_cv_pthread" = "yes"
4075then
4076 CXX="$CXX -pthread"
4077 ac_cv_cxx_thread=yes
4078fi
4079
4080if test $ac_cv_cxx_thread = yes
4081then
4082 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4083 $CXX -c conftest.$ac_ext 2>&5
4084 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4085 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4086 then
4087 ac_cv_cxx_thread=yes
4088 else
4089 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004090 fi
4091 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004092fi
4093fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004094CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004095echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4096echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4097
Michael W. Hudson54241132001-12-07 15:38:26 +00004098
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004099# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004100echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4101echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4102if test "${ac_cv_header_stdc+set}" = set; then
4103 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004104else
Martin v. Löwis11437992002-04-12 09:54:03 +00004105 cat >conftest.$ac_ext <<_ACEOF
4106#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004107/* confdefs.h. */
4108_ACEOF
4109cat confdefs.h >>conftest.$ac_ext
4110cat >>conftest.$ac_ext <<_ACEOF
4111/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004112#include <stdlib.h>
4113#include <stdarg.h>
4114#include <string.h>
4115#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004116
Skip Montanaro6dead952003-09-25 14:50:04 +00004117int
4118main ()
4119{
4120
4121 ;
4122 return 0;
4123}
Martin v. Löwis11437992002-04-12 09:54:03 +00004124_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004125rm -f conftest.$ac_objext
4126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4127 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004130 (exit $ac_status); } &&
4131 { ac_try='test -s conftest.$ac_objext'
4132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4133 (eval $ac_try) 2>&5
4134 ac_status=$?
4135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4136 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004137 ac_cv_header_stdc=yes
4138else
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004140sed 's/^/| /' conftest.$ac_ext >&5
4141
4142ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004143fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004144rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004145
4146if test $ac_cv_header_stdc = yes; then
4147 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004148 cat >conftest.$ac_ext <<_ACEOF
4149#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004150/* confdefs.h. */
4151_ACEOF
4152cat confdefs.h >>conftest.$ac_ext
4153cat >>conftest.$ac_ext <<_ACEOF
4154/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004155#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004156
4157_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004159 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004160 :
4161else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004162 ac_cv_header_stdc=no
4163fi
4164rm -f conftest*
4165
4166fi
4167
4168if test $ac_cv_header_stdc = yes; then
4169 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004170 cat >conftest.$ac_ext <<_ACEOF
4171#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004172/* confdefs.h. */
4173_ACEOF
4174cat confdefs.h >>conftest.$ac_ext
4175cat >>conftest.$ac_ext <<_ACEOF
4176/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004177#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004178
4179_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004181 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004182 :
4183else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004184 ac_cv_header_stdc=no
4185fi
4186rm -f conftest*
4187
4188fi
4189
4190if test $ac_cv_header_stdc = yes; then
4191 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004192 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004193 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194else
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 cat >conftest.$ac_ext <<_ACEOF
4196#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004197/* confdefs.h. */
4198_ACEOF
4199cat confdefs.h >>conftest.$ac_ext
4200cat >>conftest.$ac_ext <<_ACEOF
4201/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004202#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004203#if ((' ' & 0x0FF) == 0x020)
4204# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4205# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4206#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004207# define ISLOWER(c) \
4208 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004209 || ('j' <= (c) && (c) <= 'r') \
4210 || ('s' <= (c) && (c) <= 'z'))
4211# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4212#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004213
Martin v. Löwis11437992002-04-12 09:54:03 +00004214#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4215int
4216main ()
4217{
4218 int i;
4219 for (i = 0; i < 256; i++)
4220 if (XOR (islower (i), ISLOWER (i))
4221 || toupper (i) != TOUPPER (i))
4222 exit(2);
4223 exit (0);
4224}
4225_ACEOF
4226rm -f conftest$ac_exeext
4227if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4228 (eval $ac_link) 2>&5
4229 ac_status=$?
4230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4231 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4233 (eval $ac_try) 2>&5
4234 ac_status=$?
4235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4236 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237 :
4238else
Martin v. Löwis11437992002-04-12 09:54:03 +00004239 echo "$as_me: program exited with status $ac_status" >&5
4240echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004241sed 's/^/| /' conftest.$ac_ext >&5
4242
Martin v. Löwis11437992002-04-12 09:54:03 +00004243( exit $ac_status )
4244ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004245fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004246rm -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 +00004247fi
4248fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004249fi
4250echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4251echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004252if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004253
4254cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004255#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004256_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004257
4258fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004259
Skip Montanarob9820a32004-01-17 00:16:12 +00004260# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4271 inttypes.h stdint.h unistd.h
4272do
4273as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4274echo "$as_me:$LINENO: checking for $ac_header" >&5
4275echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4276if eval "test \"\${$as_ac_Header+set}\" = set"; then
4277 echo $ECHO_N "(cached) $ECHO_C" >&6
4278else
4279 cat >conftest.$ac_ext <<_ACEOF
4280#line $LINENO "configure"
4281/* confdefs.h. */
4282_ACEOF
4283cat confdefs.h >>conftest.$ac_ext
4284cat >>conftest.$ac_ext <<_ACEOF
4285/* end confdefs.h. */
4286$ac_includes_default
4287
4288#include <$ac_header>
4289_ACEOF
4290rm -f conftest.$ac_objext
4291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4292 (eval $ac_compile) 2>&5
4293 ac_status=$?
4294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4295 (exit $ac_status); } &&
4296 { ac_try='test -s conftest.$ac_objext'
4297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4298 (eval $ac_try) 2>&5
4299 ac_status=$?
4300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4301 (exit $ac_status); }; }; then
4302 eval "$as_ac_Header=yes"
4303else
4304 echo "$as_me: failed program was:" >&5
4305sed 's/^/| /' conftest.$ac_ext >&5
4306
4307eval "$as_ac_Header=no"
4308fi
4309rm -f conftest.$ac_objext conftest.$ac_ext
4310fi
4311echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4312echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4313if test `eval echo '${'$as_ac_Header'}'` = yes; then
4314 cat >>confdefs.h <<_ACEOF
4315#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4316_ACEOF
4317
4318fi
4319
4320done
4321
4322
Martin v. Löwis11437992002-04-12 09:54:03 +00004323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004360
Barry Warsawfe33b792003-01-07 22:42:49 +00004361
Neal Norwitz82251032003-05-23 14:35:24 +00004362
Martin v. Löwis11437992002-04-12 09:54:03 +00004363for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004364libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004365signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4366unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004367sys/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 +00004368sys/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 +00004369sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004370sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004371do
Martin v. Löwis11437992002-04-12 09:54:03 +00004372as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4373if eval "test \"\${$as_ac_Header+set}\" = set"; then
4374 echo "$as_me:$LINENO: checking for $ac_header" >&5
4375echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4376if eval "test \"\${$as_ac_Header+set}\" = set"; then
4377 echo $ECHO_N "(cached) $ECHO_C" >&6
4378fi
4379echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4380echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004381else
Martin v. Löwis11437992002-04-12 09:54:03 +00004382 # Is the header compilable?
4383echo "$as_me:$LINENO: checking $ac_header usability" >&5
4384echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4385cat >conftest.$ac_ext <<_ACEOF
4386#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004387/* confdefs.h. */
4388_ACEOF
4389cat confdefs.h >>conftest.$ac_ext
4390cat >>conftest.$ac_ext <<_ACEOF
4391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004392$ac_includes_default
4393#include <$ac_header>
4394_ACEOF
4395rm -f conftest.$ac_objext
4396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4397 (eval $ac_compile) 2>&5
4398 ac_status=$?
4399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4400 (exit $ac_status); } &&
4401 { ac_try='test -s conftest.$ac_objext'
4402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4403 (eval $ac_try) 2>&5
4404 ac_status=$?
4405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4406 (exit $ac_status); }; }; then
4407 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004408else
Martin v. Löwis11437992002-04-12 09:54:03 +00004409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004410sed 's/^/| /' conftest.$ac_ext >&5
4411
Martin v. Löwis11437992002-04-12 09:54:03 +00004412ac_header_compiler=no
4413fi
4414rm -f conftest.$ac_objext conftest.$ac_ext
4415echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4416echo "${ECHO_T}$ac_header_compiler" >&6
4417
4418# Is the header present?
4419echo "$as_me:$LINENO: checking $ac_header presence" >&5
4420echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4421cat >conftest.$ac_ext <<_ACEOF
4422#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004423/* confdefs.h. */
4424_ACEOF
4425cat confdefs.h >>conftest.$ac_ext
4426cat >>conftest.$ac_ext <<_ACEOF
4427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004428#include <$ac_header>
4429_ACEOF
4430if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4431 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4432 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004433 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004434 rm -f conftest.er1
4435 cat conftest.err >&5
4436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4437 (exit $ac_status); } >/dev/null; then
4438 if test -s conftest.err; then
4439 ac_cpp_err=$ac_c_preproc_warn_flag
4440 else
4441 ac_cpp_err=
4442 fi
4443else
4444 ac_cpp_err=yes
4445fi
4446if test -z "$ac_cpp_err"; then
4447 ac_header_preproc=yes
4448else
4449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004450sed 's/^/| /' conftest.$ac_ext >&5
4451
Martin v. Löwis11437992002-04-12 09:54:03 +00004452 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004453fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004454rm -f conftest.err conftest.$ac_ext
4455echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4456echo "${ECHO_T}$ac_header_preproc" >&6
4457
4458# So? What about this header?
4459case $ac_header_compiler:$ac_header_preproc in
4460 yes:no )
4461 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4462echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4463 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004464echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4465 (
4466 cat <<\_ASBOX
4467## ------------------------------------ ##
4468## Report this to bug-autoconf@gnu.org. ##
4469## ------------------------------------ ##
4470_ASBOX
4471 ) |
4472 sed "s/^/$as_me: WARNING: /" >&2
4473 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004474 no:yes )
4475 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4476echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4477 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4478echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4479 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004480echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4481 (
4482 cat <<\_ASBOX
4483## ------------------------------------ ##
4484## Report this to bug-autoconf@gnu.org. ##
4485## ------------------------------------ ##
4486_ASBOX
4487 ) |
4488 sed "s/^/$as_me: WARNING: /" >&2
4489 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004490esac
4491echo "$as_me:$LINENO: checking for $ac_header" >&5
4492echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4493if eval "test \"\${$as_ac_Header+set}\" = set"; then
4494 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004495else
Martin v. Löwis11437992002-04-12 09:54:03 +00004496 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004497fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004498echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4499echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4500
4501fi
4502if test `eval echo '${'$as_ac_Header'}'` = yes; then
4503 cat >>confdefs.h <<_ACEOF
4504#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4505_ACEOF
4506
4507fi
4508
Guido van Rossum627b2d71993-12-24 10:39:16 +00004509done
4510
Martin v. Löwis11437992002-04-12 09:54:03 +00004511
4512
4513
4514
4515
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004516ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004517for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4518 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4519echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4520echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4521if eval "test \"\${$as_ac_Header+set}\" = set"; then
4522 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004523else
Martin v. Löwis11437992002-04-12 09:54:03 +00004524 cat >conftest.$ac_ext <<_ACEOF
4525#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004526/* confdefs.h. */
4527_ACEOF
4528cat confdefs.h >>conftest.$ac_ext
4529cat >>conftest.$ac_ext <<_ACEOF
4530/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004531#include <sys/types.h>
4532#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004533
Martin v. Löwis11437992002-04-12 09:54:03 +00004534int
4535main ()
4536{
4537if ((DIR *) 0)
4538return 0;
4539 ;
4540 return 0;
4541}
4542_ACEOF
4543rm -f conftest.$ac_objext
4544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4545 (eval $ac_compile) 2>&5
4546 ac_status=$?
4547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4548 (exit $ac_status); } &&
4549 { ac_try='test -s conftest.$ac_objext'
4550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4551 (eval $ac_try) 2>&5
4552 ac_status=$?
4553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4554 (exit $ac_status); }; }; then
4555 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004556else
Martin v. Löwis11437992002-04-12 09:54:03 +00004557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004558sed 's/^/| /' conftest.$ac_ext >&5
4559
Martin v. Löwis11437992002-04-12 09:54:03 +00004560eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004562rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004563fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004564echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4565echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4566if test `eval echo '${'$as_ac_Header'}'` = yes; then
4567 cat >>confdefs.h <<_ACEOF
4568#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4569_ACEOF
4570
4571ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004572fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004573
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004574done
4575# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4576if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004577 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4578echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4579if test "${ac_cv_search_opendir+set}" = set; then
4580 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004581else
Martin v. Löwis11437992002-04-12 09:54:03 +00004582 ac_func_search_save_LIBS=$LIBS
4583ac_cv_search_opendir=no
4584cat >conftest.$ac_ext <<_ACEOF
4585#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004586/* confdefs.h. */
4587_ACEOF
4588cat confdefs.h >>conftest.$ac_ext
4589cat >>conftest.$ac_ext <<_ACEOF
4590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004591
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004592/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004593#ifdef __cplusplus
4594extern "C"
4595#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004596/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004597 builtin and then its argument prototype would still apply. */
4598char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004599int
4600main ()
4601{
4602opendir ();
4603 ;
4604 return 0;
4605}
4606_ACEOF
4607rm -f conftest.$ac_objext conftest$ac_exeext
4608if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4609 (eval $ac_link) 2>&5
4610 ac_status=$?
4611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4612 (exit $ac_status); } &&
4613 { ac_try='test -s conftest$ac_exeext'
4614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4615 (eval $ac_try) 2>&5
4616 ac_status=$?
4617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4618 (exit $ac_status); }; }; then
4619 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004620else
Martin v. Löwis11437992002-04-12 09:54:03 +00004621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004622sed 's/^/| /' conftest.$ac_ext >&5
4623
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004624fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004625rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4626if test "$ac_cv_search_opendir" = no; then
4627 for ac_lib in dir; do
4628 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4629 cat >conftest.$ac_ext <<_ACEOF
4630#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
4654 (eval $ac_link) 2>&5
4655 ac_status=$?
4656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4657 (exit $ac_status); } &&
4658 { ac_try='test -s conftest$ac_exeext'
4659 { (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="-l$ac_lib"
4665break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004666else
Martin v. Löwis11437992002-04-12 09:54:03 +00004667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004668sed 's/^/| /' conftest.$ac_ext >&5
4669
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004670fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004671rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4672 done
4673fi
4674LIBS=$ac_func_search_save_LIBS
4675fi
4676echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4677echo "${ECHO_T}$ac_cv_search_opendir" >&6
4678if test "$ac_cv_search_opendir" != no; then
4679 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004680
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004681fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004682
Michael W. Hudson54241132001-12-07 15:38:26 +00004683else
Martin v. Löwis11437992002-04-12 09:54:03 +00004684 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4685echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4686if test "${ac_cv_search_opendir+set}" = set; then
4687 echo $ECHO_N "(cached) $ECHO_C" >&6
4688else
4689 ac_func_search_save_LIBS=$LIBS
4690ac_cv_search_opendir=no
4691cat >conftest.$ac_ext <<_ACEOF
4692#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004693/* confdefs.h. */
4694_ACEOF
4695cat confdefs.h >>conftest.$ac_ext
4696cat >>conftest.$ac_ext <<_ACEOF
4697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004698
4699/* Override any gcc2 internal prototype to avoid an error. */
4700#ifdef __cplusplus
4701extern "C"
4702#endif
4703/* We use char because int might match the return type of a gcc2
4704 builtin and then its argument prototype would still apply. */
4705char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004706int
4707main ()
4708{
4709opendir ();
4710 ;
4711 return 0;
4712}
4713_ACEOF
4714rm -f conftest.$ac_objext conftest$ac_exeext
4715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4716 (eval $ac_link) 2>&5
4717 ac_status=$?
4718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4719 (exit $ac_status); } &&
4720 { ac_try='test -s conftest$ac_exeext'
4721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4722 (eval $ac_try) 2>&5
4723 ac_status=$?
4724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4725 (exit $ac_status); }; }; then
4726 ac_cv_search_opendir="none required"
4727else
4728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004729sed 's/^/| /' conftest.$ac_ext >&5
4730
Martin v. Löwis11437992002-04-12 09:54:03 +00004731fi
4732rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4733if test "$ac_cv_search_opendir" = no; then
4734 for ac_lib in x; do
4735 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4736 cat >conftest.$ac_ext <<_ACEOF
4737#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
4761 (eval $ac_link) 2>&5
4762 ac_status=$?
4763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4764 (exit $ac_status); } &&
4765 { ac_try='test -s conftest$ac_exeext'
4766 { (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="-l$ac_lib"
4772break
4773else
4774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004775sed 's/^/| /' conftest.$ac_ext >&5
4776
Martin v. Löwis11437992002-04-12 09:54:03 +00004777fi
4778rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4779 done
4780fi
4781LIBS=$ac_func_search_save_LIBS
4782fi
4783echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4784echo "${ECHO_T}$ac_cv_search_opendir" >&6
4785if test "$ac_cv_search_opendir" != no; then
4786 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4787
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004788fi
4789
4790fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004791
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004792echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4793echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4794if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4795 echo $ECHO_N "(cached) $ECHO_C" >&6
4796else
4797 cat >conftest.$ac_ext <<_ACEOF
4798#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004799/* confdefs.h. */
4800_ACEOF
4801cat confdefs.h >>conftest.$ac_ext
4802cat >>conftest.$ac_ext <<_ACEOF
4803/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004804#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004805int
4806main ()
4807{
4808return makedev(0, 0);
4809 ;
4810 return 0;
4811}
4812_ACEOF
4813rm -f conftest.$ac_objext conftest$ac_exeext
4814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4815 (eval $ac_link) 2>&5
4816 ac_status=$?
4817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4818 (exit $ac_status); } &&
4819 { ac_try='test -s conftest$ac_exeext'
4820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4821 (eval $ac_try) 2>&5
4822 ac_status=$?
4823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4824 (exit $ac_status); }; }; then
4825 ac_cv_header_sys_types_h_makedev=yes
4826else
4827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004828sed 's/^/| /' conftest.$ac_ext >&5
4829
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004830ac_cv_header_sys_types_h_makedev=no
4831fi
4832rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4833
4834fi
4835echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4836echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4837
4838if test $ac_cv_header_sys_types_h_makedev = no; then
4839if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4840 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4841echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4842if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4843 echo $ECHO_N "(cached) $ECHO_C" >&6
4844fi
4845echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4846echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4847else
4848 # Is the header compilable?
4849echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4850echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4851cat >conftest.$ac_ext <<_ACEOF
4852#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004853/* confdefs.h. */
4854_ACEOF
4855cat confdefs.h >>conftest.$ac_ext
4856cat >>conftest.$ac_ext <<_ACEOF
4857/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004858$ac_includes_default
4859#include <sys/mkdev.h>
4860_ACEOF
4861rm -f conftest.$ac_objext
4862if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4863 (eval $ac_compile) 2>&5
4864 ac_status=$?
4865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4866 (exit $ac_status); } &&
4867 { ac_try='test -s conftest.$ac_objext'
4868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4869 (eval $ac_try) 2>&5
4870 ac_status=$?
4871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4872 (exit $ac_status); }; }; then
4873 ac_header_compiler=yes
4874else
4875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004876sed 's/^/| /' conftest.$ac_ext >&5
4877
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004878ac_header_compiler=no
4879fi
4880rm -f conftest.$ac_objext conftest.$ac_ext
4881echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4882echo "${ECHO_T}$ac_header_compiler" >&6
4883
4884# Is the header present?
4885echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4886echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4887cat >conftest.$ac_ext <<_ACEOF
4888#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004889/* confdefs.h. */
4890_ACEOF
4891cat confdefs.h >>conftest.$ac_ext
4892cat >>conftest.$ac_ext <<_ACEOF
4893/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004894#include <sys/mkdev.h>
4895_ACEOF
4896if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4897 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4898 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004899 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004900 rm -f conftest.er1
4901 cat conftest.err >&5
4902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4903 (exit $ac_status); } >/dev/null; then
4904 if test -s conftest.err; then
4905 ac_cpp_err=$ac_c_preproc_warn_flag
4906 else
4907 ac_cpp_err=
4908 fi
4909else
4910 ac_cpp_err=yes
4911fi
4912if test -z "$ac_cpp_err"; then
4913 ac_header_preproc=yes
4914else
4915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004916sed 's/^/| /' conftest.$ac_ext >&5
4917
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004918 ac_header_preproc=no
4919fi
4920rm -f conftest.err conftest.$ac_ext
4921echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4922echo "${ECHO_T}$ac_header_preproc" >&6
4923
4924# So? What about this header?
4925case $ac_header_compiler:$ac_header_preproc in
4926 yes:no )
4927 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4928echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4929 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004930echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4931 (
4932 cat <<\_ASBOX
4933## ------------------------------------ ##
4934## Report this to bug-autoconf@gnu.org. ##
4935## ------------------------------------ ##
4936_ASBOX
4937 ) |
4938 sed "s/^/$as_me: WARNING: /" >&2
4939 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004940 no:yes )
4941 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4942echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4943 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4944echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4945 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004946echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4947 (
4948 cat <<\_ASBOX
4949## ------------------------------------ ##
4950## Report this to bug-autoconf@gnu.org. ##
4951## ------------------------------------ ##
4952_ASBOX
4953 ) |
4954 sed "s/^/$as_me: WARNING: /" >&2
4955 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004956esac
4957echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4958echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4959if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4960 echo $ECHO_N "(cached) $ECHO_C" >&6
4961else
4962 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4963fi
4964echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4965echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4966
4967fi
4968if test $ac_cv_header_sys_mkdev_h = yes; then
4969
4970cat >>confdefs.h <<\_ACEOF
4971#define MAJOR_IN_MKDEV 1
4972_ACEOF
4973
4974fi
4975
4976
4977
4978 if test $ac_cv_header_sys_mkdev_h = no; then
4979 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4980 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4981echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4982if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4983 echo $ECHO_N "(cached) $ECHO_C" >&6
4984fi
4985echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4986echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4987else
4988 # Is the header compilable?
4989echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4990echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4991cat >conftest.$ac_ext <<_ACEOF
4992#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004993/* confdefs.h. */
4994_ACEOF
4995cat confdefs.h >>conftest.$ac_ext
4996cat >>conftest.$ac_ext <<_ACEOF
4997/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004998$ac_includes_default
4999#include <sys/sysmacros.h>
5000_ACEOF
5001rm -f conftest.$ac_objext
5002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5003 (eval $ac_compile) 2>&5
5004 ac_status=$?
5005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5006 (exit $ac_status); } &&
5007 { ac_try='test -s conftest.$ac_objext'
5008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5009 (eval $ac_try) 2>&5
5010 ac_status=$?
5011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5012 (exit $ac_status); }; }; then
5013 ac_header_compiler=yes
5014else
5015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005016sed 's/^/| /' conftest.$ac_ext >&5
5017
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005018ac_header_compiler=no
5019fi
5020rm -f conftest.$ac_objext conftest.$ac_ext
5021echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5022echo "${ECHO_T}$ac_header_compiler" >&6
5023
5024# Is the header present?
5025echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5026echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5027cat >conftest.$ac_ext <<_ACEOF
5028#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005029/* confdefs.h. */
5030_ACEOF
5031cat confdefs.h >>conftest.$ac_ext
5032cat >>conftest.$ac_ext <<_ACEOF
5033/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005034#include <sys/sysmacros.h>
5035_ACEOF
5036if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5037 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5038 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005039 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005040 rm -f conftest.er1
5041 cat conftest.err >&5
5042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5043 (exit $ac_status); } >/dev/null; then
5044 if test -s conftest.err; then
5045 ac_cpp_err=$ac_c_preproc_warn_flag
5046 else
5047 ac_cpp_err=
5048 fi
5049else
5050 ac_cpp_err=yes
5051fi
5052if test -z "$ac_cpp_err"; then
5053 ac_header_preproc=yes
5054else
5055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005056sed 's/^/| /' conftest.$ac_ext >&5
5057
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005058 ac_header_preproc=no
5059fi
5060rm -f conftest.err conftest.$ac_ext
5061echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5062echo "${ECHO_T}$ac_header_preproc" >&6
5063
5064# So? What about this header?
5065case $ac_header_compiler:$ac_header_preproc in
5066 yes:no )
5067 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5068echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5069 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005070echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5071 (
5072 cat <<\_ASBOX
5073## ------------------------------------ ##
5074## Report this to bug-autoconf@gnu.org. ##
5075## ------------------------------------ ##
5076_ASBOX
5077 ) |
5078 sed "s/^/$as_me: WARNING: /" >&2
5079 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005080 no:yes )
5081 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5082echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5083 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5084echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5085 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005086echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5087 (
5088 cat <<\_ASBOX
5089## ------------------------------------ ##
5090## Report this to bug-autoconf@gnu.org. ##
5091## ------------------------------------ ##
5092_ASBOX
5093 ) |
5094 sed "s/^/$as_me: WARNING: /" >&2
5095 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005096esac
5097echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5098echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5099if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5100 echo $ECHO_N "(cached) $ECHO_C" >&6
5101else
5102 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5103fi
5104echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5105echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5106
5107fi
5108if test $ac_cv_header_sys_sysmacros_h = yes; then
5109
5110cat >>confdefs.h <<\_ACEOF
5111#define MAJOR_IN_SYSMACROS 1
5112_ACEOF
5113
5114fi
5115
5116
5117 fi
5118fi
5119
Michael W. Hudson54241132001-12-07 15:38:26 +00005120
Guido van Rossum627b2d71993-12-24 10:39:16 +00005121# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005122was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005123echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5124echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5125cat >conftest.$ac_ext <<_ACEOF
5126#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005127/* confdefs.h. */
5128_ACEOF
5129cat confdefs.h >>conftest.$ac_ext
5130cat >>conftest.$ac_ext <<_ACEOF
5131/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005132#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005133
5134_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005136 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005137 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005138else
Martin v. Löwis11437992002-04-12 09:54:03 +00005139
5140
5141cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005142#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005143_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005144
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005145
Guido van Rossum627b2d71993-12-24 10:39:16 +00005146fi
5147rm -f conftest*
5148
Martin v. Löwis11437992002-04-12 09:54:03 +00005149echo "$as_me:$LINENO: result: $was_it_defined" >&5
5150echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005151
Neal Norwitz11690112002-07-30 01:08:28 +00005152# Check whether using makedev requires defining _OSF_SOURCE
5153echo "$as_me:$LINENO: checking for makedev" >&5
5154echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5155cat >conftest.$ac_ext <<_ACEOF
5156#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005157/* confdefs.h. */
5158_ACEOF
5159cat confdefs.h >>conftest.$ac_ext
5160cat >>conftest.$ac_ext <<_ACEOF
5161/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005162#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005163int
5164main ()
5165{
5166 makedev(0, 0)
5167 ;
5168 return 0;
5169}
5170_ACEOF
5171rm -f conftest.$ac_objext conftest$ac_exeext
5172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5173 (eval $ac_link) 2>&5
5174 ac_status=$?
5175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5176 (exit $ac_status); } &&
5177 { ac_try='test -s conftest$ac_exeext'
5178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5179 (eval $ac_try) 2>&5
5180 ac_status=$?
5181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5182 (exit $ac_status); }; }; then
5183 ac_cv_has_makedev=yes
5184else
5185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005186sed 's/^/| /' conftest.$ac_ext >&5
5187
Neal Norwitz11690112002-07-30 01:08:28 +00005188ac_cv_has_makedev=no
5189fi
5190rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5191if test "$ac_cv_has_makedev" = "no"; then
5192 # we didn't link, try if _OSF_SOURCE will allow us to link
5193 cat >conftest.$ac_ext <<_ACEOF
5194#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005195/* confdefs.h. */
5196_ACEOF
5197cat confdefs.h >>conftest.$ac_ext
5198cat >>conftest.$ac_ext <<_ACEOF
5199/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005200
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005201#define _OSF_SOURCE 1
5202#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005203
Neal Norwitz11690112002-07-30 01:08:28 +00005204int
5205main ()
5206{
5207 makedev(0, 0)
5208 ;
5209 return 0;
5210}
5211_ACEOF
5212rm -f conftest.$ac_objext conftest$ac_exeext
5213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5214 (eval $ac_link) 2>&5
5215 ac_status=$?
5216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5217 (exit $ac_status); } &&
5218 { ac_try='test -s conftest$ac_exeext'
5219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5220 (eval $ac_try) 2>&5
5221 ac_status=$?
5222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5223 (exit $ac_status); }; }; then
5224 ac_cv_has_makedev=yes
5225else
5226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005227sed 's/^/| /' conftest.$ac_ext >&5
5228
Neal Norwitz11690112002-07-30 01:08:28 +00005229ac_cv_has_makedev=no
5230fi
5231rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5232 if test "$ac_cv_has_makedev" = "yes"; then
5233
5234cat >>confdefs.h <<\_ACEOF
5235#define _OSF_SOURCE 1
5236_ACEOF
5237
5238 fi
5239fi
5240echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5241echo "${ECHO_T}$ac_cv_has_makedev" >&6
5242if test "$ac_cv_has_makedev" = "yes"; then
5243
5244cat >>confdefs.h <<\_ACEOF
5245#define HAVE_MAKEDEV 1
5246_ACEOF
5247
5248fi
5249
Martin v. Löwis399a6892002-10-04 10:22:02 +00005250# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5251# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5252# defined, but the compiler does not support pragma redefine_extname,
5253# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5254# structures (such as rlimit64) without declaring them. As a
5255# work-around, disable LFS on such configurations
5256
5257use_lfs=yes
5258echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5259echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5260cat >conftest.$ac_ext <<_ACEOF
5261#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005262/* confdefs.h. */
5263_ACEOF
5264cat confdefs.h >>conftest.$ac_ext
5265cat >>conftest.$ac_ext <<_ACEOF
5266/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005267
5268#define _LARGEFILE_SOURCE 1
5269#define _FILE_OFFSET_BITS 64
5270#include <sys/resource.h>
5271
Martin v. Löwis399a6892002-10-04 10:22:02 +00005272int
5273main ()
5274{
5275struct rlimit foo;
5276 ;
5277 return 0;
5278}
5279_ACEOF
5280rm -f conftest.$ac_objext
5281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5282 (eval $ac_compile) 2>&5
5283 ac_status=$?
5284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5285 (exit $ac_status); } &&
5286 { ac_try='test -s conftest.$ac_objext'
5287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5288 (eval $ac_try) 2>&5
5289 ac_status=$?
5290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5291 (exit $ac_status); }; }; then
5292 sol_lfs_bug=no
5293else
5294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005295sed 's/^/| /' conftest.$ac_ext >&5
5296
Martin v. Löwis399a6892002-10-04 10:22:02 +00005297sol_lfs_bug=yes
5298fi
5299rm -f conftest.$ac_objext conftest.$ac_ext
5300echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5301echo "${ECHO_T}$sol_lfs_bug" >&6
5302if test "$sol_lfs_bug" = "yes"; then
5303 use_lfs=no
5304fi
5305
5306if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005307# Two defines needed to enable largefile support on various platforms
5308# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005309
Martin v. Löwis11437992002-04-12 09:54:03 +00005310cat >>confdefs.h <<\_ACEOF
5311#define _LARGEFILE_SOURCE 1
5312_ACEOF
5313
5314
5315cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005316#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005317_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005318
Martin v. Löwis399a6892002-10-04 10:22:02 +00005319fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005320
Guido van Rossum84e7b241996-08-19 21:59:00 +00005321# Add some code to confdefs.h so that the test for off_t works on SCO
5322cat >> confdefs.h <<\EOF
5323#if defined(SCO_DS)
5324#undef _OFF_T
5325#endif
5326EOF
5327
Guido van Rossumef2255b2000-03-10 22:30:29 +00005328# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005329echo "$as_me:$LINENO: checking for mode_t" >&5
5330echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5331if test "${ac_cv_type_mode_t+set}" = set; then
5332 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005333else
Martin v. Löwis11437992002-04-12 09:54:03 +00005334 cat >conftest.$ac_ext <<_ACEOF
5335#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005336/* confdefs.h. */
5337_ACEOF
5338cat confdefs.h >>conftest.$ac_ext
5339cat >>conftest.$ac_ext <<_ACEOF
5340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005341$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005342int
5343main ()
5344{
5345if ((mode_t *) 0)
5346 return 0;
5347if (sizeof (mode_t))
5348 return 0;
5349 ;
5350 return 0;
5351}
5352_ACEOF
5353rm -f conftest.$ac_objext
5354if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5355 (eval $ac_compile) 2>&5
5356 ac_status=$?
5357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5358 (exit $ac_status); } &&
5359 { ac_try='test -s conftest.$ac_objext'
5360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5361 (eval $ac_try) 2>&5
5362 ac_status=$?
5363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5364 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005365 ac_cv_type_mode_t=yes
5366else
Martin v. Löwis11437992002-04-12 09:54:03 +00005367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005368sed 's/^/| /' conftest.$ac_ext >&5
5369
Martin v. Löwis11437992002-04-12 09:54:03 +00005370ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005371fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005372rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005373fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005374echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5375echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5376if test $ac_cv_type_mode_t = yes; then
5377 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005378else
Martin v. Löwis11437992002-04-12 09:54:03 +00005379
5380cat >>confdefs.h <<_ACEOF
5381#define mode_t int
5382_ACEOF
5383
5384fi
5385
5386echo "$as_me:$LINENO: checking for off_t" >&5
5387echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5388if test "${ac_cv_type_off_t+set}" = set; then
5389 echo $ECHO_N "(cached) $ECHO_C" >&6
5390else
5391 cat >conftest.$ac_ext <<_ACEOF
5392#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005393/* confdefs.h. */
5394_ACEOF
5395cat confdefs.h >>conftest.$ac_ext
5396cat >>conftest.$ac_ext <<_ACEOF
5397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005398$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005399int
5400main ()
5401{
5402if ((off_t *) 0)
5403 return 0;
5404if (sizeof (off_t))
5405 return 0;
5406 ;
5407 return 0;
5408}
5409_ACEOF
5410rm -f conftest.$ac_objext
5411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5412 (eval $ac_compile) 2>&5
5413 ac_status=$?
5414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5415 (exit $ac_status); } &&
5416 { ac_try='test -s conftest.$ac_objext'
5417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5418 (eval $ac_try) 2>&5
5419 ac_status=$?
5420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5421 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005422 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005423else
Martin v. Löwis11437992002-04-12 09:54:03 +00005424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005425sed 's/^/| /' conftest.$ac_ext >&5
5426
Martin v. Löwis11437992002-04-12 09:54:03 +00005427ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005428fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005429rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005430fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005431echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5432echo "${ECHO_T}$ac_cv_type_off_t" >&6
5433if test $ac_cv_type_off_t = yes; then
5434 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005435else
Martin v. Löwis11437992002-04-12 09:54:03 +00005436
5437cat >>confdefs.h <<_ACEOF
5438#define off_t long
5439_ACEOF
5440
5441fi
5442
5443echo "$as_me:$LINENO: checking for pid_t" >&5
5444echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5445if test "${ac_cv_type_pid_t+set}" = set; then
5446 echo $ECHO_N "(cached) $ECHO_C" >&6
5447else
5448 cat >conftest.$ac_ext <<_ACEOF
5449#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005450/* confdefs.h. */
5451_ACEOF
5452cat confdefs.h >>conftest.$ac_ext
5453cat >>conftest.$ac_ext <<_ACEOF
5454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005455$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005456int
5457main ()
5458{
5459if ((pid_t *) 0)
5460 return 0;
5461if (sizeof (pid_t))
5462 return 0;
5463 ;
5464 return 0;
5465}
5466_ACEOF
5467rm -f conftest.$ac_objext
5468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5469 (eval $ac_compile) 2>&5
5470 ac_status=$?
5471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5472 (exit $ac_status); } &&
5473 { ac_try='test -s conftest.$ac_objext'
5474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5475 (eval $ac_try) 2>&5
5476 ac_status=$?
5477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5478 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005479 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005480else
Martin v. Löwis11437992002-04-12 09:54:03 +00005481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005482sed 's/^/| /' conftest.$ac_ext >&5
5483
Martin v. Löwis11437992002-04-12 09:54:03 +00005484ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005485fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005486rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005488echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5489echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5490if test $ac_cv_type_pid_t = yes; then
5491 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005492else
Martin v. Löwis11437992002-04-12 09:54:03 +00005493
5494cat >>confdefs.h <<_ACEOF
5495#define pid_t int
5496_ACEOF
5497
5498fi
5499
5500echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5501echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5502if test "${ac_cv_type_signal+set}" = set; then
5503 echo $ECHO_N "(cached) $ECHO_C" >&6
5504else
5505 cat >conftest.$ac_ext <<_ACEOF
5506#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005507/* confdefs.h. */
5508_ACEOF
5509cat confdefs.h >>conftest.$ac_ext
5510cat >>conftest.$ac_ext <<_ACEOF
5511/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005512#include <sys/types.h>
5513#include <signal.h>
5514#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005515# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005516#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005517#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005518extern "C" void (*signal (int, void (*)(int)))(int);
5519#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005520void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005521#endif
5522
Martin v. Löwis11437992002-04-12 09:54:03 +00005523int
5524main ()
5525{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005526int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005527 ;
5528 return 0;
5529}
5530_ACEOF
5531rm -f conftest.$ac_objext
5532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5533 (eval $ac_compile) 2>&5
5534 ac_status=$?
5535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5536 (exit $ac_status); } &&
5537 { ac_try='test -s conftest.$ac_objext'
5538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5539 (eval $ac_try) 2>&5
5540 ac_status=$?
5541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5542 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005543 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005544else
Martin v. Löwis11437992002-04-12 09:54:03 +00005545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005546sed 's/^/| /' conftest.$ac_ext >&5
5547
Martin v. Löwis11437992002-04-12 09:54:03 +00005548ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005549fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005550rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005551fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005552echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5553echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005554
Martin v. Löwis11437992002-04-12 09:54:03 +00005555cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005556#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005557_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005558
Michael W. Hudson54241132001-12-07 15:38:26 +00005559
Martin v. Löwis11437992002-04-12 09:54:03 +00005560echo "$as_me:$LINENO: checking for size_t" >&5
5561echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5562if test "${ac_cv_type_size_t+set}" = set; then
5563 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005564else
Martin v. Löwis11437992002-04-12 09:54:03 +00005565 cat >conftest.$ac_ext <<_ACEOF
5566#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005567/* confdefs.h. */
5568_ACEOF
5569cat confdefs.h >>conftest.$ac_ext
5570cat >>conftest.$ac_ext <<_ACEOF
5571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005572$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005573int
5574main ()
5575{
5576if ((size_t *) 0)
5577 return 0;
5578if (sizeof (size_t))
5579 return 0;
5580 ;
5581 return 0;
5582}
5583_ACEOF
5584rm -f conftest.$ac_objext
5585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5586 (eval $ac_compile) 2>&5
5587 ac_status=$?
5588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5589 (exit $ac_status); } &&
5590 { ac_try='test -s conftest.$ac_objext'
5591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5592 (eval $ac_try) 2>&5
5593 ac_status=$?
5594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5595 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005596 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005597else
Martin v. Löwis11437992002-04-12 09:54:03 +00005598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005599sed 's/^/| /' conftest.$ac_ext >&5
5600
Martin v. Löwis11437992002-04-12 09:54:03 +00005601ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005603rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005604fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005605echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5606echo "${ECHO_T}$ac_cv_type_size_t" >&6
5607if test $ac_cv_type_size_t = yes; then
5608 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005609else
Martin v. Löwis11437992002-04-12 09:54:03 +00005610
5611cat >>confdefs.h <<_ACEOF
5612#define size_t unsigned
5613_ACEOF
5614
5615fi
5616
5617echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5618echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5619if test "${ac_cv_type_uid_t+set}" = set; then
5620 echo $ECHO_N "(cached) $ECHO_C" >&6
5621else
5622 cat >conftest.$ac_ext <<_ACEOF
5623#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005624/* confdefs.h. */
5625_ACEOF
5626cat confdefs.h >>conftest.$ac_ext
5627cat >>conftest.$ac_ext <<_ACEOF
5628/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005629#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005630
5631_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005632if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005633 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005634 ac_cv_type_uid_t=yes
5635else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005636 ac_cv_type_uid_t=no
5637fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005638rm -f conftest*
5639
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005640fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005641echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5642echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005643if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005644
Martin v. Löwis11437992002-04-12 09:54:03 +00005645cat >>confdefs.h <<\_ACEOF
5646#define uid_t int
5647_ACEOF
5648
5649
5650cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005651#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005652_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005653
5654fi
5655
Jack Jansendd19cf82001-12-06 22:36:17 +00005656
Michael W. Hudson54241132001-12-07 15:38:26 +00005657# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005658# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005659echo "$as_me:$LINENO: checking for int" >&5
5660echo $ECHO_N "checking for int... $ECHO_C" >&6
5661if test "${ac_cv_type_int+set}" = set; then
5662 echo $ECHO_N "(cached) $ECHO_C" >&6
5663else
5664 cat >conftest.$ac_ext <<_ACEOF
5665#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005666/* confdefs.h. */
5667_ACEOF
5668cat confdefs.h >>conftest.$ac_ext
5669cat >>conftest.$ac_ext <<_ACEOF
5670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005671$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005672int
5673main ()
5674{
5675if ((int *) 0)
5676 return 0;
5677if (sizeof (int))
5678 return 0;
5679 ;
5680 return 0;
5681}
5682_ACEOF
5683rm -f conftest.$ac_objext
5684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5685 (eval $ac_compile) 2>&5
5686 ac_status=$?
5687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5688 (exit $ac_status); } &&
5689 { ac_try='test -s conftest.$ac_objext'
5690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5691 (eval $ac_try) 2>&5
5692 ac_status=$?
5693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5694 (exit $ac_status); }; }; then
5695 ac_cv_type_int=yes
5696else
5697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005698sed 's/^/| /' conftest.$ac_ext >&5
5699
Martin v. Löwis11437992002-04-12 09:54:03 +00005700ac_cv_type_int=no
5701fi
5702rm -f conftest.$ac_objext conftest.$ac_ext
5703fi
5704echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5705echo "${ECHO_T}$ac_cv_type_int" >&6
5706
5707echo "$as_me:$LINENO: checking size of int" >&5
5708echo $ECHO_N "checking size of int... $ECHO_C" >&6
5709if test "${ac_cv_sizeof_int+set}" = set; then
5710 echo $ECHO_N "(cached) $ECHO_C" >&6
5711else
5712 if test "$ac_cv_type_int" = yes; then
5713 # The cast to unsigned long works around a bug in the HP C Compiler
5714 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5715 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5716 # This bug is HP SR number 8606223364.
5717 if test "$cross_compiling" = yes; then
5718 # Depending upon the size, compute the lo and hi bounds.
5719cat >conftest.$ac_ext <<_ACEOF
5720#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005721/* confdefs.h. */
5722_ACEOF
5723cat confdefs.h >>conftest.$ac_ext
5724cat >>conftest.$ac_ext <<_ACEOF
5725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005726$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005727int
5728main ()
5729{
5730static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5731test_array [0] = 0
5732
5733 ;
5734 return 0;
5735}
5736_ACEOF
5737rm -f conftest.$ac_objext
5738if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5739 (eval $ac_compile) 2>&5
5740 ac_status=$?
5741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5742 (exit $ac_status); } &&
5743 { ac_try='test -s conftest.$ac_objext'
5744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5745 (eval $ac_try) 2>&5
5746 ac_status=$?
5747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5748 (exit $ac_status); }; }; then
5749 ac_lo=0 ac_mid=0
5750 while :; do
5751 cat >conftest.$ac_ext <<_ACEOF
5752#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005753/* confdefs.h. */
5754_ACEOF
5755cat confdefs.h >>conftest.$ac_ext
5756cat >>conftest.$ac_ext <<_ACEOF
5757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005758$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005759int
5760main ()
5761{
5762static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5763test_array [0] = 0
5764
5765 ;
5766 return 0;
5767}
5768_ACEOF
5769rm -f conftest.$ac_objext
5770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5771 (eval $ac_compile) 2>&5
5772 ac_status=$?
5773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5774 (exit $ac_status); } &&
5775 { ac_try='test -s conftest.$ac_objext'
5776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5777 (eval $ac_try) 2>&5
5778 ac_status=$?
5779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5780 (exit $ac_status); }; }; then
5781 ac_hi=$ac_mid; break
5782else
5783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005784sed 's/^/| /' conftest.$ac_ext >&5
5785
Martin v. Löwis11437992002-04-12 09:54:03 +00005786ac_lo=`expr $ac_mid + 1`
5787 if test $ac_lo -le $ac_mid; then
5788 ac_lo= ac_hi=
5789 break
5790 fi
5791 ac_mid=`expr 2 '*' $ac_mid + 1`
5792fi
5793rm -f conftest.$ac_objext conftest.$ac_ext
5794 done
5795else
5796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005797sed 's/^/| /' conftest.$ac_ext >&5
5798
Martin v. Löwis11437992002-04-12 09:54:03 +00005799cat >conftest.$ac_ext <<_ACEOF
5800#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005801/* confdefs.h. */
5802_ACEOF
5803cat confdefs.h >>conftest.$ac_ext
5804cat >>conftest.$ac_ext <<_ACEOF
5805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005806$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005807int
5808main ()
5809{
5810static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5811test_array [0] = 0
5812
5813 ;
5814 return 0;
5815}
5816_ACEOF
5817rm -f conftest.$ac_objext
5818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5819 (eval $ac_compile) 2>&5
5820 ac_status=$?
5821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822 (exit $ac_status); } &&
5823 { ac_try='test -s conftest.$ac_objext'
5824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5825 (eval $ac_try) 2>&5
5826 ac_status=$?
5827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5828 (exit $ac_status); }; }; then
5829 ac_hi=-1 ac_mid=-1
5830 while :; do
5831 cat >conftest.$ac_ext <<_ACEOF
5832#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005833/* confdefs.h. */
5834_ACEOF
5835cat confdefs.h >>conftest.$ac_ext
5836cat >>conftest.$ac_ext <<_ACEOF
5837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005838$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005839int
5840main ()
5841{
5842static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5843test_array [0] = 0
5844
5845 ;
5846 return 0;
5847}
5848_ACEOF
5849rm -f conftest.$ac_objext
5850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5851 (eval $ac_compile) 2>&5
5852 ac_status=$?
5853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5854 (exit $ac_status); } &&
5855 { ac_try='test -s conftest.$ac_objext'
5856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5857 (eval $ac_try) 2>&5
5858 ac_status=$?
5859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5860 (exit $ac_status); }; }; then
5861 ac_lo=$ac_mid; break
5862else
5863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005864sed 's/^/| /' conftest.$ac_ext >&5
5865
Martin v. Löwis11437992002-04-12 09:54:03 +00005866ac_hi=`expr '(' $ac_mid ')' - 1`
5867 if test $ac_mid -le $ac_hi; then
5868 ac_lo= ac_hi=
5869 break
5870 fi
5871 ac_mid=`expr 2 '*' $ac_mid`
5872fi
5873rm -f conftest.$ac_objext conftest.$ac_ext
5874 done
5875else
5876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005877sed 's/^/| /' conftest.$ac_ext >&5
5878
Martin v. Löwis11437992002-04-12 09:54:03 +00005879ac_lo= ac_hi=
5880fi
5881rm -f conftest.$ac_objext conftest.$ac_ext
5882fi
5883rm -f conftest.$ac_objext conftest.$ac_ext
5884# Binary search between lo and hi bounds.
5885while test "x$ac_lo" != "x$ac_hi"; do
5886 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5887 cat >conftest.$ac_ext <<_ACEOF
5888#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005889/* confdefs.h. */
5890_ACEOF
5891cat confdefs.h >>conftest.$ac_ext
5892cat >>conftest.$ac_ext <<_ACEOF
5893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005894$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005895int
5896main ()
5897{
5898static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5899test_array [0] = 0
5900
5901 ;
5902 return 0;
5903}
5904_ACEOF
5905rm -f conftest.$ac_objext
5906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5907 (eval $ac_compile) 2>&5
5908 ac_status=$?
5909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5910 (exit $ac_status); } &&
5911 { ac_try='test -s conftest.$ac_objext'
5912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5913 (eval $ac_try) 2>&5
5914 ac_status=$?
5915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5916 (exit $ac_status); }; }; then
5917 ac_hi=$ac_mid
5918else
5919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005920sed 's/^/| /' conftest.$ac_ext >&5
5921
Martin v. Löwis11437992002-04-12 09:54:03 +00005922ac_lo=`expr '(' $ac_mid ')' + 1`
5923fi
5924rm -f conftest.$ac_objext conftest.$ac_ext
5925done
5926case $ac_lo in
5927?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005928'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5929See \`config.log' for more details." >&5
5930echo "$as_me: error: cannot compute sizeof (int), 77
5931See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005932 { (exit 1); exit 1; }; } ;;
5933esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005934else
5935 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005936 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5937See \`config.log' for more details." >&5
5938echo "$as_me: error: cannot run test program while cross compiling
5939See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005940 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005941else
Martin v. Löwis11437992002-04-12 09:54:03 +00005942 cat >conftest.$ac_ext <<_ACEOF
5943#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005944/* confdefs.h. */
5945_ACEOF
5946cat confdefs.h >>conftest.$ac_ext
5947cat >>conftest.$ac_ext <<_ACEOF
5948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005949$ac_includes_default
5950long longval () { return (long) (sizeof (int)); }
5951unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005952#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005953#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005954int
5955main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005956{
Martin v. Löwis11437992002-04-12 09:54:03 +00005957
5958 FILE *f = fopen ("conftest.val", "w");
5959 if (! f)
5960 exit (1);
5961 if (((long) (sizeof (int))) < 0)
5962 {
5963 long i = longval ();
5964 if (i != ((long) (sizeof (int))))
5965 exit (1);
5966 fprintf (f, "%ld\n", i);
5967 }
5968 else
5969 {
5970 unsigned long i = ulongval ();
5971 if (i != ((long) (sizeof (int))))
5972 exit (1);
5973 fprintf (f, "%lu\n", i);
5974 }
5975 exit (ferror (f) || fclose (f) != 0);
5976
5977 ;
5978 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005979}
Martin v. Löwis11437992002-04-12 09:54:03 +00005980_ACEOF
5981rm -f conftest$ac_exeext
5982if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5983 (eval $ac_link) 2>&5
5984 ac_status=$?
5985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5986 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5988 (eval $ac_try) 2>&5
5989 ac_status=$?
5990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5991 (exit $ac_status); }; }; then
5992 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005993else
Martin v. Löwis11437992002-04-12 09:54:03 +00005994 echo "$as_me: program exited with status $ac_status" >&5
5995echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005996sed 's/^/| /' conftest.$ac_ext >&5
5997
Martin v. Löwis11437992002-04-12 09:54:03 +00005998( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00005999{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6000See \`config.log' for more details." >&5
6001echo "$as_me: error: cannot compute sizeof (int), 77
6002See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006003 { (exit 1); exit 1; }; }
6004fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006005rm -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 +00006006fi
6007fi
6008rm -f conftest.val
6009else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006010 ac_cv_sizeof_int=0
6011fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006012fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006013echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6014echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6015cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006016#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006017_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006018
6019
Martin v. Löwis11437992002-04-12 09:54:03 +00006020echo "$as_me:$LINENO: checking for long" >&5
6021echo $ECHO_N "checking for long... $ECHO_C" >&6
6022if test "${ac_cv_type_long+set}" = set; then
6023 echo $ECHO_N "(cached) $ECHO_C" >&6
6024else
6025 cat >conftest.$ac_ext <<_ACEOF
6026#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006027/* confdefs.h. */
6028_ACEOF
6029cat confdefs.h >>conftest.$ac_ext
6030cat >>conftest.$ac_ext <<_ACEOF
6031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006032$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006033int
6034main ()
6035{
6036if ((long *) 0)
6037 return 0;
6038if (sizeof (long))
6039 return 0;
6040 ;
6041 return 0;
6042}
6043_ACEOF
6044rm -f conftest.$ac_objext
6045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6046 (eval $ac_compile) 2>&5
6047 ac_status=$?
6048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6049 (exit $ac_status); } &&
6050 { ac_try='test -s conftest.$ac_objext'
6051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6052 (eval $ac_try) 2>&5
6053 ac_status=$?
6054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6055 (exit $ac_status); }; }; then
6056 ac_cv_type_long=yes
6057else
6058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006059sed 's/^/| /' conftest.$ac_ext >&5
6060
Martin v. Löwis11437992002-04-12 09:54:03 +00006061ac_cv_type_long=no
6062fi
6063rm -f conftest.$ac_objext conftest.$ac_ext
6064fi
6065echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6066echo "${ECHO_T}$ac_cv_type_long" >&6
6067
6068echo "$as_me:$LINENO: checking size of long" >&5
6069echo $ECHO_N "checking size of long... $ECHO_C" >&6
6070if test "${ac_cv_sizeof_long+set}" = set; then
6071 echo $ECHO_N "(cached) $ECHO_C" >&6
6072else
6073 if test "$ac_cv_type_long" = yes; then
6074 # The cast to unsigned long works around a bug in the HP C Compiler
6075 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6076 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6077 # This bug is HP SR number 8606223364.
6078 if test "$cross_compiling" = yes; then
6079 # Depending upon the size, compute the lo and hi bounds.
6080cat >conftest.$ac_ext <<_ACEOF
6081#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006082/* confdefs.h. */
6083_ACEOF
6084cat confdefs.h >>conftest.$ac_ext
6085cat >>conftest.$ac_ext <<_ACEOF
6086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006087$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006088int
6089main ()
6090{
6091static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6092test_array [0] = 0
6093
6094 ;
6095 return 0;
6096}
6097_ACEOF
6098rm -f conftest.$ac_objext
6099if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6100 (eval $ac_compile) 2>&5
6101 ac_status=$?
6102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6103 (exit $ac_status); } &&
6104 { ac_try='test -s conftest.$ac_objext'
6105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6106 (eval $ac_try) 2>&5
6107 ac_status=$?
6108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6109 (exit $ac_status); }; }; then
6110 ac_lo=0 ac_mid=0
6111 while :; do
6112 cat >conftest.$ac_ext <<_ACEOF
6113#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006114/* confdefs.h. */
6115_ACEOF
6116cat confdefs.h >>conftest.$ac_ext
6117cat >>conftest.$ac_ext <<_ACEOF
6118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006119$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006120int
6121main ()
6122{
6123static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6124test_array [0] = 0
6125
6126 ;
6127 return 0;
6128}
6129_ACEOF
6130rm -f conftest.$ac_objext
6131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6132 (eval $ac_compile) 2>&5
6133 ac_status=$?
6134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135 (exit $ac_status); } &&
6136 { ac_try='test -s conftest.$ac_objext'
6137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6138 (eval $ac_try) 2>&5
6139 ac_status=$?
6140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6141 (exit $ac_status); }; }; then
6142 ac_hi=$ac_mid; break
6143else
6144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006145sed 's/^/| /' conftest.$ac_ext >&5
6146
Martin v. Löwis11437992002-04-12 09:54:03 +00006147ac_lo=`expr $ac_mid + 1`
6148 if test $ac_lo -le $ac_mid; then
6149 ac_lo= ac_hi=
6150 break
6151 fi
6152 ac_mid=`expr 2 '*' $ac_mid + 1`
6153fi
6154rm -f conftest.$ac_objext conftest.$ac_ext
6155 done
6156else
6157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006158sed 's/^/| /' conftest.$ac_ext >&5
6159
Martin v. Löwis11437992002-04-12 09:54:03 +00006160cat >conftest.$ac_ext <<_ACEOF
6161#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006162/* confdefs.h. */
6163_ACEOF
6164cat confdefs.h >>conftest.$ac_ext
6165cat >>conftest.$ac_ext <<_ACEOF
6166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006167$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006168int
6169main ()
6170{
6171static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6172test_array [0] = 0
6173
6174 ;
6175 return 0;
6176}
6177_ACEOF
6178rm -f conftest.$ac_objext
6179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6180 (eval $ac_compile) 2>&5
6181 ac_status=$?
6182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6183 (exit $ac_status); } &&
6184 { ac_try='test -s conftest.$ac_objext'
6185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6186 (eval $ac_try) 2>&5
6187 ac_status=$?
6188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6189 (exit $ac_status); }; }; then
6190 ac_hi=-1 ac_mid=-1
6191 while :; do
6192 cat >conftest.$ac_ext <<_ACEOF
6193#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006194/* confdefs.h. */
6195_ACEOF
6196cat confdefs.h >>conftest.$ac_ext
6197cat >>conftest.$ac_ext <<_ACEOF
6198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006199$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006200int
6201main ()
6202{
6203static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6204test_array [0] = 0
6205
6206 ;
6207 return 0;
6208}
6209_ACEOF
6210rm -f conftest.$ac_objext
6211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6212 (eval $ac_compile) 2>&5
6213 ac_status=$?
6214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6215 (exit $ac_status); } &&
6216 { ac_try='test -s conftest.$ac_objext'
6217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6218 (eval $ac_try) 2>&5
6219 ac_status=$?
6220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6221 (exit $ac_status); }; }; then
6222 ac_lo=$ac_mid; break
6223else
6224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006225sed 's/^/| /' conftest.$ac_ext >&5
6226
Martin v. Löwis11437992002-04-12 09:54:03 +00006227ac_hi=`expr '(' $ac_mid ')' - 1`
6228 if test $ac_mid -le $ac_hi; then
6229 ac_lo= ac_hi=
6230 break
6231 fi
6232 ac_mid=`expr 2 '*' $ac_mid`
6233fi
6234rm -f conftest.$ac_objext conftest.$ac_ext
6235 done
6236else
6237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006238sed 's/^/| /' conftest.$ac_ext >&5
6239
Martin v. Löwis11437992002-04-12 09:54:03 +00006240ac_lo= ac_hi=
6241fi
6242rm -f conftest.$ac_objext conftest.$ac_ext
6243fi
6244rm -f conftest.$ac_objext conftest.$ac_ext
6245# Binary search between lo and hi bounds.
6246while test "x$ac_lo" != "x$ac_hi"; do
6247 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6248 cat >conftest.$ac_ext <<_ACEOF
6249#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006250/* confdefs.h. */
6251_ACEOF
6252cat confdefs.h >>conftest.$ac_ext
6253cat >>conftest.$ac_ext <<_ACEOF
6254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006255$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006256int
6257main ()
6258{
6259static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6260test_array [0] = 0
6261
6262 ;
6263 return 0;
6264}
6265_ACEOF
6266rm -f conftest.$ac_objext
6267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6268 (eval $ac_compile) 2>&5
6269 ac_status=$?
6270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6271 (exit $ac_status); } &&
6272 { ac_try='test -s conftest.$ac_objext'
6273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6274 (eval $ac_try) 2>&5
6275 ac_status=$?
6276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6277 (exit $ac_status); }; }; then
6278 ac_hi=$ac_mid
6279else
6280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006281sed 's/^/| /' conftest.$ac_ext >&5
6282
Martin v. Löwis11437992002-04-12 09:54:03 +00006283ac_lo=`expr '(' $ac_mid ')' + 1`
6284fi
6285rm -f conftest.$ac_objext conftest.$ac_ext
6286done
6287case $ac_lo in
6288?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006289'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6290See \`config.log' for more details." >&5
6291echo "$as_me: error: cannot compute sizeof (long), 77
6292See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006293 { (exit 1); exit 1; }; } ;;
6294esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006295else
6296 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006297 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6298See \`config.log' for more details." >&5
6299echo "$as_me: error: cannot run test program while cross compiling
6300See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006301 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006302else
Martin v. Löwis11437992002-04-12 09:54:03 +00006303 cat >conftest.$ac_ext <<_ACEOF
6304#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006305/* confdefs.h. */
6306_ACEOF
6307cat confdefs.h >>conftest.$ac_ext
6308cat >>conftest.$ac_ext <<_ACEOF
6309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006310$ac_includes_default
6311long longval () { return (long) (sizeof (long)); }
6312unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006313#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006314#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006315int
6316main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006317{
Martin v. Löwis11437992002-04-12 09:54:03 +00006318
6319 FILE *f = fopen ("conftest.val", "w");
6320 if (! f)
6321 exit (1);
6322 if (((long) (sizeof (long))) < 0)
6323 {
6324 long i = longval ();
6325 if (i != ((long) (sizeof (long))))
6326 exit (1);
6327 fprintf (f, "%ld\n", i);
6328 }
6329 else
6330 {
6331 unsigned long i = ulongval ();
6332 if (i != ((long) (sizeof (long))))
6333 exit (1);
6334 fprintf (f, "%lu\n", i);
6335 }
6336 exit (ferror (f) || fclose (f) != 0);
6337
6338 ;
6339 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006340}
Martin v. Löwis11437992002-04-12 09:54:03 +00006341_ACEOF
6342rm -f conftest$ac_exeext
6343if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6344 (eval $ac_link) 2>&5
6345 ac_status=$?
6346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6347 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6349 (eval $ac_try) 2>&5
6350 ac_status=$?
6351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6352 (exit $ac_status); }; }; then
6353 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006354else
Martin v. Löwis11437992002-04-12 09:54:03 +00006355 echo "$as_me: program exited with status $ac_status" >&5
6356echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006357sed 's/^/| /' conftest.$ac_ext >&5
6358
Martin v. Löwis11437992002-04-12 09:54:03 +00006359( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006360{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6361See \`config.log' for more details." >&5
6362echo "$as_me: error: cannot compute sizeof (long), 77
6363See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006364 { (exit 1); exit 1; }; }
6365fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006366rm -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 +00006367fi
6368fi
6369rm -f conftest.val
6370else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006371 ac_cv_sizeof_long=0
6372fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006373fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006374echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6375echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6376cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006377#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006378_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006379
6380
Martin v. Löwis11437992002-04-12 09:54:03 +00006381echo "$as_me:$LINENO: checking for void *" >&5
6382echo $ECHO_N "checking for void *... $ECHO_C" >&6
6383if test "${ac_cv_type_void_p+set}" = set; then
6384 echo $ECHO_N "(cached) $ECHO_C" >&6
6385else
6386 cat >conftest.$ac_ext <<_ACEOF
6387#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006388/* confdefs.h. */
6389_ACEOF
6390cat confdefs.h >>conftest.$ac_ext
6391cat >>conftest.$ac_ext <<_ACEOF
6392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006393$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006394int
6395main ()
6396{
6397if ((void * *) 0)
6398 return 0;
6399if (sizeof (void *))
6400 return 0;
6401 ;
6402 return 0;
6403}
6404_ACEOF
6405rm -f conftest.$ac_objext
6406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6407 (eval $ac_compile) 2>&5
6408 ac_status=$?
6409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6410 (exit $ac_status); } &&
6411 { ac_try='test -s conftest.$ac_objext'
6412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6413 (eval $ac_try) 2>&5
6414 ac_status=$?
6415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416 (exit $ac_status); }; }; then
6417 ac_cv_type_void_p=yes
6418else
6419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006420sed 's/^/| /' conftest.$ac_ext >&5
6421
Martin v. Löwis11437992002-04-12 09:54:03 +00006422ac_cv_type_void_p=no
6423fi
6424rm -f conftest.$ac_objext conftest.$ac_ext
6425fi
6426echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6427echo "${ECHO_T}$ac_cv_type_void_p" >&6
6428
6429echo "$as_me:$LINENO: checking size of void *" >&5
6430echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6431if test "${ac_cv_sizeof_void_p+set}" = set; then
6432 echo $ECHO_N "(cached) $ECHO_C" >&6
6433else
6434 if test "$ac_cv_type_void_p" = yes; then
6435 # The cast to unsigned long works around a bug in the HP C Compiler
6436 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6437 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6438 # This bug is HP SR number 8606223364.
6439 if test "$cross_compiling" = yes; then
6440 # Depending upon the size, compute the lo and hi bounds.
6441cat >conftest.$ac_ext <<_ACEOF
6442#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006443/* confdefs.h. */
6444_ACEOF
6445cat confdefs.h >>conftest.$ac_ext
6446cat >>conftest.$ac_ext <<_ACEOF
6447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006448$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006449int
6450main ()
6451{
6452static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6453test_array [0] = 0
6454
6455 ;
6456 return 0;
6457}
6458_ACEOF
6459rm -f conftest.$ac_objext
6460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6461 (eval $ac_compile) 2>&5
6462 ac_status=$?
6463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6464 (exit $ac_status); } &&
6465 { ac_try='test -s conftest.$ac_objext'
6466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6467 (eval $ac_try) 2>&5
6468 ac_status=$?
6469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6470 (exit $ac_status); }; }; then
6471 ac_lo=0 ac_mid=0
6472 while :; do
6473 cat >conftest.$ac_ext <<_ACEOF
6474#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006475/* confdefs.h. */
6476_ACEOF
6477cat confdefs.h >>conftest.$ac_ext
6478cat >>conftest.$ac_ext <<_ACEOF
6479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006480$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006481int
6482main ()
6483{
6484static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6485test_array [0] = 0
6486
6487 ;
6488 return 0;
6489}
6490_ACEOF
6491rm -f conftest.$ac_objext
6492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6493 (eval $ac_compile) 2>&5
6494 ac_status=$?
6495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6496 (exit $ac_status); } &&
6497 { ac_try='test -s conftest.$ac_objext'
6498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6499 (eval $ac_try) 2>&5
6500 ac_status=$?
6501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6502 (exit $ac_status); }; }; then
6503 ac_hi=$ac_mid; break
6504else
6505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006506sed 's/^/| /' conftest.$ac_ext >&5
6507
Martin v. Löwis11437992002-04-12 09:54:03 +00006508ac_lo=`expr $ac_mid + 1`
6509 if test $ac_lo -le $ac_mid; then
6510 ac_lo= ac_hi=
6511 break
6512 fi
6513 ac_mid=`expr 2 '*' $ac_mid + 1`
6514fi
6515rm -f conftest.$ac_objext conftest.$ac_ext
6516 done
6517else
6518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006519sed 's/^/| /' conftest.$ac_ext >&5
6520
Martin v. Löwis11437992002-04-12 09:54:03 +00006521cat >conftest.$ac_ext <<_ACEOF
6522#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006523/* confdefs.h. */
6524_ACEOF
6525cat confdefs.h >>conftest.$ac_ext
6526cat >>conftest.$ac_ext <<_ACEOF
6527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006528$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006529int
6530main ()
6531{
6532static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6533test_array [0] = 0
6534
6535 ;
6536 return 0;
6537}
6538_ACEOF
6539rm -f conftest.$ac_objext
6540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6541 (eval $ac_compile) 2>&5
6542 ac_status=$?
6543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6544 (exit $ac_status); } &&
6545 { ac_try='test -s conftest.$ac_objext'
6546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6547 (eval $ac_try) 2>&5
6548 ac_status=$?
6549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6550 (exit $ac_status); }; }; then
6551 ac_hi=-1 ac_mid=-1
6552 while :; do
6553 cat >conftest.$ac_ext <<_ACEOF
6554#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006555/* confdefs.h. */
6556_ACEOF
6557cat confdefs.h >>conftest.$ac_ext
6558cat >>conftest.$ac_ext <<_ACEOF
6559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006560$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006561int
6562main ()
6563{
6564static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6565test_array [0] = 0
6566
6567 ;
6568 return 0;
6569}
6570_ACEOF
6571rm -f conftest.$ac_objext
6572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6573 (eval $ac_compile) 2>&5
6574 ac_status=$?
6575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6576 (exit $ac_status); } &&
6577 { ac_try='test -s conftest.$ac_objext'
6578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6579 (eval $ac_try) 2>&5
6580 ac_status=$?
6581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6582 (exit $ac_status); }; }; then
6583 ac_lo=$ac_mid; break
6584else
6585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006586sed 's/^/| /' conftest.$ac_ext >&5
6587
Martin v. Löwis11437992002-04-12 09:54:03 +00006588ac_hi=`expr '(' $ac_mid ')' - 1`
6589 if test $ac_mid -le $ac_hi; then
6590 ac_lo= ac_hi=
6591 break
6592 fi
6593 ac_mid=`expr 2 '*' $ac_mid`
6594fi
6595rm -f conftest.$ac_objext conftest.$ac_ext
6596 done
6597else
6598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006599sed 's/^/| /' conftest.$ac_ext >&5
6600
Martin v. Löwis11437992002-04-12 09:54:03 +00006601ac_lo= ac_hi=
6602fi
6603rm -f conftest.$ac_objext conftest.$ac_ext
6604fi
6605rm -f conftest.$ac_objext conftest.$ac_ext
6606# Binary search between lo and hi bounds.
6607while test "x$ac_lo" != "x$ac_hi"; do
6608 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6609 cat >conftest.$ac_ext <<_ACEOF
6610#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006611/* confdefs.h. */
6612_ACEOF
6613cat confdefs.h >>conftest.$ac_ext
6614cat >>conftest.$ac_ext <<_ACEOF
6615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006616$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006617int
6618main ()
6619{
6620static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6621test_array [0] = 0
6622
6623 ;
6624 return 0;
6625}
6626_ACEOF
6627rm -f conftest.$ac_objext
6628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6629 (eval $ac_compile) 2>&5
6630 ac_status=$?
6631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6632 (exit $ac_status); } &&
6633 { ac_try='test -s conftest.$ac_objext'
6634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6635 (eval $ac_try) 2>&5
6636 ac_status=$?
6637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6638 (exit $ac_status); }; }; then
6639 ac_hi=$ac_mid
6640else
6641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006642sed 's/^/| /' conftest.$ac_ext >&5
6643
Martin v. Löwis11437992002-04-12 09:54:03 +00006644ac_lo=`expr '(' $ac_mid ')' + 1`
6645fi
6646rm -f conftest.$ac_objext conftest.$ac_ext
6647done
6648case $ac_lo in
6649?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006650'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6651See \`config.log' for more details." >&5
6652echo "$as_me: error: cannot compute sizeof (void *), 77
6653See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006654 { (exit 1); exit 1; }; } ;;
6655esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006656else
6657 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006658 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6659See \`config.log' for more details." >&5
6660echo "$as_me: error: cannot run test program while cross compiling
6661See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006662 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006663else
Martin v. Löwis11437992002-04-12 09:54:03 +00006664 cat >conftest.$ac_ext <<_ACEOF
6665#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006666/* confdefs.h. */
6667_ACEOF
6668cat confdefs.h >>conftest.$ac_ext
6669cat >>conftest.$ac_ext <<_ACEOF
6670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006671$ac_includes_default
6672long longval () { return (long) (sizeof (void *)); }
6673unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006674#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006675#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006676int
6677main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006678{
Martin v. Löwis11437992002-04-12 09:54:03 +00006679
6680 FILE *f = fopen ("conftest.val", "w");
6681 if (! f)
6682 exit (1);
6683 if (((long) (sizeof (void *))) < 0)
6684 {
6685 long i = longval ();
6686 if (i != ((long) (sizeof (void *))))
6687 exit (1);
6688 fprintf (f, "%ld\n", i);
6689 }
6690 else
6691 {
6692 unsigned long i = ulongval ();
6693 if (i != ((long) (sizeof (void *))))
6694 exit (1);
6695 fprintf (f, "%lu\n", i);
6696 }
6697 exit (ferror (f) || fclose (f) != 0);
6698
6699 ;
6700 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006701}
Martin v. Löwis11437992002-04-12 09:54:03 +00006702_ACEOF
6703rm -f conftest$ac_exeext
6704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6705 (eval $ac_link) 2>&5
6706 ac_status=$?
6707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6708 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6710 (eval $ac_try) 2>&5
6711 ac_status=$?
6712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6713 (exit $ac_status); }; }; then
6714 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006715else
Martin v. Löwis11437992002-04-12 09:54:03 +00006716 echo "$as_me: program exited with status $ac_status" >&5
6717echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006718sed 's/^/| /' conftest.$ac_ext >&5
6719
Martin v. Löwis11437992002-04-12 09:54:03 +00006720( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006721{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6722See \`config.log' for more details." >&5
6723echo "$as_me: error: cannot compute sizeof (void *), 77
6724See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006725 { (exit 1); exit 1; }; }
6726fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006727rm -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 +00006728fi
6729fi
6730rm -f conftest.val
6731else
Guido van Rossumad678af1998-10-02 14:42:15 +00006732 ac_cv_sizeof_void_p=0
6733fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006734fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006735echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6736echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6737cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006738#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006739_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006740
6741
Martin v. Löwis11437992002-04-12 09:54:03 +00006742echo "$as_me:$LINENO: checking for short" >&5
6743echo $ECHO_N "checking for short... $ECHO_C" >&6
6744if test "${ac_cv_type_short+set}" = set; then
6745 echo $ECHO_N "(cached) $ECHO_C" >&6
6746else
6747 cat >conftest.$ac_ext <<_ACEOF
6748#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006749/* confdefs.h. */
6750_ACEOF
6751cat confdefs.h >>conftest.$ac_ext
6752cat >>conftest.$ac_ext <<_ACEOF
6753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006754$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006755int
6756main ()
6757{
6758if ((short *) 0)
6759 return 0;
6760if (sizeof (short))
6761 return 0;
6762 ;
6763 return 0;
6764}
6765_ACEOF
6766rm -f conftest.$ac_objext
6767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6768 (eval $ac_compile) 2>&5
6769 ac_status=$?
6770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6771 (exit $ac_status); } &&
6772 { ac_try='test -s conftest.$ac_objext'
6773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6774 (eval $ac_try) 2>&5
6775 ac_status=$?
6776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6777 (exit $ac_status); }; }; then
6778 ac_cv_type_short=yes
6779else
6780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006781sed 's/^/| /' conftest.$ac_ext >&5
6782
Martin v. Löwis11437992002-04-12 09:54:03 +00006783ac_cv_type_short=no
6784fi
6785rm -f conftest.$ac_objext conftest.$ac_ext
6786fi
6787echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6788echo "${ECHO_T}$ac_cv_type_short" >&6
6789
6790echo "$as_me:$LINENO: checking size of short" >&5
6791echo $ECHO_N "checking size of short... $ECHO_C" >&6
6792if test "${ac_cv_sizeof_short+set}" = set; then
6793 echo $ECHO_N "(cached) $ECHO_C" >&6
6794else
6795 if test "$ac_cv_type_short" = yes; then
6796 # The cast to unsigned long works around a bug in the HP C Compiler
6797 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6798 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6799 # This bug is HP SR number 8606223364.
6800 if test "$cross_compiling" = yes; then
6801 # Depending upon the size, compute the lo and hi bounds.
6802cat >conftest.$ac_ext <<_ACEOF
6803#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006804/* confdefs.h. */
6805_ACEOF
6806cat confdefs.h >>conftest.$ac_ext
6807cat >>conftest.$ac_ext <<_ACEOF
6808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006809$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006810int
6811main ()
6812{
6813static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6814test_array [0] = 0
6815
6816 ;
6817 return 0;
6818}
6819_ACEOF
6820rm -f conftest.$ac_objext
6821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6822 (eval $ac_compile) 2>&5
6823 ac_status=$?
6824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6825 (exit $ac_status); } &&
6826 { ac_try='test -s conftest.$ac_objext'
6827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6828 (eval $ac_try) 2>&5
6829 ac_status=$?
6830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6831 (exit $ac_status); }; }; then
6832 ac_lo=0 ac_mid=0
6833 while :; do
6834 cat >conftest.$ac_ext <<_ACEOF
6835#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006836/* confdefs.h. */
6837_ACEOF
6838cat confdefs.h >>conftest.$ac_ext
6839cat >>conftest.$ac_ext <<_ACEOF
6840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006841$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006842int
6843main ()
6844{
6845static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6846test_array [0] = 0
6847
6848 ;
6849 return 0;
6850}
6851_ACEOF
6852rm -f conftest.$ac_objext
6853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6854 (eval $ac_compile) 2>&5
6855 ac_status=$?
6856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6857 (exit $ac_status); } &&
6858 { ac_try='test -s conftest.$ac_objext'
6859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6860 (eval $ac_try) 2>&5
6861 ac_status=$?
6862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6863 (exit $ac_status); }; }; then
6864 ac_hi=$ac_mid; break
6865else
6866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006867sed 's/^/| /' conftest.$ac_ext >&5
6868
Martin v. Löwis11437992002-04-12 09:54:03 +00006869ac_lo=`expr $ac_mid + 1`
6870 if test $ac_lo -le $ac_mid; then
6871 ac_lo= ac_hi=
6872 break
6873 fi
6874 ac_mid=`expr 2 '*' $ac_mid + 1`
6875fi
6876rm -f conftest.$ac_objext conftest.$ac_ext
6877 done
6878else
6879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006880sed 's/^/| /' conftest.$ac_ext >&5
6881
Martin v. Löwis11437992002-04-12 09:54:03 +00006882cat >conftest.$ac_ext <<_ACEOF
6883#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006884/* confdefs.h. */
6885_ACEOF
6886cat confdefs.h >>conftest.$ac_ext
6887cat >>conftest.$ac_ext <<_ACEOF
6888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006889$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006890int
6891main ()
6892{
6893static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6894test_array [0] = 0
6895
6896 ;
6897 return 0;
6898}
6899_ACEOF
6900rm -f conftest.$ac_objext
6901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6902 (eval $ac_compile) 2>&5
6903 ac_status=$?
6904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6905 (exit $ac_status); } &&
6906 { ac_try='test -s conftest.$ac_objext'
6907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6908 (eval $ac_try) 2>&5
6909 ac_status=$?
6910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6911 (exit $ac_status); }; }; then
6912 ac_hi=-1 ac_mid=-1
6913 while :; do
6914 cat >conftest.$ac_ext <<_ACEOF
6915#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006916/* confdefs.h. */
6917_ACEOF
6918cat confdefs.h >>conftest.$ac_ext
6919cat >>conftest.$ac_ext <<_ACEOF
6920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006921$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006922int
6923main ()
6924{
6925static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6926test_array [0] = 0
6927
6928 ;
6929 return 0;
6930}
6931_ACEOF
6932rm -f conftest.$ac_objext
6933if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6934 (eval $ac_compile) 2>&5
6935 ac_status=$?
6936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6937 (exit $ac_status); } &&
6938 { ac_try='test -s conftest.$ac_objext'
6939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6940 (eval $ac_try) 2>&5
6941 ac_status=$?
6942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6943 (exit $ac_status); }; }; then
6944 ac_lo=$ac_mid; break
6945else
6946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006947sed 's/^/| /' conftest.$ac_ext >&5
6948
Martin v. Löwis11437992002-04-12 09:54:03 +00006949ac_hi=`expr '(' $ac_mid ')' - 1`
6950 if test $ac_mid -le $ac_hi; then
6951 ac_lo= ac_hi=
6952 break
6953 fi
6954 ac_mid=`expr 2 '*' $ac_mid`
6955fi
6956rm -f conftest.$ac_objext conftest.$ac_ext
6957 done
6958else
6959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006960sed 's/^/| /' conftest.$ac_ext >&5
6961
Martin v. Löwis11437992002-04-12 09:54:03 +00006962ac_lo= ac_hi=
6963fi
6964rm -f conftest.$ac_objext conftest.$ac_ext
6965fi
6966rm -f conftest.$ac_objext conftest.$ac_ext
6967# Binary search between lo and hi bounds.
6968while test "x$ac_lo" != "x$ac_hi"; do
6969 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6970 cat >conftest.$ac_ext <<_ACEOF
6971#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006972/* confdefs.h. */
6973_ACEOF
6974cat confdefs.h >>conftest.$ac_ext
6975cat >>conftest.$ac_ext <<_ACEOF
6976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006977$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006978int
6979main ()
6980{
6981static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6982test_array [0] = 0
6983
6984 ;
6985 return 0;
6986}
6987_ACEOF
6988rm -f conftest.$ac_objext
6989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6990 (eval $ac_compile) 2>&5
6991 ac_status=$?
6992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6993 (exit $ac_status); } &&
6994 { ac_try='test -s conftest.$ac_objext'
6995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6996 (eval $ac_try) 2>&5
6997 ac_status=$?
6998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6999 (exit $ac_status); }; }; then
7000 ac_hi=$ac_mid
7001else
7002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007003sed 's/^/| /' conftest.$ac_ext >&5
7004
Martin v. Löwis11437992002-04-12 09:54:03 +00007005ac_lo=`expr '(' $ac_mid ')' + 1`
7006fi
7007rm -f conftest.$ac_objext conftest.$ac_ext
7008done
7009case $ac_lo in
7010?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007011'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7012See \`config.log' for more details." >&5
7013echo "$as_me: error: cannot compute sizeof (short), 77
7014See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 { (exit 1); exit 1; }; } ;;
7016esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007017else
7018 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007019 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7020See \`config.log' for more details." >&5
7021echo "$as_me: error: cannot run test program while cross compiling
7022See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007023 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007024else
Martin v. Löwis11437992002-04-12 09:54:03 +00007025 cat >conftest.$ac_ext <<_ACEOF
7026#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007027/* confdefs.h. */
7028_ACEOF
7029cat confdefs.h >>conftest.$ac_ext
7030cat >>conftest.$ac_ext <<_ACEOF
7031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007032$ac_includes_default
7033long longval () { return (long) (sizeof (short)); }
7034unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007035#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007036#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007037int
7038main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007039{
Martin v. Löwis11437992002-04-12 09:54:03 +00007040
7041 FILE *f = fopen ("conftest.val", "w");
7042 if (! f)
7043 exit (1);
7044 if (((long) (sizeof (short))) < 0)
7045 {
7046 long i = longval ();
7047 if (i != ((long) (sizeof (short))))
7048 exit (1);
7049 fprintf (f, "%ld\n", i);
7050 }
7051 else
7052 {
7053 unsigned long i = ulongval ();
7054 if (i != ((long) (sizeof (short))))
7055 exit (1);
7056 fprintf (f, "%lu\n", i);
7057 }
7058 exit (ferror (f) || fclose (f) != 0);
7059
7060 ;
7061 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007062}
Martin v. Löwis11437992002-04-12 09:54:03 +00007063_ACEOF
7064rm -f conftest$ac_exeext
7065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7066 (eval $ac_link) 2>&5
7067 ac_status=$?
7068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7069 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7071 (eval $ac_try) 2>&5
7072 ac_status=$?
7073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7074 (exit $ac_status); }; }; then
7075 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007076else
Martin v. Löwis11437992002-04-12 09:54:03 +00007077 echo "$as_me: program exited with status $ac_status" >&5
7078echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007079sed 's/^/| /' conftest.$ac_ext >&5
7080
Martin v. Löwis11437992002-04-12 09:54:03 +00007081( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007082{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7083See \`config.log' for more details." >&5
7084echo "$as_me: error: cannot compute sizeof (short), 77
7085See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007086 { (exit 1); exit 1; }; }
7087fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007088rm -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 +00007089fi
7090fi
7091rm -f conftest.val
7092else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007093 ac_cv_sizeof_short=0
7094fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007095fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007096echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7097echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7098cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007099#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007100_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007101
7102
Martin v. Löwis11437992002-04-12 09:54:03 +00007103echo "$as_me:$LINENO: checking for float" >&5
7104echo $ECHO_N "checking for float... $ECHO_C" >&6
7105if test "${ac_cv_type_float+set}" = set; then
7106 echo $ECHO_N "(cached) $ECHO_C" >&6
7107else
7108 cat >conftest.$ac_ext <<_ACEOF
7109#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007110/* confdefs.h. */
7111_ACEOF
7112cat confdefs.h >>conftest.$ac_ext
7113cat >>conftest.$ac_ext <<_ACEOF
7114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007115$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007116int
7117main ()
7118{
7119if ((float *) 0)
7120 return 0;
7121if (sizeof (float))
7122 return 0;
7123 ;
7124 return 0;
7125}
7126_ACEOF
7127rm -f conftest.$ac_objext
7128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7129 (eval $ac_compile) 2>&5
7130 ac_status=$?
7131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7132 (exit $ac_status); } &&
7133 { ac_try='test -s conftest.$ac_objext'
7134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7135 (eval $ac_try) 2>&5
7136 ac_status=$?
7137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7138 (exit $ac_status); }; }; then
7139 ac_cv_type_float=yes
7140else
7141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007142sed 's/^/| /' conftest.$ac_ext >&5
7143
Martin v. Löwis11437992002-04-12 09:54:03 +00007144ac_cv_type_float=no
7145fi
7146rm -f conftest.$ac_objext conftest.$ac_ext
7147fi
7148echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7149echo "${ECHO_T}$ac_cv_type_float" >&6
7150
7151echo "$as_me:$LINENO: checking size of float" >&5
7152echo $ECHO_N "checking size of float... $ECHO_C" >&6
7153if test "${ac_cv_sizeof_float+set}" = set; then
7154 echo $ECHO_N "(cached) $ECHO_C" >&6
7155else
7156 if test "$ac_cv_type_float" = yes; then
7157 # The cast to unsigned long works around a bug in the HP C Compiler
7158 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7159 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7160 # This bug is HP SR number 8606223364.
7161 if test "$cross_compiling" = yes; then
7162 # Depending upon the size, compute the lo and hi bounds.
7163cat >conftest.$ac_ext <<_ACEOF
7164#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007165/* confdefs.h. */
7166_ACEOF
7167cat confdefs.h >>conftest.$ac_ext
7168cat >>conftest.$ac_ext <<_ACEOF
7169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007170$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007171int
7172main ()
7173{
7174static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7175test_array [0] = 0
7176
7177 ;
7178 return 0;
7179}
7180_ACEOF
7181rm -f conftest.$ac_objext
7182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7183 (eval $ac_compile) 2>&5
7184 ac_status=$?
7185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7186 (exit $ac_status); } &&
7187 { ac_try='test -s conftest.$ac_objext'
7188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7189 (eval $ac_try) 2>&5
7190 ac_status=$?
7191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7192 (exit $ac_status); }; }; then
7193 ac_lo=0 ac_mid=0
7194 while :; do
7195 cat >conftest.$ac_ext <<_ACEOF
7196#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007197/* confdefs.h. */
7198_ACEOF
7199cat confdefs.h >>conftest.$ac_ext
7200cat >>conftest.$ac_ext <<_ACEOF
7201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007202$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007203int
7204main ()
7205{
7206static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7207test_array [0] = 0
7208
7209 ;
7210 return 0;
7211}
7212_ACEOF
7213rm -f conftest.$ac_objext
7214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7215 (eval $ac_compile) 2>&5
7216 ac_status=$?
7217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7218 (exit $ac_status); } &&
7219 { ac_try='test -s conftest.$ac_objext'
7220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7221 (eval $ac_try) 2>&5
7222 ac_status=$?
7223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7224 (exit $ac_status); }; }; then
7225 ac_hi=$ac_mid; break
7226else
7227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007228sed 's/^/| /' conftest.$ac_ext >&5
7229
Martin v. Löwis11437992002-04-12 09:54:03 +00007230ac_lo=`expr $ac_mid + 1`
7231 if test $ac_lo -le $ac_mid; then
7232 ac_lo= ac_hi=
7233 break
7234 fi
7235 ac_mid=`expr 2 '*' $ac_mid + 1`
7236fi
7237rm -f conftest.$ac_objext conftest.$ac_ext
7238 done
7239else
7240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007241sed 's/^/| /' conftest.$ac_ext >&5
7242
Martin v. Löwis11437992002-04-12 09:54:03 +00007243cat >conftest.$ac_ext <<_ACEOF
7244#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007245/* confdefs.h. */
7246_ACEOF
7247cat confdefs.h >>conftest.$ac_ext
7248cat >>conftest.$ac_ext <<_ACEOF
7249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007250$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007251int
7252main ()
7253{
7254static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7255test_array [0] = 0
7256
7257 ;
7258 return 0;
7259}
7260_ACEOF
7261rm -f conftest.$ac_objext
7262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7263 (eval $ac_compile) 2>&5
7264 ac_status=$?
7265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7266 (exit $ac_status); } &&
7267 { ac_try='test -s conftest.$ac_objext'
7268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7269 (eval $ac_try) 2>&5
7270 ac_status=$?
7271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7272 (exit $ac_status); }; }; then
7273 ac_hi=-1 ac_mid=-1
7274 while :; do
7275 cat >conftest.$ac_ext <<_ACEOF
7276#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007277/* confdefs.h. */
7278_ACEOF
7279cat confdefs.h >>conftest.$ac_ext
7280cat >>conftest.$ac_ext <<_ACEOF
7281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007282$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007283int
7284main ()
7285{
7286static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7287test_array [0] = 0
7288
7289 ;
7290 return 0;
7291}
7292_ACEOF
7293rm -f conftest.$ac_objext
7294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7295 (eval $ac_compile) 2>&5
7296 ac_status=$?
7297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7298 (exit $ac_status); } &&
7299 { ac_try='test -s conftest.$ac_objext'
7300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7301 (eval $ac_try) 2>&5
7302 ac_status=$?
7303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7304 (exit $ac_status); }; }; then
7305 ac_lo=$ac_mid; break
7306else
7307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007308sed 's/^/| /' conftest.$ac_ext >&5
7309
Martin v. Löwis11437992002-04-12 09:54:03 +00007310ac_hi=`expr '(' $ac_mid ')' - 1`
7311 if test $ac_mid -le $ac_hi; then
7312 ac_lo= ac_hi=
7313 break
7314 fi
7315 ac_mid=`expr 2 '*' $ac_mid`
7316fi
7317rm -f conftest.$ac_objext conftest.$ac_ext
7318 done
7319else
7320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007321sed 's/^/| /' conftest.$ac_ext >&5
7322
Martin v. Löwis11437992002-04-12 09:54:03 +00007323ac_lo= ac_hi=
7324fi
7325rm -f conftest.$ac_objext conftest.$ac_ext
7326fi
7327rm -f conftest.$ac_objext conftest.$ac_ext
7328# Binary search between lo and hi bounds.
7329while test "x$ac_lo" != "x$ac_hi"; do
7330 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7331 cat >conftest.$ac_ext <<_ACEOF
7332#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007333/* confdefs.h. */
7334_ACEOF
7335cat confdefs.h >>conftest.$ac_ext
7336cat >>conftest.$ac_ext <<_ACEOF
7337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007338$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007339int
7340main ()
7341{
7342static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7343test_array [0] = 0
7344
7345 ;
7346 return 0;
7347}
7348_ACEOF
7349rm -f conftest.$ac_objext
7350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7351 (eval $ac_compile) 2>&5
7352 ac_status=$?
7353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7354 (exit $ac_status); } &&
7355 { ac_try='test -s conftest.$ac_objext'
7356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7357 (eval $ac_try) 2>&5
7358 ac_status=$?
7359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7360 (exit $ac_status); }; }; then
7361 ac_hi=$ac_mid
7362else
7363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007364sed 's/^/| /' conftest.$ac_ext >&5
7365
Martin v. Löwis11437992002-04-12 09:54:03 +00007366ac_lo=`expr '(' $ac_mid ')' + 1`
7367fi
7368rm -f conftest.$ac_objext conftest.$ac_ext
7369done
7370case $ac_lo in
7371?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007372'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7373See \`config.log' for more details." >&5
7374echo "$as_me: error: cannot compute sizeof (float), 77
7375See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007376 { (exit 1); exit 1; }; } ;;
7377esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007378else
7379 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007380 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7381See \`config.log' for more details." >&5
7382echo "$as_me: error: cannot run test program while cross compiling
7383See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007384 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007385else
Martin v. Löwis11437992002-04-12 09:54:03 +00007386 cat >conftest.$ac_ext <<_ACEOF
7387#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007388/* confdefs.h. */
7389_ACEOF
7390cat confdefs.h >>conftest.$ac_ext
7391cat >>conftest.$ac_ext <<_ACEOF
7392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007393$ac_includes_default
7394long longval () { return (long) (sizeof (float)); }
7395unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007396#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007397#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007398int
7399main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007400{
Martin v. Löwis11437992002-04-12 09:54:03 +00007401
7402 FILE *f = fopen ("conftest.val", "w");
7403 if (! f)
7404 exit (1);
7405 if (((long) (sizeof (float))) < 0)
7406 {
7407 long i = longval ();
7408 if (i != ((long) (sizeof (float))))
7409 exit (1);
7410 fprintf (f, "%ld\n", i);
7411 }
7412 else
7413 {
7414 unsigned long i = ulongval ();
7415 if (i != ((long) (sizeof (float))))
7416 exit (1);
7417 fprintf (f, "%lu\n", i);
7418 }
7419 exit (ferror (f) || fclose (f) != 0);
7420
7421 ;
7422 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007423}
Martin v. Löwis11437992002-04-12 09:54:03 +00007424_ACEOF
7425rm -f conftest$ac_exeext
7426if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7427 (eval $ac_link) 2>&5
7428 ac_status=$?
7429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7430 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7432 (eval $ac_try) 2>&5
7433 ac_status=$?
7434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7435 (exit $ac_status); }; }; then
7436 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007437else
Martin v. Löwis11437992002-04-12 09:54:03 +00007438 echo "$as_me: program exited with status $ac_status" >&5
7439echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007440sed 's/^/| /' conftest.$ac_ext >&5
7441
Martin v. Löwis11437992002-04-12 09:54:03 +00007442( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007443{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7444See \`config.log' for more details." >&5
7445echo "$as_me: error: cannot compute sizeof (float), 77
7446See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007447 { (exit 1); exit 1; }; }
7448fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007449rm -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 +00007450fi
7451fi
7452rm -f conftest.val
7453else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007454 ac_cv_sizeof_float=0
7455fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007456fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007457echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7458echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7459cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007460#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007461_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007462
7463
Martin v. Löwis11437992002-04-12 09:54:03 +00007464echo "$as_me:$LINENO: checking for double" >&5
7465echo $ECHO_N "checking for double... $ECHO_C" >&6
7466if test "${ac_cv_type_double+set}" = set; then
7467 echo $ECHO_N "(cached) $ECHO_C" >&6
7468else
7469 cat >conftest.$ac_ext <<_ACEOF
7470#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007471/* confdefs.h. */
7472_ACEOF
7473cat confdefs.h >>conftest.$ac_ext
7474cat >>conftest.$ac_ext <<_ACEOF
7475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007476$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007477int
7478main ()
7479{
7480if ((double *) 0)
7481 return 0;
7482if (sizeof (double))
7483 return 0;
7484 ;
7485 return 0;
7486}
7487_ACEOF
7488rm -f conftest.$ac_objext
7489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7490 (eval $ac_compile) 2>&5
7491 ac_status=$?
7492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7493 (exit $ac_status); } &&
7494 { ac_try='test -s conftest.$ac_objext'
7495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7496 (eval $ac_try) 2>&5
7497 ac_status=$?
7498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7499 (exit $ac_status); }; }; then
7500 ac_cv_type_double=yes
7501else
7502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007503sed 's/^/| /' conftest.$ac_ext >&5
7504
Martin v. Löwis11437992002-04-12 09:54:03 +00007505ac_cv_type_double=no
7506fi
7507rm -f conftest.$ac_objext conftest.$ac_ext
7508fi
7509echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7510echo "${ECHO_T}$ac_cv_type_double" >&6
7511
7512echo "$as_me:$LINENO: checking size of double" >&5
7513echo $ECHO_N "checking size of double... $ECHO_C" >&6
7514if test "${ac_cv_sizeof_double+set}" = set; then
7515 echo $ECHO_N "(cached) $ECHO_C" >&6
7516else
7517 if test "$ac_cv_type_double" = yes; then
7518 # The cast to unsigned long works around a bug in the HP C Compiler
7519 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7520 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7521 # This bug is HP SR number 8606223364.
7522 if test "$cross_compiling" = yes; then
7523 # Depending upon the size, compute the lo and hi bounds.
7524cat >conftest.$ac_ext <<_ACEOF
7525#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007526/* confdefs.h. */
7527_ACEOF
7528cat confdefs.h >>conftest.$ac_ext
7529cat >>conftest.$ac_ext <<_ACEOF
7530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007531$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007532int
7533main ()
7534{
7535static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7536test_array [0] = 0
7537
7538 ;
7539 return 0;
7540}
7541_ACEOF
7542rm -f conftest.$ac_objext
7543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7544 (eval $ac_compile) 2>&5
7545 ac_status=$?
7546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7547 (exit $ac_status); } &&
7548 { ac_try='test -s conftest.$ac_objext'
7549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7550 (eval $ac_try) 2>&5
7551 ac_status=$?
7552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7553 (exit $ac_status); }; }; then
7554 ac_lo=0 ac_mid=0
7555 while :; do
7556 cat >conftest.$ac_ext <<_ACEOF
7557#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007558/* confdefs.h. */
7559_ACEOF
7560cat confdefs.h >>conftest.$ac_ext
7561cat >>conftest.$ac_ext <<_ACEOF
7562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007563$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007564int
7565main ()
7566{
7567static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7568test_array [0] = 0
7569
7570 ;
7571 return 0;
7572}
7573_ACEOF
7574rm -f conftest.$ac_objext
7575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7576 (eval $ac_compile) 2>&5
7577 ac_status=$?
7578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7579 (exit $ac_status); } &&
7580 { ac_try='test -s conftest.$ac_objext'
7581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7582 (eval $ac_try) 2>&5
7583 ac_status=$?
7584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7585 (exit $ac_status); }; }; then
7586 ac_hi=$ac_mid; break
7587else
7588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007589sed 's/^/| /' conftest.$ac_ext >&5
7590
Martin v. Löwis11437992002-04-12 09:54:03 +00007591ac_lo=`expr $ac_mid + 1`
7592 if test $ac_lo -le $ac_mid; then
7593 ac_lo= ac_hi=
7594 break
7595 fi
7596 ac_mid=`expr 2 '*' $ac_mid + 1`
7597fi
7598rm -f conftest.$ac_objext conftest.$ac_ext
7599 done
7600else
7601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007602sed 's/^/| /' conftest.$ac_ext >&5
7603
Martin v. Löwis11437992002-04-12 09:54:03 +00007604cat >conftest.$ac_ext <<_ACEOF
7605#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007606/* confdefs.h. */
7607_ACEOF
7608cat confdefs.h >>conftest.$ac_ext
7609cat >>conftest.$ac_ext <<_ACEOF
7610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007611$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007612int
7613main ()
7614{
7615static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7616test_array [0] = 0
7617
7618 ;
7619 return 0;
7620}
7621_ACEOF
7622rm -f conftest.$ac_objext
7623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7624 (eval $ac_compile) 2>&5
7625 ac_status=$?
7626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7627 (exit $ac_status); } &&
7628 { ac_try='test -s conftest.$ac_objext'
7629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7630 (eval $ac_try) 2>&5
7631 ac_status=$?
7632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7633 (exit $ac_status); }; }; then
7634 ac_hi=-1 ac_mid=-1
7635 while :; do
7636 cat >conftest.$ac_ext <<_ACEOF
7637#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007638/* confdefs.h. */
7639_ACEOF
7640cat confdefs.h >>conftest.$ac_ext
7641cat >>conftest.$ac_ext <<_ACEOF
7642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007643$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007644int
7645main ()
7646{
7647static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7648test_array [0] = 0
7649
7650 ;
7651 return 0;
7652}
7653_ACEOF
7654rm -f conftest.$ac_objext
7655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7656 (eval $ac_compile) 2>&5
7657 ac_status=$?
7658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7659 (exit $ac_status); } &&
7660 { ac_try='test -s conftest.$ac_objext'
7661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7662 (eval $ac_try) 2>&5
7663 ac_status=$?
7664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7665 (exit $ac_status); }; }; then
7666 ac_lo=$ac_mid; break
7667else
7668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007669sed 's/^/| /' conftest.$ac_ext >&5
7670
Martin v. Löwis11437992002-04-12 09:54:03 +00007671ac_hi=`expr '(' $ac_mid ')' - 1`
7672 if test $ac_mid -le $ac_hi; then
7673 ac_lo= ac_hi=
7674 break
7675 fi
7676 ac_mid=`expr 2 '*' $ac_mid`
7677fi
7678rm -f conftest.$ac_objext conftest.$ac_ext
7679 done
7680else
7681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007682sed 's/^/| /' conftest.$ac_ext >&5
7683
Martin v. Löwis11437992002-04-12 09:54:03 +00007684ac_lo= ac_hi=
7685fi
7686rm -f conftest.$ac_objext conftest.$ac_ext
7687fi
7688rm -f conftest.$ac_objext conftest.$ac_ext
7689# Binary search between lo and hi bounds.
7690while test "x$ac_lo" != "x$ac_hi"; do
7691 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7692 cat >conftest.$ac_ext <<_ACEOF
7693#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007694/* confdefs.h. */
7695_ACEOF
7696cat confdefs.h >>conftest.$ac_ext
7697cat >>conftest.$ac_ext <<_ACEOF
7698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007699$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007700int
7701main ()
7702{
7703static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7704test_array [0] = 0
7705
7706 ;
7707 return 0;
7708}
7709_ACEOF
7710rm -f conftest.$ac_objext
7711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7712 (eval $ac_compile) 2>&5
7713 ac_status=$?
7714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7715 (exit $ac_status); } &&
7716 { ac_try='test -s conftest.$ac_objext'
7717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7718 (eval $ac_try) 2>&5
7719 ac_status=$?
7720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7721 (exit $ac_status); }; }; then
7722 ac_hi=$ac_mid
7723else
7724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007725sed 's/^/| /' conftest.$ac_ext >&5
7726
Martin v. Löwis11437992002-04-12 09:54:03 +00007727ac_lo=`expr '(' $ac_mid ')' + 1`
7728fi
7729rm -f conftest.$ac_objext conftest.$ac_ext
7730done
7731case $ac_lo in
7732?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007733'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7734See \`config.log' for more details." >&5
7735echo "$as_me: error: cannot compute sizeof (double), 77
7736See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 { (exit 1); exit 1; }; } ;;
7738esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007739else
7740 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007741 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7742See \`config.log' for more details." >&5
7743echo "$as_me: error: cannot run test program while cross compiling
7744See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007746else
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 cat >conftest.$ac_ext <<_ACEOF
7748#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007749/* confdefs.h. */
7750_ACEOF
7751cat confdefs.h >>conftest.$ac_ext
7752cat >>conftest.$ac_ext <<_ACEOF
7753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007754$ac_includes_default
7755long longval () { return (long) (sizeof (double)); }
7756unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007757#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007758#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007759int
7760main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007761{
Martin v. Löwis11437992002-04-12 09:54:03 +00007762
7763 FILE *f = fopen ("conftest.val", "w");
7764 if (! f)
7765 exit (1);
7766 if (((long) (sizeof (double))) < 0)
7767 {
7768 long i = longval ();
7769 if (i != ((long) (sizeof (double))))
7770 exit (1);
7771 fprintf (f, "%ld\n", i);
7772 }
7773 else
7774 {
7775 unsigned long i = ulongval ();
7776 if (i != ((long) (sizeof (double))))
7777 exit (1);
7778 fprintf (f, "%lu\n", i);
7779 }
7780 exit (ferror (f) || fclose (f) != 0);
7781
7782 ;
7783 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007784}
Martin v. Löwis11437992002-04-12 09:54:03 +00007785_ACEOF
7786rm -f conftest$ac_exeext
7787if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7788 (eval $ac_link) 2>&5
7789 ac_status=$?
7790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7791 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7793 (eval $ac_try) 2>&5
7794 ac_status=$?
7795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7796 (exit $ac_status); }; }; then
7797 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007798else
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 echo "$as_me: program exited with status $ac_status" >&5
7800echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007801sed 's/^/| /' conftest.$ac_ext >&5
7802
Martin v. Löwis11437992002-04-12 09:54:03 +00007803( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007804{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7805See \`config.log' for more details." >&5
7806echo "$as_me: error: cannot compute sizeof (double), 77
7807See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007808 { (exit 1); exit 1; }; }
7809fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007810rm -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 +00007811fi
7812fi
7813rm -f conftest.val
7814else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007815 ac_cv_sizeof_double=0
7816fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007817fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007818echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7819echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7820cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007821#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007822_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007823
7824
Martin v. Löwis11437992002-04-12 09:54:03 +00007825echo "$as_me:$LINENO: checking for fpos_t" >&5
7826echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7827if test "${ac_cv_type_fpos_t+set}" = set; then
7828 echo $ECHO_N "(cached) $ECHO_C" >&6
7829else
7830 cat >conftest.$ac_ext <<_ACEOF
7831#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007832/* confdefs.h. */
7833_ACEOF
7834cat confdefs.h >>conftest.$ac_ext
7835cat >>conftest.$ac_ext <<_ACEOF
7836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007837$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007838int
7839main ()
7840{
7841if ((fpos_t *) 0)
7842 return 0;
7843if (sizeof (fpos_t))
7844 return 0;
7845 ;
7846 return 0;
7847}
7848_ACEOF
7849rm -f conftest.$ac_objext
7850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7851 (eval $ac_compile) 2>&5
7852 ac_status=$?
7853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7854 (exit $ac_status); } &&
7855 { ac_try='test -s conftest.$ac_objext'
7856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7857 (eval $ac_try) 2>&5
7858 ac_status=$?
7859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7860 (exit $ac_status); }; }; then
7861 ac_cv_type_fpos_t=yes
7862else
7863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007864sed 's/^/| /' conftest.$ac_ext >&5
7865
Martin v. Löwis11437992002-04-12 09:54:03 +00007866ac_cv_type_fpos_t=no
7867fi
7868rm -f conftest.$ac_objext conftest.$ac_ext
7869fi
7870echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7871echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7872
7873echo "$as_me:$LINENO: checking size of fpos_t" >&5
7874echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7875if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7876 echo $ECHO_N "(cached) $ECHO_C" >&6
7877else
7878 if test "$ac_cv_type_fpos_t" = yes; then
7879 # The cast to unsigned long works around a bug in the HP C Compiler
7880 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7881 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7882 # This bug is HP SR number 8606223364.
7883 if test "$cross_compiling" = yes; then
7884 # Depending upon the size, compute the lo and hi bounds.
7885cat >conftest.$ac_ext <<_ACEOF
7886#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007887/* confdefs.h. */
7888_ACEOF
7889cat confdefs.h >>conftest.$ac_ext
7890cat >>conftest.$ac_ext <<_ACEOF
7891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007892$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007893int
7894main ()
7895{
7896static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7897test_array [0] = 0
7898
7899 ;
7900 return 0;
7901}
7902_ACEOF
7903rm -f conftest.$ac_objext
7904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7905 (eval $ac_compile) 2>&5
7906 ac_status=$?
7907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7908 (exit $ac_status); } &&
7909 { ac_try='test -s conftest.$ac_objext'
7910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7911 (eval $ac_try) 2>&5
7912 ac_status=$?
7913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7914 (exit $ac_status); }; }; then
7915 ac_lo=0 ac_mid=0
7916 while :; do
7917 cat >conftest.$ac_ext <<_ACEOF
7918#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007919/* confdefs.h. */
7920_ACEOF
7921cat confdefs.h >>conftest.$ac_ext
7922cat >>conftest.$ac_ext <<_ACEOF
7923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007924$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007925int
7926main ()
7927{
7928static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7929test_array [0] = 0
7930
7931 ;
7932 return 0;
7933}
7934_ACEOF
7935rm -f conftest.$ac_objext
7936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7937 (eval $ac_compile) 2>&5
7938 ac_status=$?
7939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7940 (exit $ac_status); } &&
7941 { ac_try='test -s conftest.$ac_objext'
7942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7943 (eval $ac_try) 2>&5
7944 ac_status=$?
7945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7946 (exit $ac_status); }; }; then
7947 ac_hi=$ac_mid; break
7948else
7949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007950sed 's/^/| /' conftest.$ac_ext >&5
7951
Martin v. Löwis11437992002-04-12 09:54:03 +00007952ac_lo=`expr $ac_mid + 1`
7953 if test $ac_lo -le $ac_mid; then
7954 ac_lo= ac_hi=
7955 break
7956 fi
7957 ac_mid=`expr 2 '*' $ac_mid + 1`
7958fi
7959rm -f conftest.$ac_objext conftest.$ac_ext
7960 done
7961else
7962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007963sed 's/^/| /' conftest.$ac_ext >&5
7964
Martin v. Löwis11437992002-04-12 09:54:03 +00007965cat >conftest.$ac_ext <<_ACEOF
7966#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007967/* confdefs.h. */
7968_ACEOF
7969cat confdefs.h >>conftest.$ac_ext
7970cat >>conftest.$ac_ext <<_ACEOF
7971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007972$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007973int
7974main ()
7975{
7976static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7977test_array [0] = 0
7978
7979 ;
7980 return 0;
7981}
7982_ACEOF
7983rm -f conftest.$ac_objext
7984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7985 (eval $ac_compile) 2>&5
7986 ac_status=$?
7987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7988 (exit $ac_status); } &&
7989 { ac_try='test -s conftest.$ac_objext'
7990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7991 (eval $ac_try) 2>&5
7992 ac_status=$?
7993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7994 (exit $ac_status); }; }; then
7995 ac_hi=-1 ac_mid=-1
7996 while :; do
7997 cat >conftest.$ac_ext <<_ACEOF
7998#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007999/* confdefs.h. */
8000_ACEOF
8001cat confdefs.h >>conftest.$ac_ext
8002cat >>conftest.$ac_ext <<_ACEOF
8003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008004$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008005int
8006main ()
8007{
8008static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8009test_array [0] = 0
8010
8011 ;
8012 return 0;
8013}
8014_ACEOF
8015rm -f conftest.$ac_objext
8016if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8017 (eval $ac_compile) 2>&5
8018 ac_status=$?
8019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8020 (exit $ac_status); } &&
8021 { ac_try='test -s conftest.$ac_objext'
8022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8023 (eval $ac_try) 2>&5
8024 ac_status=$?
8025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8026 (exit $ac_status); }; }; then
8027 ac_lo=$ac_mid; break
8028else
8029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008030sed 's/^/| /' conftest.$ac_ext >&5
8031
Martin v. Löwis11437992002-04-12 09:54:03 +00008032ac_hi=`expr '(' $ac_mid ')' - 1`
8033 if test $ac_mid -le $ac_hi; then
8034 ac_lo= ac_hi=
8035 break
8036 fi
8037 ac_mid=`expr 2 '*' $ac_mid`
8038fi
8039rm -f conftest.$ac_objext conftest.$ac_ext
8040 done
8041else
8042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008043sed 's/^/| /' conftest.$ac_ext >&5
8044
Martin v. Löwis11437992002-04-12 09:54:03 +00008045ac_lo= ac_hi=
8046fi
8047rm -f conftest.$ac_objext conftest.$ac_ext
8048fi
8049rm -f conftest.$ac_objext conftest.$ac_ext
8050# Binary search between lo and hi bounds.
8051while test "x$ac_lo" != "x$ac_hi"; do
8052 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8053 cat >conftest.$ac_ext <<_ACEOF
8054#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008055/* confdefs.h. */
8056_ACEOF
8057cat confdefs.h >>conftest.$ac_ext
8058cat >>conftest.$ac_ext <<_ACEOF
8059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008060$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008061int
8062main ()
8063{
8064static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8065test_array [0] = 0
8066
8067 ;
8068 return 0;
8069}
8070_ACEOF
8071rm -f conftest.$ac_objext
8072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8073 (eval $ac_compile) 2>&5
8074 ac_status=$?
8075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8076 (exit $ac_status); } &&
8077 { ac_try='test -s conftest.$ac_objext'
8078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8079 (eval $ac_try) 2>&5
8080 ac_status=$?
8081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8082 (exit $ac_status); }; }; then
8083 ac_hi=$ac_mid
8084else
8085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008086sed 's/^/| /' conftest.$ac_ext >&5
8087
Martin v. Löwis11437992002-04-12 09:54:03 +00008088ac_lo=`expr '(' $ac_mid ')' + 1`
8089fi
8090rm -f conftest.$ac_objext conftest.$ac_ext
8091done
8092case $ac_lo in
8093?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008094'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8095See \`config.log' for more details." >&5
8096echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8097See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 { (exit 1); exit 1; }; } ;;
8099esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008100else
8101 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008102 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8103See \`config.log' for more details." >&5
8104echo "$as_me: error: cannot run test program while cross compiling
8105See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008106 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008107else
Martin v. Löwis11437992002-04-12 09:54:03 +00008108 cat >conftest.$ac_ext <<_ACEOF
8109#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008110/* confdefs.h. */
8111_ACEOF
8112cat confdefs.h >>conftest.$ac_ext
8113cat >>conftest.$ac_ext <<_ACEOF
8114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008115$ac_includes_default
8116long longval () { return (long) (sizeof (fpos_t)); }
8117unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008118#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008119#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008120int
8121main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008122{
Martin v. Löwis11437992002-04-12 09:54:03 +00008123
8124 FILE *f = fopen ("conftest.val", "w");
8125 if (! f)
8126 exit (1);
8127 if (((long) (sizeof (fpos_t))) < 0)
8128 {
8129 long i = longval ();
8130 if (i != ((long) (sizeof (fpos_t))))
8131 exit (1);
8132 fprintf (f, "%ld\n", i);
8133 }
8134 else
8135 {
8136 unsigned long i = ulongval ();
8137 if (i != ((long) (sizeof (fpos_t))))
8138 exit (1);
8139 fprintf (f, "%lu\n", i);
8140 }
8141 exit (ferror (f) || fclose (f) != 0);
8142
8143 ;
8144 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008145}
Martin v. Löwis11437992002-04-12 09:54:03 +00008146_ACEOF
8147rm -f conftest$ac_exeext
8148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8149 (eval $ac_link) 2>&5
8150 ac_status=$?
8151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8152 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8154 (eval $ac_try) 2>&5
8155 ac_status=$?
8156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8157 (exit $ac_status); }; }; then
8158 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008159else
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 echo "$as_me: program exited with status $ac_status" >&5
8161echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008162sed 's/^/| /' conftest.$ac_ext >&5
8163
Martin v. Löwis11437992002-04-12 09:54:03 +00008164( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008165{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8166See \`config.log' for more details." >&5
8167echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8168See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008169 { (exit 1); exit 1; }; }
8170fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008171rm -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 +00008172fi
8173fi
8174rm -f conftest.val
8175else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008176 ac_cv_sizeof_fpos_t=0
8177fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008179echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8180echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8181cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008182#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008183_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008184
Michael W. Hudson54241132001-12-07 15:38:26 +00008185
8186
Martin v. Löwis11437992002-04-12 09:54:03 +00008187echo "$as_me:$LINENO: checking for long long support" >&5
8188echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008189have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008190cat >conftest.$ac_ext <<_ACEOF
8191#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008192/* confdefs.h. */
8193_ACEOF
8194cat confdefs.h >>conftest.$ac_ext
8195cat >>conftest.$ac_ext <<_ACEOF
8196/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008197
Martin v. Löwis11437992002-04-12 09:54:03 +00008198int
8199main ()
8200{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008201long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008202 ;
8203 return 0;
8204}
8205_ACEOF
8206rm -f conftest.$ac_objext
8207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8208 (eval $ac_compile) 2>&5
8209 ac_status=$?
8210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8211 (exit $ac_status); } &&
8212 { ac_try='test -s conftest.$ac_objext'
8213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8214 (eval $ac_try) 2>&5
8215 ac_status=$?
8216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8217 (exit $ac_status); }; }; then
8218
8219
8220cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008221#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008222_ACEOF
8223
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008224 have_long_long=yes
8225
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008226else
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008228sed 's/^/| /' conftest.$ac_ext >&5
8229
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008230fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008231rm -f conftest.$ac_objext conftest.$ac_ext
8232echo "$as_me:$LINENO: result: $have_long_long" >&5
8233echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008234if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008235echo "$as_me:$LINENO: checking for long long" >&5
8236echo $ECHO_N "checking for long long... $ECHO_C" >&6
8237if test "${ac_cv_type_long_long+set}" = set; then
8238 echo $ECHO_N "(cached) $ECHO_C" >&6
8239else
8240 cat >conftest.$ac_ext <<_ACEOF
8241#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008242/* confdefs.h. */
8243_ACEOF
8244cat confdefs.h >>conftest.$ac_ext
8245cat >>conftest.$ac_ext <<_ACEOF
8246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008247$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008248int
8249main ()
8250{
8251if ((long long *) 0)
8252 return 0;
8253if (sizeof (long long))
8254 return 0;
8255 ;
8256 return 0;
8257}
8258_ACEOF
8259rm -f conftest.$ac_objext
8260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8261 (eval $ac_compile) 2>&5
8262 ac_status=$?
8263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8264 (exit $ac_status); } &&
8265 { ac_try='test -s conftest.$ac_objext'
8266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8267 (eval $ac_try) 2>&5
8268 ac_status=$?
8269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8270 (exit $ac_status); }; }; then
8271 ac_cv_type_long_long=yes
8272else
8273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008274sed 's/^/| /' conftest.$ac_ext >&5
8275
Martin v. Löwis11437992002-04-12 09:54:03 +00008276ac_cv_type_long_long=no
8277fi
8278rm -f conftest.$ac_objext conftest.$ac_ext
8279fi
8280echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8281echo "${ECHO_T}$ac_cv_type_long_long" >&6
8282
8283echo "$as_me:$LINENO: checking size of long long" >&5
8284echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8285if test "${ac_cv_sizeof_long_long+set}" = set; then
8286 echo $ECHO_N "(cached) $ECHO_C" >&6
8287else
8288 if test "$ac_cv_type_long_long" = yes; then
8289 # The cast to unsigned long works around a bug in the HP C Compiler
8290 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8291 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8292 # This bug is HP SR number 8606223364.
8293 if test "$cross_compiling" = yes; then
8294 # Depending upon the size, compute the lo and hi bounds.
8295cat >conftest.$ac_ext <<_ACEOF
8296#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008297/* confdefs.h. */
8298_ACEOF
8299cat confdefs.h >>conftest.$ac_ext
8300cat >>conftest.$ac_ext <<_ACEOF
8301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008302$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008303int
8304main ()
8305{
8306static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8307test_array [0] = 0
8308
8309 ;
8310 return 0;
8311}
8312_ACEOF
8313rm -f conftest.$ac_objext
8314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8315 (eval $ac_compile) 2>&5
8316 ac_status=$?
8317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8318 (exit $ac_status); } &&
8319 { ac_try='test -s conftest.$ac_objext'
8320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8321 (eval $ac_try) 2>&5
8322 ac_status=$?
8323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8324 (exit $ac_status); }; }; then
8325 ac_lo=0 ac_mid=0
8326 while :; do
8327 cat >conftest.$ac_ext <<_ACEOF
8328#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008329/* confdefs.h. */
8330_ACEOF
8331cat confdefs.h >>conftest.$ac_ext
8332cat >>conftest.$ac_ext <<_ACEOF
8333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008334$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008335int
8336main ()
8337{
8338static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8339test_array [0] = 0
8340
8341 ;
8342 return 0;
8343}
8344_ACEOF
8345rm -f conftest.$ac_objext
8346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8347 (eval $ac_compile) 2>&5
8348 ac_status=$?
8349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350 (exit $ac_status); } &&
8351 { ac_try='test -s conftest.$ac_objext'
8352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8353 (eval $ac_try) 2>&5
8354 ac_status=$?
8355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8356 (exit $ac_status); }; }; then
8357 ac_hi=$ac_mid; break
8358else
8359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008360sed 's/^/| /' conftest.$ac_ext >&5
8361
Martin v. Löwis11437992002-04-12 09:54:03 +00008362ac_lo=`expr $ac_mid + 1`
8363 if test $ac_lo -le $ac_mid; then
8364 ac_lo= ac_hi=
8365 break
8366 fi
8367 ac_mid=`expr 2 '*' $ac_mid + 1`
8368fi
8369rm -f conftest.$ac_objext conftest.$ac_ext
8370 done
8371else
8372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008373sed 's/^/| /' conftest.$ac_ext >&5
8374
Martin v. Löwis11437992002-04-12 09:54:03 +00008375cat >conftest.$ac_ext <<_ACEOF
8376#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008377/* confdefs.h. */
8378_ACEOF
8379cat confdefs.h >>conftest.$ac_ext
8380cat >>conftest.$ac_ext <<_ACEOF
8381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008382$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008383int
8384main ()
8385{
8386static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8387test_array [0] = 0
8388
8389 ;
8390 return 0;
8391}
8392_ACEOF
8393rm -f conftest.$ac_objext
8394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8395 (eval $ac_compile) 2>&5
8396 ac_status=$?
8397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8398 (exit $ac_status); } &&
8399 { ac_try='test -s conftest.$ac_objext'
8400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8401 (eval $ac_try) 2>&5
8402 ac_status=$?
8403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8404 (exit $ac_status); }; }; then
8405 ac_hi=-1 ac_mid=-1
8406 while :; do
8407 cat >conftest.$ac_ext <<_ACEOF
8408#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008409/* confdefs.h. */
8410_ACEOF
8411cat confdefs.h >>conftest.$ac_ext
8412cat >>conftest.$ac_ext <<_ACEOF
8413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008414$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008415int
8416main ()
8417{
8418static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8419test_array [0] = 0
8420
8421 ;
8422 return 0;
8423}
8424_ACEOF
8425rm -f conftest.$ac_objext
8426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8427 (eval $ac_compile) 2>&5
8428 ac_status=$?
8429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8430 (exit $ac_status); } &&
8431 { ac_try='test -s conftest.$ac_objext'
8432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8433 (eval $ac_try) 2>&5
8434 ac_status=$?
8435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8436 (exit $ac_status); }; }; then
8437 ac_lo=$ac_mid; break
8438else
8439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008440sed 's/^/| /' conftest.$ac_ext >&5
8441
Martin v. Löwis11437992002-04-12 09:54:03 +00008442ac_hi=`expr '(' $ac_mid ')' - 1`
8443 if test $ac_mid -le $ac_hi; then
8444 ac_lo= ac_hi=
8445 break
8446 fi
8447 ac_mid=`expr 2 '*' $ac_mid`
8448fi
8449rm -f conftest.$ac_objext conftest.$ac_ext
8450 done
8451else
8452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008453sed 's/^/| /' conftest.$ac_ext >&5
8454
Martin v. Löwis11437992002-04-12 09:54:03 +00008455ac_lo= ac_hi=
8456fi
8457rm -f conftest.$ac_objext conftest.$ac_ext
8458fi
8459rm -f conftest.$ac_objext conftest.$ac_ext
8460# Binary search between lo and hi bounds.
8461while test "x$ac_lo" != "x$ac_hi"; do
8462 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8463 cat >conftest.$ac_ext <<_ACEOF
8464#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008465/* confdefs.h. */
8466_ACEOF
8467cat confdefs.h >>conftest.$ac_ext
8468cat >>conftest.$ac_ext <<_ACEOF
8469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008470$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008471int
8472main ()
8473{
8474static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8475test_array [0] = 0
8476
8477 ;
8478 return 0;
8479}
8480_ACEOF
8481rm -f conftest.$ac_objext
8482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8483 (eval $ac_compile) 2>&5
8484 ac_status=$?
8485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8486 (exit $ac_status); } &&
8487 { ac_try='test -s conftest.$ac_objext'
8488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8489 (eval $ac_try) 2>&5
8490 ac_status=$?
8491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8492 (exit $ac_status); }; }; then
8493 ac_hi=$ac_mid
8494else
8495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008496sed 's/^/| /' conftest.$ac_ext >&5
8497
Martin v. Löwis11437992002-04-12 09:54:03 +00008498ac_lo=`expr '(' $ac_mid ')' + 1`
8499fi
8500rm -f conftest.$ac_objext conftest.$ac_ext
8501done
8502case $ac_lo in
8503?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008504'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8505See \`config.log' for more details." >&5
8506echo "$as_me: error: cannot compute sizeof (long long), 77
8507See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 { (exit 1); exit 1; }; } ;;
8509esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008510else
8511 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008512 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8513See \`config.log' for more details." >&5
8514echo "$as_me: error: cannot run test program while cross compiling
8515See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008517else
Martin v. Löwis11437992002-04-12 09:54:03 +00008518 cat >conftest.$ac_ext <<_ACEOF
8519#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008520/* confdefs.h. */
8521_ACEOF
8522cat confdefs.h >>conftest.$ac_ext
8523cat >>conftest.$ac_ext <<_ACEOF
8524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008525$ac_includes_default
8526long longval () { return (long) (sizeof (long long)); }
8527unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008528#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008529#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008530int
8531main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008532{
Martin v. Löwis11437992002-04-12 09:54:03 +00008533
8534 FILE *f = fopen ("conftest.val", "w");
8535 if (! f)
8536 exit (1);
8537 if (((long) (sizeof (long long))) < 0)
8538 {
8539 long i = longval ();
8540 if (i != ((long) (sizeof (long long))))
8541 exit (1);
8542 fprintf (f, "%ld\n", i);
8543 }
8544 else
8545 {
8546 unsigned long i = ulongval ();
8547 if (i != ((long) (sizeof (long long))))
8548 exit (1);
8549 fprintf (f, "%lu\n", i);
8550 }
8551 exit (ferror (f) || fclose (f) != 0);
8552
8553 ;
8554 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008555}
Martin v. Löwis11437992002-04-12 09:54:03 +00008556_ACEOF
8557rm -f conftest$ac_exeext
8558if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8559 (eval $ac_link) 2>&5
8560 ac_status=$?
8561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8562 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8564 (eval $ac_try) 2>&5
8565 ac_status=$?
8566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8567 (exit $ac_status); }; }; then
8568 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008569else
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 echo "$as_me: program exited with status $ac_status" >&5
8571echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008572sed 's/^/| /' conftest.$ac_ext >&5
8573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008575{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8576See \`config.log' for more details." >&5
8577echo "$as_me: error: cannot compute sizeof (long long), 77
8578See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 { (exit 1); exit 1; }; }
8580fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008581rm -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 +00008582fi
8583fi
8584rm -f conftest.val
8585else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008586 ac_cv_sizeof_long_long=0
8587fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008589echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8590echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8591cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008592#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008593_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008594
Michael W. Hudson54241132001-12-07 15:38:26 +00008595
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008596fi
8597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8599echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008600have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008601cat >conftest.$ac_ext <<_ACEOF
8602#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008603/* confdefs.h. */
8604_ACEOF
8605cat confdefs.h >>conftest.$ac_ext
8606cat >>conftest.$ac_ext <<_ACEOF
8607/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008608
Martin v. Löwis11437992002-04-12 09:54:03 +00008609int
8610main ()
8611{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008612uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008613 ;
8614 return 0;
8615}
8616_ACEOF
8617rm -f conftest.$ac_objext
8618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8619 (eval $ac_compile) 2>&5
8620 ac_status=$?
8621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8622 (exit $ac_status); } &&
8623 { ac_try='test -s conftest.$ac_objext'
8624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8625 (eval $ac_try) 2>&5
8626 ac_status=$?
8627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8628 (exit $ac_status); }; }; then
8629
8630
8631cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008632#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008633_ACEOF
8634
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008635 have_uintptr_t=yes
8636
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008637else
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008639sed 's/^/| /' conftest.$ac_ext >&5
8640
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008641fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008642rm -f conftest.$ac_objext conftest.$ac_ext
8643echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8644echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008645if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008646echo "$as_me:$LINENO: checking for uintptr_t" >&5
8647echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8648if test "${ac_cv_type_uintptr_t+set}" = set; then
8649 echo $ECHO_N "(cached) $ECHO_C" >&6
8650else
8651 cat >conftest.$ac_ext <<_ACEOF
8652#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008653/* confdefs.h. */
8654_ACEOF
8655cat confdefs.h >>conftest.$ac_ext
8656cat >>conftest.$ac_ext <<_ACEOF
8657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008658$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008659int
8660main ()
8661{
8662if ((uintptr_t *) 0)
8663 return 0;
8664if (sizeof (uintptr_t))
8665 return 0;
8666 ;
8667 return 0;
8668}
8669_ACEOF
8670rm -f conftest.$ac_objext
8671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8672 (eval $ac_compile) 2>&5
8673 ac_status=$?
8674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8675 (exit $ac_status); } &&
8676 { ac_try='test -s conftest.$ac_objext'
8677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8678 (eval $ac_try) 2>&5
8679 ac_status=$?
8680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8681 (exit $ac_status); }; }; then
8682 ac_cv_type_uintptr_t=yes
8683else
8684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008685sed 's/^/| /' conftest.$ac_ext >&5
8686
Martin v. Löwis11437992002-04-12 09:54:03 +00008687ac_cv_type_uintptr_t=no
8688fi
8689rm -f conftest.$ac_objext conftest.$ac_ext
8690fi
8691echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8692echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8693
8694echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8695echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8696if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8697 echo $ECHO_N "(cached) $ECHO_C" >&6
8698else
8699 if test "$ac_cv_type_uintptr_t" = yes; then
8700 # The cast to unsigned long works around a bug in the HP C Compiler
8701 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8702 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8703 # This bug is HP SR number 8606223364.
8704 if test "$cross_compiling" = yes; then
8705 # Depending upon the size, compute the lo and hi bounds.
8706cat >conftest.$ac_ext <<_ACEOF
8707#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008708/* confdefs.h. */
8709_ACEOF
8710cat confdefs.h >>conftest.$ac_ext
8711cat >>conftest.$ac_ext <<_ACEOF
8712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008714int
8715main ()
8716{
8717static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8718test_array [0] = 0
8719
8720 ;
8721 return 0;
8722}
8723_ACEOF
8724rm -f conftest.$ac_objext
8725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8726 (eval $ac_compile) 2>&5
8727 ac_status=$?
8728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8729 (exit $ac_status); } &&
8730 { ac_try='test -s conftest.$ac_objext'
8731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8732 (eval $ac_try) 2>&5
8733 ac_status=$?
8734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8735 (exit $ac_status); }; }; then
8736 ac_lo=0 ac_mid=0
8737 while :; do
8738 cat >conftest.$ac_ext <<_ACEOF
8739#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008740/* confdefs.h. */
8741_ACEOF
8742cat confdefs.h >>conftest.$ac_ext
8743cat >>conftest.$ac_ext <<_ACEOF
8744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008745$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008746int
8747main ()
8748{
8749static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8750test_array [0] = 0
8751
8752 ;
8753 return 0;
8754}
8755_ACEOF
8756rm -f conftest.$ac_objext
8757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8758 (eval $ac_compile) 2>&5
8759 ac_status=$?
8760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8761 (exit $ac_status); } &&
8762 { ac_try='test -s conftest.$ac_objext'
8763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8764 (eval $ac_try) 2>&5
8765 ac_status=$?
8766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8767 (exit $ac_status); }; }; then
8768 ac_hi=$ac_mid; break
8769else
8770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008771sed 's/^/| /' conftest.$ac_ext >&5
8772
Martin v. Löwis11437992002-04-12 09:54:03 +00008773ac_lo=`expr $ac_mid + 1`
8774 if test $ac_lo -le $ac_mid; then
8775 ac_lo= ac_hi=
8776 break
8777 fi
8778 ac_mid=`expr 2 '*' $ac_mid + 1`
8779fi
8780rm -f conftest.$ac_objext conftest.$ac_ext
8781 done
8782else
8783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008784sed 's/^/| /' conftest.$ac_ext >&5
8785
Martin v. Löwis11437992002-04-12 09:54:03 +00008786cat >conftest.$ac_ext <<_ACEOF
8787#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008788/* confdefs.h. */
8789_ACEOF
8790cat confdefs.h >>conftest.$ac_ext
8791cat >>conftest.$ac_ext <<_ACEOF
8792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008793$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008794int
8795main ()
8796{
8797static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8798test_array [0] = 0
8799
8800 ;
8801 return 0;
8802}
8803_ACEOF
8804rm -f conftest.$ac_objext
8805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8806 (eval $ac_compile) 2>&5
8807 ac_status=$?
8808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8809 (exit $ac_status); } &&
8810 { ac_try='test -s conftest.$ac_objext'
8811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8812 (eval $ac_try) 2>&5
8813 ac_status=$?
8814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8815 (exit $ac_status); }; }; then
8816 ac_hi=-1 ac_mid=-1
8817 while :; do
8818 cat >conftest.$ac_ext <<_ACEOF
8819#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008820/* confdefs.h. */
8821_ACEOF
8822cat confdefs.h >>conftest.$ac_ext
8823cat >>conftest.$ac_ext <<_ACEOF
8824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008825$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008826int
8827main ()
8828{
8829static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8830test_array [0] = 0
8831
8832 ;
8833 return 0;
8834}
8835_ACEOF
8836rm -f conftest.$ac_objext
8837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8838 (eval $ac_compile) 2>&5
8839 ac_status=$?
8840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8841 (exit $ac_status); } &&
8842 { ac_try='test -s conftest.$ac_objext'
8843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8844 (eval $ac_try) 2>&5
8845 ac_status=$?
8846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8847 (exit $ac_status); }; }; then
8848 ac_lo=$ac_mid; break
8849else
8850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008851sed 's/^/| /' conftest.$ac_ext >&5
8852
Martin v. Löwis11437992002-04-12 09:54:03 +00008853ac_hi=`expr '(' $ac_mid ')' - 1`
8854 if test $ac_mid -le $ac_hi; then
8855 ac_lo= ac_hi=
8856 break
8857 fi
8858 ac_mid=`expr 2 '*' $ac_mid`
8859fi
8860rm -f conftest.$ac_objext conftest.$ac_ext
8861 done
8862else
8863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008864sed 's/^/| /' conftest.$ac_ext >&5
8865
Martin v. Löwis11437992002-04-12 09:54:03 +00008866ac_lo= ac_hi=
8867fi
8868rm -f conftest.$ac_objext conftest.$ac_ext
8869fi
8870rm -f conftest.$ac_objext conftest.$ac_ext
8871# Binary search between lo and hi bounds.
8872while test "x$ac_lo" != "x$ac_hi"; do
8873 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8874 cat >conftest.$ac_ext <<_ACEOF
8875#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008876/* confdefs.h. */
8877_ACEOF
8878cat confdefs.h >>conftest.$ac_ext
8879cat >>conftest.$ac_ext <<_ACEOF
8880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008881$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008882int
8883main ()
8884{
8885static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8886test_array [0] = 0
8887
8888 ;
8889 return 0;
8890}
8891_ACEOF
8892rm -f conftest.$ac_objext
8893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8894 (eval $ac_compile) 2>&5
8895 ac_status=$?
8896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8897 (exit $ac_status); } &&
8898 { ac_try='test -s conftest.$ac_objext'
8899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8900 (eval $ac_try) 2>&5
8901 ac_status=$?
8902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8903 (exit $ac_status); }; }; then
8904 ac_hi=$ac_mid
8905else
8906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008907sed 's/^/| /' conftest.$ac_ext >&5
8908
Martin v. Löwis11437992002-04-12 09:54:03 +00008909ac_lo=`expr '(' $ac_mid ')' + 1`
8910fi
8911rm -f conftest.$ac_objext conftest.$ac_ext
8912done
8913case $ac_lo in
8914?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008915'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8916See \`config.log' for more details." >&5
8917echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8918See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 { (exit 1); exit 1; }; } ;;
8920esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008921else
8922 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008923 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8924See \`config.log' for more details." >&5
8925echo "$as_me: error: cannot run test program while cross compiling
8926See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008927 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008928else
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 cat >conftest.$ac_ext <<_ACEOF
8930#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008931/* confdefs.h. */
8932_ACEOF
8933cat confdefs.h >>conftest.$ac_ext
8934cat >>conftest.$ac_ext <<_ACEOF
8935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008936$ac_includes_default
8937long longval () { return (long) (sizeof (uintptr_t)); }
8938unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008939#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008940#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008941int
8942main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008943{
Martin v. Löwis11437992002-04-12 09:54:03 +00008944
8945 FILE *f = fopen ("conftest.val", "w");
8946 if (! f)
8947 exit (1);
8948 if (((long) (sizeof (uintptr_t))) < 0)
8949 {
8950 long i = longval ();
8951 if (i != ((long) (sizeof (uintptr_t))))
8952 exit (1);
8953 fprintf (f, "%ld\n", i);
8954 }
8955 else
8956 {
8957 unsigned long i = ulongval ();
8958 if (i != ((long) (sizeof (uintptr_t))))
8959 exit (1);
8960 fprintf (f, "%lu\n", i);
8961 }
8962 exit (ferror (f) || fclose (f) != 0);
8963
8964 ;
8965 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008966}
Martin v. Löwis11437992002-04-12 09:54:03 +00008967_ACEOF
8968rm -f conftest$ac_exeext
8969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8970 (eval $ac_link) 2>&5
8971 ac_status=$?
8972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8973 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8975 (eval $ac_try) 2>&5
8976 ac_status=$?
8977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8978 (exit $ac_status); }; }; then
8979 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008980else
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 echo "$as_me: program exited with status $ac_status" >&5
8982echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008983sed 's/^/| /' conftest.$ac_ext >&5
8984
Martin v. Löwis11437992002-04-12 09:54:03 +00008985( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008986{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8987See \`config.log' for more details." >&5
8988echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8989See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 { (exit 1); exit 1; }; }
8991fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008992rm -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 +00008993fi
8994fi
8995rm -f conftest.val
8996else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008997 ac_cv_sizeof_uintptr_t=0
8998fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008999fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009000echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9001echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9002cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009003#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009004_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009005
Michael W. Hudson54241132001-12-07 15:38:26 +00009006
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009007fi
9008
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009009# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009010echo "$as_me:$LINENO: checking size of off_t" >&5
9011echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9012if test "${ac_cv_sizeof_off_t+set}" = set; then
9013 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009014else
9015 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009016 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009017else
Martin v. Löwis11437992002-04-12 09:54:03 +00009018 cat >conftest.$ac_ext <<_ACEOF
9019#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009020/* confdefs.h. */
9021_ACEOF
9022cat confdefs.h >>conftest.$ac_ext
9023cat >>conftest.$ac_ext <<_ACEOF
9024/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009025#include <stdio.h>
9026#include <sys/types.h>
9027main()
9028{
9029 FILE *f=fopen("conftestval", "w");
9030 if (!f) exit(1);
9031 fprintf(f, "%d\n", sizeof(off_t));
9032 exit(0);
9033}
Martin v. Löwis11437992002-04-12 09:54:03 +00009034_ACEOF
9035rm -f conftest$ac_exeext
9036if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9037 (eval $ac_link) 2>&5
9038 ac_status=$?
9039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9040 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9042 (eval $ac_try) 2>&5
9043 ac_status=$?
9044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9045 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009046 ac_cv_sizeof_off_t=`cat conftestval`
9047else
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 echo "$as_me: program exited with status $ac_status" >&5
9049echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009050sed 's/^/| /' conftest.$ac_ext >&5
9051
Martin v. Löwis11437992002-04-12 09:54:03 +00009052( exit $ac_status )
9053ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009054fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009055rm -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 +00009056fi
9057
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009058fi
9059
Martin v. Löwis11437992002-04-12 09:54:03 +00009060echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9061echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9062
9063cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009064#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009065_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009066
Michael W. Hudson54241132001-12-07 15:38:26 +00009067
Martin v. Löwis11437992002-04-12 09:54:03 +00009068echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9069echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009070if test "$have_long_long" = yes -a \
9071 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9072 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009073
Martin v. Löwis11437992002-04-12 09:54:03 +00009074cat >>confdefs.h <<\_ACEOF
9075#define HAVE_LARGEFILE_SUPPORT 1
9076_ACEOF
9077
9078 echo "$as_me:$LINENO: result: yes" >&5
9079echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009080else
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 echo "$as_me:$LINENO: result: no" >&5
9082echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009083fi
9084
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009085# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009086echo "$as_me:$LINENO: checking size of time_t" >&5
9087echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9088if test "${ac_cv_sizeof_time_t+set}" = set; then
9089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009090else
9091 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009092 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009093else
Martin v. Löwis11437992002-04-12 09:54:03 +00009094 cat >conftest.$ac_ext <<_ACEOF
9095#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009096/* confdefs.h. */
9097_ACEOF
9098cat confdefs.h >>conftest.$ac_ext
9099cat >>conftest.$ac_ext <<_ACEOF
9100/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009101#include <stdio.h>
9102#include <time.h>
9103main()
9104{
9105 FILE *f=fopen("conftestval", "w");
9106 if (!f) exit(1);
9107 fprintf(f, "%d\n", sizeof(time_t));
9108 exit(0);
9109}
Martin v. Löwis11437992002-04-12 09:54:03 +00009110_ACEOF
9111rm -f conftest$ac_exeext
9112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9113 (eval $ac_link) 2>&5
9114 ac_status=$?
9115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9116 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9118 (eval $ac_try) 2>&5
9119 ac_status=$?
9120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9121 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009122 ac_cv_sizeof_time_t=`cat conftestval`
9123else
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 echo "$as_me: program exited with status $ac_status" >&5
9125echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009126sed 's/^/| /' conftest.$ac_ext >&5
9127
Martin v. Löwis11437992002-04-12 09:54:03 +00009128( exit $ac_status )
9129ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009130fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009131rm -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 +00009132fi
9133
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009134fi
9135
Martin v. Löwis11437992002-04-12 09:54:03 +00009136echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9137echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9138
9139cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009140#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009141_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009142
Michael W. Hudson54241132001-12-07 15:38:26 +00009143
9144
Trent Mick635f6fb2000-08-23 21:33:05 +00009145# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009146ac_save_cc="$CC"
9147if test "$ac_cv_kpthread" = "yes"
9148then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009149elif test "$ac_cv_kthread" = "yes"
9150then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009151elif test "$ac_cv_pthread" = "yes"
9152then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009153fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009154echo "$as_me:$LINENO: checking for pthread_t" >&5
9155echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009156have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009157cat >conftest.$ac_ext <<_ACEOF
9158#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009159/* confdefs.h. */
9160_ACEOF
9161cat confdefs.h >>conftest.$ac_ext
9162cat >>conftest.$ac_ext <<_ACEOF
9163/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009164#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009165int
9166main ()
9167{
Guido van Rossum12580492000-09-24 16:47:19 +00009168pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 ;
9170 return 0;
9171}
9172_ACEOF
9173rm -f conftest.$ac_objext
9174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9175 (eval $ac_compile) 2>&5
9176 ac_status=$?
9177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9178 (exit $ac_status); } &&
9179 { ac_try='test -s conftest.$ac_objext'
9180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9181 (eval $ac_try) 2>&5
9182 ac_status=$?
9183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9184 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009185 have_pthread_t=yes
9186else
Martin v. Löwis11437992002-04-12 09:54:03 +00009187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009188sed 's/^/| /' conftest.$ac_ext >&5
9189
Trent Mick635f6fb2000-08-23 21:33:05 +00009190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009191rm -f conftest.$ac_objext conftest.$ac_ext
9192echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9193echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009194if test "$have_pthread_t" = yes ; then
9195 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9197echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9198 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9199 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009200else
9201 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009202 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009203else
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 cat >conftest.$ac_ext <<_ACEOF
9205#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009206/* confdefs.h. */
9207_ACEOF
9208cat confdefs.h >>conftest.$ac_ext
9209cat >>conftest.$ac_ext <<_ACEOF
9210/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009211#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009212#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009213 main()
9214 {
9215 FILE *f=fopen("conftestval", "w");
9216 if (!f) exit(1);
9217 fprintf(f, "%d\n", sizeof(pthread_t));
9218 exit(0);
9219 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009220_ACEOF
9221rm -f conftest$ac_exeext
9222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9223 (eval $ac_link) 2>&5
9224 ac_status=$?
9225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9226 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9228 (eval $ac_try) 2>&5
9229 ac_status=$?
9230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9231 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009232 ac_cv_sizeof_pthread_t=`cat conftestval`
9233else
Martin v. Löwis11437992002-04-12 09:54:03 +00009234 echo "$as_me: program exited with status $ac_status" >&5
9235echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009236sed 's/^/| /' conftest.$ac_ext >&5
9237
Martin v. Löwis11437992002-04-12 09:54:03 +00009238( exit $ac_status )
9239ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009240fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009241rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009242fi
9243
Trent Mick635f6fb2000-08-23 21:33:05 +00009244fi
9245
Martin v. Löwis11437992002-04-12 09:54:03 +00009246 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9247echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9248
9249cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009250#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009251_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009252
9253fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009254CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009255
Martin v. Löwis11437992002-04-12 09:54:03 +00009256echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9257echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009258# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9259if test "${enable_toolbox_glue+set}" = set; then
9260 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009261
Martin v. Löwis11437992002-04-12 09:54:03 +00009262fi;
Jack Jansene578a632001-08-15 01:27:14 +00009263
9264if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009265then
Jack Jansene578a632001-08-15 01:27:14 +00009266 case $ac_sys_system/$ac_sys_release in
9267 Darwin/*)
9268 enable_toolbox_glue="yes";;
9269 *)
9270 enable_toolbox_glue="no";;
9271 esac
9272fi
9273case "$enable_toolbox_glue" in
9274yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009275 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009276 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009277 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009278
9279cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009280#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009281_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009282
9283 ;;
9284*)
9285 extra_frameworks=""
9286 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009287 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009288 ;;
9289esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009290echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9291echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009292
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009293
9294case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009295 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009296 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009297 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009298 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009299 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009300 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009301 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009302 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009303 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009304 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305esac
9306
Martin v. Löwis11437992002-04-12 09:54:03 +00009307echo "$as_me:$LINENO: checking for --enable-framework" >&5
9308echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009309if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009310then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009311 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009313 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009314
Martin v. Löwis11437992002-04-12 09:54:03 +00009315cat >>confdefs.h <<\_ACEOF
9316#define WITH_NEXT_FRAMEWORK 1
9317_ACEOF
9318
9319 echo "$as_me:$LINENO: result: yes" >&5
9320echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009321else
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 echo "$as_me:$LINENO: result: no" >&5
9323echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009324fi
9325
Martin v. Löwis11437992002-04-12 09:54:03 +00009326echo "$as_me:$LINENO: checking for dyld" >&5
9327echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009328case $ac_sys_system/$ac_sys_release in
9329 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009330
Martin v. Löwis11437992002-04-12 09:54:03 +00009331cat >>confdefs.h <<\_ACEOF
9332#define WITH_DYLD 1
9333_ACEOF
9334
9335 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9336echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009337 ;;
9338 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009339 echo "$as_me:$LINENO: result: no" >&5
9340echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009341 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009342esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009343
Guido van Rossum0a516c91994-09-12 10:58:40 +00009344# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009345
Michael W. Hudson54241132001-12-07 15:38:26 +00009346
9347
9348
9349
Guido van Rossum0a516c91994-09-12 10:58:40 +00009350# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009351# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009352echo "$as_me:$LINENO: checking SO" >&5
9353echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009354if test -z "$SO"
9355then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009356 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009357 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009358 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009359 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009360 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009361else
9362 # this might also be a termcap variable, see #610332
9363 echo
9364 echo '====================================================================='
9365 echo '+ +'
9366 echo '+ WARNING: You have set SO in your environment. +'
9367 echo '+ Do you really mean to change the extension for shared libraries? +'
9368 echo '+ Continuing in 10 seconds to let you to ponder. +'
9369 echo '+ +'
9370 echo '====================================================================='
9371 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009372fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009373echo "$as_me:$LINENO: result: $SO" >&5
9374echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009375# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009376# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009377# (Shared libraries in this instance are shared modules to be loaded into
9378# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009379echo "$as_me:$LINENO: checking LDSHARED" >&5
9380echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009381if test -z "$LDSHARED"
9382then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009383 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009384 AIX*)
9385 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009386 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009387 ;;
9388 BeOS*)
9389 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009390 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009391 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009392 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009393 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009394 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009396 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009397 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009398 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009399 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009400 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009401 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9402 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009403 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009404 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9405 if test "$enable_framework" ; then
9406 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009407 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9408 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009409 else
9410 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009411 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009412 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009413 Darwin/*)
9414 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9415 if test "$enable_framework" ; then
9416 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009417 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9418 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009419 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009420 # No framework, use the Python app as bundle-loader
9421 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009422 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009423 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009424 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009425 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009426 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009427 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009428 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009429 then
9430 LDSHARED="cc -shared ${LDFLAGS}"
9431 else
9432 LDSHARED="ld -Bshareable ${LDFLAGS}"
9433 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009434 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009435 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009436 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009437 then LDSHARED='$(CC) -shared'
9438 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009439 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009440 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009441 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009442 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009443 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009444 *) LDSHARED="ld";;
9445 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009446fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009447echo "$as_me:$LINENO: result: $LDSHARED" >&5
9448echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009449BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009450# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009451# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009452echo "$as_me:$LINENO: checking CCSHARED" >&5
9453echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009454if test -z "$CCSHARED"
9455then
Guido van Rossum07397971997-04-29 21:49:50 +00009456 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009457 SunOS*) if test "$GCC" = yes;
9458 then CCSHARED="-fPIC";
9459 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009460 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009461 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009462 else CCSHARED="+z";
9463 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009464 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009465 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009466 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009467 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009468 if test "$GCC" = "yes"
9469 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009470 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009471 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009472 SCO_SV*)
9473 if test "$GCC" = "yes"
9474 then CCSHARED="-fPIC"
9475 else CCSHARED="-Kpic -belf"
9476 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009477 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009478 IRIX*/6*) case $CC in
9479 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009480 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009481 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009482 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009483 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009485echo "$as_me:$LINENO: result: $CCSHARED" >&5
9486echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009487# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009488# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009489echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9490echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009491if test -z "$LINKFORSHARED"
9492then
Guido van Rossum07397971997-04-29 21:49:50 +00009493 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009494 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009495 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009496 LINKFORSHARED="-Wl,-E -Wl,+s";;
9497# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009498 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009499 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009500 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009502 # -u __dummy makes the linker aware of the objc runtime
9503 # in System.framework; otherwise, __objcInit (referenced in
9504 # crt1.o) gets erroneously defined as common, which breaks dynamic
9505 # loading of any modules which reference it in System.framework.
9506 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9507 # not used by the core itself but which needs to be in the core so
9508 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009509 # -prebind is no longer used, because it actually seems to give a
9510 # slowdown in stead of a speedup, maybe due to the large number of
9511 # dynamic loads Python does.
9512 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009513 if test "$enable_framework"
9514 then
Jack Jansenc8607b72003-12-08 01:10:12 +00009515 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework Python"
Jack Jansene578a632001-08-15 01:27:14 +00009516 fi
9517 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009518 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009519 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009520 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009522 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9523 then
9524 LINKFORSHARED="-Wl,--export-dynamic"
9525 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009526 SunOS/5*) case $CC in
9527 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009528 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009529 then
9530 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009531 fi;;
9532 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009533 CYGWIN*)
9534 if test $enable_shared = "no"
9535 then
9536 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9537 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009538 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009539fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009540echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9541echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009542
Michael W. Hudson54241132001-12-07 15:38:26 +00009543
Martin v. Löwis11437992002-04-12 09:54:03 +00009544echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9545echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009546if test ! "$LIBRARY" = "$LDLIBRARY"
9547then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009548 case $ac_sys_system in
9549 CYGWIN*)
9550 # Cygwin needs CCSHARED when building extension DLLs
9551 # but not when building the interpreter DLL.
9552 CFLAGSFORSHARED='';;
9553 *)
9554 CFLAGSFORSHARED='$(CCSHARED)'
9555 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009556fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009557echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9558echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009559
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009560# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9561# library (with --enable-shared).
9562# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009563# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9564# if it is not required, since it creates a dependency of the shared library
9565# to LIBS. This, in turn, means that applications linking the shared libpython
9566# don't need to link LIBS explicitly. The default should be only changed
9567# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009568
9569echo "$as_me:$LINENO: checking SHLIBS" >&5
9570echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9571case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009572 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009573 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009574esac
9575echo "$as_me:$LINENO: result: $SHLIBS" >&5
9576echo "${ECHO_T}$SHLIBS" >&6
9577
9578
Guido van Rossum627b2d71993-12-24 10:39:16 +00009579# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009580
9581echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9582echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9583if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9584 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009585else
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009587LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009588cat >conftest.$ac_ext <<_ACEOF
9589#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009590/* confdefs.h. */
9591_ACEOF
9592cat confdefs.h >>conftest.$ac_ext
9593cat >>conftest.$ac_ext <<_ACEOF
9594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009595
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009596/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009597#ifdef __cplusplus
9598extern "C"
9599#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009600/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 builtin and then its argument prototype would still apply. */
9602char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009603int
9604main ()
9605{
9606dlopen ();
9607 ;
9608 return 0;
9609}
9610_ACEOF
9611rm -f conftest.$ac_objext conftest$ac_exeext
9612if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9613 (eval $ac_link) 2>&5
9614 ac_status=$?
9615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9616 (exit $ac_status); } &&
9617 { ac_try='test -s conftest$ac_exeext'
9618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9619 (eval $ac_try) 2>&5
9620 ac_status=$?
9621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9622 (exit $ac_status); }; }; then
9623 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009624else
Martin v. Löwis11437992002-04-12 09:54:03 +00009625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009626sed 's/^/| /' conftest.$ac_ext >&5
9627
Martin v. Löwis11437992002-04-12 09:54:03 +00009628ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009629fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009630rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9631LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009633echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9634echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9635if test $ac_cv_lib_dl_dlopen = yes; then
9636 cat >>confdefs.h <<_ACEOF
9637#define HAVE_LIBDL 1
9638_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009639
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009640 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009641
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009642fi
9643 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009644
9645echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9646echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9647if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9648 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009649else
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009651LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009652cat >conftest.$ac_ext <<_ACEOF
9653#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009654/* confdefs.h. */
9655_ACEOF
9656cat confdefs.h >>conftest.$ac_ext
9657cat >>conftest.$ac_ext <<_ACEOF
9658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009659
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009660/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009661#ifdef __cplusplus
9662extern "C"
9663#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009664/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009665 builtin and then its argument prototype would still apply. */
9666char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009667int
9668main ()
9669{
9670shl_load ();
9671 ;
9672 return 0;
9673}
9674_ACEOF
9675rm -f conftest.$ac_objext conftest$ac_exeext
9676if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9677 (eval $ac_link) 2>&5
9678 ac_status=$?
9679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9680 (exit $ac_status); } &&
9681 { ac_try='test -s conftest$ac_exeext'
9682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9683 (eval $ac_try) 2>&5
9684 ac_status=$?
9685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9686 (exit $ac_status); }; }; then
9687 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009688else
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009690sed 's/^/| /' conftest.$ac_ext >&5
9691
Martin v. Löwis11437992002-04-12 09:54:03 +00009692ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009693fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9695LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009696fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009697echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9698echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9699if test $ac_cv_lib_dld_shl_load = yes; then
9700 cat >>confdefs.h <<_ACEOF
9701#define HAVE_LIBDLD 1
9702_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009703
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009704 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009705
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009706fi
9707 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009708
9709# only check for sem_ini if thread support is requested
9710if test "$with_threads" = "yes" -o -z "$with_threads"; then
9711 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009712echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9713if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009714 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009715else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009716 ac_func_search_save_LIBS=$LIBS
9717ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009718cat >conftest.$ac_ext <<_ACEOF
9719#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009720/* confdefs.h. */
9721_ACEOF
9722cat confdefs.h >>conftest.$ac_ext
9723cat >>conftest.$ac_ext <<_ACEOF
9724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009725
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009726/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009727#ifdef __cplusplus
9728extern "C"
9729#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009730/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 builtin and then its argument prototype would still apply. */
9732char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009733int
9734main ()
9735{
9736sem_init ();
9737 ;
9738 return 0;
9739}
9740_ACEOF
9741rm -f conftest.$ac_objext conftest$ac_exeext
9742if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9743 (eval $ac_link) 2>&5
9744 ac_status=$?
9745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9746 (exit $ac_status); } &&
9747 { ac_try='test -s conftest$ac_exeext'
9748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9749 (eval $ac_try) 2>&5
9750 ac_status=$?
9751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9752 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009753 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009754else
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009756sed 's/^/| /' conftest.$ac_ext >&5
9757
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009758fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009759rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009760if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009761 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009762 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9763 cat >conftest.$ac_ext <<_ACEOF
9764#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009765/* confdefs.h. */
9766_ACEOF
9767cat confdefs.h >>conftest.$ac_ext
9768cat >>conftest.$ac_ext <<_ACEOF
9769/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009770
9771/* Override any gcc2 internal prototype to avoid an error. */
9772#ifdef __cplusplus
9773extern "C"
9774#endif
9775/* We use char because int might match the return type of a gcc2
9776 builtin and then its argument prototype would still apply. */
9777char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009778int
9779main ()
9780{
9781sem_init ();
9782 ;
9783 return 0;
9784}
Martin v. Löwis11437992002-04-12 09:54:03 +00009785_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009786rm -f conftest.$ac_objext conftest$ac_exeext
9787if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9788 (eval $ac_link) 2>&5
9789 ac_status=$?
9790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9791 (exit $ac_status); } &&
9792 { ac_try='test -s conftest$ac_exeext'
9793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9794 (eval $ac_try) 2>&5
9795 ac_status=$?
9796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9797 (exit $ac_status); }; }; then
9798 ac_cv_search_sem_init="-l$ac_lib"
9799break
9800else
9801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009802sed 's/^/| /' conftest.$ac_ext >&5
9803
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009804fi
9805rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9806 done
9807fi
9808LIBS=$ac_func_search_save_LIBS
9809fi
9810echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9811echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9812if test "$ac_cv_search_sem_init" != no; then
9813 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009814
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009815fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009816 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009817 # posix4 on Solaris 2.6
9818 # pthread (first!) on Linux
9819fi
9820
Martin v. Löwis19d17342003-06-14 21:03:05 +00009821# check if we need libintl for locale functions
9822echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9823echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9824if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9825 echo $ECHO_N "(cached) $ECHO_C" >&6
9826else
9827 ac_check_lib_save_LIBS=$LIBS
9828LIBS="-lintl $LIBS"
9829cat >conftest.$ac_ext <<_ACEOF
9830#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009831/* confdefs.h. */
9832_ACEOF
9833cat confdefs.h >>conftest.$ac_ext
9834cat >>conftest.$ac_ext <<_ACEOF
9835/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009836
9837/* Override any gcc2 internal prototype to avoid an error. */
9838#ifdef __cplusplus
9839extern "C"
9840#endif
9841/* We use char because int might match the return type of a gcc2
9842 builtin and then its argument prototype would still apply. */
9843char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009844int
9845main ()
9846{
9847textdomain ();
9848 ;
9849 return 0;
9850}
9851_ACEOF
9852rm -f conftest.$ac_objext conftest$ac_exeext
9853if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9854 (eval $ac_link) 2>&5
9855 ac_status=$?
9856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9857 (exit $ac_status); } &&
9858 { ac_try='test -s conftest$ac_exeext'
9859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9860 (eval $ac_try) 2>&5
9861 ac_status=$?
9862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9863 (exit $ac_status); }; }; then
9864 ac_cv_lib_intl_textdomain=yes
9865else
9866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009867sed 's/^/| /' conftest.$ac_ext >&5
9868
Martin v. Löwis19d17342003-06-14 21:03:05 +00009869ac_cv_lib_intl_textdomain=no
9870fi
9871rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9872LIBS=$ac_check_lib_save_LIBS
9873fi
9874echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9875echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9876if test $ac_cv_lib_intl_textdomain = yes; then
9877
9878cat >>confdefs.h <<\_ACEOF
9879#define WITH_LIBINTL 1
9880_ACEOF
9881
9882fi
9883
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009884
9885# checks for system dependent C++ extensions support
9886case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9888echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9889 cat >conftest.$ac_ext <<_ACEOF
9890#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009891/* confdefs.h. */
9892_ACEOF
9893cat confdefs.h >>conftest.$ac_ext
9894cat >>conftest.$ac_ext <<_ACEOF
9895/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009896#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009897int
9898main ()
9899{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009900loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009901 ;
9902 return 0;
9903}
9904_ACEOF
9905rm -f conftest.$ac_objext conftest$ac_exeext
9906if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9907 (eval $ac_link) 2>&5
9908 ac_status=$?
9909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9910 (exit $ac_status); } &&
9911 { ac_try='test -s conftest$ac_exeext'
9912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9913 (eval $ac_try) 2>&5
9914 ac_status=$?
9915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9916 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009917
Martin v. Löwis11437992002-04-12 09:54:03 +00009918cat >>confdefs.h <<\_ACEOF
9919#define AIX_GENUINE_CPLUSPLUS 1
9920_ACEOF
9921
9922 echo "$as_me:$LINENO: result: yes" >&5
9923echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009924else
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009926sed 's/^/| /' conftest.$ac_ext >&5
9927
Martin v. Löwis11437992002-04-12 09:54:03 +00009928echo "$as_me:$LINENO: result: no" >&5
9929echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009930fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009931rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009932 *) ;;
9933esac
9934
Guido van Rossum70c7f481998-03-26 18:44:10 +00009935# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009936# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009937# BeOS' sockets are stashed in libnet.
9938case "$ac_sys_system" in
9939IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009940*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009941echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9942echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9943if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009945else
Martin v. Löwis11437992002-04-12 09:54:03 +00009946 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009947LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009948cat >conftest.$ac_ext <<_ACEOF
9949#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009950/* confdefs.h. */
9951_ACEOF
9952cat confdefs.h >>conftest.$ac_ext
9953cat >>conftest.$ac_ext <<_ACEOF
9954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009955
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009956/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009957#ifdef __cplusplus
9958extern "C"
9959#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009960/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009961 builtin and then its argument prototype would still apply. */
9962char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009963int
9964main ()
9965{
9966t_open ();
9967 ;
9968 return 0;
9969}
9970_ACEOF
9971rm -f conftest.$ac_objext conftest$ac_exeext
9972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9973 (eval $ac_link) 2>&5
9974 ac_status=$?
9975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9976 (exit $ac_status); } &&
9977 { ac_try='test -s conftest$ac_exeext'
9978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9979 (eval $ac_try) 2>&5
9980 ac_status=$?
9981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9982 (exit $ac_status); }; }; then
9983 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009984else
Martin v. Löwis11437992002-04-12 09:54:03 +00009985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009986sed 's/^/| /' conftest.$ac_ext >&5
9987
Martin v. Löwis11437992002-04-12 09:54:03 +00009988ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009989fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009990rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9991LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009992fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009993echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9994echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9995if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009996 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009997fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009998 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009999echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10000echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10001if test "${ac_cv_lib_socket_socket+set}" = set; then
10002 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010003else
Martin v. Löwis11437992002-04-12 09:54:03 +000010004 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010005LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010006cat >conftest.$ac_ext <<_ACEOF
10007#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010008/* confdefs.h. */
10009_ACEOF
10010cat confdefs.h >>conftest.$ac_ext
10011cat >>conftest.$ac_ext <<_ACEOF
10012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010013
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010014/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010015#ifdef __cplusplus
10016extern "C"
10017#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010018/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 builtin and then its argument prototype would still apply. */
10020char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010021int
10022main ()
10023{
10024socket ();
10025 ;
10026 return 0;
10027}
10028_ACEOF
10029rm -f conftest.$ac_objext conftest$ac_exeext
10030if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10031 (eval $ac_link) 2>&5
10032 ac_status=$?
10033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10034 (exit $ac_status); } &&
10035 { ac_try='test -s conftest$ac_exeext'
10036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10037 (eval $ac_try) 2>&5
10038 ac_status=$?
10039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10040 (exit $ac_status); }; }; then
10041 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010042else
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010044sed 's/^/| /' conftest.$ac_ext >&5
10045
Martin v. Löwis11437992002-04-12 09:54:03 +000010046ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010047fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010048rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10049LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010050fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010051echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10052echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10053if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010054 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010055fi
10056 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010057;;
10058esac
10059case "$ac_sys_system" in
10060BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010061echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10062echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10063if test "${ac_cv_lib_net_socket+set}" = set; then
10064 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010065else
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010067LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010068cat >conftest.$ac_ext <<_ACEOF
10069#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010070/* confdefs.h. */
10071_ACEOF
10072cat confdefs.h >>conftest.$ac_ext
10073cat >>conftest.$ac_ext <<_ACEOF
10074/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010075
Guido van Rossumad678af1998-10-02 14:42:15 +000010076/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010077#ifdef __cplusplus
10078extern "C"
10079#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010080/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 builtin and then its argument prototype would still apply. */
10082char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010083int
10084main ()
10085{
10086socket ();
10087 ;
10088 return 0;
10089}
10090_ACEOF
10091rm -f conftest.$ac_objext conftest$ac_exeext
10092if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10093 (eval $ac_link) 2>&5
10094 ac_status=$?
10095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10096 (exit $ac_status); } &&
10097 { ac_try='test -s conftest$ac_exeext'
10098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10099 (eval $ac_try) 2>&5
10100 ac_status=$?
10101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10102 (exit $ac_status); }; }; then
10103 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010104else
Martin v. Löwis11437992002-04-12 09:54:03 +000010105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010106sed 's/^/| /' conftest.$ac_ext >&5
10107
Martin v. Löwis11437992002-04-12 09:54:03 +000010108ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010109fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010110rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10111LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010112fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010113echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10114echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10115if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010116 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010117fi
10118 # BeOS
10119;;
10120esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010121
Martin v. Löwis11437992002-04-12 09:54:03 +000010122echo "$as_me:$LINENO: checking for --with-libs" >&5
10123echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10124
Guido van Rossuma68acba1996-07-31 17:36:39 +000010125# Check whether --with-libs or --without-libs was given.
10126if test "${with_libs+set}" = set; then
10127 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010128
10129echo "$as_me:$LINENO: result: $withval" >&5
10130echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010131LIBS="$withval $LIBS"
10132
10133else
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 echo "$as_me:$LINENO: result: no" >&5
10135echo "${ECHO_T}no" >&6
10136fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010137
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010138# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010139
10140
Martin v. Löwis11437992002-04-12 09:54:03 +000010141echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10142echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10143
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010144# Check whether --with-signal-module or --without-signal-module was given.
10145if test "${with_signal_module+set}" = set; then
10146 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010147
Martin v. Löwis11437992002-04-12 09:54:03 +000010148fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010149
10150if test -z "$with_signal_module"
10151then with_signal_module="yes"
10152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010153echo "$as_me:$LINENO: result: $with_signal_module" >&5
10154echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010155
10156if test "${with_signal_module}" = "yes"; then
10157 USE_SIGNAL_MODULE=""
10158 SIGNAL_OBJS=""
10159else
10160 USE_SIGNAL_MODULE="#"
10161 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10162fi
10163
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010164# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010165
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010166USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010167
Martin v. Löwis11437992002-04-12 09:54:03 +000010168echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10169echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10170
Guido van Rossumec2f0731997-01-22 20:54:01 +000010171
10172# Check whether --with-dec-threads or --without-dec-threads was given.
10173if test "${with_dec_threads+set}" = set; then
10174 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010175
10176echo "$as_me:$LINENO: result: $withval" >&5
10177echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010178LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010179if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010180 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010181fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010182else
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 echo "$as_me:$LINENO: result: no" >&5
10184echo "${ECHO_T}no" >&6
10185fi;
10186
10187# Templates for things AC_DEFINEd more than once.
10188# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010189
10190
Martin v. Löwis11437992002-04-12 09:54:03 +000010191
10192
10193
10194
10195
10196echo "$as_me:$LINENO: checking for --with-threads" >&5
10197echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10198
Guido van Rossumec2f0731997-01-22 20:54:01 +000010199# Check whether --with-threads or --without-threads was given.
10200if test "${with_threads+set}" = set; then
10201 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010202
Martin v. Löwis11437992002-04-12 09:54:03 +000010203fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010204
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010205# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010206
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010207# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010208if test "${with_thread+set}" = set; then
10209 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010210 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010211fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010212
10213if test -z "$with_threads"
10214then with_threads="yes"
10215fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010216echo "$as_me:$LINENO: result: $with_threads" >&5
10217echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010218
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010219
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010220if test "$with_threads" = "no"
10221then
10222 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010223elif test "$ac_cv_pthread_is_default" = yes
10224then
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010226#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010227_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010228
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010229 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010231#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010232_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010233
10234 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010236elif test "$ac_cv_kpthread" = "yes"
10237then
10238 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010239 if test "$ac_cv_cxx_thread" = "yes"; then
10240 CXX="$CXX -Kpthread"
10241 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010243#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010244_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010245
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010246 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010247 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010248elif test "$ac_cv_kthread" = "yes"
10249then
10250 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010251 if test "$ac_cv_cxx_thread" = "yes"; then
10252 CXX="$CXX -Kthread"
10253 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010254 cat >>confdefs.h <<\_ACEOF
10255#define WITH_THREAD 1
10256_ACEOF
10257
10258 posix_threads=yes
10259 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010260elif test "$ac_cv_pthread" = "yes"
10261then
10262 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010263 if test "$ac_cv_cxx_thread" = "yes"; then
10264 CXX="$CXX -pthread"
10265 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010266 cat >>confdefs.h <<\_ACEOF
10267#define WITH_THREAD 1
10268_ACEOF
10269
10270 posix_threads=yes
10271 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010272else
10273 if test ! -z "$with_threads" -a -d "$with_threads"
10274 then LDFLAGS="$LDFLAGS -L$with_threads"
10275 fi
10276 if test ! -z "$withval" -a -d "$withval"
10277 then LDFLAGS="$LDFLAGS -L$withval"
10278 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010279
10280 # According to the POSIX spec, a pthreads implementation must
10281 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10283echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10284 cat >conftest.$ac_ext <<_ACEOF
10285#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010286/* confdefs.h. */
10287_ACEOF
10288cat confdefs.h >>conftest.$ac_ext
10289cat >>conftest.$ac_ext <<_ACEOF
10290/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010291
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010292#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010293#ifdef _POSIX_THREADS
10294yes
10295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010296
10297_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010299 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010300 unistd_defines_pthreads=yes
10301else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010302 unistd_defines_pthreads=no
10303fi
10304rm -f conftest*
10305
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10307echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010308
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010310#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010311_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010312
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 if test "${ac_cv_header_cthreads_h+set}" = set; then
10314 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10315echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10316if test "${ac_cv_header_cthreads_h+set}" = set; then
10317 echo $ECHO_N "(cached) $ECHO_C" >&6
10318fi
10319echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10320echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010321else
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 # Is the header compilable?
10323echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10324echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10325cat >conftest.$ac_ext <<_ACEOF
10326#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010327/* confdefs.h. */
10328_ACEOF
10329cat confdefs.h >>conftest.$ac_ext
10330cat >>conftest.$ac_ext <<_ACEOF
10331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010332$ac_includes_default
10333#include <cthreads.h>
10334_ACEOF
10335rm -f conftest.$ac_objext
10336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10337 (eval $ac_compile) 2>&5
10338 ac_status=$?
10339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10340 (exit $ac_status); } &&
10341 { ac_try='test -s conftest.$ac_objext'
10342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10343 (eval $ac_try) 2>&5
10344 ac_status=$?
10345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10346 (exit $ac_status); }; }; then
10347 ac_header_compiler=yes
10348else
10349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010350sed 's/^/| /' conftest.$ac_ext >&5
10351
Martin v. Löwis11437992002-04-12 09:54:03 +000010352ac_header_compiler=no
10353fi
10354rm -f conftest.$ac_objext conftest.$ac_ext
10355echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10356echo "${ECHO_T}$ac_header_compiler" >&6
10357
10358# Is the header present?
10359echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10360echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10361cat >conftest.$ac_ext <<_ACEOF
10362#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010363/* confdefs.h. */
10364_ACEOF
10365cat confdefs.h >>conftest.$ac_ext
10366cat >>conftest.$ac_ext <<_ACEOF
10367/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010368#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010369_ACEOF
10370if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10371 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10372 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010373 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 rm -f conftest.er1
10375 cat conftest.err >&5
10376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10377 (exit $ac_status); } >/dev/null; then
10378 if test -s conftest.err; then
10379 ac_cpp_err=$ac_c_preproc_warn_flag
10380 else
10381 ac_cpp_err=
10382 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010383else
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 ac_cpp_err=yes
10385fi
10386if test -z "$ac_cpp_err"; then
10387 ac_header_preproc=yes
10388else
10389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010390sed 's/^/| /' conftest.$ac_ext >&5
10391
Martin v. Löwis11437992002-04-12 09:54:03 +000010392 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010393fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010394rm -f conftest.err conftest.$ac_ext
10395echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10396echo "${ECHO_T}$ac_header_preproc" >&6
10397
10398# So? What about this header?
10399case $ac_header_compiler:$ac_header_preproc in
10400 yes:no )
10401 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10402echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10403 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010404echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10405 (
10406 cat <<\_ASBOX
10407## ------------------------------------ ##
10408## Report this to bug-autoconf@gnu.org. ##
10409## ------------------------------------ ##
10410_ASBOX
10411 ) |
10412 sed "s/^/$as_me: WARNING: /" >&2
10413 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010414 no:yes )
10415 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10416echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10417 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10418echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10419 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010420echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10421 (
10422 cat <<\_ASBOX
10423## ------------------------------------ ##
10424## Report this to bug-autoconf@gnu.org. ##
10425## ------------------------------------ ##
10426_ASBOX
10427 ) |
10428 sed "s/^/$as_me: WARNING: /" >&2
10429 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010430esac
10431echo "$as_me:$LINENO: checking for cthreads.h" >&5
10432echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10433if test "${ac_cv_header_cthreads_h+set}" = set; then
10434 echo $ECHO_N "(cached) $ECHO_C" >&6
10435else
10436 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010438echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10439echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10440
10441fi
10442if test $ac_cv_header_cthreads_h = yes; then
10443 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010444#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010445_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010446
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010448#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010449_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010450
Martin v. Löwis11437992002-04-12 09:54:03 +000010451
10452cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010453#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010454_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010455
10456 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010457 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010458else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010459
Martin v. Löwis11437992002-04-12 09:54:03 +000010460 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10461 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10462echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10463if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10464 echo $ECHO_N "(cached) $ECHO_C" >&6
10465fi
10466echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10467echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010468else
Martin v. Löwis11437992002-04-12 09:54:03 +000010469 # Is the header compilable?
10470echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10471echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10472cat >conftest.$ac_ext <<_ACEOF
10473#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010474/* confdefs.h. */
10475_ACEOF
10476cat confdefs.h >>conftest.$ac_ext
10477cat >>conftest.$ac_ext <<_ACEOF
10478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010479$ac_includes_default
10480#include <mach/cthreads.h>
10481_ACEOF
10482rm -f conftest.$ac_objext
10483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10484 (eval $ac_compile) 2>&5
10485 ac_status=$?
10486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10487 (exit $ac_status); } &&
10488 { ac_try='test -s conftest.$ac_objext'
10489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10490 (eval $ac_try) 2>&5
10491 ac_status=$?
10492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10493 (exit $ac_status); }; }; then
10494 ac_header_compiler=yes
10495else
10496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010497sed 's/^/| /' conftest.$ac_ext >&5
10498
Martin v. Löwis11437992002-04-12 09:54:03 +000010499ac_header_compiler=no
10500fi
10501rm -f conftest.$ac_objext conftest.$ac_ext
10502echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10503echo "${ECHO_T}$ac_header_compiler" >&6
10504
10505# Is the header present?
10506echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10507echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10508cat >conftest.$ac_ext <<_ACEOF
10509#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010510/* confdefs.h. */
10511_ACEOF
10512cat confdefs.h >>conftest.$ac_ext
10513cat >>conftest.$ac_ext <<_ACEOF
10514/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010515#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010516_ACEOF
10517if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10518 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10519 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010520 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 rm -f conftest.er1
10522 cat conftest.err >&5
10523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10524 (exit $ac_status); } >/dev/null; then
10525 if test -s conftest.err; then
10526 ac_cpp_err=$ac_c_preproc_warn_flag
10527 else
10528 ac_cpp_err=
10529 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010530else
Martin v. Löwis11437992002-04-12 09:54:03 +000010531 ac_cpp_err=yes
10532fi
10533if test -z "$ac_cpp_err"; then
10534 ac_header_preproc=yes
10535else
10536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010537sed 's/^/| /' conftest.$ac_ext >&5
10538
Martin v. Löwis11437992002-04-12 09:54:03 +000010539 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010540fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010541rm -f conftest.err conftest.$ac_ext
10542echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10543echo "${ECHO_T}$ac_header_preproc" >&6
10544
10545# So? What about this header?
10546case $ac_header_compiler:$ac_header_preproc in
10547 yes:no )
10548 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10549echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10550 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010551echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10552 (
10553 cat <<\_ASBOX
10554## ------------------------------------ ##
10555## Report this to bug-autoconf@gnu.org. ##
10556## ------------------------------------ ##
10557_ASBOX
10558 ) |
10559 sed "s/^/$as_me: WARNING: /" >&2
10560 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010561 no:yes )
10562 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10563echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10564 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10565echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10566 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010567echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10568 (
10569 cat <<\_ASBOX
10570## ------------------------------------ ##
10571## Report this to bug-autoconf@gnu.org. ##
10572## ------------------------------------ ##
10573_ASBOX
10574 ) |
10575 sed "s/^/$as_me: WARNING: /" >&2
10576 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010577esac
10578echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10579echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10580if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10581 echo $ECHO_N "(cached) $ECHO_C" >&6
10582else
10583 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010584fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010585echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10586echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10587
10588fi
10589if test $ac_cv_header_mach_cthreads_h = yes; then
10590 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010591#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010592_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010593
Martin v. Löwis11437992002-04-12 09:54:03 +000010594 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010595#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010596_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010597
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
10599cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010600#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010601_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010602
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010603 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010604else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010605
Martin v. Löwis11437992002-04-12 09:54:03 +000010606 echo "$as_me:$LINENO: checking for --with-pth" >&5
10607echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10608
10609# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010610if test "${with_pth+set}" = set; then
10611 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010612 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010613echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010614 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010615#define WITH_THREAD 1
10616_ACEOF
10617
10618
10619cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010620#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010621_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010622
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010623 LIBS="-lpth $LIBS"
10624 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010625else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010626 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010627echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010628
10629 # Just looking for pthread_create in libpthread is not enough:
10630 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10631 # So we really have to include pthread.h, and then link.
10632 _libs=$LIBS
10633 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10635echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10636 cat >conftest.$ac_ext <<_ACEOF
10637#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010638/* confdefs.h. */
10639_ACEOF
10640cat confdefs.h >>conftest.$ac_ext
10641cat >>conftest.$ac_ext <<_ACEOF
10642/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010643#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010644
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010645void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010646int
10647main ()
10648{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010649
10650pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010651 ;
10652 return 0;
10653}
10654_ACEOF
10655rm -f conftest.$ac_objext conftest$ac_exeext
10656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10657 (eval $ac_link) 2>&5
10658 ac_status=$?
10659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10660 (exit $ac_status); } &&
10661 { ac_try='test -s conftest$ac_exeext'
10662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10663 (eval $ac_try) 2>&5
10664 ac_status=$?
10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666 (exit $ac_status); }; }; then
10667
10668 echo "$as_me:$LINENO: result: yes" >&5
10669echo "${ECHO_T}yes" >&6
10670 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010671#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010672_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010673
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010674 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010675 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010676else
Martin v. Löwis11437992002-04-12 09:54:03 +000010677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010678sed 's/^/| /' conftest.$ac_ext >&5
10679
Martin v. Löwis11437992002-04-12 09:54:03 +000010680
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010681 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10683echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10684if test "${ac_cv_func_pthread_detach+set}" = set; then
10685 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010686else
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 cat >conftest.$ac_ext <<_ACEOF
10688#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010689/* confdefs.h. */
10690_ACEOF
10691cat confdefs.h >>conftest.$ac_ext
10692cat >>conftest.$ac_ext <<_ACEOF
10693/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010694/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010695 which can conflict with char pthread_detach (); below.
10696 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010697 <limits.h> exists even on freestanding compilers. Under hpux,
10698 including <limits.h> includes <sys/time.h> and causes problems
10699 checking for functions defined therein. */
10700#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010701# include <limits.h>
10702#else
10703# include <assert.h>
10704#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010705/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010706#ifdef __cplusplus
10707extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010708{
Martin v. Löwis11437992002-04-12 09:54:03 +000010709#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010710/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 builtin and then its argument prototype would still apply. */
10712char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010713/* The GNU C library defines this for functions which it implements
10714 to always fail with ENOSYS. Some functions are actually named
10715 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010716#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010717choke me
10718#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010719char (*f) () = pthread_detach;
10720#endif
10721#ifdef __cplusplus
10722}
Guido van Rossumad678af1998-10-02 14:42:15 +000010723#endif
10724
Skip Montanaro6dead952003-09-25 14:50:04 +000010725int
10726main ()
10727{
10728return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010729 ;
10730 return 0;
10731}
10732_ACEOF
10733rm -f conftest.$ac_objext conftest$ac_exeext
10734if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10735 (eval $ac_link) 2>&5
10736 ac_status=$?
10737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10738 (exit $ac_status); } &&
10739 { ac_try='test -s conftest$ac_exeext'
10740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10741 (eval $ac_try) 2>&5
10742 ac_status=$?
10743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10744 (exit $ac_status); }; }; then
10745 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010746else
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010748sed 's/^/| /' conftest.$ac_ext >&5
10749
Martin v. Löwis11437992002-04-12 09:54:03 +000010750ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010751fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010752rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010753fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010754echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10755echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10756if test $ac_cv_func_pthread_detach = yes; then
10757 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010758#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010759_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010760
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010761 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010762 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010763else
Guido van Rossumad678af1998-10-02 14:42:15 +000010764
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010765 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10766 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10767echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10768if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10769 echo $ECHO_N "(cached) $ECHO_C" >&6
10770fi
10771echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10772echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10773else
10774 # Is the header compilable?
10775echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10776echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10777cat >conftest.$ac_ext <<_ACEOF
10778#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010779/* confdefs.h. */
10780_ACEOF
10781cat confdefs.h >>conftest.$ac_ext
10782cat >>conftest.$ac_ext <<_ACEOF
10783/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010784$ac_includes_default
10785#include <atheos/threads.h>
10786_ACEOF
10787rm -f conftest.$ac_objext
10788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10789 (eval $ac_compile) 2>&5
10790 ac_status=$?
10791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10792 (exit $ac_status); } &&
10793 { ac_try='test -s conftest.$ac_objext'
10794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10795 (eval $ac_try) 2>&5
10796 ac_status=$?
10797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10798 (exit $ac_status); }; }; then
10799 ac_header_compiler=yes
10800else
10801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010802sed 's/^/| /' conftest.$ac_ext >&5
10803
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010804ac_header_compiler=no
10805fi
10806rm -f conftest.$ac_objext conftest.$ac_ext
10807echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10808echo "${ECHO_T}$ac_header_compiler" >&6
10809
10810# Is the header present?
10811echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10812echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10813cat >conftest.$ac_ext <<_ACEOF
10814#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010815/* confdefs.h. */
10816_ACEOF
10817cat confdefs.h >>conftest.$ac_ext
10818cat >>conftest.$ac_ext <<_ACEOF
10819/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010820#include <atheos/threads.h>
10821_ACEOF
10822if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10823 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10824 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010825 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010826 rm -f conftest.er1
10827 cat conftest.err >&5
10828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10829 (exit $ac_status); } >/dev/null; then
10830 if test -s conftest.err; then
10831 ac_cpp_err=$ac_c_preproc_warn_flag
10832 else
10833 ac_cpp_err=
10834 fi
10835else
10836 ac_cpp_err=yes
10837fi
10838if test -z "$ac_cpp_err"; then
10839 ac_header_preproc=yes
10840else
10841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010842sed 's/^/| /' conftest.$ac_ext >&5
10843
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010844 ac_header_preproc=no
10845fi
10846rm -f conftest.err conftest.$ac_ext
10847echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10848echo "${ECHO_T}$ac_header_preproc" >&6
10849
10850# So? What about this header?
10851case $ac_header_compiler:$ac_header_preproc in
10852 yes:no )
10853 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10854echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10855 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010856echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10857 (
10858 cat <<\_ASBOX
10859## ------------------------------------ ##
10860## Report this to bug-autoconf@gnu.org. ##
10861## ------------------------------------ ##
10862_ASBOX
10863 ) |
10864 sed "s/^/$as_me: WARNING: /" >&2
10865 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010866 no:yes )
10867 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10868echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10869 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10870echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10871 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010872echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10873 (
10874 cat <<\_ASBOX
10875## ------------------------------------ ##
10876## Report this to bug-autoconf@gnu.org. ##
10877## ------------------------------------ ##
10878_ASBOX
10879 ) |
10880 sed "s/^/$as_me: WARNING: /" >&2
10881 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010882esac
10883echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10884echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10885if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10886 echo $ECHO_N "(cached) $ECHO_C" >&6
10887else
10888 ac_cv_header_atheos_threads_h=$ac_header_preproc
10889fi
10890echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10891echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10892
10893fi
10894if test $ac_cv_header_atheos_threads_h = yes; then
10895 cat >>confdefs.h <<\_ACEOF
10896#define WITH_THREAD 1
10897_ACEOF
10898
10899
10900cat >>confdefs.h <<\_ACEOF
10901#define ATHEOS_THREADS 1
10902_ACEOF
10903
10904 THREADOBJ="Python/thread.o"
10905else
10906
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10908 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10909echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10910if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10911 echo $ECHO_N "(cached) $ECHO_C" >&6
10912fi
10913echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10914echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010915else
Martin v. Löwis11437992002-04-12 09:54:03 +000010916 # Is the header compilable?
10917echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10918echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10919cat >conftest.$ac_ext <<_ACEOF
10920#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010921/* confdefs.h. */
10922_ACEOF
10923cat confdefs.h >>conftest.$ac_ext
10924cat >>conftest.$ac_ext <<_ACEOF
10925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010926$ac_includes_default
10927#include <kernel/OS.h>
10928_ACEOF
10929rm -f conftest.$ac_objext
10930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10931 (eval $ac_compile) 2>&5
10932 ac_status=$?
10933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10934 (exit $ac_status); } &&
10935 { ac_try='test -s conftest.$ac_objext'
10936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10937 (eval $ac_try) 2>&5
10938 ac_status=$?
10939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10940 (exit $ac_status); }; }; then
10941 ac_header_compiler=yes
10942else
10943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010944sed 's/^/| /' conftest.$ac_ext >&5
10945
Martin v. Löwis11437992002-04-12 09:54:03 +000010946ac_header_compiler=no
10947fi
10948rm -f conftest.$ac_objext conftest.$ac_ext
10949echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10950echo "${ECHO_T}$ac_header_compiler" >&6
10951
10952# Is the header present?
10953echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10954echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10955cat >conftest.$ac_ext <<_ACEOF
10956#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010957/* confdefs.h. */
10958_ACEOF
10959cat confdefs.h >>conftest.$ac_ext
10960cat >>conftest.$ac_ext <<_ACEOF
10961/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010962#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010963_ACEOF
10964if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10965 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10966 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010967 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 rm -f conftest.er1
10969 cat conftest.err >&5
10970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10971 (exit $ac_status); } >/dev/null; then
10972 if test -s conftest.err; then
10973 ac_cpp_err=$ac_c_preproc_warn_flag
10974 else
10975 ac_cpp_err=
10976 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010977else
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 ac_cpp_err=yes
10979fi
10980if test -z "$ac_cpp_err"; then
10981 ac_header_preproc=yes
10982else
10983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010984sed 's/^/| /' conftest.$ac_ext >&5
10985
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010988rm -f conftest.err conftest.$ac_ext
10989echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10990echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010991
Martin v. Löwis11437992002-04-12 09:54:03 +000010992# So? What about this header?
10993case $ac_header_compiler:$ac_header_preproc in
10994 yes:no )
10995 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10996echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10997 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010998echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10999 (
11000 cat <<\_ASBOX
11001## ------------------------------------ ##
11002## Report this to bug-autoconf@gnu.org. ##
11003## ------------------------------------ ##
11004_ASBOX
11005 ) |
11006 sed "s/^/$as_me: WARNING: /" >&2
11007 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011008 no:yes )
11009 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11010echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11011 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11012echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11013 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011014echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11015 (
11016 cat <<\_ASBOX
11017## ------------------------------------ ##
11018## Report this to bug-autoconf@gnu.org. ##
11019## ------------------------------------ ##
11020_ASBOX
11021 ) |
11022 sed "s/^/$as_me: WARNING: /" >&2
11023 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011024esac
11025echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11026echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11027if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11028 echo $ECHO_N "(cached) $ECHO_C" >&6
11029else
11030 ac_cv_header_kernel_OS_h=$ac_header_preproc
11031fi
11032echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11033echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11034
11035fi
11036if test $ac_cv_header_kernel_OS_h = yes; then
11037 cat >>confdefs.h <<\_ACEOF
11038#define WITH_THREAD 1
11039_ACEOF
11040
11041
11042cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011043#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011044_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011045
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011046 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011047else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011048
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11050echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11051if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11052 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011053else
Martin v. Löwis11437992002-04-12 09:54:03 +000011054 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011055LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011056cat >conftest.$ac_ext <<_ACEOF
11057#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011058/* confdefs.h. */
11059_ACEOF
11060cat confdefs.h >>conftest.$ac_ext
11061cat >>conftest.$ac_ext <<_ACEOF
11062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011063
Greg Steinadf63d62000-07-05 10:38:09 +000011064/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011065#ifdef __cplusplus
11066extern "C"
11067#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011068/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 builtin and then its argument prototype would still apply. */
11070char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011071int
11072main ()
11073{
11074pthread_create ();
11075 ;
11076 return 0;
11077}
11078_ACEOF
11079rm -f conftest.$ac_objext conftest$ac_exeext
11080if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11081 (eval $ac_link) 2>&5
11082 ac_status=$?
11083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11084 (exit $ac_status); } &&
11085 { ac_try='test -s conftest$ac_exeext'
11086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11087 (eval $ac_try) 2>&5
11088 ac_status=$?
11089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11090 (exit $ac_status); }; }; then
11091 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011092else
Martin v. Löwis11437992002-04-12 09:54:03 +000011093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011094sed 's/^/| /' conftest.$ac_ext >&5
11095
Martin v. Löwis11437992002-04-12 09:54:03 +000011096ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011097fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011098rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11099LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011100fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011101echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11102echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11103if test $ac_cv_lib_pthreads_pthread_create = yes; then
11104 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011105#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011106_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011107
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011108 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011109 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011110 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011111else
Greg Steinadf63d62000-07-05 10:38:09 +000011112
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11114echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11115if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11116 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011117else
Martin v. Löwis11437992002-04-12 09:54:03 +000011118 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011119LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011120cat >conftest.$ac_ext <<_ACEOF
11121#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011122/* confdefs.h. */
11123_ACEOF
11124cat confdefs.h >>conftest.$ac_ext
11125cat >>conftest.$ac_ext <<_ACEOF
11126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011127
Guido van Rossum49545951997-12-02 19:28:29 +000011128/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011129#ifdef __cplusplus
11130extern "C"
11131#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011132/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 builtin and then its argument prototype would still apply. */
11134char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011135int
11136main ()
11137{
11138pthread_create ();
11139 ;
11140 return 0;
11141}
11142_ACEOF
11143rm -f conftest.$ac_objext conftest$ac_exeext
11144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11145 (eval $ac_link) 2>&5
11146 ac_status=$?
11147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11148 (exit $ac_status); } &&
11149 { ac_try='test -s conftest$ac_exeext'
11150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11151 (eval $ac_try) 2>&5
11152 ac_status=$?
11153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11154 (exit $ac_status); }; }; then
11155 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011156else
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011158sed 's/^/| /' conftest.$ac_ext >&5
11159
Martin v. Löwis11437992002-04-12 09:54:03 +000011160ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011161fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011162rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11163LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011164fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011165echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11166echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11167if test $ac_cv_lib_c_r_pthread_create = yes; then
11168 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011169#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011170_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011171
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011172 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011173 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011174 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011175else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011176
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11178echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11179if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011181else
Martin v. Löwis11437992002-04-12 09:54:03 +000011182 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011183LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011184cat >conftest.$ac_ext <<_ACEOF
11185#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011186/* confdefs.h. */
11187_ACEOF
11188cat confdefs.h >>conftest.$ac_ext
11189cat >>conftest.$ac_ext <<_ACEOF
11190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011191
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011192/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011193#ifdef __cplusplus
11194extern "C"
11195#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011196/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 builtin and then its argument prototype would still apply. */
11198char __d6_pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011199int
11200main ()
11201{
11202__d6_pthread_create ();
11203 ;
11204 return 0;
11205}
11206_ACEOF
11207rm -f conftest.$ac_objext conftest$ac_exeext
11208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11209 (eval $ac_link) 2>&5
11210 ac_status=$?
11211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11212 (exit $ac_status); } &&
11213 { ac_try='test -s conftest$ac_exeext'
11214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11215 (eval $ac_try) 2>&5
11216 ac_status=$?
11217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11218 (exit $ac_status); }; }; then
11219 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011220else
Martin v. Löwis11437992002-04-12 09:54:03 +000011221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011222sed 's/^/| /' conftest.$ac_ext >&5
11223
Martin v. Löwis11437992002-04-12 09:54:03 +000011224ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011225fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011226rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11227LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011229echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11230echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11231if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11232 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011233#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011234_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011235
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011236 echo Systems with __d6_pthread_create are not supported anymore.
11237 echo See README
11238 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011239 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011240 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011241 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011242else
Guido van Rossum49545951997-12-02 19:28:29 +000011243
Martin v. Löwis11437992002-04-12 09:54:03 +000011244 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11245echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11246if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11247 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011248else
Martin v. Löwis11437992002-04-12 09:54:03 +000011249 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011250LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011251cat >conftest.$ac_ext <<_ACEOF
11252#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011253/* confdefs.h. */
11254_ACEOF
11255cat confdefs.h >>conftest.$ac_ext
11256cat >>conftest.$ac_ext <<_ACEOF
11257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011258
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011259/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011260#ifdef __cplusplus
11261extern "C"
11262#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011263/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 builtin and then its argument prototype would still apply. */
11265char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011266int
11267main ()
11268{
11269__pthread_create_system ();
11270 ;
11271 return 0;
11272}
11273_ACEOF
11274rm -f conftest.$ac_objext conftest$ac_exeext
11275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11276 (eval $ac_link) 2>&5
11277 ac_status=$?
11278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11279 (exit $ac_status); } &&
11280 { ac_try='test -s conftest$ac_exeext'
11281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11282 (eval $ac_try) 2>&5
11283 ac_status=$?
11284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11285 (exit $ac_status); }; }; then
11286 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011287else
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011289sed 's/^/| /' conftest.$ac_ext >&5
11290
Martin v. Löwis11437992002-04-12 09:54:03 +000011291ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011293rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11294LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011295fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011296echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11297echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11298if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11299 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011300#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011301_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011302
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011303 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011304 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011305 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011306else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011307
Martin v. Löwis11437992002-04-12 09:54:03 +000011308 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11309echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11310if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11311 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011312else
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011314LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011315cat >conftest.$ac_ext <<_ACEOF
11316#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* confdefs.h. */
11318_ACEOF
11319cat confdefs.h >>conftest.$ac_ext
11320cat >>conftest.$ac_ext <<_ACEOF
11321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011322
Guido van Rossumb93a8621998-05-07 13:27:32 +000011323/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011324#ifdef __cplusplus
11325extern "C"
11326#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011327/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 builtin and then its argument prototype would still apply. */
11329char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011330int
11331main ()
11332{
11333pthread_create ();
11334 ;
11335 return 0;
11336}
11337_ACEOF
11338rm -f conftest.$ac_objext conftest$ac_exeext
11339if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11340 (eval $ac_link) 2>&5
11341 ac_status=$?
11342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11343 (exit $ac_status); } &&
11344 { ac_try='test -s conftest$ac_exeext'
11345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11346 (eval $ac_try) 2>&5
11347 ac_status=$?
11348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11349 (exit $ac_status); }; }; then
11350 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011351else
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011353sed 's/^/| /' conftest.$ac_ext >&5
11354
Martin v. Löwis11437992002-04-12 09:54:03 +000011355ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011357rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11358LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011359fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011360echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11361echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11362if test $ac_cv_lib_cma_pthread_create = yes; then
11363 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011364#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011365_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011366
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011367 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011368 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011369 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011370else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011371
Martin v. Löwis130fb172001-07-19 11:00:41 +000011372 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011373fi
11374
Guido van Rossum627b2d71993-12-24 10:39:16 +000011375
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011376fi
11377
Guido van Rossum0be3e491997-05-22 20:33:33 +000011378fi
11379
Guido van Rossum49545951997-12-02 19:28:29 +000011380fi
11381
Guido van Rossumb93a8621998-05-07 13:27:32 +000011382fi
11383
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011384fi
11385
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011386
Michael W. Hudson54241132001-12-07 15:38:26 +000011387fi
11388
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011389
11390fi
11391
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011392fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011393rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11394fi;
11395fi
11396
11397
11398fi
11399
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011400
Michael W. Hudson54241132001-12-07 15:38:26 +000011401
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11403echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11404if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11405 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011406else
Martin v. Löwis11437992002-04-12 09:54:03 +000011407 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011408LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011409cat >conftest.$ac_ext <<_ACEOF
11410#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011411/* confdefs.h. */
11412_ACEOF
11413cat confdefs.h >>conftest.$ac_ext
11414cat >>conftest.$ac_ext <<_ACEOF
11415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011416
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011417/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011418#ifdef __cplusplus
11419extern "C"
11420#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011421/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011422 builtin and then its argument prototype would still apply. */
11423char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011424int
11425main ()
11426{
11427usconfig ();
11428 ;
11429 return 0;
11430}
11431_ACEOF
11432rm -f conftest.$ac_objext conftest$ac_exeext
11433if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11434 (eval $ac_link) 2>&5
11435 ac_status=$?
11436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11437 (exit $ac_status); } &&
11438 { ac_try='test -s conftest$ac_exeext'
11439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11440 (eval $ac_try) 2>&5
11441 ac_status=$?
11442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11443 (exit $ac_status); }; }; then
11444 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011445else
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011447sed 's/^/| /' conftest.$ac_ext >&5
11448
Martin v. Löwis11437992002-04-12 09:54:03 +000011449ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011451rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11452LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011454echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11455echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11456if test $ac_cv_lib_mpc_usconfig = yes; then
11457 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011458#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011459_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011460
Martin v. Löwis130fb172001-07-19 11:00:41 +000011461 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011462 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011463 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011464fi
11465
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011466
Neal Norwitza978ab02002-11-02 16:58:05 +000011467 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11469echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11470if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11471 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011472else
Martin v. Löwis11437992002-04-12 09:54:03 +000011473 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011474LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011475cat >conftest.$ac_ext <<_ACEOF
11476#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011477/* confdefs.h. */
11478_ACEOF
11479cat confdefs.h >>conftest.$ac_ext
11480cat >>conftest.$ac_ext <<_ACEOF
11481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011482
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011483/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011484#ifdef __cplusplus
11485extern "C"
11486#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011487/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 builtin and then its argument prototype would still apply. */
11489char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011490int
11491main ()
11492{
11493thr_create ();
11494 ;
11495 return 0;
11496}
11497_ACEOF
11498rm -f conftest.$ac_objext conftest$ac_exeext
11499if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11500 (eval $ac_link) 2>&5
11501 ac_status=$?
11502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11503 (exit $ac_status); } &&
11504 { ac_try='test -s conftest$ac_exeext'
11505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11506 (eval $ac_try) 2>&5
11507 ac_status=$?
11508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11509 (exit $ac_status); }; }; then
11510 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011511else
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011513sed 's/^/| /' conftest.$ac_ext >&5
11514
Martin v. Löwis11437992002-04-12 09:54:03 +000011515ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011516fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011517rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11518LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011519fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011520echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11521echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11522if test $ac_cv_lib_thread_thr_create = yes; then
11523 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011524#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011525_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011526
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011527 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011528 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011529 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011530fi
11531
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011532 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011533
Martin v. Löwis130fb172001-07-19 11:00:41 +000011534 if test "$USE_THREAD_MODULE" != "#"
11535 then
11536 # If the above checks didn't disable threads, (at least) OSF1
11537 # needs this '-threads' argument during linking.
11538 case $ac_sys_system in
11539 OSF1) LDLAST=-threads;;
11540 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011541 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011542fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011543
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011544if test "$posix_threads" = "yes"; then
11545 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011546
11547cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011548#define _POSIX_THREADS 1
11549_ACEOF
11550
11551 fi
11552
11553 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11554 case $ac_sys_system/$ac_sys_release in
11555 SunOS/5.6)
11556cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011557#define HAVE_PTHREAD_DESTRUCTOR 1
11558_ACEOF
11559
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011560 ;;
11561 SunOS/5.8)
11562cat >>confdefs.h <<\_ACEOF
11563#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11564_ACEOF
11565
11566 ;;
11567 esac
11568
11569 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11570echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11571 if test "${ac_cv_pthread_system_supported+set}" = set; then
11572 echo $ECHO_N "(cached) $ECHO_C" >&6
11573else
11574 if test "$cross_compiling" = yes; then
11575 ac_cv_pthread_system_supported=no
11576else
11577 cat >conftest.$ac_ext <<_ACEOF
11578#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011579/* confdefs.h. */
11580_ACEOF
11581cat confdefs.h >>conftest.$ac_ext
11582cat >>conftest.$ac_ext <<_ACEOF
11583/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011584#include <pthread.h>
11585 void *foo(void *parm) {
11586 return NULL;
11587 }
11588 main() {
11589 pthread_attr_t attr;
11590 pthread_t id;
11591 if (pthread_attr_init(&attr)) exit(-1);
11592 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11593 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11594 exit(0);
11595 }
11596_ACEOF
11597rm -f conftest$ac_exeext
11598if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11599 (eval $ac_link) 2>&5
11600 ac_status=$?
11601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11602 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11604 (eval $ac_try) 2>&5
11605 ac_status=$?
11606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11607 (exit $ac_status); }; }; then
11608 ac_cv_pthread_system_supported=yes
11609else
11610 echo "$as_me: program exited with status $ac_status" >&5
11611echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011612sed 's/^/| /' conftest.$ac_ext >&5
11613
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011614( exit $ac_status )
11615ac_cv_pthread_system_supported=no
11616fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011617rm -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 +000011618fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011619
Guido van Rossum627b2d71993-12-24 10:39:16 +000011620fi
11621
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011622 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11623echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11624 if test "$ac_cv_pthread_system_supported" = "yes"; then
11625
11626cat >>confdefs.h <<\_ACEOF
11627#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11628_ACEOF
11629
11630 fi
11631
11632for ac_func in pthread_sigmask
11633do
11634as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11635echo "$as_me:$LINENO: checking for $ac_func" >&5
11636echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11637if eval "test \"\${$as_ac_var+set}\" = set"; then
11638 echo $ECHO_N "(cached) $ECHO_C" >&6
11639else
11640 cat >conftest.$ac_ext <<_ACEOF
11641#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011642/* confdefs.h. */
11643_ACEOF
11644cat confdefs.h >>conftest.$ac_ext
11645cat >>conftest.$ac_ext <<_ACEOF
11646/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011647/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011648 which can conflict with char $ac_func (); below.
11649 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011650 <limits.h> exists even on freestanding compilers. Under hpux,
11651 including <limits.h> includes <sys/time.h> and causes problems
11652 checking for functions defined therein. */
11653#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011654# include <limits.h>
11655#else
11656# include <assert.h>
11657#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011658/* Override any gcc2 internal prototype to avoid an error. */
11659#ifdef __cplusplus
11660extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011661{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011662#endif
11663/* We use char because int might match the return type of a gcc2
11664 builtin and then its argument prototype would still apply. */
11665char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011666/* The GNU C library defines this for functions which it implements
11667 to always fail with ENOSYS. Some functions are actually named
11668 something starting with __ and the normal name is an alias. */
11669#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11670choke me
11671#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011672char (*f) () = $ac_func;
11673#endif
11674#ifdef __cplusplus
11675}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011676#endif
11677
Skip Montanaro6dead952003-09-25 14:50:04 +000011678int
11679main ()
11680{
11681return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011682 ;
11683 return 0;
11684}
11685_ACEOF
11686rm -f conftest.$ac_objext conftest$ac_exeext
11687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11688 (eval $ac_link) 2>&5
11689 ac_status=$?
11690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11691 (exit $ac_status); } &&
11692 { ac_try='test -s conftest$ac_exeext'
11693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11694 (eval $ac_try) 2>&5
11695 ac_status=$?
11696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11697 (exit $ac_status); }; }; then
11698 eval "$as_ac_var=yes"
11699else
11700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011701sed 's/^/| /' conftest.$ac_ext >&5
11702
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011703eval "$as_ac_var=no"
11704fi
11705rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11706fi
11707echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11708echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11709if test `eval echo '${'$as_ac_var'}'` = yes; then
11710 cat >>confdefs.h <<_ACEOF
11711#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11712_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011713 case $ac_sys_system in
11714 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011715
Jason Tishlerfac083d2003-07-22 15:20:49 +000011716cat >>confdefs.h <<\_ACEOF
11717#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11718_ACEOF
11719
11720 ;;
11721 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011722fi
11723done
11724
11725fi
11726
11727
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011728# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011729
11730
11731echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11732echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011733# Check whether --enable-ipv6 or --disable-ipv6 was given.
11734if test "${enable_ipv6+set}" = set; then
11735 enableval="$enable_ipv6"
11736 case "$enableval" in
11737 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 echo "$as_me:$LINENO: result: no" >&5
11739echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011740 ipv6=no
11741 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 *) echo "$as_me:$LINENO: result: yes" >&5
11743echo "${ECHO_T}yes" >&6
11744 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011745#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011746_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011747
11748 ipv6=yes
11749 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011750 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011751else
Martin v. Löwis11437992002-04-12 09:54:03 +000011752
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011753 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011754 echo "$as_me:$LINENO: result: no" >&5
11755echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011756 ipv6=no
11757
11758else
Martin v. Löwis11437992002-04-12 09:54:03 +000011759 cat >conftest.$ac_ext <<_ACEOF
11760#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011761/* confdefs.h. */
11762_ACEOF
11763cat confdefs.h >>conftest.$ac_ext
11764cat >>conftest.$ac_ext <<_ACEOF
11765/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011766 /* AF_INET6 available check */
11767#include <sys/types.h>
11768#include <sys/socket.h>
11769main()
11770{
11771 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11772 exit(1);
11773 else
11774 exit(0);
11775}
11776
Martin v. Löwis11437992002-04-12 09:54:03 +000011777_ACEOF
11778rm -f conftest$ac_exeext
11779if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11780 (eval $ac_link) 2>&5
11781 ac_status=$?
11782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11783 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11785 (eval $ac_try) 2>&5
11786 ac_status=$?
11787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11788 (exit $ac_status); }; }; then
11789 echo "$as_me:$LINENO: result: yes" >&5
11790echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011791 ipv6=yes
11792else
Martin v. Löwis11437992002-04-12 09:54:03 +000011793 echo "$as_me: program exited with status $ac_status" >&5
11794echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011795sed 's/^/| /' conftest.$ac_ext >&5
11796
Martin v. Löwis11437992002-04-12 09:54:03 +000011797( exit $ac_status )
11798echo "$as_me:$LINENO: result: no" >&5
11799echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011800 ipv6=no
11801fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011802rm -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 +000011803fi
11804
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011805if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011806 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11807echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11808 cat >conftest.$ac_ext <<_ACEOF
11809#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011810/* confdefs.h. */
11811_ACEOF
11812cat confdefs.h >>conftest.$ac_ext
11813cat >>conftest.$ac_ext <<_ACEOF
11814/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011815#include <sys/types.h>
11816#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011817int
11818main ()
11819{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011820struct sockaddr_in6 x;
11821x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011822 ;
11823 return 0;
11824}
11825_ACEOF
11826rm -f conftest.$ac_objext
11827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11828 (eval $ac_compile) 2>&5
11829 ac_status=$?
11830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11831 (exit $ac_status); } &&
11832 { ac_try='test -s conftest.$ac_objext'
11833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11834 (eval $ac_try) 2>&5
11835 ac_status=$?
11836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11837 (exit $ac_status); }; }; then
11838 echo "$as_me:$LINENO: result: yes" >&5
11839echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011840 ipv6=yes
11841else
Martin v. Löwis11437992002-04-12 09:54:03 +000011842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011843sed 's/^/| /' conftest.$ac_ext >&5
11844
Martin v. Löwis11437992002-04-12 09:54:03 +000011845echo "$as_me:$LINENO: result: no" >&5
11846echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011847 ipv6=no
11848fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011849rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011850fi
11851
11852if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011853 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011854#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011855_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011856
11857fi
11858
Martin v. Löwis11437992002-04-12 09:54:03 +000011859fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011860
11861ipv6type=unknown
11862ipv6lib=none
11863ipv6trylibc=no
11864
11865if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011866 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11867echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011868 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11869 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011870 case $i in
11871 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011872 cat >conftest.$ac_ext <<_ACEOF
11873#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011874/* confdefs.h. */
11875_ACEOF
11876cat confdefs.h >>conftest.$ac_ext
11877cat >>conftest.$ac_ext <<_ACEOF
11878/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011879
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011880#include <netinet/in.h>
11881#ifdef IPV6_INRIA_VERSION
11882yes
11883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011884_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011886 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011887 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011888fi
11889rm -f conftest*
11890
11891 ;;
11892 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011893 cat >conftest.$ac_ext <<_ACEOF
11894#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011895/* confdefs.h. */
11896_ACEOF
11897cat confdefs.h >>conftest.$ac_ext
11898cat >>conftest.$ac_ext <<_ACEOF
11899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011901#include <netinet/in.h>
11902#ifdef __KAME__
11903yes
11904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011907 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011908 ipv6type=$i;
11909 ipv6lib=inet6
11910 ipv6libdir=/usr/local/v6/lib
11911 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011912fi
11913rm -f conftest*
11914
11915 ;;
11916 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 cat >conftest.$ac_ext <<_ACEOF
11918#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011919/* confdefs.h. */
11920_ACEOF
11921cat confdefs.h >>conftest.$ac_ext
11922cat >>conftest.$ac_ext <<_ACEOF
11923/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011924
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011925#include <features.h>
11926#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11927yes
11928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011929_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011931 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011932 ipv6type=$i;
11933 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011934fi
11935rm -f conftest*
11936
11937 ;;
11938 linux-inet6)
11939 if test -d /usr/inet6; then
11940 ipv6type=$i
11941 ipv6lib=inet6
11942 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011943 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011944 fi
11945 ;;
11946 solaris)
11947 if test -f /etc/netconfig; then
11948 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11949 ipv6type=$i
11950 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011951 fi
11952 fi
11953 ;;
11954 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011955 cat >conftest.$ac_ext <<_ACEOF
11956#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011957/* confdefs.h. */
11958_ACEOF
11959cat confdefs.h >>conftest.$ac_ext
11960cat >>conftest.$ac_ext <<_ACEOF
11961/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011962
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011963#include <sys/param.h>
11964#ifdef _TOSHIBA_INET6
11965yes
11966#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011967_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011968if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011969 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011970 ipv6type=$i;
11971 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011972 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011973fi
11974rm -f conftest*
11975
11976 ;;
11977 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011978 cat >conftest.$ac_ext <<_ACEOF
11979#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011980/* confdefs.h. */
11981_ACEOF
11982cat confdefs.h >>conftest.$ac_ext
11983cat >>conftest.$ac_ext <<_ACEOF
11984/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011985
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011986#include </usr/local/v6/include/sys/v6config.h>
11987#ifdef __V6D__
11988yes
11989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011990_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011991if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011992 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011993 ipv6type=$i;
11994 ipv6lib=v6;
11995 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011996 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011997fi
11998rm -f conftest*
11999
12000 ;;
12001 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000012002 cat >conftest.$ac_ext <<_ACEOF
12003#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012004/* confdefs.h. */
12005_ACEOF
12006cat confdefs.h >>conftest.$ac_ext
12007cat >>conftest.$ac_ext <<_ACEOF
12008/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012009
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012010#include <sys/param.h>
12011#ifdef _ZETA_MINAMI_INET6
12012yes
12013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012014_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012016 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012017 ipv6type=$i;
12018 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012019 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012020fi
12021rm -f conftest*
12022
12023 ;;
12024 esac
12025 if test "$ipv6type" != "unknown"; then
12026 break
12027 fi
12028 done
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 echo "$as_me:$LINENO: result: $ipv6type" >&5
12030echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012031fi
12032
12033if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12034 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12035 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12036 echo "using lib$ipv6lib"
12037 else
12038 if test $ipv6trylibc = "yes"; then
12039 echo "using libc"
12040 else
12041 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12042 echo "You need to fetch lib$ipv6lib.a from appropriate"
12043 echo 'ipv6 kit and compile beforehand.'
12044 exit 1
12045 fi
12046 fi
12047fi
12048
Jack Jansen7b8c7542002-04-14 20:12:41 +000012049# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000012050echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
12051echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000012052
12053# Check whether --with-universal-newlines or --without-universal-newlines was given.
12054if test "${with_universal_newlines+set}" = set; then
12055 withval="$with_universal_newlines"
12056
12057fi;
12058
12059if test -z "$with_universal_newlines"
12060then with_universal_newlines="yes"
12061fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012062if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012063then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012064 echo --without-universal-newlines is unsupported, see README
12065 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012066else
Martin v. Löwise8aea582002-04-16 05:51:02 +000012067
12068cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000012069#define WITH_UNIVERSAL_NEWLINES 1
12070_ACEOF
12071
12072fi
12073echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
12074echo "${ECHO_T}$with_universal_newlines" >&6
12075
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012076# Check for --with-doc-strings
12077echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12078echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12079
12080# Check whether --with-doc-strings or --without-doc-strings was given.
12081if test "${with_doc_strings+set}" = set; then
12082 withval="$with_doc_strings"
12083
12084fi;
12085
12086if test -z "$with_doc_strings"
12087then with_doc_strings="yes"
12088fi
12089if test "$with_doc_strings" != "no"
12090then
12091
12092cat >>confdefs.h <<\_ACEOF
12093#define WITH_DOC_STRINGS 1
12094_ACEOF
12095
12096fi
12097echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12098echo "${ECHO_T}$with_doc_strings" >&6
12099
Neil Schemenauera35c6882001-02-27 04:45:05 +000012100# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012101echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12102echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12103
Neil Schemenauera35c6882001-02-27 04:45:05 +000012104# Check whether --with-pymalloc or --without-pymalloc was given.
12105if test "${with_pymalloc+set}" = set; then
12106 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012107
Martin v. Löwis11437992002-04-12 09:54:03 +000012108fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012109
Neil Schemenauer16c22972002-03-22 15:34:49 +000012110if test -z "$with_pymalloc"
12111then with_pymalloc="yes"
12112fi
12113if test "$with_pymalloc" != "no"
12114then
Martin v. Löwis11437992002-04-12 09:54:03 +000012115
12116cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012117#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012118_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012119
12120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012121echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12122echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012123
Barry Warsawef82cd72000-06-30 16:21:01 +000012124# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012125echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12126echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12127
Barry Warsawef82cd72000-06-30 16:21:01 +000012128# Check whether --with-wctype-functions or --without-wctype-functions was given.
12129if test "${with_wctype_functions+set}" = set; then
12130 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012131
Barry Warsawef82cd72000-06-30 16:21:01 +000012132if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012133then
12134
12135cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012136#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012137_ACEOF
12138
12139 echo "$as_me:$LINENO: result: yes" >&5
12140echo "${ECHO_T}yes" >&6
12141else echo "$as_me:$LINENO: result: no" >&5
12142echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012143fi
12144else
Martin v. Löwis11437992002-04-12 09:54:03 +000012145 echo "$as_me:$LINENO: result: no" >&5
12146echo "${ECHO_T}no" >&6
12147fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012149# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012150
Guido van Rossum98935bf2001-09-05 19:13:16 +000012151DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012152
Martin v. Löwis11437992002-04-12 09:54:03 +000012153echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12154echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12155
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012157if test "${with_sgi_dl+set}" = set; then
12158 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012159
12160echo "$as_me:$LINENO: result: $withval" >&5
12161echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012162echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012163exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012164
12165cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012167_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012168
Guido van Rossume97ee181999-12-20 21:27:22 +000012169DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012170dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012171if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012172then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012173else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12174echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12175 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012176fi
12177DLINCLDIR=${dldir}
12178LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012179else
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 echo "$as_me:$LINENO: result: no" >&5
12181echo "${ECHO_T}no" >&6
12182fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012183
Martin v. Löwis11437992002-04-12 09:54:03 +000012184echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12185echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012186
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012187# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012188if test "${with_dl_dld+set}" = set; then
12189 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012190
12191echo "$as_me:$LINENO: result: $withval" >&5
12192echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012193echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012194exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012195
12196cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012197#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012198_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012199
Guido van Rossume97ee181999-12-20 21:27:22 +000012200DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012201dldir=`echo "$withval" | sed 's/,.*//'`
12202dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012203if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012204then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012205else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12206echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12207 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012208fi
12209DLINCLDIR=${dldir}
12210LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012211else
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 echo "$as_me:$LINENO: result: no" >&5
12213echo "${ECHO_T}no" >&6
12214fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012215
Guido van Rossume97ee181999-12-20 21:27:22 +000012216# the dlopen() function means we might want to use dynload_shlib.o. some
12217# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012218
Thomas Wouters3a584202000-08-05 23:28:51 +000012219for ac_func in dlopen
12220do
Martin v. Löwis11437992002-04-12 09:54:03 +000012221as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12222echo "$as_me:$LINENO: checking for $ac_func" >&5
12223echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12224if eval "test \"\${$as_ac_var+set}\" = set"; then
12225 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012226else
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 cat >conftest.$ac_ext <<_ACEOF
12228#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012229/* confdefs.h. */
12230_ACEOF
12231cat confdefs.h >>conftest.$ac_ext
12232cat >>conftest.$ac_ext <<_ACEOF
12233/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012234/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012235 which can conflict with char $ac_func (); below.
12236 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012237 <limits.h> exists even on freestanding compilers. Under hpux,
12238 including <limits.h> includes <sys/time.h> and causes problems
12239 checking for functions defined therein. */
12240#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012241# include <limits.h>
12242#else
12243# include <assert.h>
12244#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012245/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012246#ifdef __cplusplus
12247extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012248{
Martin v. Löwis11437992002-04-12 09:54:03 +000012249#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012250/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012251 builtin and then its argument prototype would still apply. */
12252char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012253/* The GNU C library defines this for functions which it implements
12254 to always fail with ENOSYS. Some functions are actually named
12255 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012256#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012257choke me
12258#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012259char (*f) () = $ac_func;
12260#endif
12261#ifdef __cplusplus
12262}
Guido van Rossume97ee181999-12-20 21:27:22 +000012263#endif
12264
Skip Montanaro6dead952003-09-25 14:50:04 +000012265int
12266main ()
12267{
12268return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 ;
12270 return 0;
12271}
12272_ACEOF
12273rm -f conftest.$ac_objext conftest$ac_exeext
12274if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12275 (eval $ac_link) 2>&5
12276 ac_status=$?
12277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12278 (exit $ac_status); } &&
12279 { ac_try='test -s conftest$ac_exeext'
12280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12281 (eval $ac_try) 2>&5
12282 ac_status=$?
12283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12284 (exit $ac_status); }; }; then
12285 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012286else
Martin v. Löwis11437992002-04-12 09:54:03 +000012287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012288sed 's/^/| /' conftest.$ac_ext >&5
12289
Martin v. Löwis11437992002-04-12 09:54:03 +000012290eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012291fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012292rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012294echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12295echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12296if test `eval echo '${'$as_ac_var'}'` = yes; then
12297 cat >>confdefs.h <<_ACEOF
12298#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12299_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012300
Guido van Rossume97ee181999-12-20 21:27:22 +000012301fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012302done
Guido van Rossume97ee181999-12-20 21:27:22 +000012303
Michael W. Hudson54241132001-12-07 15:38:26 +000012304
Guido van Rossume97ee181999-12-20 21:27:22 +000012305# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12306# loading of modules.
12307
Martin v. Löwis11437992002-04-12 09:54:03 +000012308echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12309echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012310if test -z "$DYNLOADFILE"
12311then
12312 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012313 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12314 if test "$ac_cv_func_dlopen" = yes
12315 then DYNLOADFILE="dynload_shlib.o"
12316 else DYNLOADFILE="dynload_aix.o"
12317 fi
12318 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012319 BeOS*) DYNLOADFILE="dynload_beos.o";;
12320 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012321 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012322 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012323 *)
12324 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12325 # out any dynamic loading
12326 if test "$ac_cv_func_dlopen" = yes
12327 then DYNLOADFILE="dynload_shlib.o"
12328 else DYNLOADFILE="dynload_stub.o"
12329 fi
12330 ;;
12331 esac
12332fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012333echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12334echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012335if test "$DYNLOADFILE" != "dynload_stub.o"
12336then
Martin v. Löwis11437992002-04-12 09:54:03 +000012337
12338cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012339#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012340_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012341
12342fi
12343
Neil Schemenauer4e425612001-06-19 15:44:15 +000012344# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12345
Michael W. Hudson54241132001-12-07 15:38:26 +000012346
Martin v. Löwis11437992002-04-12 09:54:03 +000012347echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12348echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012349if test -z "$MACHDEP_OBJS"
12350then
Jack Jansene578a632001-08-15 01:27:14 +000012351 MACHDEP_OBJS=$extra_machdep_objs
12352else
12353 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012354fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012355echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12356echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012357
Guido van Rossum627b2d71993-12-24 10:39:16 +000012358# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012430
Martin v. Löwisd5843682002-11-21 20:41:28 +000012431for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012432 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012433 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012434 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012435 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012436 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012437 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012438 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012439 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012440 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012441 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012442 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012443do
Martin v. Löwis11437992002-04-12 09:54:03 +000012444as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12445echo "$as_me:$LINENO: checking for $ac_func" >&5
12446echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12447if eval "test \"\${$as_ac_var+set}\" = set"; then
12448 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012449else
Martin v. Löwis11437992002-04-12 09:54:03 +000012450 cat >conftest.$ac_ext <<_ACEOF
12451#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012452/* confdefs.h. */
12453_ACEOF
12454cat confdefs.h >>conftest.$ac_ext
12455cat >>conftest.$ac_ext <<_ACEOF
12456/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012457/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012458 which can conflict with char $ac_func (); below.
12459 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012460 <limits.h> exists even on freestanding compilers. Under hpux,
12461 including <limits.h> includes <sys/time.h> and causes problems
12462 checking for functions defined therein. */
12463#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012464# include <limits.h>
12465#else
12466# include <assert.h>
12467#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012468/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012469#ifdef __cplusplus
12470extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012471{
Martin v. Löwis11437992002-04-12 09:54:03 +000012472#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012473/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012474 builtin and then its argument prototype would still apply. */
12475char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012476/* The GNU C library defines this for functions which it implements
12477 to always fail with ENOSYS. Some functions are actually named
12478 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012479#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012480choke me
12481#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012482char (*f) () = $ac_func;
12483#endif
12484#ifdef __cplusplus
12485}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012486#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012487
Skip Montanaro6dead952003-09-25 14:50:04 +000012488int
12489main ()
12490{
12491return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 ;
12493 return 0;
12494}
12495_ACEOF
12496rm -f conftest.$ac_objext conftest$ac_exeext
12497if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12498 (eval $ac_link) 2>&5
12499 ac_status=$?
12500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12501 (exit $ac_status); } &&
12502 { ac_try='test -s conftest$ac_exeext'
12503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12504 (eval $ac_try) 2>&5
12505 ac_status=$?
12506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507 (exit $ac_status); }; }; then
12508 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012509else
Martin v. Löwis11437992002-04-12 09:54:03 +000012510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012511sed 's/^/| /' conftest.$ac_ext >&5
12512
Martin v. Löwis11437992002-04-12 09:54:03 +000012513eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012514fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012515rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012516fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012517echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12518echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12519if test `eval echo '${'$as_ac_var'}'` = yes; then
12520 cat >>confdefs.h <<_ACEOF
12521#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12522_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012523
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012524fi
12525done
12526
Michael W. Hudson54241132001-12-07 15:38:26 +000012527
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012528# For some functions, having a definition is not sufficient, since
12529# we want to take their address.
12530echo "$as_me:$LINENO: checking for chroot" >&5
12531echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12532cat >conftest.$ac_ext <<_ACEOF
12533#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012534/* confdefs.h. */
12535_ACEOF
12536cat confdefs.h >>conftest.$ac_ext
12537cat >>conftest.$ac_ext <<_ACEOF
12538/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012539#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012540int
12541main ()
12542{
12543void *x=chroot
12544 ;
12545 return 0;
12546}
12547_ACEOF
12548rm -f conftest.$ac_objext
12549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12550 (eval $ac_compile) 2>&5
12551 ac_status=$?
12552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12553 (exit $ac_status); } &&
12554 { ac_try='test -s conftest.$ac_objext'
12555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12556 (eval $ac_try) 2>&5
12557 ac_status=$?
12558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559 (exit $ac_status); }; }; then
12560
12561cat >>confdefs.h <<\_ACEOF
12562#define HAVE_CHROOT 1
12563_ACEOF
12564
12565 echo "$as_me:$LINENO: result: yes" >&5
12566echo "${ECHO_T}yes" >&6
12567else
12568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012569sed 's/^/| /' conftest.$ac_ext >&5
12570
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012571echo "$as_me:$LINENO: result: no" >&5
12572echo "${ECHO_T}no" >&6
12573
12574fi
12575rm -f conftest.$ac_objext conftest.$ac_ext
12576echo "$as_me:$LINENO: checking for link" >&5
12577echo $ECHO_N "checking for link... $ECHO_C" >&6
12578cat >conftest.$ac_ext <<_ACEOF
12579#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012580/* confdefs.h. */
12581_ACEOF
12582cat confdefs.h >>conftest.$ac_ext
12583cat >>conftest.$ac_ext <<_ACEOF
12584/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012585#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012586int
12587main ()
12588{
12589void *x=link
12590 ;
12591 return 0;
12592}
12593_ACEOF
12594rm -f conftest.$ac_objext
12595if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12596 (eval $ac_compile) 2>&5
12597 ac_status=$?
12598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12599 (exit $ac_status); } &&
12600 { ac_try='test -s conftest.$ac_objext'
12601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12602 (eval $ac_try) 2>&5
12603 ac_status=$?
12604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12605 (exit $ac_status); }; }; then
12606
12607cat >>confdefs.h <<\_ACEOF
12608#define HAVE_LINK 1
12609_ACEOF
12610
12611 echo "$as_me:$LINENO: result: yes" >&5
12612echo "${ECHO_T}yes" >&6
12613else
12614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012615sed 's/^/| /' conftest.$ac_ext >&5
12616
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012617echo "$as_me:$LINENO: result: no" >&5
12618echo "${ECHO_T}no" >&6
12619
12620fi
12621rm -f conftest.$ac_objext conftest.$ac_ext
12622echo "$as_me:$LINENO: checking for symlink" >&5
12623echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12624cat >conftest.$ac_ext <<_ACEOF
12625#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012626/* confdefs.h. */
12627_ACEOF
12628cat confdefs.h >>conftest.$ac_ext
12629cat >>conftest.$ac_ext <<_ACEOF
12630/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012631#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012632int
12633main ()
12634{
12635void *x=symlink
12636 ;
12637 return 0;
12638}
12639_ACEOF
12640rm -f conftest.$ac_objext
12641if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12642 (eval $ac_compile) 2>&5
12643 ac_status=$?
12644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12645 (exit $ac_status); } &&
12646 { ac_try='test -s conftest.$ac_objext'
12647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12648 (eval $ac_try) 2>&5
12649 ac_status=$?
12650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12651 (exit $ac_status); }; }; then
12652
12653cat >>confdefs.h <<\_ACEOF
12654#define HAVE_SYMLINK 1
12655_ACEOF
12656
12657 echo "$as_me:$LINENO: result: yes" >&5
12658echo "${ECHO_T}yes" >&6
12659else
12660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012661sed 's/^/| /' conftest.$ac_ext >&5
12662
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012663echo "$as_me:$LINENO: result: no" >&5
12664echo "${ECHO_T}no" >&6
12665
12666fi
12667rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012668echo "$as_me:$LINENO: checking for fchdir" >&5
12669echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12670cat >conftest.$ac_ext <<_ACEOF
12671#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012672/* confdefs.h. */
12673_ACEOF
12674cat confdefs.h >>conftest.$ac_ext
12675cat >>conftest.$ac_ext <<_ACEOF
12676/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012677#include <unistd.h>
12678int
12679main ()
12680{
12681void *x=fchdir
12682 ;
12683 return 0;
12684}
12685_ACEOF
12686rm -f conftest.$ac_objext
12687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12688 (eval $ac_compile) 2>&5
12689 ac_status=$?
12690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12691 (exit $ac_status); } &&
12692 { ac_try='test -s conftest.$ac_objext'
12693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12694 (eval $ac_try) 2>&5
12695 ac_status=$?
12696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12697 (exit $ac_status); }; }; then
12698
12699cat >>confdefs.h <<\_ACEOF
12700#define HAVE_FCHDIR 1
12701_ACEOF
12702
12703 echo "$as_me:$LINENO: result: yes" >&5
12704echo "${ECHO_T}yes" >&6
12705else
12706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012707sed 's/^/| /' conftest.$ac_ext >&5
12708
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012709echo "$as_me:$LINENO: result: no" >&5
12710echo "${ECHO_T}no" >&6
12711
12712fi
12713rm -f conftest.$ac_objext conftest.$ac_ext
12714echo "$as_me:$LINENO: checking for fsync" >&5
12715echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12716cat >conftest.$ac_ext <<_ACEOF
12717#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* confdefs.h. */
12719_ACEOF
12720cat confdefs.h >>conftest.$ac_ext
12721cat >>conftest.$ac_ext <<_ACEOF
12722/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012723#include <unistd.h>
12724int
12725main ()
12726{
12727void *x=fsync
12728 ;
12729 return 0;
12730}
12731_ACEOF
12732rm -f conftest.$ac_objext
12733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12734 (eval $ac_compile) 2>&5
12735 ac_status=$?
12736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12737 (exit $ac_status); } &&
12738 { ac_try='test -s conftest.$ac_objext'
12739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12740 (eval $ac_try) 2>&5
12741 ac_status=$?
12742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12743 (exit $ac_status); }; }; then
12744
12745cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012746#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012747_ACEOF
12748
12749 echo "$as_me:$LINENO: result: yes" >&5
12750echo "${ECHO_T}yes" >&6
12751else
12752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012753sed 's/^/| /' conftest.$ac_ext >&5
12754
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012755echo "$as_me:$LINENO: result: no" >&5
12756echo "${ECHO_T}no" >&6
12757
12758fi
12759rm -f conftest.$ac_objext conftest.$ac_ext
12760echo "$as_me:$LINENO: checking for fdatasync" >&5
12761echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12762cat >conftest.$ac_ext <<_ACEOF
12763#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012764/* confdefs.h. */
12765_ACEOF
12766cat confdefs.h >>conftest.$ac_ext
12767cat >>conftest.$ac_ext <<_ACEOF
12768/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012769#include <unistd.h>
12770int
12771main ()
12772{
12773void *x=fdatasync
12774 ;
12775 return 0;
12776}
12777_ACEOF
12778rm -f conftest.$ac_objext
12779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12780 (eval $ac_compile) 2>&5
12781 ac_status=$?
12782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12783 (exit $ac_status); } &&
12784 { ac_try='test -s conftest.$ac_objext'
12785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12786 (eval $ac_try) 2>&5
12787 ac_status=$?
12788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12789 (exit $ac_status); }; }; then
12790
12791cat >>confdefs.h <<\_ACEOF
12792#define HAVE_FDATASYNC 1
12793_ACEOF
12794
12795 echo "$as_me:$LINENO: result: yes" >&5
12796echo "${ECHO_T}yes" >&6
12797else
12798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012799sed 's/^/| /' conftest.$ac_ext >&5
12800
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012801echo "$as_me:$LINENO: result: no" >&5
12802echo "${ECHO_T}no" >&6
12803
12804fi
12805rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012806
Martin v. Löwisd5843682002-11-21 20:41:28 +000012807# On some systems (eg. FreeBSD 5), we would find a definition of the
12808# functions ctermid_r, setgroups in the library, but no prototype
12809# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12810# address to avoid compiler warnings and potential miscompilations
12811# because of the missing prototypes.
12812
12813echo "$as_me:$LINENO: checking for ctermid_r" >&5
12814echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12815cat >conftest.$ac_ext <<_ACEOF
12816#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012817/* confdefs.h. */
12818_ACEOF
12819cat confdefs.h >>conftest.$ac_ext
12820cat >>conftest.$ac_ext <<_ACEOF
12821/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012822
12823#include "confdefs.h"
12824#include <stdio.h>
12825
Martin v. Löwisd5843682002-11-21 20:41:28 +000012826int
12827main ()
12828{
12829void* p = ctermid_r
12830 ;
12831 return 0;
12832}
12833_ACEOF
12834rm -f conftest.$ac_objext
12835if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12836 (eval $ac_compile) 2>&5
12837 ac_status=$?
12838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12839 (exit $ac_status); } &&
12840 { ac_try='test -s conftest.$ac_objext'
12841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12842 (eval $ac_try) 2>&5
12843 ac_status=$?
12844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12845 (exit $ac_status); }; }; then
12846
12847cat >>confdefs.h <<\_ACEOF
12848#define HAVE_CTERMID_R 1
12849_ACEOF
12850
12851 echo "$as_me:$LINENO: result: yes" >&5
12852echo "${ECHO_T}yes" >&6
12853else
12854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012855sed 's/^/| /' conftest.$ac_ext >&5
12856
Martin v. Löwisd5843682002-11-21 20:41:28 +000012857echo "$as_me:$LINENO: result: no" >&5
12858echo "${ECHO_T}no" >&6
12859
12860fi
12861rm -f conftest.$ac_objext conftest.$ac_ext
12862
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012863echo "$as_me:$LINENO: checking for flock" >&5
12864echo $ECHO_N "checking for flock... $ECHO_C" >&6
12865cat >conftest.$ac_ext <<_ACEOF
12866#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012867/* confdefs.h. */
12868_ACEOF
12869cat confdefs.h >>conftest.$ac_ext
12870cat >>conftest.$ac_ext <<_ACEOF
12871/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012872
12873#include "confdefs.h"
12874#include <sys/file.h>
12875
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012876int
12877main ()
12878{
12879void* p = flock
12880 ;
12881 return 0;
12882}
12883_ACEOF
12884rm -f conftest.$ac_objext
12885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12886 (eval $ac_compile) 2>&5
12887 ac_status=$?
12888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12889 (exit $ac_status); } &&
12890 { ac_try='test -s conftest.$ac_objext'
12891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12892 (eval $ac_try) 2>&5
12893 ac_status=$?
12894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12895 (exit $ac_status); }; }; then
12896
12897cat >>confdefs.h <<\_ACEOF
12898#define HAVE_FLOCK 1
12899_ACEOF
12900
12901 echo "$as_me:$LINENO: result: yes" >&5
12902echo "${ECHO_T}yes" >&6
12903else
12904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012905sed 's/^/| /' conftest.$ac_ext >&5
12906
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012907echo "$as_me:$LINENO: result: no" >&5
12908echo "${ECHO_T}no" >&6
12909
12910fi
12911rm -f conftest.$ac_objext conftest.$ac_ext
12912
12913echo "$as_me:$LINENO: checking for getpagesize" >&5
12914echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12915cat >conftest.$ac_ext <<_ACEOF
12916#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012917/* confdefs.h. */
12918_ACEOF
12919cat confdefs.h >>conftest.$ac_ext
12920cat >>conftest.$ac_ext <<_ACEOF
12921/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012922
12923#include "confdefs.h"
12924#include <unistd.h>
12925
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012926int
12927main ()
12928{
12929void* p = getpagesize
12930 ;
12931 return 0;
12932}
12933_ACEOF
12934rm -f conftest.$ac_objext
12935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12936 (eval $ac_compile) 2>&5
12937 ac_status=$?
12938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12939 (exit $ac_status); } &&
12940 { ac_try='test -s conftest.$ac_objext'
12941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12942 (eval $ac_try) 2>&5
12943 ac_status=$?
12944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12945 (exit $ac_status); }; }; then
12946
12947cat >>confdefs.h <<\_ACEOF
12948#define HAVE_GETPAGESIZE 1
12949_ACEOF
12950
12951 echo "$as_me:$LINENO: result: yes" >&5
12952echo "${ECHO_T}yes" >&6
12953else
12954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012955sed 's/^/| /' conftest.$ac_ext >&5
12956
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012957echo "$as_me:$LINENO: result: no" >&5
12958echo "${ECHO_T}no" >&6
12959
12960fi
12961rm -f conftest.$ac_objext conftest.$ac_ext
12962
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012963for ac_prog in true
12964do
12965 # Extract the first word of "$ac_prog", so it can be a program name with args.
12966set dummy $ac_prog; ac_word=$2
12967echo "$as_me:$LINENO: checking for $ac_word" >&5
12968echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12969if test "${ac_cv_prog_TRUE+set}" = set; then
12970 echo $ECHO_N "(cached) $ECHO_C" >&6
12971else
12972 if test -n "$TRUE"; then
12973 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12974else
12975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12976for as_dir in $PATH
12977do
12978 IFS=$as_save_IFS
12979 test -z "$as_dir" && as_dir=.
12980 for ac_exec_ext in '' $ac_executable_extensions; do
12981 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12982 ac_cv_prog_TRUE="$ac_prog"
12983 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12984 break 2
12985 fi
12986done
12987done
12988
12989fi
12990fi
12991TRUE=$ac_cv_prog_TRUE
12992if test -n "$TRUE"; then
12993 echo "$as_me:$LINENO: result: $TRUE" >&5
12994echo "${ECHO_T}$TRUE" >&6
12995else
12996 echo "$as_me:$LINENO: result: no" >&5
12997echo "${ECHO_T}no" >&6
12998fi
12999
13000 test -n "$TRUE" && break
13001done
13002test -n "$TRUE" || TRUE="/bin/true"
13003
13004
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013005echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
13006echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
13007if test "${ac_cv_lib_c_inet_aton+set}" = set; then
13008 echo $ECHO_N "(cached) $ECHO_C" >&6
13009else
13010 ac_check_lib_save_LIBS=$LIBS
13011LIBS="-lc $LIBS"
13012cat >conftest.$ac_ext <<_ACEOF
13013#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013014/* confdefs.h. */
13015_ACEOF
13016cat confdefs.h >>conftest.$ac_ext
13017cat >>conftest.$ac_ext <<_ACEOF
13018/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013019
13020/* Override any gcc2 internal prototype to avoid an error. */
13021#ifdef __cplusplus
13022extern "C"
13023#endif
13024/* We use char because int might match the return type of a gcc2
13025 builtin and then its argument prototype would still apply. */
13026char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013027int
13028main ()
13029{
13030inet_aton ();
13031 ;
13032 return 0;
13033}
13034_ACEOF
13035rm -f conftest.$ac_objext conftest$ac_exeext
13036if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13037 (eval $ac_link) 2>&5
13038 ac_status=$?
13039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13040 (exit $ac_status); } &&
13041 { ac_try='test -s conftest$ac_exeext'
13042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13043 (eval $ac_try) 2>&5
13044 ac_status=$?
13045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13046 (exit $ac_status); }; }; then
13047 ac_cv_lib_c_inet_aton=yes
13048else
13049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013050sed 's/^/| /' conftest.$ac_ext >&5
13051
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013052ac_cv_lib_c_inet_aton=no
13053fi
13054rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13055LIBS=$ac_check_lib_save_LIBS
13056fi
13057echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
13058echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
13059if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013060 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013061else
13062
13063echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
13064echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
13065if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
13066 echo $ECHO_N "(cached) $ECHO_C" >&6
13067else
13068 ac_check_lib_save_LIBS=$LIBS
13069LIBS="-lresolv $LIBS"
13070cat >conftest.$ac_ext <<_ACEOF
13071#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013072/* confdefs.h. */
13073_ACEOF
13074cat confdefs.h >>conftest.$ac_ext
13075cat >>conftest.$ac_ext <<_ACEOF
13076/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013077
13078/* Override any gcc2 internal prototype to avoid an error. */
13079#ifdef __cplusplus
13080extern "C"
13081#endif
13082/* We use char because int might match the return type of a gcc2
13083 builtin and then its argument prototype would still apply. */
13084char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013085int
13086main ()
13087{
13088inet_aton ();
13089 ;
13090 return 0;
13091}
13092_ACEOF
13093rm -f conftest.$ac_objext conftest$ac_exeext
13094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13095 (eval $ac_link) 2>&5
13096 ac_status=$?
13097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13098 (exit $ac_status); } &&
13099 { ac_try='test -s conftest$ac_exeext'
13100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13101 (eval $ac_try) 2>&5
13102 ac_status=$?
13103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13104 (exit $ac_status); }; }; then
13105 ac_cv_lib_resolv_inet_aton=yes
13106else
13107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013108sed 's/^/| /' conftest.$ac_ext >&5
13109
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013110ac_cv_lib_resolv_inet_aton=no
13111fi
13112rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13113LIBS=$ac_check_lib_save_LIBS
13114fi
13115echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13116echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13117if test $ac_cv_lib_resolv_inet_aton = yes; then
13118 cat >>confdefs.h <<_ACEOF
13119#define HAVE_LIBRESOLV 1
13120_ACEOF
13121
13122 LIBS="-lresolv $LIBS"
13123
13124fi
13125
13126
13127fi
13128
13129
Martin v. Löwise9416172003-05-03 10:12:45 +000013130echo "$as_me:$LINENO: checking for hstrerror" >&5
13131echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13132cat >conftest.$ac_ext <<_ACEOF
13133#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013134/* confdefs.h. */
13135_ACEOF
13136cat confdefs.h >>conftest.$ac_ext
13137cat >>conftest.$ac_ext <<_ACEOF
13138/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013139
13140#include "confdefs.h"
13141#include <netdb.h>
13142
Martin v. Löwise9416172003-05-03 10:12:45 +000013143int
13144main ()
13145{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013146void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013147 ;
13148 return 0;
13149}
13150_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013151rm -f conftest.$ac_objext conftest$ac_exeext
13152if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13153 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013154 ac_status=$?
13155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13156 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013157 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13159 (eval $ac_try) 2>&5
13160 ac_status=$?
13161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13162 (exit $ac_status); }; }; then
13163
13164cat >>confdefs.h <<\_ACEOF
13165#define HAVE_HSTRERROR 1
13166_ACEOF
13167
13168 echo "$as_me:$LINENO: result: yes" >&5
13169echo "${ECHO_T}yes" >&6
13170else
13171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013172sed 's/^/| /' conftest.$ac_ext >&5
13173
Martin v. Löwise9416172003-05-03 10:12:45 +000013174echo "$as_me:$LINENO: result: no" >&5
13175echo "${ECHO_T}no" >&6
13176
13177fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013178rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013179
13180echo "$as_me:$LINENO: checking for inet_aton" >&5
13181echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13182cat >conftest.$ac_ext <<_ACEOF
13183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013184/* confdefs.h. */
13185_ACEOF
13186cat confdefs.h >>conftest.$ac_ext
13187cat >>conftest.$ac_ext <<_ACEOF
13188/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013189
13190#include "confdefs.h"
13191#include <sys/socket.h>
13192#include <netinet/in.h>
13193#include <arpa/inet.h>
13194
Martin v. Löwise9416172003-05-03 10:12:45 +000013195int
13196main ()
13197{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013198void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013199 ;
13200 return 0;
13201}
13202_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013203rm -f conftest.$ac_objext conftest$ac_exeext
13204if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13205 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013206 ac_status=$?
13207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13208 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013209 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13211 (eval $ac_try) 2>&5
13212 ac_status=$?
13213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13214 (exit $ac_status); }; }; then
13215
13216cat >>confdefs.h <<\_ACEOF
13217#define HAVE_INET_ATON 1
13218_ACEOF
13219
13220 echo "$as_me:$LINENO: result: yes" >&5
13221echo "${ECHO_T}yes" >&6
13222else
13223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013224sed 's/^/| /' conftest.$ac_ext >&5
13225
Martin v. Löwise9416172003-05-03 10:12:45 +000013226echo "$as_me:$LINENO: result: no" >&5
13227echo "${ECHO_T}no" >&6
13228
13229fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013230rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013231
13232echo "$as_me:$LINENO: checking for inet_pton" >&5
13233echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13234cat >conftest.$ac_ext <<_ACEOF
13235#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013236/* confdefs.h. */
13237_ACEOF
13238cat confdefs.h >>conftest.$ac_ext
13239cat >>conftest.$ac_ext <<_ACEOF
13240/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013241
13242#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013243#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013244#include <sys/socket.h>
13245#include <netinet/in.h>
13246#include <arpa/inet.h>
13247
Martin v. Löwise9416172003-05-03 10:12:45 +000013248int
13249main ()
13250{
13251void* p = inet_pton
13252 ;
13253 return 0;
13254}
13255_ACEOF
13256rm -f conftest.$ac_objext
13257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13258 (eval $ac_compile) 2>&5
13259 ac_status=$?
13260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13261 (exit $ac_status); } &&
13262 { ac_try='test -s conftest.$ac_objext'
13263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13264 (eval $ac_try) 2>&5
13265 ac_status=$?
13266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13267 (exit $ac_status); }; }; then
13268
13269cat >>confdefs.h <<\_ACEOF
13270#define HAVE_INET_PTON 1
13271_ACEOF
13272
13273 echo "$as_me:$LINENO: result: yes" >&5
13274echo "${ECHO_T}yes" >&6
13275else
13276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013277sed 's/^/| /' conftest.$ac_ext >&5
13278
Martin v. Löwise9416172003-05-03 10:12:45 +000013279echo "$as_me:$LINENO: result: no" >&5
13280echo "${ECHO_T}no" >&6
13281
13282fi
13283rm -f conftest.$ac_objext conftest.$ac_ext
13284
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013285# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013286echo "$as_me:$LINENO: checking for setgroups" >&5
13287echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13288cat >conftest.$ac_ext <<_ACEOF
13289#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013290/* confdefs.h. */
13291_ACEOF
13292cat confdefs.h >>conftest.$ac_ext
13293cat >>conftest.$ac_ext <<_ACEOF
13294/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013295
13296#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013297#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013298#ifdef HAVE_GRP_H
13299#include <grp.h>
13300#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013301
Martin v. Löwisd5843682002-11-21 20:41:28 +000013302int
13303main ()
13304{
13305void* p = setgroups
13306 ;
13307 return 0;
13308}
13309_ACEOF
13310rm -f conftest.$ac_objext
13311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13312 (eval $ac_compile) 2>&5
13313 ac_status=$?
13314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13315 (exit $ac_status); } &&
13316 { ac_try='test -s conftest.$ac_objext'
13317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13318 (eval $ac_try) 2>&5
13319 ac_status=$?
13320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13321 (exit $ac_status); }; }; then
13322
13323cat >>confdefs.h <<\_ACEOF
13324#define HAVE_SETGROUPS 1
13325_ACEOF
13326
13327 echo "$as_me:$LINENO: result: yes" >&5
13328echo "${ECHO_T}yes" >&6
13329else
13330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013331sed 's/^/| /' conftest.$ac_ext >&5
13332
Martin v. Löwisd5843682002-11-21 20:41:28 +000013333echo "$as_me:$LINENO: result: no" >&5
13334echo "${ECHO_T}no" >&6
13335
13336fi
13337rm -f conftest.$ac_objext conftest.$ac_ext
13338
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013339# check for openpty and forkpty
13340
Martin v. Löwis11437992002-04-12 09:54:03 +000013341
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013342for ac_func in openpty
13343do
Martin v. Löwis11437992002-04-12 09:54:03 +000013344as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13345echo "$as_me:$LINENO: checking for $ac_func" >&5
13346echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13347if eval "test \"\${$as_ac_var+set}\" = set"; then
13348 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013349else
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 cat >conftest.$ac_ext <<_ACEOF
13351#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013352/* confdefs.h. */
13353_ACEOF
13354cat confdefs.h >>conftest.$ac_ext
13355cat >>conftest.$ac_ext <<_ACEOF
13356/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013357/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013358 which can conflict with char $ac_func (); below.
13359 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013360 <limits.h> exists even on freestanding compilers. Under hpux,
13361 including <limits.h> includes <sys/time.h> and causes problems
13362 checking for functions defined therein. */
13363#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013364# include <limits.h>
13365#else
13366# include <assert.h>
13367#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013368/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013369#ifdef __cplusplus
13370extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013371{
Martin v. Löwis11437992002-04-12 09:54:03 +000013372#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013373/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 builtin and then its argument prototype would still apply. */
13375char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013376/* The GNU C library defines this for functions which it implements
13377 to always fail with ENOSYS. Some functions are actually named
13378 something starting with __ and the normal name is an alias. */
13379#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13380choke me
13381#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013382char (*f) () = $ac_func;
13383#endif
13384#ifdef __cplusplus
13385}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013386#endif
13387
Skip Montanaro6dead952003-09-25 14:50:04 +000013388int
13389main ()
13390{
13391return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013392 ;
13393 return 0;
13394}
13395_ACEOF
13396rm -f conftest.$ac_objext conftest$ac_exeext
13397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13398 (eval $ac_link) 2>&5
13399 ac_status=$?
13400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13401 (exit $ac_status); } &&
13402 { ac_try='test -s conftest$ac_exeext'
13403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13404 (eval $ac_try) 2>&5
13405 ac_status=$?
13406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13407 (exit $ac_status); }; }; then
13408 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013409else
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013411sed 's/^/| /' conftest.$ac_ext >&5
13412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013416fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013417echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13418echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13419if test `eval echo '${'$as_ac_var'}'` = yes; then
13420 cat >>confdefs.h <<_ACEOF
13421#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13422_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013423
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013424else
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13426echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13427if test "${ac_cv_lib_util_openpty+set}" = set; then
13428 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013429else
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013431LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013432cat >conftest.$ac_ext <<_ACEOF
13433#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013434/* confdefs.h. */
13435_ACEOF
13436cat confdefs.h >>conftest.$ac_ext
13437cat >>conftest.$ac_ext <<_ACEOF
13438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013439
Fred Drake8cef4cf2000-06-28 16:40:38 +000013440/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013441#ifdef __cplusplus
13442extern "C"
13443#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 openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013447int
13448main ()
13449{
13450openpty ();
13451 ;
13452 return 0;
13453}
13454_ACEOF
13455rm -f conftest.$ac_objext conftest$ac_exeext
13456if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13457 (eval $ac_link) 2>&5
13458 ac_status=$?
13459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13460 (exit $ac_status); } &&
13461 { ac_try='test -s conftest$ac_exeext'
13462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13463 (eval $ac_try) 2>&5
13464 ac_status=$?
13465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13466 (exit $ac_status); }; }; then
13467 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013468else
Martin v. Löwis11437992002-04-12 09:54:03 +000013469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013470sed 's/^/| /' conftest.$ac_ext >&5
13471
Martin v. Löwis11437992002-04-12 09:54:03 +000013472ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013473fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013474rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13475LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013476fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013477echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13478echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13479if test $ac_cv_lib_util_openpty = yes; then
13480 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013481#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013482_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013483 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013484fi
13485
13486fi
13487done
13488
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
Fred Drake8cef4cf2000-06-28 16:40:38 +000013490for ac_func in forkpty
13491do
Martin v. Löwis11437992002-04-12 09:54:03 +000013492as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13493echo "$as_me:$LINENO: checking for $ac_func" >&5
13494echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13495if eval "test \"\${$as_ac_var+set}\" = set"; then
13496 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013497else
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 cat >conftest.$ac_ext <<_ACEOF
13499#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013500/* confdefs.h. */
13501_ACEOF
13502cat confdefs.h >>conftest.$ac_ext
13503cat >>conftest.$ac_ext <<_ACEOF
13504/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013505/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013506 which can conflict with char $ac_func (); below.
13507 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013508 <limits.h> exists even on freestanding compilers. Under hpux,
13509 including <limits.h> includes <sys/time.h> and causes problems
13510 checking for functions defined therein. */
13511#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013512# include <limits.h>
13513#else
13514# include <assert.h>
13515#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013516/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013517#ifdef __cplusplus
13518extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013519{
Martin v. Löwis11437992002-04-12 09:54:03 +000013520#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013521/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 builtin and then its argument prototype would still apply. */
13523char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013524/* The GNU C library defines this for functions which it implements
13525 to always fail with ENOSYS. Some functions are actually named
13526 something starting with __ and the normal name is an alias. */
13527#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13528choke me
13529#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013530char (*f) () = $ac_func;
13531#endif
13532#ifdef __cplusplus
13533}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013534#endif
13535
Skip Montanaro6dead952003-09-25 14:50:04 +000013536int
13537main ()
13538{
13539return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013540 ;
13541 return 0;
13542}
13543_ACEOF
13544rm -f conftest.$ac_objext conftest$ac_exeext
13545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13546 (eval $ac_link) 2>&5
13547 ac_status=$?
13548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13549 (exit $ac_status); } &&
13550 { ac_try='test -s conftest$ac_exeext'
13551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13552 (eval $ac_try) 2>&5
13553 ac_status=$?
13554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13555 (exit $ac_status); }; }; then
13556 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013557else
Martin v. Löwis11437992002-04-12 09:54:03 +000013558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013559sed 's/^/| /' conftest.$ac_ext >&5
13560
Martin v. Löwis11437992002-04-12 09:54:03 +000013561eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013562fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013563rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013565echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13566echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13567if test `eval echo '${'$as_ac_var'}'` = yes; then
13568 cat >>confdefs.h <<_ACEOF
13569#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13570_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013571
Fred Drake8cef4cf2000-06-28 16:40:38 +000013572else
Martin v. Löwis11437992002-04-12 09:54:03 +000013573 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13574echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13575if test "${ac_cv_lib_util_forkpty+set}" = set; then
13576 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013577else
Martin v. Löwis11437992002-04-12 09:54:03 +000013578 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013579LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013580cat >conftest.$ac_ext <<_ACEOF
13581#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013582/* confdefs.h. */
13583_ACEOF
13584cat confdefs.h >>conftest.$ac_ext
13585cat >>conftest.$ac_ext <<_ACEOF
13586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013587
Fred Drake8cef4cf2000-06-28 16:40:38 +000013588/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013589#ifdef __cplusplus
13590extern "C"
13591#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013592/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 builtin and then its argument prototype would still apply. */
13594char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013595int
13596main ()
13597{
13598forkpty ();
13599 ;
13600 return 0;
13601}
13602_ACEOF
13603rm -f conftest.$ac_objext conftest$ac_exeext
13604if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13605 (eval $ac_link) 2>&5
13606 ac_status=$?
13607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13608 (exit $ac_status); } &&
13609 { ac_try='test -s conftest$ac_exeext'
13610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13611 (eval $ac_try) 2>&5
13612 ac_status=$?
13613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13614 (exit $ac_status); }; }; then
13615 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013616else
Martin v. Löwis11437992002-04-12 09:54:03 +000013617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013618sed 's/^/| /' conftest.$ac_ext >&5
13619
Martin v. Löwis11437992002-04-12 09:54:03 +000013620ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013621fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013622rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13623LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013625echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13626echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13627if test $ac_cv_lib_util_forkpty = yes; then
13628 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013629#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013630_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013631 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013632fi
13633
13634fi
13635done
13636
Jack Jansendd19cf82001-12-06 22:36:17 +000013637
Michael W. Hudson54241132001-12-07 15:38:26 +000013638# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013639
13640
13641
13642
13643
13644
Fred Drake8cef4cf2000-06-28 16:40:38 +000013645for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13646do
Martin v. Löwis11437992002-04-12 09:54:03 +000013647as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13648echo "$as_me:$LINENO: checking for $ac_func" >&5
13649echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13650if eval "test \"\${$as_ac_var+set}\" = set"; then
13651 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013652else
Martin v. Löwis11437992002-04-12 09:54:03 +000013653 cat >conftest.$ac_ext <<_ACEOF
13654#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013655/* confdefs.h. */
13656_ACEOF
13657cat confdefs.h >>conftest.$ac_ext
13658cat >>conftest.$ac_ext <<_ACEOF
13659/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013660/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013661 which can conflict with char $ac_func (); below.
13662 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013663 <limits.h> exists even on freestanding compilers. Under hpux,
13664 including <limits.h> includes <sys/time.h> and causes problems
13665 checking for functions defined therein. */
13666#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013667# include <limits.h>
13668#else
13669# include <assert.h>
13670#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013671/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013672#ifdef __cplusplus
13673extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013674{
Martin v. Löwis11437992002-04-12 09:54:03 +000013675#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013676/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013677 builtin and then its argument prototype would still apply. */
13678char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013679/* The GNU C library defines this for functions which it implements
13680 to always fail with ENOSYS. Some functions are actually named
13681 something starting with __ and the normal name is an alias. */
13682#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13683choke me
13684#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013685char (*f) () = $ac_func;
13686#endif
13687#ifdef __cplusplus
13688}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013689#endif
13690
Skip Montanaro6dead952003-09-25 14:50:04 +000013691int
13692main ()
13693{
13694return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 ;
13696 return 0;
13697}
13698_ACEOF
13699rm -f conftest.$ac_objext conftest$ac_exeext
13700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13701 (eval $ac_link) 2>&5
13702 ac_status=$?
13703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13704 (exit $ac_status); } &&
13705 { ac_try='test -s conftest$ac_exeext'
13706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13707 (eval $ac_try) 2>&5
13708 ac_status=$?
13709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13710 (exit $ac_status); }; }; then
13711 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013712else
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013714sed 's/^/| /' conftest.$ac_ext >&5
13715
Martin v. Löwis11437992002-04-12 09:54:03 +000013716eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013717fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013718rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013719fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013720echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13721echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13722if test `eval echo '${'$as_ac_var'}'` = yes; then
13723 cat >>confdefs.h <<_ACEOF
13724#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13725_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013726
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013727fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013728done
13729
Michael W. Hudson54241132001-12-07 15:38:26 +000013730
Martin v. Löwis11437992002-04-12 09:54:03 +000013731
13732
13733
13734
13735
Martin v. Löwis1142de32002-03-29 16:28:31 +000013736for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013737do
Martin v. Löwis11437992002-04-12 09:54:03 +000013738as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13739echo "$as_me:$LINENO: checking for $ac_func" >&5
13740echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13741if eval "test \"\${$as_ac_var+set}\" = set"; then
13742 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013743else
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 cat >conftest.$ac_ext <<_ACEOF
13745#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013746/* confdefs.h. */
13747_ACEOF
13748cat confdefs.h >>conftest.$ac_ext
13749cat >>conftest.$ac_ext <<_ACEOF
13750/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013751/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013752 which can conflict with char $ac_func (); below.
13753 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013754 <limits.h> exists even on freestanding compilers. Under hpux,
13755 including <limits.h> includes <sys/time.h> and causes problems
13756 checking for functions defined therein. */
13757#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013758# include <limits.h>
13759#else
13760# include <assert.h>
13761#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013762/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013763#ifdef __cplusplus
13764extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013765{
Martin v. Löwis11437992002-04-12 09:54:03 +000013766#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013767/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013768 builtin and then its argument prototype would still apply. */
13769char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013770/* The GNU C library defines this for functions which it implements
13771 to always fail with ENOSYS. Some functions are actually named
13772 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013773#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013774choke me
13775#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013776char (*f) () = $ac_func;
13777#endif
13778#ifdef __cplusplus
13779}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013780#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013781
Skip Montanaro6dead952003-09-25 14:50:04 +000013782int
13783main ()
13784{
13785return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 ;
13787 return 0;
13788}
13789_ACEOF
13790rm -f conftest.$ac_objext conftest$ac_exeext
13791if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13792 (eval $ac_link) 2>&5
13793 ac_status=$?
13794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13795 (exit $ac_status); } &&
13796 { ac_try='test -s conftest$ac_exeext'
13797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13798 (eval $ac_try) 2>&5
13799 ac_status=$?
13800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13801 (exit $ac_status); }; }; then
13802 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013803else
Martin v. Löwis11437992002-04-12 09:54:03 +000013804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013805sed 's/^/| /' conftest.$ac_ext >&5
13806
Martin v. Löwis11437992002-04-12 09:54:03 +000013807eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013808fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013809rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013811echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13812echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13813if test `eval echo '${'$as_ac_var'}'` = yes; then
13814 cat >>confdefs.h <<_ACEOF
13815#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13816_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013817
Martin v. Löwis1142de32002-03-29 16:28:31 +000013818else
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013820fi
13821done
13822
13823
Martin v. Löwis11437992002-04-12 09:54:03 +000013824
Martin v. Löwis1142de32002-03-29 16:28:31 +000013825for ac_func in getpgrp
13826do
Martin v. Löwis11437992002-04-12 09:54:03 +000013827as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13828echo "$as_me:$LINENO: checking for $ac_func" >&5
13829echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13830if eval "test \"\${$as_ac_var+set}\" = set"; then
13831 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013832else
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 cat >conftest.$ac_ext <<_ACEOF
13834#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013835/* confdefs.h. */
13836_ACEOF
13837cat confdefs.h >>conftest.$ac_ext
13838cat >>conftest.$ac_ext <<_ACEOF
13839/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013840/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013841 which can conflict with char $ac_func (); below.
13842 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013843 <limits.h> exists even on freestanding compilers. Under hpux,
13844 including <limits.h> includes <sys/time.h> and causes problems
13845 checking for functions defined therein. */
13846#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013847# include <limits.h>
13848#else
13849# include <assert.h>
13850#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013851/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013852#ifdef __cplusplus
13853extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013854{
Martin v. Löwis11437992002-04-12 09:54:03 +000013855#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013856/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013857 builtin and then its argument prototype would still apply. */
13858char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013859/* The GNU C library defines this for functions which it implements
13860 to always fail with ENOSYS. Some functions are actually named
13861 something starting with __ and the normal name is an alias. */
13862#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13863choke me
13864#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013865char (*f) () = $ac_func;
13866#endif
13867#ifdef __cplusplus
13868}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013869#endif
13870
Skip Montanaro6dead952003-09-25 14:50:04 +000013871int
13872main ()
13873{
13874return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013875 ;
13876 return 0;
13877}
13878_ACEOF
13879rm -f conftest.$ac_objext conftest$ac_exeext
13880if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13881 (eval $ac_link) 2>&5
13882 ac_status=$?
13883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13884 (exit $ac_status); } &&
13885 { ac_try='test -s conftest$ac_exeext'
13886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13887 (eval $ac_try) 2>&5
13888 ac_status=$?
13889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13890 (exit $ac_status); }; }; then
13891 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013892else
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013894sed 's/^/| /' conftest.$ac_ext >&5
13895
Martin v. Löwis11437992002-04-12 09:54:03 +000013896eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013897fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013898rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013899fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013900echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13901echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13902if test `eval echo '${'$as_ac_var'}'` = yes; then
13903 cat >>confdefs.h <<_ACEOF
13904#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13905_ACEOF
13906 cat >conftest.$ac_ext <<_ACEOF
13907#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013908/* confdefs.h. */
13909_ACEOF
13910cat confdefs.h >>conftest.$ac_ext
13911cat >>conftest.$ac_ext <<_ACEOF
13912/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013913#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013914int
13915main ()
13916{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013917getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013918 ;
13919 return 0;
13920}
13921_ACEOF
13922rm -f conftest.$ac_objext
13923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13924 (eval $ac_compile) 2>&5
13925 ac_status=$?
13926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13927 (exit $ac_status); } &&
13928 { ac_try='test -s conftest.$ac_objext'
13929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13930 (eval $ac_try) 2>&5
13931 ac_status=$?
13932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13933 (exit $ac_status); }; }; then
13934
13935cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013936#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013937_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013938
Martin v. Löwis11437992002-04-12 09:54:03 +000013939
Guido van Rossumf78abae1997-01-21 22:02:36 +000013940else
Martin v. Löwis11437992002-04-12 09:54:03 +000013941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013942sed 's/^/| /' conftest.$ac_ext >&5
13943
Guido van Rossum627b2d71993-12-24 10:39:16 +000013944fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013945rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013946
Guido van Rossum627b2d71993-12-24 10:39:16 +000013947fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013948done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013949
Jack Jansen150753c2003-03-29 22:07:47 +000013950
13951for ac_func in setpgrp
13952do
13953as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13954echo "$as_me:$LINENO: checking for $ac_func" >&5
13955echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13956if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013957 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013958else
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 cat >conftest.$ac_ext <<_ACEOF
13960#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013961/* confdefs.h. */
13962_ACEOF
13963cat confdefs.h >>conftest.$ac_ext
13964cat >>conftest.$ac_ext <<_ACEOF
13965/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013966/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013967 which can conflict with char $ac_func (); below.
13968 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013969 <limits.h> exists even on freestanding compilers. Under hpux,
13970 including <limits.h> includes <sys/time.h> and causes problems
13971 checking for functions defined therein. */
13972#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013973# include <limits.h>
13974#else
13975# include <assert.h>
13976#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013977/* Override any gcc2 internal prototype to avoid an error. */
13978#ifdef __cplusplus
13979extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013980{
Martin v. Löwis11437992002-04-12 09:54:03 +000013981#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013982/* We use char because int might match the return type of a gcc2
13983 builtin and then its argument prototype would still apply. */
13984char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013985/* The GNU C library defines this for functions which it implements
13986 to always fail with ENOSYS. Some functions are actually named
13987 something starting with __ and the normal name is an alias. */
13988#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13989choke me
13990#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013991char (*f) () = $ac_func;
13992#endif
13993#ifdef __cplusplus
13994}
Jack Jansen150753c2003-03-29 22:07:47 +000013995#endif
13996
Skip Montanaro6dead952003-09-25 14:50:04 +000013997int
13998main ()
13999{
14000return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014001 ;
14002 return 0;
14003}
14004_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014005rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000014006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14007 (eval $ac_link) 2>&5
14008 ac_status=$?
14009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000014010 (exit $ac_status); } &&
14011 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14013 (eval $ac_try) 2>&5
14014 ac_status=$?
14015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14016 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000014017 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014018else
Jack Jansen150753c2003-03-29 22:07:47 +000014019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014020sed 's/^/| /' conftest.$ac_ext >&5
14021
Jack Jansen150753c2003-03-29 22:07:47 +000014022eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014023fi
Jack Jansen150753c2003-03-29 22:07:47 +000014024rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014025fi
Jack Jansen150753c2003-03-29 22:07:47 +000014026echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14027echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14028if test `eval echo '${'$as_ac_var'}'` = yes; then
14029 cat >>confdefs.h <<_ACEOF
14030#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14031_ACEOF
14032 cat >conftest.$ac_ext <<_ACEOF
14033#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014034/* confdefs.h. */
14035_ACEOF
14036cat confdefs.h >>conftest.$ac_ext
14037cat >>conftest.$ac_ext <<_ACEOF
14038/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014039#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000014040int
14041main ()
14042{
14043setpgrp(0,0);
14044 ;
14045 return 0;
14046}
14047_ACEOF
14048rm -f conftest.$ac_objext
14049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14050 (eval $ac_compile) 2>&5
14051 ac_status=$?
14052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14053 (exit $ac_status); } &&
14054 { ac_try='test -s conftest.$ac_objext'
14055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14056 (eval $ac_try) 2>&5
14057 ac_status=$?
14058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14059 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014060
14061cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014062#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014063_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014064
Jack Jansen150753c2003-03-29 22:07:47 +000014065
14066else
14067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014068sed 's/^/| /' conftest.$ac_ext >&5
14069
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014070fi
Jack Jansen150753c2003-03-29 22:07:47 +000014071rm -f conftest.$ac_objext conftest.$ac_ext
14072
14073fi
14074done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014075
Martin v. Löwis11437992002-04-12 09:54:03 +000014076
Thomas Wouters3a584202000-08-05 23:28:51 +000014077for ac_func in gettimeofday
14078do
Martin v. Löwis11437992002-04-12 09:54:03 +000014079as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14080echo "$as_me:$LINENO: checking for $ac_func" >&5
14081echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14082if eval "test \"\${$as_ac_var+set}\" = set"; then
14083 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014084else
Martin v. Löwis11437992002-04-12 09:54:03 +000014085 cat >conftest.$ac_ext <<_ACEOF
14086#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014087/* confdefs.h. */
14088_ACEOF
14089cat confdefs.h >>conftest.$ac_ext
14090cat >>conftest.$ac_ext <<_ACEOF
14091/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014092/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014093 which can conflict with char $ac_func (); below.
14094 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014095 <limits.h> exists even on freestanding compilers. Under hpux,
14096 including <limits.h> includes <sys/time.h> and causes problems
14097 checking for functions defined therein. */
14098#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014099# include <limits.h>
14100#else
14101# include <assert.h>
14102#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014103/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014104#ifdef __cplusplus
14105extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014106{
Martin v. Löwis11437992002-04-12 09:54:03 +000014107#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014108/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 builtin and then its argument prototype would still apply. */
14110char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014111/* The GNU C library defines this for functions which it implements
14112 to always fail with ENOSYS. Some functions are actually named
14113 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014114#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014115choke me
14116#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014117char (*f) () = $ac_func;
14118#endif
14119#ifdef __cplusplus
14120}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014121#endif
14122
Skip Montanaro6dead952003-09-25 14:50:04 +000014123int
14124main ()
14125{
14126return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014127 ;
14128 return 0;
14129}
14130_ACEOF
14131rm -f conftest.$ac_objext conftest$ac_exeext
14132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14133 (eval $ac_link) 2>&5
14134 ac_status=$?
14135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14136 (exit $ac_status); } &&
14137 { ac_try='test -s conftest$ac_exeext'
14138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14139 (eval $ac_try) 2>&5
14140 ac_status=$?
14141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14142 (exit $ac_status); }; }; then
14143 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014144else
Martin v. Löwis11437992002-04-12 09:54:03 +000014145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014146sed 's/^/| /' conftest.$ac_ext >&5
14147
Martin v. Löwis11437992002-04-12 09:54:03 +000014148eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014149fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014150rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014151fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014152echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14153echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14154if test `eval echo '${'$as_ac_var'}'` = yes; then
14155 cat >>confdefs.h <<_ACEOF
14156#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14157_ACEOF
14158 cat >conftest.$ac_ext <<_ACEOF
14159#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014160/* confdefs.h. */
14161_ACEOF
14162cat confdefs.h >>conftest.$ac_ext
14163cat >>conftest.$ac_ext <<_ACEOF
14164/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014165#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014166int
14167main ()
14168{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014169gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014170 ;
14171 return 0;
14172}
14173_ACEOF
14174rm -f conftest.$ac_objext
14175if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14176 (eval $ac_compile) 2>&5
14177 ac_status=$?
14178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14179 (exit $ac_status); } &&
14180 { ac_try='test -s conftest.$ac_objext'
14181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14182 (eval $ac_try) 2>&5
14183 ac_status=$?
14184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14185 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014186 :
14187else
Martin v. Löwis11437992002-04-12 09:54:03 +000014188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014189sed 's/^/| /' conftest.$ac_ext >&5
14190
Martin v. Löwis11437992002-04-12 09:54:03 +000014191
14192cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014193#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014194_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014195
Martin v. Löwis11437992002-04-12 09:54:03 +000014196
Guido van Rossum627b2d71993-12-24 10:39:16 +000014197fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014198rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014199
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014200fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014201done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014202
Michael W. Hudson54241132001-12-07 15:38:26 +000014203
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014204echo "$as_me:$LINENO: checking for major" >&5
14205echo $ECHO_N "checking for major... $ECHO_C" >&6
14206cat >conftest.$ac_ext <<_ACEOF
14207#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014208/* confdefs.h. */
14209_ACEOF
14210cat confdefs.h >>conftest.$ac_ext
14211cat >>conftest.$ac_ext <<_ACEOF
14212/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014213
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014214#if defined(MAJOR_IN_MKDEV)
14215#include <sys/mkdev.h>
14216#elif defined(MAJOR_IN_SYSMACROS)
14217#include <sys/sysmacros.h>
14218#else
14219#include <sys/types.h>
14220#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014221
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014222int
14223main ()
14224{
14225
14226 makedev(major(0),minor(0));
14227
14228 ;
14229 return 0;
14230}
14231_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014232rm -f conftest.$ac_objext conftest$ac_exeext
14233if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14234 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014235 ac_status=$?
14236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14237 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014238 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14240 (eval $ac_try) 2>&5
14241 ac_status=$?
14242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14243 (exit $ac_status); }; }; then
14244
14245
14246cat >>confdefs.h <<\_ACEOF
14247#define HAVE_DEVICE_MACROS 1
14248_ACEOF
14249
14250 echo "$as_me:$LINENO: result: yes" >&5
14251echo "${ECHO_T}yes" >&6
14252
14253else
14254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014255sed 's/^/| /' conftest.$ac_ext >&5
14256
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014257
14258 echo "$as_me:$LINENO: result: no" >&5
14259echo "${ECHO_T}no" >&6
14260
14261fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014262rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014263
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014264# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014265# for [no]getaddrinfo in netdb.h.
14266echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14267echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14268cat >conftest.$ac_ext <<_ACEOF
14269#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014270/* confdefs.h. */
14271_ACEOF
14272cat confdefs.h >>conftest.$ac_ext
14273cat >>conftest.$ac_ext <<_ACEOF
14274/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014275
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014276#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014277#include <sys/socket.h>
14278#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014279#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014280
Martin v. Löwis11437992002-04-12 09:54:03 +000014281int
14282main ()
14283{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014284
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014285getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014286
Martin v. Löwis11437992002-04-12 09:54:03 +000014287 ;
14288 return 0;
14289}
14290_ACEOF
14291rm -f conftest.$ac_objext conftest$ac_exeext
14292if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14293 (eval $ac_link) 2>&5
14294 ac_status=$?
14295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14296 (exit $ac_status); } &&
14297 { ac_try='test -s conftest$ac_exeext'
14298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14299 (eval $ac_try) 2>&5
14300 ac_status=$?
14301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14302 (exit $ac_status); }; }; then
14303
14304echo "$as_me:$LINENO: result: yes" >&5
14305echo "${ECHO_T}yes" >&6
14306echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14307echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014308if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014309 echo "$as_me:$LINENO: result: buggy" >&5
14310echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014311buggygetaddrinfo=yes
14312else
Martin v. Löwis11437992002-04-12 09:54:03 +000014313 cat >conftest.$ac_ext <<_ACEOF
14314#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014315/* confdefs.h. */
14316_ACEOF
14317cat confdefs.h >>conftest.$ac_ext
14318cat >>conftest.$ac_ext <<_ACEOF
14319/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014320
14321#include <sys/types.h>
14322#include <netdb.h>
14323#include <string.h>
14324#include <sys/socket.h>
14325#include <netinet/in.h>
14326
14327main()
14328{
14329 int passive, gaierr, inet4 = 0, inet6 = 0;
14330 struct addrinfo hints, *ai, *aitop;
14331 char straddr[INET6_ADDRSTRLEN], strport[16];
14332
14333 for (passive = 0; passive <= 1; passive++) {
14334 memset(&hints, 0, sizeof(hints));
14335 hints.ai_family = AF_UNSPEC;
14336 hints.ai_flags = passive ? AI_PASSIVE : 0;
14337 hints.ai_socktype = SOCK_STREAM;
14338 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14339 (void)gai_strerror(gaierr);
14340 goto bad;
14341 }
14342 for (ai = aitop; ai; ai = ai->ai_next) {
14343 if (ai->ai_addr == NULL ||
14344 ai->ai_addrlen == 0 ||
14345 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14346 straddr, sizeof(straddr), strport, sizeof(strport),
14347 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14348 goto bad;
14349 }
14350 switch (ai->ai_family) {
14351 case AF_INET:
14352 if (strcmp(strport, "54321") != 0) {
14353 goto bad;
14354 }
14355 if (passive) {
14356 if (strcmp(straddr, "0.0.0.0") != 0) {
14357 goto bad;
14358 }
14359 } else {
14360 if (strcmp(straddr, "127.0.0.1") != 0) {
14361 goto bad;
14362 }
14363 }
14364 inet4++;
14365 break;
14366 case AF_INET6:
14367 if (strcmp(strport, "54321") != 0) {
14368 goto bad;
14369 }
14370 if (passive) {
14371 if (strcmp(straddr, "::") != 0) {
14372 goto bad;
14373 }
14374 } else {
14375 if (strcmp(straddr, "::1") != 0) {
14376 goto bad;
14377 }
14378 }
14379 inet6++;
14380 break;
14381 case AF_UNSPEC:
14382 goto bad;
14383 break;
14384 default:
14385 /* another family support? */
14386 break;
14387 }
14388 }
14389 }
14390
14391 if (!(inet4 == 0 || inet4 == 2))
14392 goto bad;
14393 if (!(inet6 == 0 || inet6 == 2))
14394 goto bad;
14395
14396 if (aitop)
14397 freeaddrinfo(aitop);
14398 exit(0);
14399
14400 bad:
14401 if (aitop)
14402 freeaddrinfo(aitop);
14403 exit(1);
14404}
14405
Martin v. Löwis11437992002-04-12 09:54:03 +000014406_ACEOF
14407rm -f conftest$ac_exeext
14408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14409 (eval $ac_link) 2>&5
14410 ac_status=$?
14411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14414 (eval $ac_try) 2>&5
14415 ac_status=$?
14416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14417 (exit $ac_status); }; }; then
14418 echo "$as_me:$LINENO: result: good" >&5
14419echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014420buggygetaddrinfo=no
14421else
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 echo "$as_me: program exited with status $ac_status" >&5
14423echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014424sed 's/^/| /' conftest.$ac_ext >&5
14425
Martin v. Löwis11437992002-04-12 09:54:03 +000014426( exit $ac_status )
14427echo "$as_me:$LINENO: result: buggy" >&5
14428echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014429buggygetaddrinfo=yes
14430fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014431rm -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 +000014432fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014433else
Martin v. Löwis11437992002-04-12 09:54:03 +000014434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014435sed 's/^/| /' conftest.$ac_ext >&5
14436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
14438echo "$as_me:$LINENO: result: no" >&5
14439echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014440buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014441
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014443rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014444
14445if test "$buggygetaddrinfo" = "yes"; then
14446 if test "$ipv6" = "yes"; then
14447 echo 'Fatal: You must get working getaddrinfo() function.'
14448 echo ' or you can specify "--disable-ipv6"'.
14449 exit 1
14450 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014451else
Martin v. Löwis11437992002-04-12 09:54:03 +000014452
14453cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014454#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014455_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014456
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014457fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014458
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014459for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014460do
Martin v. Löwis11437992002-04-12 09:54:03 +000014461as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14462echo "$as_me:$LINENO: checking for $ac_func" >&5
14463echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14464if eval "test \"\${$as_ac_var+set}\" = set"; then
14465 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014466else
Martin v. Löwis11437992002-04-12 09:54:03 +000014467 cat >conftest.$ac_ext <<_ACEOF
14468#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014469/* confdefs.h. */
14470_ACEOF
14471cat confdefs.h >>conftest.$ac_ext
14472cat >>conftest.$ac_ext <<_ACEOF
14473/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014474/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014475 which can conflict with char $ac_func (); below.
14476 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014477 <limits.h> exists even on freestanding compilers. Under hpux,
14478 including <limits.h> includes <sys/time.h> and causes problems
14479 checking for functions defined therein. */
14480#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014481# include <limits.h>
14482#else
14483# include <assert.h>
14484#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014485/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014486#ifdef __cplusplus
14487extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014488{
Martin v. Löwis11437992002-04-12 09:54:03 +000014489#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014490/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 builtin and then its argument prototype would still apply. */
14492char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014493/* The GNU C library defines this for functions which it implements
14494 to always fail with ENOSYS. Some functions are actually named
14495 something starting with __ and the normal name is an alias. */
14496#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14497choke me
14498#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014499char (*f) () = $ac_func;
14500#endif
14501#ifdef __cplusplus
14502}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014503#endif
14504
Skip Montanaro6dead952003-09-25 14:50:04 +000014505int
14506main ()
14507{
14508return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 ;
14510 return 0;
14511}
14512_ACEOF
14513rm -f conftest.$ac_objext conftest$ac_exeext
14514if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14515 (eval $ac_link) 2>&5
14516 ac_status=$?
14517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14518 (exit $ac_status); } &&
14519 { ac_try='test -s conftest$ac_exeext'
14520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14521 (eval $ac_try) 2>&5
14522 ac_status=$?
14523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14524 (exit $ac_status); }; }; then
14525 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014526else
Martin v. Löwis11437992002-04-12 09:54:03 +000014527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014528sed 's/^/| /' conftest.$ac_ext >&5
14529
Martin v. Löwis11437992002-04-12 09:54:03 +000014530eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014531fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014532rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014533fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014534echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14535echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14536if test `eval echo '${'$as_ac_var'}'` = yes; then
14537 cat >>confdefs.h <<_ACEOF
14538#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14539_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014540
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014541fi
14542done
14543
Michael W. Hudson54241132001-12-07 15:38:26 +000014544
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014545# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014546echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14547echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14548if test "${ac_cv_header_time+set}" = set; then
14549 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014550else
Martin v. Löwis11437992002-04-12 09:54:03 +000014551 cat >conftest.$ac_ext <<_ACEOF
14552#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014553/* confdefs.h. */
14554_ACEOF
14555cat confdefs.h >>conftest.$ac_ext
14556cat >>conftest.$ac_ext <<_ACEOF
14557/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014558#include <sys/types.h>
14559#include <sys/time.h>
14560#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014561
Martin v. Löwis11437992002-04-12 09:54:03 +000014562int
14563main ()
14564{
14565if ((struct tm *) 0)
14566return 0;
14567 ;
14568 return 0;
14569}
14570_ACEOF
14571rm -f conftest.$ac_objext
14572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14573 (eval $ac_compile) 2>&5
14574 ac_status=$?
14575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14576 (exit $ac_status); } &&
14577 { ac_try='test -s conftest.$ac_objext'
14578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14579 (eval $ac_try) 2>&5
14580 ac_status=$?
14581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14582 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014583 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014584else
Martin v. Löwis11437992002-04-12 09:54:03 +000014585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014586sed 's/^/| /' conftest.$ac_ext >&5
14587
Martin v. Löwis11437992002-04-12 09:54:03 +000014588ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014590rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014591fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014592echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14593echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014594if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014595
14596cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014597#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014598_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014599
14600fi
14601
Martin v. Löwis11437992002-04-12 09:54:03 +000014602echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14603echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14604if test "${ac_cv_struct_tm+set}" = set; then
14605 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014606else
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 cat >conftest.$ac_ext <<_ACEOF
14608#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014609/* confdefs.h. */
14610_ACEOF
14611cat confdefs.h >>conftest.$ac_ext
14612cat >>conftest.$ac_ext <<_ACEOF
14613/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014614#include <sys/types.h>
14615#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014616
Martin v. Löwis11437992002-04-12 09:54:03 +000014617int
14618main ()
14619{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014620struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 ;
14622 return 0;
14623}
14624_ACEOF
14625rm -f conftest.$ac_objext
14626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14627 (eval $ac_compile) 2>&5
14628 ac_status=$?
14629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14630 (exit $ac_status); } &&
14631 { ac_try='test -s conftest.$ac_objext'
14632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14633 (eval $ac_try) 2>&5
14634 ac_status=$?
14635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14636 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014637 ac_cv_struct_tm=time.h
14638else
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014640sed 's/^/| /' conftest.$ac_ext >&5
14641
Martin v. Löwis11437992002-04-12 09:54:03 +000014642ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014643fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014644rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014645fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014646echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14647echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014648if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014649
14650cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014651#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014652_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014653
14654fi
14655
Martin v. Löwis11437992002-04-12 09:54:03 +000014656echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14657echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14658if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14659 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014660else
Martin v. Löwis11437992002-04-12 09:54:03 +000014661 cat >conftest.$ac_ext <<_ACEOF
14662#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014663/* confdefs.h. */
14664_ACEOF
14665cat confdefs.h >>conftest.$ac_ext
14666cat >>conftest.$ac_ext <<_ACEOF
14667/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014668#include <sys/types.h>
14669#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014670
14671
Martin v. Löwis11437992002-04-12 09:54:03 +000014672int
14673main ()
14674{
14675static struct tm ac_aggr;
14676if (ac_aggr.tm_zone)
14677return 0;
14678 ;
14679 return 0;
14680}
14681_ACEOF
14682rm -f conftest.$ac_objext
14683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14684 (eval $ac_compile) 2>&5
14685 ac_status=$?
14686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14687 (exit $ac_status); } &&
14688 { ac_try='test -s conftest.$ac_objext'
14689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14690 (eval $ac_try) 2>&5
14691 ac_status=$?
14692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14693 (exit $ac_status); }; }; then
14694 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014695else
Martin v. Löwis11437992002-04-12 09:54:03 +000014696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014697sed 's/^/| /' conftest.$ac_ext >&5
14698
14699cat >conftest.$ac_ext <<_ACEOF
14700#line $LINENO "configure"
14701/* confdefs.h. */
14702_ACEOF
14703cat confdefs.h >>conftest.$ac_ext
14704cat >>conftest.$ac_ext <<_ACEOF
14705/* end confdefs.h. */
14706#include <sys/types.h>
14707#include <$ac_cv_struct_tm>
14708
14709
14710int
14711main ()
14712{
14713static struct tm ac_aggr;
14714if (sizeof ac_aggr.tm_zone)
14715return 0;
14716 ;
14717 return 0;
14718}
14719_ACEOF
14720rm -f conftest.$ac_objext
14721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14722 (eval $ac_compile) 2>&5
14723 ac_status=$?
14724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14725 (exit $ac_status); } &&
14726 { ac_try='test -s conftest.$ac_objext'
14727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14728 (eval $ac_try) 2>&5
14729 ac_status=$?
14730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14731 (exit $ac_status); }; }; then
14732 ac_cv_member_struct_tm_tm_zone=yes
14733else
14734 echo "$as_me: failed program was:" >&5
14735sed 's/^/| /' conftest.$ac_ext >&5
14736
Martin v. Löwis11437992002-04-12 09:54:03 +000014737ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014738fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014739rm -f conftest.$ac_objext conftest.$ac_ext
14740fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014741rm -f conftest.$ac_objext conftest.$ac_ext
14742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014743echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14744echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14745if test $ac_cv_member_struct_tm_tm_zone = yes; then
14746
14747cat >>confdefs.h <<_ACEOF
14748#define HAVE_STRUCT_TM_TM_ZONE 1
14749_ACEOF
14750
14751
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014752fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014753
Martin v. Löwis11437992002-04-12 09:54:03 +000014754if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14755
14756cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014757#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014758_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014759
14760else
Martin v. Löwis11437992002-04-12 09:54:03 +000014761 echo "$as_me:$LINENO: checking for tzname" >&5
14762echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14763if test "${ac_cv_var_tzname+set}" = set; then
14764 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014765else
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 cat >conftest.$ac_ext <<_ACEOF
14767#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014768/* confdefs.h. */
14769_ACEOF
14770cat confdefs.h >>conftest.$ac_ext
14771cat >>conftest.$ac_ext <<_ACEOF
14772/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014773#include <time.h>
14774#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014775extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014777
Martin v. Löwis11437992002-04-12 09:54:03 +000014778int
14779main ()
14780{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014781atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014782 ;
14783 return 0;
14784}
14785_ACEOF
14786rm -f conftest.$ac_objext conftest$ac_exeext
14787if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14788 (eval $ac_link) 2>&5
14789 ac_status=$?
14790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14791 (exit $ac_status); } &&
14792 { ac_try='test -s conftest$ac_exeext'
14793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14794 (eval $ac_try) 2>&5
14795 ac_status=$?
14796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14797 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014798 ac_cv_var_tzname=yes
14799else
Martin v. Löwis11437992002-04-12 09:54:03 +000014800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014801sed 's/^/| /' conftest.$ac_ext >&5
14802
Martin v. Löwis11437992002-04-12 09:54:03 +000014803ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014804fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014805rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014806fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014807echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14808echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014809 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014810
14811cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014812#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014813_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014814
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014815 fi
14816fi
14817
Martin v. Löwis11437992002-04-12 09:54:03 +000014818echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14819echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14820if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14821 echo $ECHO_N "(cached) $ECHO_C" >&6
14822else
14823 cat >conftest.$ac_ext <<_ACEOF
14824#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014825/* confdefs.h. */
14826_ACEOF
14827cat confdefs.h >>conftest.$ac_ext
14828cat >>conftest.$ac_ext <<_ACEOF
14829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014830$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014831int
14832main ()
14833{
14834static struct stat ac_aggr;
14835if (ac_aggr.st_rdev)
14836return 0;
14837 ;
14838 return 0;
14839}
14840_ACEOF
14841rm -f conftest.$ac_objext
14842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14843 (eval $ac_compile) 2>&5
14844 ac_status=$?
14845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14846 (exit $ac_status); } &&
14847 { ac_try='test -s conftest.$ac_objext'
14848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14849 (eval $ac_try) 2>&5
14850 ac_status=$?
14851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14852 (exit $ac_status); }; }; then
14853 ac_cv_member_struct_stat_st_rdev=yes
14854else
14855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014856sed 's/^/| /' conftest.$ac_ext >&5
14857
14858cat >conftest.$ac_ext <<_ACEOF
14859#line $LINENO "configure"
14860/* confdefs.h. */
14861_ACEOF
14862cat confdefs.h >>conftest.$ac_ext
14863cat >>conftest.$ac_ext <<_ACEOF
14864/* end confdefs.h. */
14865$ac_includes_default
14866int
14867main ()
14868{
14869static struct stat ac_aggr;
14870if (sizeof ac_aggr.st_rdev)
14871return 0;
14872 ;
14873 return 0;
14874}
14875_ACEOF
14876rm -f conftest.$ac_objext
14877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14878 (eval $ac_compile) 2>&5
14879 ac_status=$?
14880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14881 (exit $ac_status); } &&
14882 { ac_try='test -s conftest.$ac_objext'
14883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14884 (eval $ac_try) 2>&5
14885 ac_status=$?
14886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14887 (exit $ac_status); }; }; then
14888 ac_cv_member_struct_stat_st_rdev=yes
14889else
14890 echo "$as_me: failed program was:" >&5
14891sed 's/^/| /' conftest.$ac_ext >&5
14892
Martin v. Löwis11437992002-04-12 09:54:03 +000014893ac_cv_member_struct_stat_st_rdev=no
14894fi
14895rm -f conftest.$ac_objext conftest.$ac_ext
14896fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014897rm -f conftest.$ac_objext conftest.$ac_ext
14898fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014899echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14900echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14901if test $ac_cv_member_struct_stat_st_rdev = yes; then
14902
14903cat >>confdefs.h <<_ACEOF
14904#define HAVE_STRUCT_STAT_ST_RDEV 1
14905_ACEOF
14906
14907
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014908fi
14909
Martin v. Löwis11437992002-04-12 09:54:03 +000014910echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14911echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14912if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14913 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014914else
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 cat >conftest.$ac_ext <<_ACEOF
14916#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014917/* confdefs.h. */
14918_ACEOF
14919cat confdefs.h >>conftest.$ac_ext
14920cat >>conftest.$ac_ext <<_ACEOF
14921/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014922$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014923int
14924main ()
14925{
14926static struct stat ac_aggr;
14927if (ac_aggr.st_blksize)
14928return 0;
14929 ;
14930 return 0;
14931}
14932_ACEOF
14933rm -f conftest.$ac_objext
14934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14935 (eval $ac_compile) 2>&5
14936 ac_status=$?
14937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14938 (exit $ac_status); } &&
14939 { ac_try='test -s conftest.$ac_objext'
14940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14941 (eval $ac_try) 2>&5
14942 ac_status=$?
14943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14944 (exit $ac_status); }; }; then
14945 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014946else
Martin v. Löwis11437992002-04-12 09:54:03 +000014947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014948sed 's/^/| /' conftest.$ac_ext >&5
14949
14950cat >conftest.$ac_ext <<_ACEOF
14951#line $LINENO "configure"
14952/* confdefs.h. */
14953_ACEOF
14954cat confdefs.h >>conftest.$ac_ext
14955cat >>conftest.$ac_ext <<_ACEOF
14956/* end confdefs.h. */
14957$ac_includes_default
14958int
14959main ()
14960{
14961static struct stat ac_aggr;
14962if (sizeof ac_aggr.st_blksize)
14963return 0;
14964 ;
14965 return 0;
14966}
14967_ACEOF
14968rm -f conftest.$ac_objext
14969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14970 (eval $ac_compile) 2>&5
14971 ac_status=$?
14972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14973 (exit $ac_status); } &&
14974 { ac_try='test -s conftest.$ac_objext'
14975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14976 (eval $ac_try) 2>&5
14977 ac_status=$?
14978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14979 (exit $ac_status); }; }; then
14980 ac_cv_member_struct_stat_st_blksize=yes
14981else
14982 echo "$as_me: failed program was:" >&5
14983sed 's/^/| /' conftest.$ac_ext >&5
14984
Martin v. Löwis11437992002-04-12 09:54:03 +000014985ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014986fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014987rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014988fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014989rm -f conftest.$ac_objext conftest.$ac_ext
14990fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014991echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14992echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14993if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014994
Martin v. Löwis11437992002-04-12 09:54:03 +000014995cat >>confdefs.h <<_ACEOF
14996#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14997_ACEOF
14998
14999
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015000fi
15001
Martin v. Löwis11437992002-04-12 09:54:03 +000015002echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
15003echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
15004if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
15005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015006else
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 cat >conftest.$ac_ext <<_ACEOF
15008#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015009/* confdefs.h. */
15010_ACEOF
15011cat confdefs.h >>conftest.$ac_ext
15012cat >>conftest.$ac_ext <<_ACEOF
15013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015014$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015015int
15016main ()
15017{
15018static struct stat ac_aggr;
15019if (ac_aggr.st_blocks)
15020return 0;
15021 ;
15022 return 0;
15023}
15024_ACEOF
15025rm -f conftest.$ac_objext
15026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15027 (eval $ac_compile) 2>&5
15028 ac_status=$?
15029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15030 (exit $ac_status); } &&
15031 { ac_try='test -s conftest.$ac_objext'
15032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15033 (eval $ac_try) 2>&5
15034 ac_status=$?
15035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15036 (exit $ac_status); }; }; then
15037 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015038else
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015040sed 's/^/| /' conftest.$ac_ext >&5
15041
15042cat >conftest.$ac_ext <<_ACEOF
15043#line $LINENO "configure"
15044/* confdefs.h. */
15045_ACEOF
15046cat confdefs.h >>conftest.$ac_ext
15047cat >>conftest.$ac_ext <<_ACEOF
15048/* end confdefs.h. */
15049$ac_includes_default
15050int
15051main ()
15052{
15053static struct stat ac_aggr;
15054if (sizeof ac_aggr.st_blocks)
15055return 0;
15056 ;
15057 return 0;
15058}
15059_ACEOF
15060rm -f conftest.$ac_objext
15061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15062 (eval $ac_compile) 2>&5
15063 ac_status=$?
15064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15065 (exit $ac_status); } &&
15066 { ac_try='test -s conftest.$ac_objext'
15067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15068 (eval $ac_try) 2>&5
15069 ac_status=$?
15070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15071 (exit $ac_status); }; }; then
15072 ac_cv_member_struct_stat_st_blocks=yes
15073else
15074 echo "$as_me: failed program was:" >&5
15075sed 's/^/| /' conftest.$ac_ext >&5
15076
Martin v. Löwis11437992002-04-12 09:54:03 +000015077ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015079rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015080fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015081rm -f conftest.$ac_objext conftest.$ac_ext
15082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015083echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
15084echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
15085if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015086
Martin v. Löwis11437992002-04-12 09:54:03 +000015087cat >>confdefs.h <<_ACEOF
15088#define HAVE_STRUCT_STAT_ST_BLOCKS 1
15089_ACEOF
15090
15091
15092cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015093#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015094_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015095
15096else
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015098fi
15099
Michael W. Hudson54241132001-12-07 15:38:26 +000015100
Martin v. Löwis11437992002-04-12 09:54:03 +000015101
15102echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
15103echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
15104if test "${ac_cv_header_time_altzone+set}" = set; then
15105 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015106else
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 cat >conftest.$ac_ext <<_ACEOF
15108#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015109/* confdefs.h. */
15110_ACEOF
15111cat confdefs.h >>conftest.$ac_ext
15112cat >>conftest.$ac_ext <<_ACEOF
15113/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015114#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015115int
15116main ()
15117{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015118return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015119 ;
15120 return 0;
15121}
15122_ACEOF
15123rm -f conftest.$ac_objext
15124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15125 (eval $ac_compile) 2>&5
15126 ac_status=$?
15127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15128 (exit $ac_status); } &&
15129 { ac_try='test -s conftest.$ac_objext'
15130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15131 (eval $ac_try) 2>&5
15132 ac_status=$?
15133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15134 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015135 ac_cv_header_time_altzone=yes
15136else
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015138sed 's/^/| /' conftest.$ac_ext >&5
15139
Martin v. Löwis11437992002-04-12 09:54:03 +000015140ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015142rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015143fi
15144
Martin v. Löwis11437992002-04-12 09:54:03 +000015145echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
15146echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015147if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015148
15149cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015150#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015151_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015152
15153fi
15154
Guido van Rossumda88dad1995-01-26 00:46:29 +000015155was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015156echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15157echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15158cat >conftest.$ac_ext <<_ACEOF
15159#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015160/* confdefs.h. */
15161_ACEOF
15162cat confdefs.h >>conftest.$ac_ext
15163cat >>conftest.$ac_ext <<_ACEOF
15164/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015165
15166#include <sys/types.h>
15167#include <sys/select.h>
15168#include <sys/time.h>
15169
Martin v. Löwis11437992002-04-12 09:54:03 +000015170int
15171main ()
15172{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015173;
Martin v. Löwis11437992002-04-12 09:54:03 +000015174 ;
15175 return 0;
15176}
15177_ACEOF
15178rm -f conftest.$ac_objext
15179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15180 (eval $ac_compile) 2>&5
15181 ac_status=$?
15182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15183 (exit $ac_status); } &&
15184 { ac_try='test -s conftest.$ac_objext'
15185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15186 (eval $ac_try) 2>&5
15187 ac_status=$?
15188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15189 (exit $ac_status); }; }; then
15190
15191
15192cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015193#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015194_ACEOF
15195
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015196 was_it_defined=yes
15197
Guido van Rossumf78abae1997-01-21 22:02:36 +000015198else
Martin v. Löwis11437992002-04-12 09:54:03 +000015199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015200sed 's/^/| /' conftest.$ac_ext >&5
15201
Guido van Rossum7f43da71994-08-01 12:15:30 +000015202fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015203rm -f conftest.$ac_objext conftest.$ac_ext
15204echo "$as_me:$LINENO: result: $was_it_defined" >&5
15205echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015206
Martin v. Löwis11437992002-04-12 09:54:03 +000015207echo "$as_me:$LINENO: checking for addrinfo" >&5
15208echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15209if test "${ac_cv_struct_addrinfo+set}" = set; then
15210 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015211else
Martin v. Löwis11437992002-04-12 09:54:03 +000015212 cat >conftest.$ac_ext <<_ACEOF
15213#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015214/* confdefs.h. */
15215_ACEOF
15216cat confdefs.h >>conftest.$ac_ext
15217cat >>conftest.$ac_ext <<_ACEOF
15218/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015219
15220# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015221int
15222main ()
15223{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015224struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 ;
15226 return 0;
15227}
15228_ACEOF
15229rm -f conftest.$ac_objext
15230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15231 (eval $ac_compile) 2>&5
15232 ac_status=$?
15233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15234 (exit $ac_status); } &&
15235 { ac_try='test -s conftest.$ac_objext'
15236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15237 (eval $ac_try) 2>&5
15238 ac_status=$?
15239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15240 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015241 ac_cv_struct_addrinfo=yes
15242else
Martin v. Löwis11437992002-04-12 09:54:03 +000015243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015244sed 's/^/| /' conftest.$ac_ext >&5
15245
Martin v. Löwis11437992002-04-12 09:54:03 +000015246ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015247fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015248rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015249fi
15250
Martin v. Löwis11437992002-04-12 09:54:03 +000015251echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15252echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015253if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015254
15255cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015256#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015257_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015258
15259fi
15260
Martin v. Löwis11437992002-04-12 09:54:03 +000015261echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15262echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15263if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15264 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015265else
Martin v. Löwis11437992002-04-12 09:54:03 +000015266 cat >conftest.$ac_ext <<_ACEOF
15267#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015268/* confdefs.h. */
15269_ACEOF
15270cat confdefs.h >>conftest.$ac_ext
15271cat >>conftest.$ac_ext <<_ACEOF
15272/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015273
15274# include <sys/types.h>
15275# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015276int
15277main ()
15278{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015279struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 ;
15281 return 0;
15282}
15283_ACEOF
15284rm -f conftest.$ac_objext
15285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15286 (eval $ac_compile) 2>&5
15287 ac_status=$?
15288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15289 (exit $ac_status); } &&
15290 { ac_try='test -s conftest.$ac_objext'
15291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15292 (eval $ac_try) 2>&5
15293 ac_status=$?
15294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15295 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015296 ac_cv_struct_sockaddr_storage=yes
15297else
Martin v. Löwis11437992002-04-12 09:54:03 +000015298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015299sed 's/^/| /' conftest.$ac_ext >&5
15300
Martin v. Löwis11437992002-04-12 09:54:03 +000015301ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015303rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015304fi
15305
Martin v. Löwis11437992002-04-12 09:54:03 +000015306echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15307echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015308if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015309
15310cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015311#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015312_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015313
15314fi
15315
Guido van Rossum627b2d71993-12-24 10:39:16 +000015316# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015317
Michael W. Hudson54241132001-12-07 15:38:26 +000015318
Martin v. Löwis11437992002-04-12 09:54:03 +000015319echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15320echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15321if test "${ac_cv_c_char_unsigned+set}" = set; then
15322 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015323else
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 cat >conftest.$ac_ext <<_ACEOF
15325#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015326/* confdefs.h. */
15327_ACEOF
15328cat confdefs.h >>conftest.$ac_ext
15329cat >>conftest.$ac_ext <<_ACEOF
15330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015331$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015332int
15333main ()
15334{
15335static int test_array [1 - 2 * !(((char) -1) < 0)];
15336test_array [0] = 0
15337
15338 ;
15339 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015340}
Martin v. Löwis11437992002-04-12 09:54:03 +000015341_ACEOF
15342rm -f conftest.$ac_objext
15343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15344 (eval $ac_compile) 2>&5
15345 ac_status=$?
15346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15347 (exit $ac_status); } &&
15348 { ac_try='test -s conftest.$ac_objext'
15349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15350 (eval $ac_try) 2>&5
15351 ac_status=$?
15352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15353 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015354 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015355else
15356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015357sed 's/^/| /' conftest.$ac_ext >&5
15358
Martin v. Löwis11437992002-04-12 09:54:03 +000015359ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015361rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015362fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015363echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15364echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015365if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015367#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015368_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015369
15370fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015371
Martin v. Löwis11437992002-04-12 09:54:03 +000015372echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15373echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15374if test "${ac_cv_c_const+set}" = set; then
15375 echo $ECHO_N "(cached) $ECHO_C" >&6
15376else
15377 cat >conftest.$ac_ext <<_ACEOF
15378#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015379/* confdefs.h. */
15380_ACEOF
15381cat confdefs.h >>conftest.$ac_ext
15382cat >>conftest.$ac_ext <<_ACEOF
15383/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015384
Martin v. Löwis11437992002-04-12 09:54:03 +000015385int
15386main ()
15387{
15388/* FIXME: Include the comments suggested by Paul. */
15389#ifndef __cplusplus
15390 /* Ultrix mips cc rejects this. */
15391 typedef int charset[2];
15392 const charset x;
15393 /* SunOS 4.1.1 cc rejects this. */
15394 char const *const *ccp;
15395 char **p;
15396 /* NEC SVR4.0.2 mips cc rejects this. */
15397 struct point {int x, y;};
15398 static struct point const zero = {0,0};
15399 /* AIX XL C 1.02.0.0 rejects this.
15400 It does not let you subtract one const X* pointer from another in
15401 an arm of an if-expression whose if-part is not a constant
15402 expression */
15403 const char *g = "string";
15404 ccp = &g + (g ? g-g : 0);
15405 /* HPUX 7.0 cc rejects these. */
15406 ++ccp;
15407 p = (char**) ccp;
15408 ccp = (char const *const *) p;
15409 { /* SCO 3.2v4 cc rejects this. */
15410 char *t;
15411 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015412
Martin v. Löwis11437992002-04-12 09:54:03 +000015413 *t++ = 0;
15414 }
15415 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15416 int x[] = {25, 17};
15417 const int *foo = &x[0];
15418 ++foo;
15419 }
15420 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15421 typedef const int *iptr;
15422 iptr p = 0;
15423 ++p;
15424 }
15425 { /* AIX XL C 1.02.0.0 rejects this saying
15426 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15427 struct s { int j; const int *ap[3]; };
15428 struct s *b; b->j = 5;
15429 }
15430 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15431 const int foo = 10;
15432 }
15433#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015434
Martin v. Löwis11437992002-04-12 09:54:03 +000015435 ;
15436 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015437}
Martin v. Löwis11437992002-04-12 09:54:03 +000015438_ACEOF
15439rm -f conftest.$ac_objext
15440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15441 (eval $ac_compile) 2>&5
15442 ac_status=$?
15443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15444 (exit $ac_status); } &&
15445 { ac_try='test -s conftest.$ac_objext'
15446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15447 (eval $ac_try) 2>&5
15448 ac_status=$?
15449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15450 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015451 ac_cv_c_const=yes
15452else
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015454sed 's/^/| /' conftest.$ac_ext >&5
15455
Martin v. Löwis11437992002-04-12 09:54:03 +000015456ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015457fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015458rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015460echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15461echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015462if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015463
15464cat >>confdefs.h <<\_ACEOF
15465#define const
15466_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015467
15468fi
15469
Michael W. Hudson54241132001-12-07 15:38:26 +000015470
Guido van Rossumda88dad1995-01-26 00:46:29 +000015471works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015472echo "$as_me:$LINENO: checking for working volatile" >&5
15473echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15474cat >conftest.$ac_ext <<_ACEOF
15475#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015476/* confdefs.h. */
15477_ACEOF
15478cat confdefs.h >>conftest.$ac_ext
15479cat >>conftest.$ac_ext <<_ACEOF
15480/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015481
Martin v. Löwis11437992002-04-12 09:54:03 +000015482int
15483main ()
15484{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015485volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 ;
15487 return 0;
15488}
15489_ACEOF
15490rm -f conftest.$ac_objext
15491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15492 (eval $ac_compile) 2>&5
15493 ac_status=$?
15494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15495 (exit $ac_status); } &&
15496 { ac_try='test -s conftest.$ac_objext'
15497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15498 (eval $ac_try) 2>&5
15499 ac_status=$?
15500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15501 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015502 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015503else
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015505sed 's/^/| /' conftest.$ac_ext >&5
15506
Martin v. Löwis11437992002-04-12 09:54:03 +000015507
15508cat >>confdefs.h <<\_ACEOF
15509#define volatile
15510_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015511
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015512
Guido van Rossum627b2d71993-12-24 10:39:16 +000015513fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015514rm -f conftest.$ac_objext conftest.$ac_ext
15515echo "$as_me:$LINENO: result: $works" >&5
15516echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015517
Guido van Rossumda88dad1995-01-26 00:46:29 +000015518works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015519echo "$as_me:$LINENO: checking for working signed char" >&5
15520echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15521cat >conftest.$ac_ext <<_ACEOF
15522#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015523/* confdefs.h. */
15524_ACEOF
15525cat confdefs.h >>conftest.$ac_ext
15526cat >>conftest.$ac_ext <<_ACEOF
15527/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015528
Martin v. Löwis11437992002-04-12 09:54:03 +000015529int
15530main ()
15531{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015532signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015533 ;
15534 return 0;
15535}
15536_ACEOF
15537rm -f conftest.$ac_objext
15538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15539 (eval $ac_compile) 2>&5
15540 ac_status=$?
15541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15542 (exit $ac_status); } &&
15543 { ac_try='test -s conftest.$ac_objext'
15544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15545 (eval $ac_try) 2>&5
15546 ac_status=$?
15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15548 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015549 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015550else
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015552sed 's/^/| /' conftest.$ac_ext >&5
15553
Martin v. Löwis11437992002-04-12 09:54:03 +000015554
15555cat >>confdefs.h <<\_ACEOF
15556#define signed
15557_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015558
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015559
Guido van Rossum7f43da71994-08-01 12:15:30 +000015560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015561rm -f conftest.$ac_objext conftest.$ac_ext
15562echo "$as_me:$LINENO: result: $works" >&5
15563echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015564
Guido van Rossumda88dad1995-01-26 00:46:29 +000015565have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015566echo "$as_me:$LINENO: checking for prototypes" >&5
15567echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15568cat >conftest.$ac_ext <<_ACEOF
15569#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015570/* confdefs.h. */
15571_ACEOF
15572cat confdefs.h >>conftest.$ac_ext
15573cat >>conftest.$ac_ext <<_ACEOF
15574/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015575int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015576int
15577main ()
15578{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015579return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015580 ;
15581 return 0;
15582}
15583_ACEOF
15584rm -f conftest.$ac_objext
15585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15586 (eval $ac_compile) 2>&5
15587 ac_status=$?
15588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15589 (exit $ac_status); } &&
15590 { ac_try='test -s conftest.$ac_objext'
15591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15592 (eval $ac_try) 2>&5
15593 ac_status=$?
15594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15595 (exit $ac_status); }; }; then
15596
15597
15598cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015599#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015600_ACEOF
15601
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015602 have_prototypes=yes
15603
Guido van Rossumf78abae1997-01-21 22:02:36 +000015604else
Martin v. Löwis11437992002-04-12 09:54:03 +000015605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015606sed 's/^/| /' conftest.$ac_ext >&5
15607
Guido van Rossum7f43da71994-08-01 12:15:30 +000015608fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015609rm -f conftest.$ac_objext conftest.$ac_ext
15610echo "$as_me:$LINENO: result: $have_prototypes" >&5
15611echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015612
Guido van Rossumda88dad1995-01-26 00:46:29 +000015613works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015614echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15615echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15616cat >conftest.$ac_ext <<_ACEOF
15617#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015618/* confdefs.h. */
15619_ACEOF
15620cat confdefs.h >>conftest.$ac_ext
15621cat >>conftest.$ac_ext <<_ACEOF
15622/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015623
15624#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015625int foo(int x, ...) {
15626 va_list va;
15627 va_start(va, x);
15628 va_arg(va, int);
15629 va_arg(va, char *);
15630 va_arg(va, double);
15631 return 0;
15632}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015633
Martin v. Löwis11437992002-04-12 09:54:03 +000015634int
15635main ()
15636{
Guido van Rossum90eea071996-08-30 20:58:57 +000015637return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015638 ;
15639 return 0;
15640}
15641_ACEOF
15642rm -f conftest.$ac_objext
15643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15644 (eval $ac_compile) 2>&5
15645 ac_status=$?
15646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15647 (exit $ac_status); } &&
15648 { ac_try='test -s conftest.$ac_objext'
15649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15650 (eval $ac_try) 2>&5
15651 ac_status=$?
15652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15653 (exit $ac_status); }; }; then
15654
15655
15656cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015657#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015658_ACEOF
15659
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015660 works=yes
15661
Guido van Rossumf78abae1997-01-21 22:02:36 +000015662else
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015664sed 's/^/| /' conftest.$ac_ext >&5
15665
Guido van Rossum627b2d71993-12-24 10:39:16 +000015666fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015667rm -f conftest.$ac_objext conftest.$ac_ext
15668echo "$as_me:$LINENO: result: $works" >&5
15669echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015670
Guido van Rossumda88dad1995-01-26 00:46:29 +000015671if test "$have_prototypes" = yes; then
15672bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015673echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15674echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15675cat >conftest.$ac_ext <<_ACEOF
15676#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015677/* confdefs.h. */
15678_ACEOF
15679cat confdefs.h >>conftest.$ac_ext
15680cat >>conftest.$ac_ext <<_ACEOF
15681/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015682#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015683int
15684main ()
15685{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015686char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015687 ;
15688 return 0;
15689}
15690_ACEOF
15691rm -f conftest.$ac_objext
15692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15693 (eval $ac_compile) 2>&5
15694 ac_status=$?
15695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15696 (exit $ac_status); } &&
15697 { ac_try='test -s conftest.$ac_objext'
15698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15699 (eval $ac_try) 2>&5
15700 ac_status=$?
15701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15702 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015703 :
15704else
Martin v. Löwis11437992002-04-12 09:54:03 +000015705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015706sed 's/^/| /' conftest.$ac_ext >&5
15707
Martin v. Löwis11437992002-04-12 09:54:03 +000015708
15709cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015710#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015711_ACEOF
15712
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015713 bad_prototypes=yes
15714
Guido van Rossum627b2d71993-12-24 10:39:16 +000015715fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015716rm -f conftest.$ac_objext conftest.$ac_ext
15717echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15718echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015719fi
15720
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015721# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015722echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15723echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15724cat >conftest.$ac_ext <<_ACEOF
15725#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015726/* confdefs.h. */
15727_ACEOF
15728cat confdefs.h >>conftest.$ac_ext
15729cat >>conftest.$ac_ext <<_ACEOF
15730/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015731#include <sys/types.h>
15732#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015733int
15734main ()
15735{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015736struct sockaddr x;
15737x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015738 ;
15739 return 0;
15740}
15741_ACEOF
15742rm -f conftest.$ac_objext
15743if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15744 (eval $ac_compile) 2>&5
15745 ac_status=$?
15746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15747 (exit $ac_status); } &&
15748 { ac_try='test -s conftest.$ac_objext'
15749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15750 (eval $ac_try) 2>&5
15751 ac_status=$?
15752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15753 (exit $ac_status); }; }; then
15754 echo "$as_me:$LINENO: result: yes" >&5
15755echo "${ECHO_T}yes" >&6
15756
15757cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015758#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015759_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015760
15761else
Martin v. Löwis11437992002-04-12 09:54:03 +000015762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015763sed 's/^/| /' conftest.$ac_ext >&5
15764
Martin v. Löwis11437992002-04-12 09:54:03 +000015765echo "$as_me:$LINENO: result: no" >&5
15766echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015767fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015768rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015769
Guido van Rossumda88dad1995-01-26 00:46:29 +000015770va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015771echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15772echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15773cat >conftest.$ac_ext <<_ACEOF
15774#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015775/* confdefs.h. */
15776_ACEOF
15777cat confdefs.h >>conftest.$ac_ext
15778cat >>conftest.$ac_ext <<_ACEOF
15779/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015780
15781#ifdef HAVE_STDARG_PROTOTYPES
15782#include <stdarg.h>
15783#else
15784#include <varargs.h>
15785#endif
15786
Martin v. Löwis11437992002-04-12 09:54:03 +000015787int
15788main ()
15789{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015790va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015791 ;
15792 return 0;
15793}
15794_ACEOF
15795rm -f conftest.$ac_objext
15796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15797 (eval $ac_compile) 2>&5
15798 ac_status=$?
15799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15800 (exit $ac_status); } &&
15801 { ac_try='test -s conftest.$ac_objext'
15802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15803 (eval $ac_try) 2>&5
15804 ac_status=$?
15805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15806 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015807 :
15808else
Martin v. Löwis11437992002-04-12 09:54:03 +000015809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015810sed 's/^/| /' conftest.$ac_ext >&5
15811
Martin v. Löwis11437992002-04-12 09:54:03 +000015812
15813
15814cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015815#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015816_ACEOF
15817
Guido van Rossumda88dad1995-01-26 00:46:29 +000015818 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015819
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015820fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015821rm -f conftest.$ac_objext conftest.$ac_ext
15822echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15823echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015824
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015825# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015826
15827
15828
15829echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15830echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15831if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15832 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015833else
Martin v. Löwis11437992002-04-12 09:54:03 +000015834 cat >conftest.$ac_ext <<_ACEOF
15835#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015836/* confdefs.h. */
15837_ACEOF
15838cat confdefs.h >>conftest.$ac_ext
15839cat >>conftest.$ac_ext <<_ACEOF
15840/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015841/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015842 which can conflict with char gethostbyname_r (); below.
15843 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015844 <limits.h> exists even on freestanding compilers. Under hpux,
15845 including <limits.h> includes <sys/time.h> and causes problems
15846 checking for functions defined therein. */
15847#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015848# include <limits.h>
15849#else
15850# include <assert.h>
15851#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015852/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015853#ifdef __cplusplus
15854extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015855{
Martin v. Löwis11437992002-04-12 09:54:03 +000015856#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015857/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015858 builtin and then its argument prototype would still apply. */
15859char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015860/* The GNU C library defines this for functions which it implements
15861 to always fail with ENOSYS. Some functions are actually named
15862 something starting with __ and the normal name is an alias. */
15863#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15864choke me
15865#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015866char (*f) () = gethostbyname_r;
15867#endif
15868#ifdef __cplusplus
15869}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015870#endif
15871
Skip Montanaro6dead952003-09-25 14:50:04 +000015872int
15873main ()
15874{
15875return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015876 ;
15877 return 0;
15878}
15879_ACEOF
15880rm -f conftest.$ac_objext conftest$ac_exeext
15881if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15882 (eval $ac_link) 2>&5
15883 ac_status=$?
15884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15885 (exit $ac_status); } &&
15886 { ac_try='test -s conftest$ac_exeext'
15887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15888 (eval $ac_try) 2>&5
15889 ac_status=$?
15890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15891 (exit $ac_status); }; }; then
15892 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015893else
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015895sed 's/^/| /' conftest.$ac_ext >&5
15896
Martin v. Löwis11437992002-04-12 09:54:03 +000015897ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015898fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015899rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015900fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015901echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15902echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15903if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015904
Martin v. Löwis11437992002-04-12 09:54:03 +000015905 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015906#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015907_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015908
Martin v. Löwis11437992002-04-12 09:54:03 +000015909 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15910echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015911 OLD_CFLAGS=$CFLAGS
15912 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015913 cat >conftest.$ac_ext <<_ACEOF
15914#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015915/* confdefs.h. */
15916_ACEOF
15917cat confdefs.h >>conftest.$ac_ext
15918cat >>conftest.$ac_ext <<_ACEOF
15919/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015920
15921# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015922
Martin v. Löwis11437992002-04-12 09:54:03 +000015923int
15924main ()
15925{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015926
15927 char *name;
15928 struct hostent *he, *res;
15929 char buffer[2048];
15930 int buflen = 2048;
15931 int h_errnop;
15932
15933 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015934
15935 ;
15936 return 0;
15937}
15938_ACEOF
15939rm -f conftest.$ac_objext
15940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15941 (eval $ac_compile) 2>&5
15942 ac_status=$?
15943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15944 (exit $ac_status); } &&
15945 { ac_try='test -s conftest.$ac_objext'
15946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15947 (eval $ac_try) 2>&5
15948 ac_status=$?
15949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15950 (exit $ac_status); }; }; then
15951
15952 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015953#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015954_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015955
Martin v. Löwis11437992002-04-12 09:54:03 +000015956
15957cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015958#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015959_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015960
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 echo "$as_me:$LINENO: result: yes" >&5
15962echo "${ECHO_T}yes" >&6
15963
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015964else
Martin v. Löwis11437992002-04-12 09:54:03 +000015965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015966sed 's/^/| /' conftest.$ac_ext >&5
15967
Martin v. Löwis11437992002-04-12 09:54:03 +000015968
15969 echo "$as_me:$LINENO: result: no" >&5
15970echo "${ECHO_T}no" >&6
15971 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15972echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15973 cat >conftest.$ac_ext <<_ACEOF
15974#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015975/* confdefs.h. */
15976_ACEOF
15977cat confdefs.h >>conftest.$ac_ext
15978cat >>conftest.$ac_ext <<_ACEOF
15979/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015980
15981# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015982
Martin v. Löwis11437992002-04-12 09:54:03 +000015983int
15984main ()
15985{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015986
15987 char *name;
15988 struct hostent *he;
15989 char buffer[2048];
15990 int buflen = 2048;
15991 int h_errnop;
15992
15993 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015994
15995 ;
15996 return 0;
15997}
15998_ACEOF
15999rm -f conftest.$ac_objext
16000if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16001 (eval $ac_compile) 2>&5
16002 ac_status=$?
16003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16004 (exit $ac_status); } &&
16005 { ac_try='test -s conftest.$ac_objext'
16006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16007 (eval $ac_try) 2>&5
16008 ac_status=$?
16009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16010 (exit $ac_status); }; }; then
16011
16012 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016013#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016014_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016015
Martin v. Löwis11437992002-04-12 09:54:03 +000016016
16017cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016018#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016019_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016020
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 echo "$as_me:$LINENO: result: yes" >&5
16022echo "${ECHO_T}yes" >&6
16023
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016024else
Martin v. Löwis11437992002-04-12 09:54:03 +000016025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016026sed 's/^/| /' conftest.$ac_ext >&5
16027
Martin v. Löwis11437992002-04-12 09:54:03 +000016028
16029 echo "$as_me:$LINENO: result: no" >&5
16030echo "${ECHO_T}no" >&6
16031 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
16032echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
16033 cat >conftest.$ac_ext <<_ACEOF
16034#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016035/* confdefs.h. */
16036_ACEOF
16037cat confdefs.h >>conftest.$ac_ext
16038cat >>conftest.$ac_ext <<_ACEOF
16039/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016040
16041# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016042
Martin v. Löwis11437992002-04-12 09:54:03 +000016043int
16044main ()
16045{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016046
16047 char *name;
16048 struct hostent *he;
16049 struct hostent_data data;
16050
16051 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000016052
16053 ;
16054 return 0;
16055}
16056_ACEOF
16057rm -f conftest.$ac_objext
16058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16059 (eval $ac_compile) 2>&5
16060 ac_status=$?
16061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16062 (exit $ac_status); } &&
16063 { ac_try='test -s conftest.$ac_objext'
16064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16065 (eval $ac_try) 2>&5
16066 ac_status=$?
16067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16068 (exit $ac_status); }; }; then
16069
16070 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016071#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016072_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016073
Martin v. Löwis11437992002-04-12 09:54:03 +000016074
16075cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016076#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016077_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016078
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 echo "$as_me:$LINENO: result: yes" >&5
16080echo "${ECHO_T}yes" >&6
16081
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016082else
Martin v. Löwis11437992002-04-12 09:54:03 +000016083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016084sed 's/^/| /' conftest.$ac_ext >&5
16085
Martin v. Löwis11437992002-04-12 09:54:03 +000016086
16087 echo "$as_me:$LINENO: result: no" >&5
16088echo "${ECHO_T}no" >&6
16089
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016091rm -f conftest.$ac_objext conftest.$ac_ext
16092
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016094rm -f conftest.$ac_objext conftest.$ac_ext
16095
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016096fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016097rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016098 CFLAGS=$OLD_CFLAGS
16099
16100else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016101
Martin v. Löwis11437992002-04-12 09:54:03 +000016102
16103for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000016104do
Martin v. Löwis11437992002-04-12 09:54:03 +000016105as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16106echo "$as_me:$LINENO: checking for $ac_func" >&5
16107echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16108if eval "test \"\${$as_ac_var+set}\" = set"; then
16109 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016110else
Martin v. Löwis11437992002-04-12 09:54:03 +000016111 cat >conftest.$ac_ext <<_ACEOF
16112#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016113/* confdefs.h. */
16114_ACEOF
16115cat confdefs.h >>conftest.$ac_ext
16116cat >>conftest.$ac_ext <<_ACEOF
16117/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016118/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016119 which can conflict with char $ac_func (); below.
16120 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016121 <limits.h> exists even on freestanding compilers. Under hpux,
16122 including <limits.h> includes <sys/time.h> and causes problems
16123 checking for functions defined therein. */
16124#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016125# include <limits.h>
16126#else
16127# include <assert.h>
16128#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016129/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016130#ifdef __cplusplus
16131extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016132{
Martin v. Löwis11437992002-04-12 09:54:03 +000016133#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016134/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016135 builtin and then its argument prototype would still apply. */
16136char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016137/* The GNU C library defines this for functions which it implements
16138 to always fail with ENOSYS. Some functions are actually named
16139 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016140#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016141choke me
16142#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016143char (*f) () = $ac_func;
16144#endif
16145#ifdef __cplusplus
16146}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016147#endif
16148
Skip Montanaro6dead952003-09-25 14:50:04 +000016149int
16150main ()
16151{
16152return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016153 ;
16154 return 0;
16155}
16156_ACEOF
16157rm -f conftest.$ac_objext conftest$ac_exeext
16158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16159 (eval $ac_link) 2>&5
16160 ac_status=$?
16161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16162 (exit $ac_status); } &&
16163 { ac_try='test -s conftest$ac_exeext'
16164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16165 (eval $ac_try) 2>&5
16166 ac_status=$?
16167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16168 (exit $ac_status); }; }; then
16169 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016170else
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016172sed 's/^/| /' conftest.$ac_ext >&5
16173
Martin v. Löwis11437992002-04-12 09:54:03 +000016174eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016176rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016177fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016178echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16179echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16180if test `eval echo '${'$as_ac_var'}'` = yes; then
16181 cat >>confdefs.h <<_ACEOF
16182#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16183_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016184
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016185fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016186done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016187
Michael W. Hudson54241132001-12-07 15:38:26 +000016188
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016189fi
16190
Michael W. Hudson54241132001-12-07 15:38:26 +000016191
16192
16193
16194
16195
16196
Guido van Rossum627b2d71993-12-24 10:39:16 +000016197# checks for system services
16198# (none yet)
16199
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016200# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016201echo "$as_me:$LINENO: checking for __fpu_control" >&5
16202echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16203if test "${ac_cv_func___fpu_control+set}" = set; then
16204 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016205else
Martin v. Löwis11437992002-04-12 09:54:03 +000016206 cat >conftest.$ac_ext <<_ACEOF
16207#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016208/* confdefs.h. */
16209_ACEOF
16210cat confdefs.h >>conftest.$ac_ext
16211cat >>conftest.$ac_ext <<_ACEOF
16212/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016213/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016214 which can conflict with char __fpu_control (); below.
16215 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016216 <limits.h> exists even on freestanding compilers. Under hpux,
16217 including <limits.h> includes <sys/time.h> and causes problems
16218 checking for functions defined therein. */
16219#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016220# include <limits.h>
16221#else
16222# include <assert.h>
16223#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016224/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016225#ifdef __cplusplus
16226extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016227{
Martin v. Löwis11437992002-04-12 09:54:03 +000016228#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016229/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 builtin and then its argument prototype would still apply. */
16231char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016232/* The GNU C library defines this for functions which it implements
16233 to always fail with ENOSYS. Some functions are actually named
16234 something starting with __ and the normal name is an alias. */
16235#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16236choke me
16237#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016238char (*f) () = __fpu_control;
16239#endif
16240#ifdef __cplusplus
16241}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016242#endif
16243
Skip Montanaro6dead952003-09-25 14:50:04 +000016244int
16245main ()
16246{
16247return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016248 ;
16249 return 0;
16250}
16251_ACEOF
16252rm -f conftest.$ac_objext conftest$ac_exeext
16253if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16254 (eval $ac_link) 2>&5
16255 ac_status=$?
16256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16257 (exit $ac_status); } &&
16258 { ac_try='test -s conftest$ac_exeext'
16259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16260 (eval $ac_try) 2>&5
16261 ac_status=$?
16262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16263 (exit $ac_status); }; }; then
16264 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016265else
Martin v. Löwis11437992002-04-12 09:54:03 +000016266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016267sed 's/^/| /' conftest.$ac_ext >&5
16268
Martin v. Löwis11437992002-04-12 09:54:03 +000016269ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016271rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016273echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16274echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16275if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016276 :
16277else
Martin v. Löwis11437992002-04-12 09:54:03 +000016278
16279echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16280echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16281if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16282 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016283else
Martin v. Löwis11437992002-04-12 09:54:03 +000016284 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016285LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016286cat >conftest.$ac_ext <<_ACEOF
16287#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016288/* confdefs.h. */
16289_ACEOF
16290cat confdefs.h >>conftest.$ac_ext
16291cat >>conftest.$ac_ext <<_ACEOF
16292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016293
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016294/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016295#ifdef __cplusplus
16296extern "C"
16297#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016298/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 builtin and then its argument prototype would still apply. */
16300char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016301int
16302main ()
16303{
16304__fpu_control ();
16305 ;
16306 return 0;
16307}
16308_ACEOF
16309rm -f conftest.$ac_objext conftest$ac_exeext
16310if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16311 (eval $ac_link) 2>&5
16312 ac_status=$?
16313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16314 (exit $ac_status); } &&
16315 { ac_try='test -s conftest$ac_exeext'
16316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16317 (eval $ac_try) 2>&5
16318 ac_status=$?
16319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16320 (exit $ac_status); }; }; then
16321 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016322else
Martin v. Löwis11437992002-04-12 09:54:03 +000016323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016324sed 's/^/| /' conftest.$ac_ext >&5
16325
Martin v. Löwis11437992002-04-12 09:54:03 +000016326ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016328rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16329LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016330fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016331echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16332echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16333if test $ac_cv_lib_ieee___fpu_control = yes; then
16334 cat >>confdefs.h <<_ACEOF
16335#define HAVE_LIBIEEE 1
16336_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016337
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016338 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016339
Guido van Rossum627b2d71993-12-24 10:39:16 +000016340fi
16341
Michael W. Hudson54241132001-12-07 15:38:26 +000016342
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016343fi
16344
Michael W. Hudson54241132001-12-07 15:38:26 +000016345
Guido van Rossum7f253911997-05-09 02:42:48 +000016346# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016347echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16348echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16349
Guido van Rossum7f253911997-05-09 02:42:48 +000016350# Check whether --with-fpectl or --without-fpectl was given.
16351if test "${with_fpectl+set}" = set; then
16352 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016353
Guido van Rossum7f253911997-05-09 02:42:48 +000016354if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016355then
16356
16357cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016358#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016359_ACEOF
16360
16361 echo "$as_me:$LINENO: result: yes" >&5
16362echo "${ECHO_T}yes" >&6
16363else echo "$as_me:$LINENO: result: no" >&5
16364echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016365fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016366else
Martin v. Löwis11437992002-04-12 09:54:03 +000016367 echo "$as_me:$LINENO: result: no" >&5
16368echo "${ECHO_T}no" >&6
16369fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016370
Guido van Rossum7f43da71994-08-01 12:15:30 +000016371# check for --with-libm=...
16372
Guido van Rossum563e7081996-09-10 18:20:48 +000016373case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016374Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016375BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016376*) LIBM=-lm
16377esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016378echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16379echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16380
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016381# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016382if test "${with_libm+set}" = set; then
16383 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016384
Guido van Rossum7f253911997-05-09 02:42:48 +000016385if test "$withval" = no
16386then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16388echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016389elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016390then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016391 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16392echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16393else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16394echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16395 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016396fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016397else
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16399echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16400fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016401
16402# check for --with-libc=...
16403
Martin v. Löwis11437992002-04-12 09:54:03 +000016404echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16405echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16406
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016407# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016408if test "${with_libc+set}" = set; then
16409 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016410
Guido van Rossum7f253911997-05-09 02:42:48 +000016411if test "$withval" = no
16412then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016413 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16414echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016415elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016416then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016417 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16418echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16419else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16420echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16421 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016422fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016423else
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16425echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16426fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016427
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016428# check for hypot() in math library
16429LIBS_SAVE=$LIBS
16430LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016431
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016432for ac_func in hypot
16433do
Martin v. Löwis11437992002-04-12 09:54:03 +000016434as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16435echo "$as_me:$LINENO: checking for $ac_func" >&5
16436echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16437if eval "test \"\${$as_ac_var+set}\" = set"; then
16438 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016439else
Martin v. Löwis11437992002-04-12 09:54:03 +000016440 cat >conftest.$ac_ext <<_ACEOF
16441#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016442/* confdefs.h. */
16443_ACEOF
16444cat confdefs.h >>conftest.$ac_ext
16445cat >>conftest.$ac_ext <<_ACEOF
16446/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016447/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016448 which can conflict with char $ac_func (); below.
16449 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016450 <limits.h> exists even on freestanding compilers. Under hpux,
16451 including <limits.h> includes <sys/time.h> and causes problems
16452 checking for functions defined therein. */
16453#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016454# include <limits.h>
16455#else
16456# include <assert.h>
16457#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016458/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016459#ifdef __cplusplus
16460extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016461{
Martin v. Löwis11437992002-04-12 09:54:03 +000016462#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016463/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016464 builtin and then its argument prototype would still apply. */
16465char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016466/* The GNU C library defines this for functions which it implements
16467 to always fail with ENOSYS. Some functions are actually named
16468 something starting with __ and the normal name is an alias. */
16469#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16470choke me
16471#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016472char (*f) () = $ac_func;
16473#endif
16474#ifdef __cplusplus
16475}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016476#endif
16477
Skip Montanaro6dead952003-09-25 14:50:04 +000016478int
16479main ()
16480{
16481return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016482 ;
16483 return 0;
16484}
16485_ACEOF
16486rm -f conftest.$ac_objext conftest$ac_exeext
16487if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16488 (eval $ac_link) 2>&5
16489 ac_status=$?
16490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16491 (exit $ac_status); } &&
16492 { ac_try='test -s conftest$ac_exeext'
16493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16494 (eval $ac_try) 2>&5
16495 ac_status=$?
16496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16497 (exit $ac_status); }; }; then
16498 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016499else
Martin v. Löwis11437992002-04-12 09:54:03 +000016500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016501sed 's/^/| /' conftest.$ac_ext >&5
16502
Martin v. Löwis11437992002-04-12 09:54:03 +000016503eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016504fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016505rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016506fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016507echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16508echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16509if test `eval echo '${'$as_ac_var'}'` = yes; then
16510 cat >>confdefs.h <<_ACEOF
16511#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16512_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016513
Michael W. Hudson54241132001-12-07 15:38:26 +000016514else
Martin v. Löwis11437992002-04-12 09:54:03 +000016515 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016516fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016517done
16518
Michael W. Hudson54241132001-12-07 15:38:26 +000016519
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016520LIBS=$LIBS_SAVE
16521
Guido van Rossumef2255b2000-03-10 22:30:29 +000016522# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016523if test "${ac_cv_header_wchar_h+set}" = set; then
16524 echo "$as_me:$LINENO: checking for wchar.h" >&5
16525echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16526if test "${ac_cv_header_wchar_h+set}" = set; then
16527 echo $ECHO_N "(cached) $ECHO_C" >&6
16528fi
16529echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16530echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016531else
Martin v. Löwis11437992002-04-12 09:54:03 +000016532 # Is the header compilable?
16533echo "$as_me:$LINENO: checking wchar.h usability" >&5
16534echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16535cat >conftest.$ac_ext <<_ACEOF
16536#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016537/* confdefs.h. */
16538_ACEOF
16539cat confdefs.h >>conftest.$ac_ext
16540cat >>conftest.$ac_ext <<_ACEOF
16541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016542$ac_includes_default
16543#include <wchar.h>
16544_ACEOF
16545rm -f conftest.$ac_objext
16546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16547 (eval $ac_compile) 2>&5
16548 ac_status=$?
16549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16550 (exit $ac_status); } &&
16551 { ac_try='test -s conftest.$ac_objext'
16552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16553 (eval $ac_try) 2>&5
16554 ac_status=$?
16555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16556 (exit $ac_status); }; }; then
16557 ac_header_compiler=yes
16558else
16559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016560sed 's/^/| /' conftest.$ac_ext >&5
16561
Martin v. Löwis11437992002-04-12 09:54:03 +000016562ac_header_compiler=no
16563fi
16564rm -f conftest.$ac_objext conftest.$ac_ext
16565echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16566echo "${ECHO_T}$ac_header_compiler" >&6
16567
16568# Is the header present?
16569echo "$as_me:$LINENO: checking wchar.h presence" >&5
16570echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16571cat >conftest.$ac_ext <<_ACEOF
16572#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016573/* confdefs.h. */
16574_ACEOF
16575cat confdefs.h >>conftest.$ac_ext
16576cat >>conftest.$ac_ext <<_ACEOF
16577/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016578#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016579_ACEOF
16580if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16581 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16582 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016583 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016584 rm -f conftest.er1
16585 cat conftest.err >&5
16586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16587 (exit $ac_status); } >/dev/null; then
16588 if test -s conftest.err; then
16589 ac_cpp_err=$ac_c_preproc_warn_flag
16590 else
16591 ac_cpp_err=
16592 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016593else
Martin v. Löwis11437992002-04-12 09:54:03 +000016594 ac_cpp_err=yes
16595fi
16596if test -z "$ac_cpp_err"; then
16597 ac_header_preproc=yes
16598else
16599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016600sed 's/^/| /' conftest.$ac_ext >&5
16601
Martin v. Löwis11437992002-04-12 09:54:03 +000016602 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016603fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016604rm -f conftest.err conftest.$ac_ext
16605echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16606echo "${ECHO_T}$ac_header_preproc" >&6
16607
16608# So? What about this header?
16609case $ac_header_compiler:$ac_header_preproc in
16610 yes:no )
16611 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16612echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16613 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016614echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16615 (
16616 cat <<\_ASBOX
16617## ------------------------------------ ##
16618## Report this to bug-autoconf@gnu.org. ##
16619## ------------------------------------ ##
16620_ASBOX
16621 ) |
16622 sed "s/^/$as_me: WARNING: /" >&2
16623 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016624 no:yes )
16625 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16626echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16627 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16628echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16629 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016630echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16631 (
16632 cat <<\_ASBOX
16633## ------------------------------------ ##
16634## Report this to bug-autoconf@gnu.org. ##
16635## ------------------------------------ ##
16636_ASBOX
16637 ) |
16638 sed "s/^/$as_me: WARNING: /" >&2
16639 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016640esac
16641echo "$as_me:$LINENO: checking for wchar.h" >&5
16642echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16643if test "${ac_cv_header_wchar_h+set}" = set; then
16644 echo $ECHO_N "(cached) $ECHO_C" >&6
16645else
16646 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016648echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16649echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16650
16651fi
16652if test $ac_cv_header_wchar_h = yes; then
16653
16654
16655cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016656#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016657_ACEOF
16658
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016659 wchar_h="yes"
16660
Guido van Rossumef2255b2000-03-10 22:30:29 +000016661else
Martin v. Löwis11437992002-04-12 09:54:03 +000016662 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016663
16664fi
16665
Michael W. Hudson54241132001-12-07 15:38:26 +000016666
Martin v. Löwis11437992002-04-12 09:54:03 +000016667
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016668# determine wchar_t size
16669if test "$wchar_h" = yes
16670then
Martin v. Löwis11437992002-04-12 09:54:03 +000016671 echo "$as_me:$LINENO: checking for wchar_t" >&5
16672echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16673if test "${ac_cv_type_wchar_t+set}" = set; then
16674 echo $ECHO_N "(cached) $ECHO_C" >&6
16675else
16676 cat >conftest.$ac_ext <<_ACEOF
16677#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016678/* confdefs.h. */
16679_ACEOF
16680cat confdefs.h >>conftest.$ac_ext
16681cat >>conftest.$ac_ext <<_ACEOF
16682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016683#include <wchar.h>
16684
Martin v. Löwis11437992002-04-12 09:54:03 +000016685int
16686main ()
16687{
16688if ((wchar_t *) 0)
16689 return 0;
16690if (sizeof (wchar_t))
16691 return 0;
16692 ;
16693 return 0;
16694}
16695_ACEOF
16696rm -f conftest.$ac_objext
16697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16698 (eval $ac_compile) 2>&5
16699 ac_status=$?
16700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16701 (exit $ac_status); } &&
16702 { ac_try='test -s conftest.$ac_objext'
16703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16704 (eval $ac_try) 2>&5
16705 ac_status=$?
16706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16707 (exit $ac_status); }; }; then
16708 ac_cv_type_wchar_t=yes
16709else
16710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016711sed 's/^/| /' conftest.$ac_ext >&5
16712
Martin v. Löwis11437992002-04-12 09:54:03 +000016713ac_cv_type_wchar_t=no
16714fi
16715rm -f conftest.$ac_objext conftest.$ac_ext
16716fi
16717echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16718echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16719
16720echo "$as_me:$LINENO: checking size of wchar_t" >&5
16721echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16722if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16723 echo $ECHO_N "(cached) $ECHO_C" >&6
16724else
16725 if test "$ac_cv_type_wchar_t" = yes; then
16726 # The cast to unsigned long works around a bug in the HP C Compiler
16727 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16728 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16729 # This bug is HP SR number 8606223364.
16730 if test "$cross_compiling" = yes; then
16731 # Depending upon the size, compute the lo and hi bounds.
16732cat >conftest.$ac_ext <<_ACEOF
16733#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016734/* confdefs.h. */
16735_ACEOF
16736cat confdefs.h >>conftest.$ac_ext
16737cat >>conftest.$ac_ext <<_ACEOF
16738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016739#include <wchar.h>
16740
Martin v. Löwis11437992002-04-12 09:54:03 +000016741int
16742main ()
16743{
16744static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16745test_array [0] = 0
16746
16747 ;
16748 return 0;
16749}
16750_ACEOF
16751rm -f conftest.$ac_objext
16752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16753 (eval $ac_compile) 2>&5
16754 ac_status=$?
16755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16756 (exit $ac_status); } &&
16757 { ac_try='test -s conftest.$ac_objext'
16758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16759 (eval $ac_try) 2>&5
16760 ac_status=$?
16761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16762 (exit $ac_status); }; }; then
16763 ac_lo=0 ac_mid=0
16764 while :; do
16765 cat >conftest.$ac_ext <<_ACEOF
16766#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016767/* confdefs.h. */
16768_ACEOF
16769cat confdefs.h >>conftest.$ac_ext
16770cat >>conftest.$ac_ext <<_ACEOF
16771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016772#include <wchar.h>
16773
Martin v. Löwis11437992002-04-12 09:54:03 +000016774int
16775main ()
16776{
16777static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16778test_array [0] = 0
16779
16780 ;
16781 return 0;
16782}
16783_ACEOF
16784rm -f conftest.$ac_objext
16785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16786 (eval $ac_compile) 2>&5
16787 ac_status=$?
16788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16789 (exit $ac_status); } &&
16790 { ac_try='test -s conftest.$ac_objext'
16791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16792 (eval $ac_try) 2>&5
16793 ac_status=$?
16794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16795 (exit $ac_status); }; }; then
16796 ac_hi=$ac_mid; break
16797else
16798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016799sed 's/^/| /' conftest.$ac_ext >&5
16800
Martin v. Löwis11437992002-04-12 09:54:03 +000016801ac_lo=`expr $ac_mid + 1`
16802 if test $ac_lo -le $ac_mid; then
16803 ac_lo= ac_hi=
16804 break
16805 fi
16806 ac_mid=`expr 2 '*' $ac_mid + 1`
16807fi
16808rm -f conftest.$ac_objext conftest.$ac_ext
16809 done
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 +000016814cat >conftest.$ac_ext <<_ACEOF
16815#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016816/* confdefs.h. */
16817_ACEOF
16818cat confdefs.h >>conftest.$ac_ext
16819cat >>conftest.$ac_ext <<_ACEOF
16820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016821#include <wchar.h>
16822
Martin v. Löwis11437992002-04-12 09:54:03 +000016823int
16824main ()
16825{
16826static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16827test_array [0] = 0
16828
16829 ;
16830 return 0;
16831}
16832_ACEOF
16833rm -f conftest.$ac_objext
16834if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16835 (eval $ac_compile) 2>&5
16836 ac_status=$?
16837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16838 (exit $ac_status); } &&
16839 { ac_try='test -s conftest.$ac_objext'
16840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16841 (eval $ac_try) 2>&5
16842 ac_status=$?
16843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16844 (exit $ac_status); }; }; then
16845 ac_hi=-1 ac_mid=-1
16846 while :; do
16847 cat >conftest.$ac_ext <<_ACEOF
16848#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016849/* confdefs.h. */
16850_ACEOF
16851cat confdefs.h >>conftest.$ac_ext
16852cat >>conftest.$ac_ext <<_ACEOF
16853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016854#include <wchar.h>
16855
Martin v. Löwis11437992002-04-12 09:54:03 +000016856int
16857main ()
16858{
16859static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16860test_array [0] = 0
16861
16862 ;
16863 return 0;
16864}
16865_ACEOF
16866rm -f conftest.$ac_objext
16867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16868 (eval $ac_compile) 2>&5
16869 ac_status=$?
16870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16871 (exit $ac_status); } &&
16872 { ac_try='test -s conftest.$ac_objext'
16873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16874 (eval $ac_try) 2>&5
16875 ac_status=$?
16876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16877 (exit $ac_status); }; }; then
16878 ac_lo=$ac_mid; break
16879else
16880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016881sed 's/^/| /' conftest.$ac_ext >&5
16882
Martin v. Löwis11437992002-04-12 09:54:03 +000016883ac_hi=`expr '(' $ac_mid ')' - 1`
16884 if test $ac_mid -le $ac_hi; then
16885 ac_lo= ac_hi=
16886 break
16887 fi
16888 ac_mid=`expr 2 '*' $ac_mid`
16889fi
16890rm -f conftest.$ac_objext conftest.$ac_ext
16891 done
16892else
16893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016894sed 's/^/| /' conftest.$ac_ext >&5
16895
Martin v. Löwis11437992002-04-12 09:54:03 +000016896ac_lo= ac_hi=
16897fi
16898rm -f conftest.$ac_objext conftest.$ac_ext
16899fi
16900rm -f conftest.$ac_objext conftest.$ac_ext
16901# Binary search between lo and hi bounds.
16902while test "x$ac_lo" != "x$ac_hi"; do
16903 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16904 cat >conftest.$ac_ext <<_ACEOF
16905#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016906/* confdefs.h. */
16907_ACEOF
16908cat confdefs.h >>conftest.$ac_ext
16909cat >>conftest.$ac_ext <<_ACEOF
16910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016911#include <wchar.h>
16912
Martin v. Löwis11437992002-04-12 09:54:03 +000016913int
16914main ()
16915{
16916static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16917test_array [0] = 0
16918
16919 ;
16920 return 0;
16921}
16922_ACEOF
16923rm -f conftest.$ac_objext
16924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16925 (eval $ac_compile) 2>&5
16926 ac_status=$?
16927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16928 (exit $ac_status); } &&
16929 { ac_try='test -s conftest.$ac_objext'
16930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16931 (eval $ac_try) 2>&5
16932 ac_status=$?
16933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16934 (exit $ac_status); }; }; then
16935 ac_hi=$ac_mid
16936else
16937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016938sed 's/^/| /' conftest.$ac_ext >&5
16939
Martin v. Löwis11437992002-04-12 09:54:03 +000016940ac_lo=`expr '(' $ac_mid ')' + 1`
16941fi
16942rm -f conftest.$ac_objext conftest.$ac_ext
16943done
16944case $ac_lo in
16945?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016946'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16947See \`config.log' for more details." >&5
16948echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16949See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016950 { (exit 1); exit 1; }; } ;;
16951esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016952else
16953 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016954 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16955See \`config.log' for more details." >&5
16956echo "$as_me: error: cannot run test program while cross compiling
16957See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016958 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016959else
Martin v. Löwis11437992002-04-12 09:54:03 +000016960 cat >conftest.$ac_ext <<_ACEOF
16961#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016962/* confdefs.h. */
16963_ACEOF
16964cat confdefs.h >>conftest.$ac_ext
16965cat >>conftest.$ac_ext <<_ACEOF
16966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016967#include <wchar.h>
16968
16969long longval () { return (long) (sizeof (wchar_t)); }
16970unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016971#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016972#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016973int
16974main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016975{
Martin v. Löwis11437992002-04-12 09:54:03 +000016976
16977 FILE *f = fopen ("conftest.val", "w");
16978 if (! f)
16979 exit (1);
16980 if (((long) (sizeof (wchar_t))) < 0)
16981 {
16982 long i = longval ();
16983 if (i != ((long) (sizeof (wchar_t))))
16984 exit (1);
16985 fprintf (f, "%ld\n", i);
16986 }
16987 else
16988 {
16989 unsigned long i = ulongval ();
16990 if (i != ((long) (sizeof (wchar_t))))
16991 exit (1);
16992 fprintf (f, "%lu\n", i);
16993 }
16994 exit (ferror (f) || fclose (f) != 0);
16995
16996 ;
16997 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016998}
Martin v. Löwis11437992002-04-12 09:54:03 +000016999_ACEOF
17000rm -f conftest$ac_exeext
17001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17002 (eval $ac_link) 2>&5
17003 ac_status=$?
17004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17005 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17007 (eval $ac_try) 2>&5
17008 ac_status=$?
17009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17010 (exit $ac_status); }; }; then
17011 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000017012else
Martin v. Löwis11437992002-04-12 09:54:03 +000017013 echo "$as_me: program exited with status $ac_status" >&5
17014echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017015sed 's/^/| /' conftest.$ac_ext >&5
17016
Martin v. Löwis11437992002-04-12 09:54:03 +000017017( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000017018{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17019See \`config.log' for more details." >&5
17020echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17021See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017022 { (exit 1); exit 1; }; }
17023fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017024rm -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 +000017025fi
17026fi
17027rm -f conftest.val
17028else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017029 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000017030fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017031fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017032echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
17033echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
17034cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017035#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017036_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017037
Michael W. Hudson54241132001-12-07 15:38:26 +000017038
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017039fi
17040
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017041echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
17042echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
17043have_ucs4_tcl=no
17044cat >conftest.$ac_ext <<_ACEOF
17045#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017046/* confdefs.h. */
17047_ACEOF
17048cat confdefs.h >>conftest.$ac_ext
17049cat >>conftest.$ac_ext <<_ACEOF
17050/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017051
17052#include <tcl.h>
17053#if TCL_UTF_MAX != 6
17054# error "NOT UCS4_TCL"
17055#endif
17056int
17057main ()
17058{
17059
17060 ;
17061 return 0;
17062}
17063_ACEOF
17064rm -f conftest.$ac_objext
17065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17066 (eval $ac_compile) 2>&5
17067 ac_status=$?
17068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17069 (exit $ac_status); } &&
17070 { ac_try='test -s conftest.$ac_objext'
17071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17072 (eval $ac_try) 2>&5
17073 ac_status=$?
17074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17075 (exit $ac_status); }; }; then
17076
17077
17078cat >>confdefs.h <<\_ACEOF
17079#define HAVE_UCS4_TCL 1
17080_ACEOF
17081
17082 have_ucs4_tcl=yes
17083
17084else
17085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017086sed 's/^/| /' conftest.$ac_ext >&5
17087
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017088fi
17089rm -f conftest.$ac_objext conftest.$ac_ext
17090echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
17091echo "${ECHO_T}$have_ucs4_tcl" >&6
17092
Skip Montanaro6dead952003-09-25 14:50:04 +000017093# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017094if test "$wchar_h" = yes
17095then
17096 # check whether wchar_t is signed or not
17097 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
17098echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
17099 if test "${ac_cv_wchar_t_signed+set}" = set; then
17100 echo $ECHO_N "(cached) $ECHO_C" >&6
17101else
17102
17103 if test "$cross_compiling" = yes; then
17104 ac_cv_wchar_t_signed=yes
17105else
17106 cat >conftest.$ac_ext <<_ACEOF
17107#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017108/* confdefs.h. */
17109_ACEOF
17110cat confdefs.h >>conftest.$ac_ext
17111cat >>conftest.$ac_ext <<_ACEOF
17112/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017113
17114 #include <wchar.h>
17115 int main()
17116 {
17117 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
17118 }
17119
17120_ACEOF
17121rm -f conftest$ac_exeext
17122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17123 (eval $ac_link) 2>&5
17124 ac_status=$?
17125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17126 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17128 (eval $ac_try) 2>&5
17129 ac_status=$?
17130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17131 (exit $ac_status); }; }; then
17132 ac_cv_wchar_t_signed=yes
17133else
17134 echo "$as_me: program exited with status $ac_status" >&5
17135echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017136sed 's/^/| /' conftest.$ac_ext >&5
17137
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017138( exit $ac_status )
17139ac_cv_wchar_t_signed=no
17140fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017141rm -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 +000017142fi
17143fi
17144
17145 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
17146echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
17147fi
17148
Martin v. Löwis11437992002-04-12 09:54:03 +000017149echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17150echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017151# Check whether --enable-unicode or --disable-unicode was given.
17152if test "${enable_unicode+set}" = set; then
17153 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017154
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017155else
17156 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017157fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017158
17159if test $enable_unicode = yes
17160then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017161 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017162 case "$have_ucs4_tcl" in
17163 yes) enable_unicode="ucs4"
17164 ;;
17165 *) enable_unicode="ucs2"
17166 ;;
17167 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017168fi
17169
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017170
17171
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017172case "$enable_unicode" in
17173ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017174 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017175#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017176_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017177
17178 ;;
17179ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017180 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017181#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017182_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017183
17184 ;;
17185esac
17186
Michael W. Hudson54241132001-12-07 15:38:26 +000017187
Martin v. Löwis11437992002-04-12 09:54:03 +000017188
17189
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017190
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017191if test "$enable_unicode" = "no"
17192then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017193 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017194 echo "$as_me:$LINENO: result: not used" >&5
17195echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017196else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017197 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017198
17199cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017200#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017201_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017202
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017203
17204 # wchar_t is only usable if it maps to an unsigned type
17205 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17206 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017207 then
17208 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017209
Martin v. Löwis11437992002-04-12 09:54:03 +000017210cat >>confdefs.h <<\_ACEOF
17211#define HAVE_USABLE_WCHAR_T 1
17212_ACEOF
17213
17214 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017215#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017216_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017217
17218 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17219 then
17220 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017221 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017222#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017223_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017224
17225 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17226 then
17227 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017228 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017229#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017230_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017231
17232 else
17233 PY_UNICODE_TYPE="no type found"
17234 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017235 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17236echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017237fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017238
17239# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017240echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17241echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17242if test "${ac_cv_c_bigendian+set}" = set; then
17243 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017244else
Martin v. Löwis11437992002-04-12 09:54:03 +000017245 # See if sys/param.h defines the BYTE_ORDER macro.
17246cat >conftest.$ac_ext <<_ACEOF
17247#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017248/* confdefs.h. */
17249_ACEOF
17250cat confdefs.h >>conftest.$ac_ext
17251cat >>conftest.$ac_ext <<_ACEOF
17252/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017253#include <sys/types.h>
17254#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017255
Martin v. Löwis11437992002-04-12 09:54:03 +000017256int
17257main ()
17258{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017259#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17260 bogus endian macros
17261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017262
17263 ;
17264 return 0;
17265}
17266_ACEOF
17267rm -f conftest.$ac_objext
17268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17269 (eval $ac_compile) 2>&5
17270 ac_status=$?
17271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17272 (exit $ac_status); } &&
17273 { ac_try='test -s conftest.$ac_objext'
17274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17275 (eval $ac_try) 2>&5
17276 ac_status=$?
17277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17278 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017279 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017280cat >conftest.$ac_ext <<_ACEOF
17281#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017282/* confdefs.h. */
17283_ACEOF
17284cat confdefs.h >>conftest.$ac_ext
17285cat >>conftest.$ac_ext <<_ACEOF
17286/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017287#include <sys/types.h>
17288#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017289
Martin v. Löwis11437992002-04-12 09:54:03 +000017290int
17291main ()
17292{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017293#if BYTE_ORDER != BIG_ENDIAN
17294 not big endian
17295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017296
17297 ;
17298 return 0;
17299}
17300_ACEOF
17301rm -f conftest.$ac_objext
17302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17303 (eval $ac_compile) 2>&5
17304 ac_status=$?
17305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17306 (exit $ac_status); } &&
17307 { ac_try='test -s conftest.$ac_objext'
17308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17309 (eval $ac_try) 2>&5
17310 ac_status=$?
17311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17312 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017313 ac_cv_c_bigendian=yes
17314else
Martin v. Löwis11437992002-04-12 09:54:03 +000017315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017316sed 's/^/| /' conftest.$ac_ext >&5
17317
Martin v. Löwis11437992002-04-12 09:54:03 +000017318ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017319fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017320rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017321else
Martin v. Löwis11437992002-04-12 09:54:03 +000017322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017323sed 's/^/| /' conftest.$ac_ext >&5
17324
Martin v. Löwis11437992002-04-12 09:54:03 +000017325# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017326if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017327 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017328 ac_cv_c_bigendian=unknown
17329 cat >conftest.$ac_ext <<_ACEOF
17330#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017331/* confdefs.h. */
17332_ACEOF
17333cat confdefs.h >>conftest.$ac_ext
17334cat >>conftest.$ac_ext <<_ACEOF
17335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017336short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17337short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17338void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17339short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17340short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17341void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017342int
17343main ()
17344{
17345 _ascii (); _ebcdic ();
17346 ;
17347 return 0;
17348}
17349_ACEOF
17350rm -f conftest.$ac_objext
17351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17352 (eval $ac_compile) 2>&5
17353 ac_status=$?
17354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17355 (exit $ac_status); } &&
17356 { ac_try='test -s conftest.$ac_objext'
17357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17358 (eval $ac_try) 2>&5
17359 ac_status=$?
17360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17361 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017362 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017363 ac_cv_c_bigendian=yes
17364fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017365if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017366 if test "$ac_cv_c_bigendian" = unknown; then
17367 ac_cv_c_bigendian=no
17368 else
17369 # finding both strings is unlikely to happen, but who knows?
17370 ac_cv_c_bigendian=unknown
17371 fi
17372fi
17373else
17374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017375sed 's/^/| /' conftest.$ac_ext >&5
17376
Martin v. Löwis11437992002-04-12 09:54:03 +000017377fi
17378rm -f conftest.$ac_objext conftest.$ac_ext
17379else
17380 cat >conftest.$ac_ext <<_ACEOF
17381#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017382/* confdefs.h. */
17383_ACEOF
17384cat confdefs.h >>conftest.$ac_ext
17385cat >>conftest.$ac_ext <<_ACEOF
17386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017387int
17388main ()
17389{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017390 /* Are we little or big endian? From Harbison&Steele. */
17391 union
17392 {
17393 long l;
17394 char c[sizeof (long)];
17395 } u;
17396 u.l = 1;
17397 exit (u.c[sizeof (long) - 1] == 1);
17398}
Martin v. Löwis11437992002-04-12 09:54:03 +000017399_ACEOF
17400rm -f conftest$ac_exeext
17401if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17402 (eval $ac_link) 2>&5
17403 ac_status=$?
17404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17405 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17407 (eval $ac_try) 2>&5
17408 ac_status=$?
17409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17410 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017411 ac_cv_c_bigendian=no
17412else
Martin v. Löwis11437992002-04-12 09:54:03 +000017413 echo "$as_me: program exited with status $ac_status" >&5
17414echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017415sed 's/^/| /' conftest.$ac_ext >&5
17416
Martin v. Löwis11437992002-04-12 09:54:03 +000017417( exit $ac_status )
17418ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017419fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017420rm -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 +000017421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017422fi
17423rm -f conftest.$ac_objext conftest.$ac_ext
17424fi
17425echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17426echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17427case $ac_cv_c_bigendian in
17428 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017429
Martin v. Löwis11437992002-04-12 09:54:03 +000017430cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017431#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017432_ACEOF
17433 ;;
17434 no)
17435 ;;
17436 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017437 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017438presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017439echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017440presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17441 { (exit 1); exit 1; }; } ;;
17442esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017443
Michael W. Hudson54241132001-12-07 15:38:26 +000017444
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017445# Check whether right shifting a negative integer extends the sign bit
17446# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017447echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17448echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17449if test "${ac_cv_rshift_extends_sign+set}" = set; then
17450 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017451else
Martin v. Löwis11437992002-04-12 09:54:03 +000017452
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017453if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017454 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017455else
Martin v. Löwis11437992002-04-12 09:54:03 +000017456 cat >conftest.$ac_ext <<_ACEOF
17457#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017458/* confdefs.h. */
17459_ACEOF
17460cat confdefs.h >>conftest.$ac_ext
17461cat >>conftest.$ac_ext <<_ACEOF
17462/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017463
17464int main()
17465{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017466 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017467}
17468
Martin v. Löwis11437992002-04-12 09:54:03 +000017469_ACEOF
17470rm -f conftest$ac_exeext
17471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17472 (eval $ac_link) 2>&5
17473 ac_status=$?
17474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17475 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17477 (eval $ac_try) 2>&5
17478 ac_status=$?
17479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17480 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017481 ac_cv_rshift_extends_sign=yes
17482else
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 echo "$as_me: program exited with status $ac_status" >&5
17484echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017485sed 's/^/| /' conftest.$ac_ext >&5
17486
Martin v. Löwis11437992002-04-12 09:54:03 +000017487( exit $ac_status )
17488ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017489fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017490rm -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 +000017491fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017492fi
17493
Martin v. Löwis11437992002-04-12 09:54:03 +000017494echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17495echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017496if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017497then
Martin v. Löwis11437992002-04-12 09:54:03 +000017498
17499cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017500#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017501_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017502
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017503fi
17504
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017505# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017506echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17507echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17508if test "${ac_cv_have_getc_unlocked+set}" = set; then
17509 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017510else
Martin v. Löwis11437992002-04-12 09:54:03 +000017511
17512cat >conftest.$ac_ext <<_ACEOF
17513#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017514/* confdefs.h. */
17515_ACEOF
17516cat confdefs.h >>conftest.$ac_ext
17517cat >>conftest.$ac_ext <<_ACEOF
17518/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017519#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017520int
17521main ()
17522{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017523
17524 FILE *f = fopen("/dev/null", "r");
17525 flockfile(f);
17526 getc_unlocked(f);
17527 funlockfile(f);
17528
Martin v. Löwis11437992002-04-12 09:54:03 +000017529 ;
17530 return 0;
17531}
17532_ACEOF
17533rm -f conftest.$ac_objext conftest$ac_exeext
17534if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17535 (eval $ac_link) 2>&5
17536 ac_status=$?
17537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17538 (exit $ac_status); } &&
17539 { ac_try='test -s conftest$ac_exeext'
17540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17541 (eval $ac_try) 2>&5
17542 ac_status=$?
17543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17544 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017545 ac_cv_have_getc_unlocked=yes
17546else
Martin v. Löwis11437992002-04-12 09:54:03 +000017547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017548sed 's/^/| /' conftest.$ac_ext >&5
17549
Martin v. Löwis11437992002-04-12 09:54:03 +000017550ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017551fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017552rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017553fi
17554
Martin v. Löwis11437992002-04-12 09:54:03 +000017555echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17556echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017557if test "$ac_cv_have_getc_unlocked" = yes
17558then
Martin v. Löwis11437992002-04-12 09:54:03 +000017559
17560cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017561#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017562_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017563
17564fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017565
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017566# check for readline 2.2
17567cat >conftest.$ac_ext <<_ACEOF
17568#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017569/* confdefs.h. */
17570_ACEOF
17571cat confdefs.h >>conftest.$ac_ext
17572cat >>conftest.$ac_ext <<_ACEOF
17573/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017574#include <readline/readline.h>
17575_ACEOF
17576if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17577 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17578 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017579 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017580 rm -f conftest.er1
17581 cat conftest.err >&5
17582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17583 (exit $ac_status); } >/dev/null; then
17584 if test -s conftest.err; then
17585 ac_cpp_err=$ac_c_preproc_warn_flag
17586 else
17587 ac_cpp_err=
17588 fi
17589else
17590 ac_cpp_err=yes
17591fi
17592if test -z "$ac_cpp_err"; then
17593 have_readline=yes
17594else
17595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017596sed 's/^/| /' conftest.$ac_ext >&5
17597
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017598 have_readline=no
17599fi
17600rm -f conftest.err conftest.$ac_ext
17601if test $have_readline = yes
17602then
17603 cat >conftest.$ac_ext <<_ACEOF
17604#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017605/* confdefs.h. */
17606_ACEOF
17607cat confdefs.h >>conftest.$ac_ext
17608cat >>conftest.$ac_ext <<_ACEOF
17609/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017610#include <readline/readline.h>
17611
17612_ACEOF
17613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017614 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017615
17616cat >>confdefs.h <<\_ACEOF
17617#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17618_ACEOF
17619
17620fi
17621rm -f conftest*
17622
17623fi
17624
Martin v. Löwis0daad592001-09-30 21:09:59 +000017625# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017626echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17627echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17628if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17629 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017630else
Martin v. Löwis11437992002-04-12 09:54:03 +000017631 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017632LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017633cat >conftest.$ac_ext <<_ACEOF
17634#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017635/* confdefs.h. */
17636_ACEOF
17637cat confdefs.h >>conftest.$ac_ext
17638cat >>conftest.$ac_ext <<_ACEOF
17639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017640
Guido van Rossum353ae582001-07-10 16:45:32 +000017641/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017642#ifdef __cplusplus
17643extern "C"
17644#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017645/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017646 builtin and then its argument prototype would still apply. */
17647char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017648int
17649main ()
17650{
17651rl_pre_input_hook ();
17652 ;
17653 return 0;
17654}
17655_ACEOF
17656rm -f conftest.$ac_objext conftest$ac_exeext
17657if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17658 (eval $ac_link) 2>&5
17659 ac_status=$?
17660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17661 (exit $ac_status); } &&
17662 { ac_try='test -s conftest$ac_exeext'
17663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17664 (eval $ac_try) 2>&5
17665 ac_status=$?
17666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17667 (exit $ac_status); }; }; then
17668 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017669else
Martin v. Löwis11437992002-04-12 09:54:03 +000017670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017671sed 's/^/| /' conftest.$ac_ext >&5
17672
Martin v. Löwis11437992002-04-12 09:54:03 +000017673ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017674fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017675rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17676LIBS=$ac_check_lib_save_LIBS
17677fi
17678echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17679echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17680if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017681
Martin v. Löwis11437992002-04-12 09:54:03 +000017682cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017683#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017684_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017685
Martin v. Löwis0daad592001-09-30 21:09:59 +000017686fi
17687
Michael W. Hudson54241132001-12-07 15:38:26 +000017688
Martin v. Löwis0daad592001-09-30 21:09:59 +000017689# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017690echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17691echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17692if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17693 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017694else
Martin v. Löwis11437992002-04-12 09:54:03 +000017695 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017696LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017697cat >conftest.$ac_ext <<_ACEOF
17698#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017699/* confdefs.h. */
17700_ACEOF
17701cat confdefs.h >>conftest.$ac_ext
17702cat >>conftest.$ac_ext <<_ACEOF
17703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017704
Martin v. Löwis0daad592001-09-30 21:09:59 +000017705/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017706#ifdef __cplusplus
17707extern "C"
17708#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017709/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017710 builtin and then its argument prototype would still apply. */
17711char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017712int
17713main ()
17714{
17715rl_completion_matches ();
17716 ;
17717 return 0;
17718}
17719_ACEOF
17720rm -f conftest.$ac_objext conftest$ac_exeext
17721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17722 (eval $ac_link) 2>&5
17723 ac_status=$?
17724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17725 (exit $ac_status); } &&
17726 { ac_try='test -s conftest$ac_exeext'
17727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17728 (eval $ac_try) 2>&5
17729 ac_status=$?
17730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17731 (exit $ac_status); }; }; then
17732 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017733else
Martin v. Löwis11437992002-04-12 09:54:03 +000017734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017735sed 's/^/| /' conftest.$ac_ext >&5
17736
Martin v. Löwis11437992002-04-12 09:54:03 +000017737ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017738fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017739rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17740LIBS=$ac_check_lib_save_LIBS
17741fi
17742echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17743echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17744if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017745
Martin v. Löwis11437992002-04-12 09:54:03 +000017746cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017747#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017748_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017749
Guido van Rossum353ae582001-07-10 16:45:32 +000017750fi
17751
Jack Jansendd19cf82001-12-06 22:36:17 +000017752
Martin v. Löwis11437992002-04-12 09:54:03 +000017753echo "$as_me:$LINENO: checking for broken nice()" >&5
17754echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17755if test "${ac_cv_broken_nice+set}" = set; then
17756 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017757else
Martin v. Löwis11437992002-04-12 09:54:03 +000017758
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017759if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017760 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017761else
Martin v. Löwis11437992002-04-12 09:54:03 +000017762 cat >conftest.$ac_ext <<_ACEOF
17763#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017764/* confdefs.h. */
17765_ACEOF
17766cat confdefs.h >>conftest.$ac_ext
17767cat >>conftest.$ac_ext <<_ACEOF
17768/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017769
17770int main()
17771{
17772 int val1 = nice(1);
17773 if (val1 != -1 && val1 == nice(2))
17774 exit(0);
17775 exit(1);
17776}
17777
Martin v. Löwis11437992002-04-12 09:54:03 +000017778_ACEOF
17779rm -f conftest$ac_exeext
17780if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17781 (eval $ac_link) 2>&5
17782 ac_status=$?
17783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17784 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17786 (eval $ac_try) 2>&5
17787 ac_status=$?
17788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17789 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017790 ac_cv_broken_nice=yes
17791else
Martin v. Löwis11437992002-04-12 09:54:03 +000017792 echo "$as_me: program exited with status $ac_status" >&5
17793echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017794sed 's/^/| /' conftest.$ac_ext >&5
17795
Martin v. Löwis11437992002-04-12 09:54:03 +000017796( exit $ac_status )
17797ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017798fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017799rm -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 +000017800fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017801fi
17802
Martin v. Löwis11437992002-04-12 09:54:03 +000017803echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17804echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017805if test "$ac_cv_broken_nice" = yes
17806then
Martin v. Löwis11437992002-04-12 09:54:03 +000017807
17808cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017809#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017810_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017811
17812fi
17813
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017814# tzset(3) exists and works like we expect it to
17815echo "$as_me:$LINENO: checking for working tzset()" >&5
17816echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17817if test "${ac_cv_working_tzset+set}" = set; then
17818 echo $ECHO_N "(cached) $ECHO_C" >&6
17819else
17820
17821if test "$cross_compiling" = yes; then
17822 ac_cv_working_tzset=no
17823else
17824 cat >conftest.$ac_ext <<_ACEOF
17825#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017826/* confdefs.h. */
17827_ACEOF
17828cat confdefs.h >>conftest.$ac_ext
17829cat >>conftest.$ac_ext <<_ACEOF
17830/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017831
17832#include <stdlib.h>
17833#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017834#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017835int main()
17836{
Brett Cannon18367812003-09-19 00:59:16 +000017837 /* Note that we need to ensure that not only does tzset(3)
17838 do 'something' with localtime, but it works as documented
17839 in the library reference and as expected by the test suite.
17840
17841 Red Hat 6.2 doesn't understand the southern hemisphere
17842 after New Year's Day; it thinks swaps on that day.
17843 */
17844
17845 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17846 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17847
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017848 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017849 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017850 if (localtime(&groundhogday)->tm_hour != 0)
17851 exit(1);
17852
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017853 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017854 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017855 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017856 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017857
17858 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17859 tzset();
17860 if (localtime(&groundhogday)->tm_hour != 11)
17861 exit(1);
17862 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17863 exit(1);
17864 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17865 exit(1);
17866
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017867 exit(0);
17868}
17869
17870_ACEOF
17871rm -f conftest$ac_exeext
17872if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17873 (eval $ac_link) 2>&5
17874 ac_status=$?
17875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17876 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17878 (eval $ac_try) 2>&5
17879 ac_status=$?
17880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17881 (exit $ac_status); }; }; then
17882 ac_cv_working_tzset=yes
17883else
17884 echo "$as_me: program exited with status $ac_status" >&5
17885echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017886sed 's/^/| /' conftest.$ac_ext >&5
17887
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017888( exit $ac_status )
17889ac_cv_working_tzset=no
17890fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017891rm -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 +000017892fi
17893fi
17894
17895echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17896echo "${ECHO_T}$ac_cv_working_tzset" >&6
17897if test "$ac_cv_working_tzset" = yes
17898then
17899
17900cat >>confdefs.h <<\_ACEOF
17901#define HAVE_WORKING_TZSET 1
17902_ACEOF
17903
17904fi
17905
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017906# Look for subsecond timestamps in struct stat
17907echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17908echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17909if test "${ac_cv_stat_tv_nsec+set}" = set; then
17910 echo $ECHO_N "(cached) $ECHO_C" >&6
17911else
17912 cat >conftest.$ac_ext <<_ACEOF
17913#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017914/* confdefs.h. */
17915_ACEOF
17916cat confdefs.h >>conftest.$ac_ext
17917cat >>conftest.$ac_ext <<_ACEOF
17918/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017919#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017920int
17921main ()
17922{
17923
17924struct stat st;
17925st.st_mtim.tv_nsec = 1;
17926
17927 ;
17928 return 0;
17929}
17930_ACEOF
17931rm -f conftest.$ac_objext
17932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17933 (eval $ac_compile) 2>&5
17934 ac_status=$?
17935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17936 (exit $ac_status); } &&
17937 { ac_try='test -s conftest.$ac_objext'
17938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17939 (eval $ac_try) 2>&5
17940 ac_status=$?
17941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17942 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017943 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017944else
17945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017946sed 's/^/| /' conftest.$ac_ext >&5
17947
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017948ac_cv_stat_tv_nsec=no
17949fi
17950rm -f conftest.$ac_objext conftest.$ac_ext
17951fi
17952
17953echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17954echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17955if test "$ac_cv_stat_tv_nsec" = yes
17956then
17957
17958cat >>confdefs.h <<\_ACEOF
17959#define HAVE_STAT_TV_NSEC 1
17960_ACEOF
17961
17962fi
17963
Jack Jansen666b1e72001-10-31 12:11:48 +000017964# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017965echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17966echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17967if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17968 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017969else
Martin v. Löwis11437992002-04-12 09:54:03 +000017970 cat >conftest.$ac_ext <<_ACEOF
17971#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017972/* confdefs.h. */
17973_ACEOF
17974cat confdefs.h >>conftest.$ac_ext
17975cat >>conftest.$ac_ext <<_ACEOF
17976/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017977#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017978int
17979main ()
17980{
Jack Jansen666b1e72001-10-31 12:11:48 +000017981
17982 int rtn;
17983 rtn = mvwdelch(0,0,0);
17984
Martin v. Löwis11437992002-04-12 09:54:03 +000017985 ;
17986 return 0;
17987}
17988_ACEOF
17989rm -f conftest.$ac_objext
17990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17991 (eval $ac_compile) 2>&5
17992 ac_status=$?
17993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17994 (exit $ac_status); } &&
17995 { ac_try='test -s conftest.$ac_objext'
17996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17997 (eval $ac_try) 2>&5
17998 ac_status=$?
17999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18000 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018001 ac_cv_mvwdelch_is_expression=yes
18002else
Martin v. Löwis11437992002-04-12 09:54:03 +000018003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018004sed 's/^/| /' conftest.$ac_ext >&5
18005
Martin v. Löwis11437992002-04-12 09:54:03 +000018006ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018007fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018008rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018009fi
18010
Martin v. Löwis11437992002-04-12 09:54:03 +000018011echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
18012echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018013
18014if test "$ac_cv_mvwdelch_is_expression" = yes
18015then
Martin v. Löwis11437992002-04-12 09:54:03 +000018016
18017cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018018#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018019_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018020
18021fi
18022
Martin v. Löwis11437992002-04-12 09:54:03 +000018023echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
18024echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
18025if test "${ac_cv_window_has_flags+set}" = set; then
18026 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018027else
Martin v. Löwis11437992002-04-12 09:54:03 +000018028 cat >conftest.$ac_ext <<_ACEOF
18029#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018030/* confdefs.h. */
18031_ACEOF
18032cat confdefs.h >>conftest.$ac_ext
18033cat >>conftest.$ac_ext <<_ACEOF
18034/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018035#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018036int
18037main ()
18038{
Jack Jansen666b1e72001-10-31 12:11:48 +000018039
18040 WINDOW *w;
18041 w->_flags = 0;
18042
Martin v. Löwis11437992002-04-12 09:54:03 +000018043 ;
18044 return 0;
18045}
18046_ACEOF
18047rm -f conftest.$ac_objext
18048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18049 (eval $ac_compile) 2>&5
18050 ac_status=$?
18051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18052 (exit $ac_status); } &&
18053 { ac_try='test -s conftest.$ac_objext'
18054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18055 (eval $ac_try) 2>&5
18056 ac_status=$?
18057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18058 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018059 ac_cv_window_has_flags=yes
18060else
Martin v. Löwis11437992002-04-12 09:54:03 +000018061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018062sed 's/^/| /' conftest.$ac_ext >&5
18063
Martin v. Löwis11437992002-04-12 09:54:03 +000018064ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018066rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018067fi
18068
Martin v. Löwis11437992002-04-12 09:54:03 +000018069echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
18070echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018071
Jack Jansen666b1e72001-10-31 12:11:48 +000018072
18073if test "$ac_cv_window_has_flags" = yes
18074then
Martin v. Löwis11437992002-04-12 09:54:03 +000018075
18076cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018077#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018078_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018079
18080fi
18081
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018082echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
18083echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
18084
18085if test -e /dev/ptmx
18086then
18087 echo "$as_me:$LINENO: result: yes" >&5
18088echo "${ECHO_T}yes" >&6
18089
18090cat >>confdefs.h <<\_ACEOF
18091#define HAVE_DEV_PTMX 1
18092_ACEOF
18093
18094else
18095 echo "$as_me:$LINENO: result: no" >&5
18096echo "${ECHO_T}no" >&6
18097fi
18098
Neal Norwitz865400f2003-03-21 01:42:58 +000018099echo "$as_me:$LINENO: checking for /dev/ptc" >&5
18100echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
18101
18102if test -e /dev/ptc
18103then
18104 echo "$as_me:$LINENO: result: yes" >&5
18105echo "${ECHO_T}yes" >&6
18106
18107cat >>confdefs.h <<\_ACEOF
18108#define HAVE_DEV_PTC 1
18109_ACEOF
18110
18111else
18112 echo "$as_me:$LINENO: result: no" >&5
18113echo "${ECHO_T}no" >&6
18114fi
18115
Martin v. Löwis11437992002-04-12 09:54:03 +000018116echo "$as_me:$LINENO: checking for socklen_t" >&5
18117echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
18118if test "${ac_cv_type_socklen_t+set}" = set; then
18119 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000018120else
Martin v. Löwis11437992002-04-12 09:54:03 +000018121 cat >conftest.$ac_ext <<_ACEOF
18122#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018123/* confdefs.h. */
18124_ACEOF
18125cat confdefs.h >>conftest.$ac_ext
18126cat >>conftest.$ac_ext <<_ACEOF
18127/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000018128
18129#ifdef HAVE_SYS_TYPES_H
18130#include <sys/types.h>
18131#endif
18132#ifdef HAVE_SYS_SOCKET_H
18133#include <sys/socket.h>
18134#endif
18135
18136
Martin v. Löwis11437992002-04-12 09:54:03 +000018137int
18138main ()
18139{
18140if ((socklen_t *) 0)
18141 return 0;
18142if (sizeof (socklen_t))
18143 return 0;
18144 ;
18145 return 0;
18146}
18147_ACEOF
18148rm -f conftest.$ac_objext
18149if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18150 (eval $ac_compile) 2>&5
18151 ac_status=$?
18152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18153 (exit $ac_status); } &&
18154 { ac_try='test -s conftest.$ac_objext'
18155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18156 (eval $ac_try) 2>&5
18157 ac_status=$?
18158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18159 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018160 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018161else
Martin v. Löwis11437992002-04-12 09:54:03 +000018162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018163sed 's/^/| /' conftest.$ac_ext >&5
18164
Martin v. Löwis11437992002-04-12 09:54:03 +000018165ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018166fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018167rm -f conftest.$ac_objext conftest.$ac_ext
18168fi
18169echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18170echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18171if test $ac_cv_type_socklen_t = yes; then
18172 :
18173else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018174
Martin v. Löwis01c04012002-11-11 14:58:44 +000018175cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018176#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018177_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018178
18179fi
18180
Michael W. Hudson54241132001-12-07 15:38:26 +000018181
Michael W. Hudson54241132001-12-07 15:38:26 +000018182
18183
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018184for h in `(cd $srcdir;echo Python/thread_*.h)`
18185do
18186 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18187done
18188
Michael W. Hudson54241132001-12-07 15:38:26 +000018189
Jack Jansen0b06be72002-06-21 14:48:38 +000018190SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018191echo "$as_me:$LINENO: checking for build directories" >&5
18192echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018193for dir in $SRCDIRS; do
18194 if test ! -d $dir; then
18195 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018196 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018197done
Martin v. Löwis11437992002-04-12 09:54:03 +000018198echo "$as_me:$LINENO: result: done" >&5
18199echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018200
Guido van Rossum627b2d71993-12-24 10:39:16 +000018201# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018202 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018203
Martin v. Löwis11437992002-04-12 09:54:03 +000018204cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018205# This file is a shell script that caches the results of configure
18206# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018207# scripts and configure runs, see configure's option --config-cache.
18208# It is not useful on other systems. If it contains results you don't
18209# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018210#
Martin v. Löwis11437992002-04-12 09:54:03 +000018211# config.status only pays attention to the cache file if you give it
18212# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018213#
Skip Montanaro6dead952003-09-25 14:50:04 +000018214# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018215# loading this file, other *unset* `ac_cv_foo' will be assigned the
18216# following values.
18217
18218_ACEOF
18219
Guido van Rossumf78abae1997-01-21 22:02:36 +000018220# The following way of writing the cache mishandles newlines in values,
18221# but we know of no workaround that is simple, portable, and efficient.
18222# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018223# Ultrix sh set writes to stderr and can't be redirected directly,
18224# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018225{
18226 (set) 2>&1 |
18227 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18228 *ac_space=\ *)
18229 # `set' does not quote correctly, so add quotes (double-quote
18230 # substitution turns \\\\ into \\, and sed turns \\ into \).
18231 sed -n \
18232 "s/'/'\\\\''/g;
18233 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18234 ;;
18235 *)
18236 # `set' quotes correctly as required by POSIX, so do not add quotes.
18237 sed -n \
18238 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18239 ;;
18240 esac;
18241} |
18242 sed '
18243 t clear
18244 : clear
18245 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18246 t end
18247 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18248 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018249if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018250 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018251 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18252 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018253 else
18254 echo "not updating unwritable cache $cache_file"
18255 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018256fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018257rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018258
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018259test "x$prefix" = xNONE && prefix=$ac_default_prefix
18260# Let make expand exec_prefix.
18261test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018262
Martin v. Löwis11437992002-04-12 09:54:03 +000018263# VPATH may cause trouble with some makes, so we remove $(srcdir),
18264# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18265# trailing colons and then remove the whole line if VPATH becomes empty
18266# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018267if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018268 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18269s/:*\$(srcdir):*/:/;
18270s/:*\${srcdir}:*/:/;
18271s/:*@srcdir@:*/:/;
18272s/^\([^=]*=[ ]*\):*/\1/;
18273s/:*$//;
18274s/^[^=]*=[ ]*$//;
18275}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018276fi
18277
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018278DEFS=-DHAVE_CONFIG_H
18279
Skip Montanaro6dead952003-09-25 14:50:04 +000018280ac_libobjs=
18281ac_ltlibobjs=
18282for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18283 # 1. Remove the extension, and $U if already installed.
18284 ac_i=`echo "$ac_i" |
18285 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18286 # 2. Add them.
18287 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18288 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18289done
18290LIBOBJS=$ac_libobjs
18291
18292LTLIBOBJS=$ac_ltlibobjs
18293
18294
Martin v. Löwis11437992002-04-12 09:54:03 +000018295
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018296: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018297ac_clean_files_save=$ac_clean_files
18298ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18299{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18300echo "$as_me: creating $CONFIG_STATUS" >&6;}
18301cat >$CONFIG_STATUS <<_ACEOF
18302#! $SHELL
18303# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018304# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018305# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018306# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018307
Martin v. Löwis11437992002-04-12 09:54:03 +000018308debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018309ac_cs_recheck=false
18310ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018311SHELL=\${CONFIG_SHELL-$SHELL}
18312_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018313
Martin v. Löwis11437992002-04-12 09:54:03 +000018314cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018315## --------------------- ##
18316## M4sh Initialization. ##
18317## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018318
Martin v. Löwis11437992002-04-12 09:54:03 +000018319# Be Bourne compatible
18320if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18321 emulate sh
18322 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018323 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18324 # is contrary to our usage. Disable this feature.
18325 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018326elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18327 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018328fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018329
Martin v. Löwis11437992002-04-12 09:54:03 +000018330# Support unset when possible.
18331if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18332 as_unset=unset
18333else
18334 as_unset=false
18335fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018336
Skip Montanaro6dead952003-09-25 14:50:04 +000018337
18338# Work around bugs in pre-3.0 UWIN ksh.
18339$as_unset ENV MAIL MAILPATH
18340PS1='$ '
18341PS2='> '
18342PS4='+ '
18343
18344# NLS nuisances.
18345for as_var in \
18346 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18347 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18348 LC_TELEPHONE LC_TIME
18349do
18350 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18351 eval $as_var=C; export $as_var
18352 else
18353 $as_unset $as_var
18354 fi
18355done
18356
18357# Required to use basename.
18358if expr a : '\(a\)' >/dev/null 2>&1; then
18359 as_expr=expr
18360else
18361 as_expr=false
18362fi
18363
18364if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18365 as_basename=basename
18366else
18367 as_basename=false
18368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018369
18370
18371# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018372as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018373$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18374 X"$0" : 'X\(//\)$' \| \
18375 X"$0" : 'X\(/\)$' \| \
18376 . : '\(.\)' 2>/dev/null ||
18377echo X/"$0" |
18378 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18379 /^X\/\(\/\/\)$/{ s//\1/; q; }
18380 /^X\/\(\/\).*/{ s//\1/; q; }
18381 s/.*/./; q'`
18382
Skip Montanaro6dead952003-09-25 14:50:04 +000018383
Martin v. Löwis11437992002-04-12 09:54:03 +000018384# PATH needs CR, and LINENO needs CR and PATH.
18385# Avoid depending upon Character Ranges.
18386as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18387as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18388as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18389as_cr_digits='0123456789'
18390as_cr_alnum=$as_cr_Letters$as_cr_digits
18391
18392# The user is always right.
18393if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018394 echo "#! /bin/sh" >conf$$.sh
18395 echo "exit 0" >>conf$$.sh
18396 chmod +x conf$$.sh
18397 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018398 PATH_SEPARATOR=';'
18399 else
18400 PATH_SEPARATOR=:
18401 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018402 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018403fi
18404
18405
18406 as_lineno_1=$LINENO
18407 as_lineno_2=$LINENO
18408 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18409 test "x$as_lineno_1" != "x$as_lineno_2" &&
18410 test "x$as_lineno_3" = "x$as_lineno_2" || {
18411 # Find who we are. Look in the path if we contain no path at all
18412 # relative or not.
18413 case $0 in
18414 *[\\/]* ) as_myself=$0 ;;
18415 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18416for as_dir in $PATH
18417do
18418 IFS=$as_save_IFS
18419 test -z "$as_dir" && as_dir=.
18420 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18421done
18422
18423 ;;
18424 esac
18425 # We did not find ourselves, most probably we were run as `sh COMMAND'
18426 # in which case we are not to be found in the path.
18427 if test "x$as_myself" = x; then
18428 as_myself=$0
18429 fi
18430 if test ! -f "$as_myself"; then
18431 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18432echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18433 { (exit 1); exit 1; }; }
18434 fi
18435 case $CONFIG_SHELL in
18436 '')
18437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18438for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18439do
18440 IFS=$as_save_IFS
18441 test -z "$as_dir" && as_dir=.
18442 for as_base in sh bash ksh sh5; do
18443 case $as_dir in
18444 /*)
18445 if ("$as_dir/$as_base" -c '
18446 as_lineno_1=$LINENO
18447 as_lineno_2=$LINENO
18448 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18449 test "x$as_lineno_1" != "x$as_lineno_2" &&
18450 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018451 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18452 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018453 CONFIG_SHELL=$as_dir/$as_base
18454 export CONFIG_SHELL
18455 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18456 fi;;
18457 esac
18458 done
18459done
18460;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018461 esac
18462
Martin v. Löwis11437992002-04-12 09:54:03 +000018463 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18464 # uniformly replaced by the line number. The first 'sed' inserts a
18465 # line-number line before each line; the second 'sed' does the real
18466 # work. The second script uses 'N' to pair each line-number line
18467 # with the numbered line, and appends trailing '-' during
18468 # substitution so that $LINENO is not a special case at line end.
18469 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18470 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18471 sed '=' <$as_myself |
18472 sed '
18473 N
18474 s,$,-,
18475 : loop
18476 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18477 t loop
18478 s,-$,,
18479 s,^['$as_cr_digits']*\n,,
18480 ' >$as_me.lineno &&
18481 chmod +x $as_me.lineno ||
18482 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18483echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18484 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018485
Martin v. Löwis11437992002-04-12 09:54:03 +000018486 # Don't try to exec as it changes $[0], causing all sort of problems
18487 # (the dirname of $[0] is not the place where we might find the
18488 # original and so on. Autoconf is especially sensible to this).
18489 . ./$as_me.lineno
18490 # Exit status is that of the last command.
18491 exit
18492}
18493
18494
18495case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18496 *c*,-n*) ECHO_N= ECHO_C='
18497' ECHO_T=' ' ;;
18498 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18499 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18500esac
18501
18502if expr a : '\(a\)' >/dev/null 2>&1; then
18503 as_expr=expr
18504else
18505 as_expr=false
18506fi
18507
18508rm -f conf$$ conf$$.exe conf$$.file
18509echo >conf$$.file
18510if ln -s conf$$.file conf$$ 2>/dev/null; then
18511 # We could just check for DJGPP; but this test a) works b) is more generic
18512 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18513 if test -f conf$$.exe; then
18514 # Don't use ln at all; we don't have any links
18515 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018516 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018517 as_ln_s='ln -s'
18518 fi
18519elif ln conf$$.file conf$$ 2>/dev/null; then
18520 as_ln_s=ln
18521else
18522 as_ln_s='cp -p'
18523fi
18524rm -f conf$$ conf$$.exe conf$$.file
18525
Skip Montanaro6dead952003-09-25 14:50:04 +000018526if mkdir -p . 2>/dev/null; then
18527 as_mkdir_p=:
18528else
18529 as_mkdir_p=false
18530fi
18531
Martin v. Löwis11437992002-04-12 09:54:03 +000018532as_executable_p="test -f"
18533
18534# Sed expression to map a string onto a valid CPP name.
18535as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18536
18537# Sed expression to map a string onto a valid variable name.
18538as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18539
18540
18541# IFS
18542# We need space, tab and new line, in precisely that order.
18543as_nl='
18544'
18545IFS=" $as_nl"
18546
18547# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018548$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018549
18550exec 6>&1
18551
18552# Open the log real soon, to keep \$[0] and so on meaningful, and to
18553# report actual input values of CONFIG_FILES etc. instead of their
18554# values after options handling. Logging --version etc. is OK.
18555exec 5>>config.log
18556{
18557 echo
18558 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18559## Running $as_me. ##
18560_ASBOX
18561} >&5
18562cat >&5 <<_CSEOF
18563
Fred Drake9bd44622003-07-30 17:39:48 +000018564This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000018565generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018566
18567 CONFIG_FILES = $CONFIG_FILES
18568 CONFIG_HEADERS = $CONFIG_HEADERS
18569 CONFIG_LINKS = $CONFIG_LINKS
18570 CONFIG_COMMANDS = $CONFIG_COMMANDS
18571 $ $0 $@
18572
18573_CSEOF
18574echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18575echo >&5
18576_ACEOF
18577
18578# Files that config.status was made for.
18579if test -n "$ac_config_files"; then
18580 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18581fi
18582
18583if test -n "$ac_config_headers"; then
18584 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18585fi
18586
18587if test -n "$ac_config_links"; then
18588 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18589fi
18590
18591if test -n "$ac_config_commands"; then
18592 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18593fi
18594
18595cat >>$CONFIG_STATUS <<\_ACEOF
18596
18597ac_cs_usage="\
18598\`$as_me' instantiates files from templates according to the
18599current configuration.
18600
18601Usage: $0 [OPTIONS] [FILE]...
18602
18603 -h, --help print this help, then exit
18604 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018605 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018606 -d, --debug don't remove temporary files
18607 --recheck update $as_me by reconfiguring in the same conditions
18608 --file=FILE[:TEMPLATE]
18609 instantiate the configuration file FILE
18610 --header=FILE[:TEMPLATE]
18611 instantiate the configuration header FILE
18612
18613Configuration files:
18614$config_files
18615
18616Configuration headers:
18617$config_headers
18618
18619Report bugs to <bug-autoconf@gnu.org>."
18620_ACEOF
18621
18622cat >>$CONFIG_STATUS <<_ACEOF
18623ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018624python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000018625configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18627
18628Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18629Free Software Foundation, Inc.
18630This config.status script is free software; the Free Software Foundation
18631gives unlimited permission to copy, distribute and modify it."
18632srcdir=$srcdir
18633INSTALL="$INSTALL"
18634_ACEOF
18635
18636cat >>$CONFIG_STATUS <<\_ACEOF
18637# If no file are specified by the user, then we need to provide default
18638# value. By we need to know if files were specified by the user.
18639ac_need_defaults=:
18640while test $# != 0
18641do
18642 case $1 in
18643 --*=*)
18644 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18645 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018646 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018647 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018648 -*)
18649 ac_option=$1
18650 ac_optarg=$2
18651 ac_shift=shift
18652 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018653 *) # This is not an option, so the user has probably given explicit
18654 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018655 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018656 ac_need_defaults=false;;
18657 esac
18658
Skip Montanaro6dead952003-09-25 14:50:04 +000018659 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018660 # Handling of the options.
18661_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018662cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018663 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18664 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018665 --version | --vers* | -V )
18666 echo "$ac_cs_version"; exit 0 ;;
18667 --he | --h)
18668 # Conflict between --help and --header
18669 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18670Try \`$0 --help' for more information." >&5
18671echo "$as_me: error: ambiguous option: $1
18672Try \`$0 --help' for more information." >&2;}
18673 { (exit 1); exit 1; }; };;
18674 --help | --hel | -h )
18675 echo "$ac_cs_usage"; exit 0 ;;
18676 --debug | --d* | -d )
18677 debug=: ;;
18678 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018679 $ac_shift
18680 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018681 ac_need_defaults=false;;
18682 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018683 $ac_shift
18684 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018685 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018686 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18687 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18688 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018689
18690 # This is an error.
18691 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18692Try \`$0 --help' for more information." >&5
18693echo "$as_me: error: unrecognized option: $1
18694Try \`$0 --help' for more information." >&2;}
18695 { (exit 1); exit 1; }; } ;;
18696
18697 *) ac_config_targets="$ac_config_targets $1" ;;
18698
18699 esac
18700 shift
18701done
18702
Skip Montanaro6dead952003-09-25 14:50:04 +000018703ac_configure_extra_args=
18704
18705if $ac_cs_silent; then
18706 exec 6>/dev/null
18707 ac_configure_extra_args="$ac_configure_extra_args --silent"
18708fi
18709
18710_ACEOF
18711cat >>$CONFIG_STATUS <<_ACEOF
18712if \$ac_cs_recheck; then
18713 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18714 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18715fi
18716
Martin v. Löwis11437992002-04-12 09:54:03 +000018717_ACEOF
18718
18719
18720
18721
18722
18723cat >>$CONFIG_STATUS <<\_ACEOF
18724for ac_config_target in $ac_config_targets
18725do
18726 case "$ac_config_target" in
18727 # Handling of arguments.
18728 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18729 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18730 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18731 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18732echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18733 { (exit 1); exit 1; }; };;
18734 esac
18735done
18736
18737# If the user did not use the arguments to specify the items to instantiate,
18738# then the envvar interface is used. Set only those that are not.
18739# We use the long form for the default assignment because of an extremely
18740# bizarre bug on SunOS 4.1.3.
18741if $ac_need_defaults; then
18742 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18743 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18744fi
18745
Skip Montanaro6dead952003-09-25 14:50:04 +000018746# Have a temporary directory for convenience. Make it in the build tree
18747# simply because there is no reason to put it here, and in addition,
18748# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018749# Create a temporary directory, and hook for its removal unless debugging.
18750$debug ||
18751{
18752 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18753 trap '{ (exit 1); exit 1; }' 1 2 13 15
18754}
18755
18756# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018757
Martin v. Löwis11437992002-04-12 09:54:03 +000018758{
Skip Montanaro6dead952003-09-25 14:50:04 +000018759 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018760 test -n "$tmp" && test -d "$tmp"
18761} ||
18762{
Skip Montanaro6dead952003-09-25 14:50:04 +000018763 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018764 (umask 077 && mkdir $tmp)
18765} ||
18766{
Skip Montanaro6dead952003-09-25 14:50:04 +000018767 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018768 { (exit 1); exit 1; }
18769}
18770
18771_ACEOF
18772
18773cat >>$CONFIG_STATUS <<_ACEOF
18774
18775#
18776# CONFIG_FILES section.
18777#
18778
18779# No need to generate the scripts if there are no CONFIG_FILES.
18780# This happens for instance when ./config.status config.h
18781if test -n "\$CONFIG_FILES"; then
18782 # Protect against being on the right side of a sed subst in config.status.
18783 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18784 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18785s,@SHELL@,$SHELL,;t t
18786s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18787s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18788s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18789s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18790s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18791s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18792s,@exec_prefix@,$exec_prefix,;t t
18793s,@prefix@,$prefix,;t t
18794s,@program_transform_name@,$program_transform_name,;t t
18795s,@bindir@,$bindir,;t t
18796s,@sbindir@,$sbindir,;t t
18797s,@libexecdir@,$libexecdir,;t t
18798s,@datadir@,$datadir,;t t
18799s,@sysconfdir@,$sysconfdir,;t t
18800s,@sharedstatedir@,$sharedstatedir,;t t
18801s,@localstatedir@,$localstatedir,;t t
18802s,@libdir@,$libdir,;t t
18803s,@includedir@,$includedir,;t t
18804s,@oldincludedir@,$oldincludedir,;t t
18805s,@infodir@,$infodir,;t t
18806s,@mandir@,$mandir,;t t
18807s,@build_alias@,$build_alias,;t t
18808s,@host_alias@,$host_alias,;t t
18809s,@target_alias@,$target_alias,;t t
18810s,@DEFS@,$DEFS,;t t
18811s,@ECHO_C@,$ECHO_C,;t t
18812s,@ECHO_N@,$ECHO_N,;t t
18813s,@ECHO_T@,$ECHO_T,;t t
18814s,@LIBS@,$LIBS,;t t
18815s,@VERSION@,$VERSION,;t t
18816s,@SOVERSION@,$SOVERSION,;t t
18817s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18818s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18819s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18820s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18821s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18822s,@MACHDEP@,$MACHDEP,;t t
18823s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018824s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018825s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018826s,@CXX@,$CXX,;t t
18827s,@MAINOBJ@,$MAINOBJ,;t t
18828s,@EXEEXT@,$EXEEXT,;t t
18829s,@CC@,$CC,;t t
18830s,@CFLAGS@,$CFLAGS,;t t
18831s,@LDFLAGS@,$LDFLAGS,;t t
18832s,@CPPFLAGS@,$CPPFLAGS,;t t
18833s,@ac_ct_CC@,$ac_ct_CC,;t t
18834s,@OBJEXT@,$OBJEXT,;t t
18835s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018836s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018837s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18838s,@LIBRARY@,$LIBRARY,;t t
18839s,@LDLIBRARY@,$LDLIBRARY,;t t
18840s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18841s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18842s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18843s,@INSTSONAME@,$INSTSONAME,;t t
18844s,@RUNSHARED@,$RUNSHARED,;t t
18845s,@LINKCC@,$LINKCC,;t t
18846s,@RANLIB@,$RANLIB,;t t
18847s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18848s,@AR@,$AR,;t t
18849s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18850s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18851s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18852s,@LN@,$LN,;t t
18853s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018854s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018855s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18856s,@SO@,$SO,;t t
18857s,@LDSHARED@,$LDSHARED,;t t
18858s,@BLDSHARED@,$BLDSHARED,;t t
18859s,@CCSHARED@,$CCSHARED,;t t
18860s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18861s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018862s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018863s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18864s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18865s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18866s,@LDLAST@,$LDLAST,;t t
18867s,@THREADOBJ@,$THREADOBJ,;t t
18868s,@DLINCLDIR@,$DLINCLDIR,;t t
18869s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18870s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018871s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018872s,@LIBOBJS@,$LIBOBJS,;t t
18873s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18874s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18875s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18876s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18877s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18878s,@LIBM@,$LIBM,;t t
18879s,@LIBC@,$LIBC,;t t
18880s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18881s,@THREADHEADERS@,$THREADHEADERS,;t t
18882s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018883s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018884CEOF
18885
18886_ACEOF
18887
18888 cat >>$CONFIG_STATUS <<\_ACEOF
18889 # Split the substitutions into bite-sized pieces for seds with
18890 # small command number limits, like on Digital OSF/1 and HP-UX.
18891 ac_max_sed_lines=48
18892 ac_sed_frag=1 # Number of current file.
18893 ac_beg=1 # First line for current file.
18894 ac_end=$ac_max_sed_lines # Line after last line for current file.
18895 ac_more_lines=:
18896 ac_sed_cmds=
18897 while $ac_more_lines; do
18898 if test $ac_beg -gt 1; then
18899 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18900 else
18901 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18902 fi
18903 if test ! -s $tmp/subs.frag; then
18904 ac_more_lines=false
18905 else
18906 # The purpose of the label and of the branching condition is to
18907 # speed up the sed processing (if there are no `@' at all, there
18908 # is no need to browse any of the substitutions).
18909 # These are the two extra sed commands mentioned above.
18910 (echo ':t
18911 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18912 if test -z "$ac_sed_cmds"; then
18913 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18914 else
18915 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18916 fi
18917 ac_sed_frag=`expr $ac_sed_frag + 1`
18918 ac_beg=$ac_end
18919 ac_end=`expr $ac_end + $ac_max_sed_lines`
18920 fi
18921 done
18922 if test -z "$ac_sed_cmds"; then
18923 ac_sed_cmds=cat
18924 fi
18925fi # test -n "$CONFIG_FILES"
18926
18927_ACEOF
18928cat >>$CONFIG_STATUS <<\_ACEOF
18929for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18930 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18931 case $ac_file in
18932 - | *:- | *:-:* ) # input from stdin
18933 cat >$tmp/stdin
18934 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18935 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18936 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18937 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18938 * ) ac_file_in=$ac_file.in ;;
18939 esac
18940
18941 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18942 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18943$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18944 X"$ac_file" : 'X\(//\)[^/]' \| \
18945 X"$ac_file" : 'X\(//\)$' \| \
18946 X"$ac_file" : 'X\(/\)' \| \
18947 . : '\(.\)' 2>/dev/null ||
18948echo X"$ac_file" |
18949 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18950 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18951 /^X\(\/\/\)$/{ s//\1/; q; }
18952 /^X\(\/\).*/{ s//\1/; q; }
18953 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018954 { if $as_mkdir_p; then
18955 mkdir -p "$ac_dir"
18956 else
18957 as_dir="$ac_dir"
18958 as_dirs=
18959 while test ! -d "$as_dir"; do
18960 as_dirs="$as_dir $as_dirs"
18961 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18962$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18963 X"$as_dir" : 'X\(//\)[^/]' \| \
18964 X"$as_dir" : 'X\(//\)$' \| \
18965 X"$as_dir" : 'X\(/\)' \| \
18966 . : '\(.\)' 2>/dev/null ||
18967echo X"$as_dir" |
18968 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18969 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18970 /^X\(\/\/\)$/{ s//\1/; q; }
18971 /^X\(\/\).*/{ s//\1/; q; }
18972 s/.*/./; q'`
18973 done
18974 test ! -n "$as_dirs" || mkdir $as_dirs
18975 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18976echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18977 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018978
18979 ac_builddir=.
18980
18981if test "$ac_dir" != .; then
18982 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18983 # A "../" for each directory in $ac_dir_suffix.
18984 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18985else
18986 ac_dir_suffix= ac_top_builddir=
18987fi
18988
18989case $srcdir in
18990 .) # No --srcdir option. We are building in place.
18991 ac_srcdir=.
18992 if test -z "$ac_top_builddir"; then
18993 ac_top_srcdir=.
18994 else
18995 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18996 fi ;;
18997 [\\/]* | ?:[\\/]* ) # Absolute path.
18998 ac_srcdir=$srcdir$ac_dir_suffix;
18999 ac_top_srcdir=$srcdir ;;
19000 *) # Relative path.
19001 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19002 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19003esac
19004# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19005# absolute.
19006ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000019007ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000019008ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19009ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19010
19011
19012 case $INSTALL in
19013 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19014 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19015 esac
19016
19017 if test x"$ac_file" != x-; then
19018 { echo "$as_me:$LINENO: creating $ac_file" >&5
19019echo "$as_me: creating $ac_file" >&6;}
19020 rm -f "$ac_file"
19021 fi
19022 # Let's still pretend it is `configure' which instantiates (i.e., don't
19023 # use $as_me), people would be surprised to read:
19024 # /* config.h. Generated by config.status. */
19025 if test x"$ac_file" = x-; then
19026 configure_input=
19027 else
19028 configure_input="$ac_file. "
19029 fi
19030 configure_input=$configure_input"Generated from `echo $ac_file_in |
19031 sed 's,.*/,,'` by configure."
19032
19033 # First look for the input files in the build tree, otherwise in the
19034 # src tree.
19035 ac_file_inputs=`IFS=:
19036 for f in $ac_file_in; do
19037 case $f in
19038 -) echo $tmp/stdin ;;
19039 [\\/$]*)
19040 # Absolute (can't be DOS-style, as IFS=:)
19041 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19042echo "$as_me: error: cannot find input file: $f" >&2;}
19043 { (exit 1); exit 1; }; }
19044 echo $f;;
19045 *) # Relative
19046 if test -f "$f"; then
19047 # Build tree
19048 echo $f
19049 elif test -f "$srcdir/$f"; then
19050 # Source tree
19051 echo $srcdir/$f
19052 else
19053 # /dev/null tree
19054 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19055echo "$as_me: error: cannot find input file: $f" >&2;}
19056 { (exit 1); exit 1; }; }
19057 fi;;
19058 esac
19059 done` || { (exit 1); exit 1; }
19060_ACEOF
19061cat >>$CONFIG_STATUS <<_ACEOF
19062 sed "$ac_vpsub
19063$extrasub
19064_ACEOF
19065cat >>$CONFIG_STATUS <<\_ACEOF
19066:t
19067/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19068s,@configure_input@,$configure_input,;t t
19069s,@srcdir@,$ac_srcdir,;t t
19070s,@abs_srcdir@,$ac_abs_srcdir,;t t
19071s,@top_srcdir@,$ac_top_srcdir,;t t
19072s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19073s,@builddir@,$ac_builddir,;t t
19074s,@abs_builddir@,$ac_abs_builddir,;t t
19075s,@top_builddir@,$ac_top_builddir,;t t
19076s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19077s,@INSTALL@,$ac_INSTALL,;t t
19078" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19079 rm -f $tmp/stdin
19080 if test x"$ac_file" != x-; then
19081 mv $tmp/out $ac_file
19082 else
19083 cat $tmp/out
19084 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019085 fi
19086
Martin v. Löwis11437992002-04-12 09:54:03 +000019087done
19088_ACEOF
19089cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019090
Martin v. Löwis11437992002-04-12 09:54:03 +000019091#
19092# CONFIG_HEADER section.
19093#
Guido van Rossum627b2d71993-12-24 10:39:16 +000019094
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019095# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19096# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000019097#
19098# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000019099ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19100ac_dB='[ ].*$,\1#\2'
19101ac_dC=' '
19102ac_dD=',;t'
19103# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19104ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19105ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019106ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000019107ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019108
Martin v. Löwis11437992002-04-12 09:54:03 +000019109for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000019110 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000019111 case $ac_file in
19112 - | *:- | *:-:* ) # input from stdin
19113 cat >$tmp/stdin
19114 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19115 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19116 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19117 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19118 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019119 esac
19120
Martin v. Löwis11437992002-04-12 09:54:03 +000019121 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19122echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019123
Martin v. Löwis11437992002-04-12 09:54:03 +000019124 # First look for the input files in the build tree, otherwise in the
19125 # src tree.
19126 ac_file_inputs=`IFS=:
19127 for f in $ac_file_in; do
19128 case $f in
19129 -) echo $tmp/stdin ;;
19130 [\\/$]*)
19131 # Absolute (can't be DOS-style, as IFS=:)
19132 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19133echo "$as_me: error: cannot find input file: $f" >&2;}
19134 { (exit 1); exit 1; }; }
19135 echo $f;;
19136 *) # Relative
19137 if test -f "$f"; then
19138 # Build tree
19139 echo $f
19140 elif test -f "$srcdir/$f"; then
19141 # Source tree
19142 echo $srcdir/$f
19143 else
19144 # /dev/null tree
19145 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19146echo "$as_me: error: cannot find input file: $f" >&2;}
19147 { (exit 1); exit 1; }; }
19148 fi;;
19149 esac
19150 done` || { (exit 1); exit 1; }
19151 # Remove the trailing spaces.
19152 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019153
Martin v. Löwis11437992002-04-12 09:54:03 +000019154_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019155
Martin v. Löwis11437992002-04-12 09:54:03 +000019156# Transform confdefs.h into two sed scripts, `conftest.defines' and
19157# `conftest.undefs', that substitutes the proper values into
19158# config.h.in to produce config.h. The first handles `#define'
19159# templates, and the second `#undef' templates.
19160# And first: Protect against being on the right side of a sed subst in
19161# config.status. Protect against being in an unquoted here document
19162# in config.status.
19163rm -f conftest.defines conftest.undefs
19164# Using a here document instead of a string reduces the quoting nightmare.
19165# Putting comments in sed scripts is not portable.
19166#
19167# `end' is used to avoid that the second main sed command (meant for
19168# 0-ary CPP macros) applies to n-ary macro definitions.
19169# See the Autoconf documentation for `clear'.
19170cat >confdef2sed.sed <<\_ACEOF
19171s/[\\&,]/\\&/g
19172s,[\\$`],\\&,g
19173t clear
19174: clear
19175s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19176t end
19177s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19178: end
19179_ACEOF
19180# If some macros were called several times there might be several times
19181# the same #defines, which is useless. Nevertheless, we may not want to
19182# sort them, since we want the *last* AC-DEFINE to be honored.
19183uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19184sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19185rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019186
19187# This sed command replaces #undef with comments. This is necessary, for
19188# example, in the case of _POSIX_SOURCE, which is predefined and required
19189# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019190cat >>conftest.undefs <<\_ACEOF
19191s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19192_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019193
Martin v. Löwis11437992002-04-12 09:54:03 +000019194# Break up conftest.defines because some shells have a limit on the size
19195# of here documents, and old seds have small limits too (100 cmds).
19196echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019197echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019198echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19199echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019200rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019201while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019202do
Martin v. Löwis11437992002-04-12 09:54:03 +000019203 # Write a limited-size here document to $tmp/defines.sed.
19204 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19205 # Speed up: don't consider the non `#define' lines.
19206 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19207 # Work around the forget-to-reset-the-flag bug.
19208 echo 't clr' >>$CONFIG_STATUS
19209 echo ': clr' >>$CONFIG_STATUS
19210 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019211 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019212 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19213 rm -f $tmp/in
19214 mv $tmp/out $tmp/in
19215' >>$CONFIG_STATUS
19216 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19217 rm -f conftest.defines
19218 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019219done
Martin v. Löwis11437992002-04-12 09:54:03 +000019220rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019221echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019222echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019223
Martin v. Löwis11437992002-04-12 09:54:03 +000019224# Break up conftest.undefs because some shells have a limit on the size
19225# of here documents, and old seds have small limits too (100 cmds).
19226echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19227rm -f conftest.tail
19228while grep . conftest.undefs >/dev/null
19229do
19230 # Write a limited-size here document to $tmp/undefs.sed.
19231 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19232 # Speed up: don't consider the non `#undef'
19233 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19234 # Work around the forget-to-reset-the-flag bug.
19235 echo 't clr' >>$CONFIG_STATUS
19236 echo ': clr' >>$CONFIG_STATUS
19237 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19238 echo 'CEOF
19239 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19240 rm -f $tmp/in
19241 mv $tmp/out $tmp/in
19242' >>$CONFIG_STATUS
19243 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19244 rm -f conftest.undefs
19245 mv conftest.tail conftest.undefs
19246done
19247rm -f conftest.undefs
19248
19249cat >>$CONFIG_STATUS <<\_ACEOF
19250 # Let's still pretend it is `configure' which instantiates (i.e., don't
19251 # use $as_me), people would be surprised to read:
19252 # /* config.h. Generated by config.status. */
19253 if test x"$ac_file" = x-; then
19254 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019255 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019256 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019257 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019258 cat $tmp/in >>$tmp/config.h
19259 rm -f $tmp/in
19260 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019261 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019262 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19263echo "$as_me: $ac_file is unchanged" >&6;}
19264 else
19265 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19266$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19267 X"$ac_file" : 'X\(//\)[^/]' \| \
19268 X"$ac_file" : 'X\(//\)$' \| \
19269 X"$ac_file" : 'X\(/\)' \| \
19270 . : '\(.\)' 2>/dev/null ||
19271echo X"$ac_file" |
19272 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19273 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19274 /^X\(\/\/\)$/{ s//\1/; q; }
19275 /^X\(\/\).*/{ s//\1/; q; }
19276 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019277 { if $as_mkdir_p; then
19278 mkdir -p "$ac_dir"
19279 else
19280 as_dir="$ac_dir"
19281 as_dirs=
19282 while test ! -d "$as_dir"; do
19283 as_dirs="$as_dir $as_dirs"
19284 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19285$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19286 X"$as_dir" : 'X\(//\)[^/]' \| \
19287 X"$as_dir" : 'X\(//\)$' \| \
19288 X"$as_dir" : 'X\(/\)' \| \
19289 . : '\(.\)' 2>/dev/null ||
19290echo X"$as_dir" |
19291 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19292 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19293 /^X\(\/\/\)$/{ s//\1/; q; }
19294 /^X\(\/\).*/{ s//\1/; q; }
19295 s/.*/./; q'`
19296 done
19297 test ! -n "$as_dirs" || mkdir $as_dirs
19298 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19299echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19300 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019301
Martin v. Löwis11437992002-04-12 09:54:03 +000019302 rm -f $ac_file
19303 mv $tmp/config.h $ac_file
19304 fi
19305 else
19306 cat $tmp/config.h
19307 rm -f $tmp/config.h
19308 fi
19309done
19310_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019311
Martin v. Löwis11437992002-04-12 09:54:03 +000019312cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019313
Martin v. Löwis11437992002-04-12 09:54:03 +000019314{ (exit 0); exit 0; }
19315_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019316chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019317ac_clean_files=$ac_clean_files_save
19318
19319
19320# configure is writing to config.log, and then calls config.status.
19321# config.status does its own redirection, appending to config.log.
19322# Unfortunately, on DOS this fails, as config.log is still kept open
19323# by configure, so config.status won't be able to write to it; its
19324# output is simply discarded. So we exec the FD to /dev/null,
19325# effectively closing config.log, so it can be properly (re)opened and
19326# appended to by config.status. When coming back to configure, we
19327# need to make the FD available again.
19328if test "$no_create" != yes; then
19329 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019330 ac_config_status_args=
19331 test "$silent" = yes &&
19332 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019333 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019334 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019335 exec 5>>config.log
19336 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19337 # would make configure fail if this is the last instruction.
19338 $ac_cs_success || { (exit 1); exit 1; }
19339fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019340
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019341
19342echo "creating Setup"
19343if test ! -f Modules/Setup
19344then
19345 cp $srcdir/Modules/Setup.dist Modules/Setup
19346fi
19347
19348echo "creating Setup.local"
19349if test ! -f Modules/Setup.local
19350then
19351 echo "# Edit this file for local setup changes" >Modules/Setup.local
19352fi
19353
19354echo "creating Makefile"
19355$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19356 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019357 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019358mv config.c Modules