blob: 7b1282ca852b75e7c4691b0385ea36d6861d49c2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002# From configure.in Revision: 1.440 .
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öwis11437992002-04-12 09:54:03 +00003010echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3011echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3012if test "${ac_cv_header_stdc+set}" = set; then
3013 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003014else
Martin v. Löwis11437992002-04-12 09:54:03 +00003015 cat >conftest.$ac_ext <<_ACEOF
3016#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003017/* confdefs.h. */
3018_ACEOF
3019cat confdefs.h >>conftest.$ac_ext
3020cat >>conftest.$ac_ext <<_ACEOF
3021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003022#include <stdlib.h>
3023#include <stdarg.h>
3024#include <string.h>
3025#include <float.h>
3026
Skip Montanaro6dead952003-09-25 14:50:04 +00003027int
3028main ()
3029{
3030
3031 ;
3032 return 0;
3033}
Martin v. Löwis11437992002-04-12 09:54:03 +00003034_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003035rm -f conftest.$ac_objext
3036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3037 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003038 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00003039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003040 (exit $ac_status); } &&
3041 { ac_try='test -s conftest.$ac_objext'
3042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3043 (eval $ac_try) 2>&5
3044 ac_status=$?
3045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3046 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003047 ac_cv_header_stdc=yes
3048else
3049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003050sed 's/^/| /' conftest.$ac_ext >&5
3051
3052ac_cv_header_stdc=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003053fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003054rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003055
3056if test $ac_cv_header_stdc = yes; then
3057 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3058 cat >conftest.$ac_ext <<_ACEOF
3059#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003060/* confdefs.h. */
3061_ACEOF
3062cat confdefs.h >>conftest.$ac_ext
3063cat >>conftest.$ac_ext <<_ACEOF
3064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003065#include <string.h>
3066
3067_ACEOF
3068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003069 $EGREP "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003070 :
3071else
3072 ac_cv_header_stdc=no
3073fi
3074rm -f conftest*
3075
3076fi
3077
3078if test $ac_cv_header_stdc = yes; then
3079 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3080 cat >conftest.$ac_ext <<_ACEOF
3081#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003082/* confdefs.h. */
3083_ACEOF
3084cat confdefs.h >>conftest.$ac_ext
3085cat >>conftest.$ac_ext <<_ACEOF
3086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003087#include <stdlib.h>
3088
3089_ACEOF
3090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003091 $EGREP "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003092 :
3093else
3094 ac_cv_header_stdc=no
3095fi
3096rm -f conftest*
3097
3098fi
3099
3100if test $ac_cv_header_stdc = yes; then
3101 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3102 if test "$cross_compiling" = yes; then
3103 :
3104else
3105 cat >conftest.$ac_ext <<_ACEOF
3106#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003107/* confdefs.h. */
3108_ACEOF
3109cat confdefs.h >>conftest.$ac_ext
3110cat >>conftest.$ac_ext <<_ACEOF
3111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003112#include <ctype.h>
3113#if ((' ' & 0x0FF) == 0x020)
3114# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3115# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3116#else
Skip Montanaro6dead952003-09-25 14:50:04 +00003117# define ISLOWER(c) \
3118 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00003119 || ('j' <= (c) && (c) <= 'r') \
3120 || ('s' <= (c) && (c) <= 'z'))
3121# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3122#endif
3123
3124#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3125int
3126main ()
3127{
3128 int i;
3129 for (i = 0; i < 256; i++)
3130 if (XOR (islower (i), ISLOWER (i))
3131 || toupper (i) != TOUPPER (i))
3132 exit(2);
3133 exit (0);
3134}
3135_ACEOF
3136rm -f conftest$ac_exeext
3137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3138 (eval $ac_link) 2>&5
3139 ac_status=$?
3140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3141 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3143 (eval $ac_try) 2>&5
3144 ac_status=$?
3145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3146 (exit $ac_status); }; }; then
3147 :
3148else
3149 echo "$as_me: program exited with status $ac_status" >&5
3150echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003151sed 's/^/| /' conftest.$ac_ext >&5
3152
Martin v. Löwis11437992002-04-12 09:54:03 +00003153( exit $ac_status )
3154ac_cv_header_stdc=no
3155fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003156rm -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 +00003157fi
3158fi
3159fi
3160echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3161echo "${ECHO_T}$ac_cv_header_stdc" >&6
3162if test $ac_cv_header_stdc = yes; then
3163
3164cat >>confdefs.h <<\_ACEOF
3165#define STDC_HEADERS 1
3166_ACEOF
3167
3168fi
3169
3170# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3181 inttypes.h stdint.h unistd.h
3182do
3183as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3184echo "$as_me:$LINENO: checking for $ac_header" >&5
3185echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3186if eval "test \"\${$as_ac_Header+set}\" = set"; then
3187 echo $ECHO_N "(cached) $ECHO_C" >&6
3188else
3189 cat >conftest.$ac_ext <<_ACEOF
3190#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003191/* confdefs.h. */
3192_ACEOF
3193cat confdefs.h >>conftest.$ac_ext
3194cat >>conftest.$ac_ext <<_ACEOF
3195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003196$ac_includes_default
3197
3198#include <$ac_header>
3199_ACEOF
3200rm -f conftest.$ac_objext
3201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3202 (eval $ac_compile) 2>&5
3203 ac_status=$?
3204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3205 (exit $ac_status); } &&
3206 { ac_try='test -s conftest.$ac_objext'
3207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3208 (eval $ac_try) 2>&5
3209 ac_status=$?
3210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3211 (exit $ac_status); }; }; then
3212 eval "$as_ac_Header=yes"
3213else
3214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003215sed 's/^/| /' conftest.$ac_ext >&5
3216
Martin v. Löwis11437992002-04-12 09:54:03 +00003217eval "$as_ac_Header=no"
3218fi
3219rm -f conftest.$ac_objext conftest.$ac_ext
3220fi
3221echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3222echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3223if test `eval echo '${'$as_ac_Header'}'` = yes; then
3224 cat >>confdefs.h <<_ACEOF
3225#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3226_ACEOF
3227
3228fi
3229
3230done
3231
3232
3233if test "${ac_cv_header_minix_config_h+set}" = set; then
3234 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3235echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3236if test "${ac_cv_header_minix_config_h+set}" = set; then
3237 echo $ECHO_N "(cached) $ECHO_C" >&6
3238fi
3239echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3240echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3241else
3242 # Is the header compilable?
3243echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3244echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3245cat >conftest.$ac_ext <<_ACEOF
3246#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003247/* confdefs.h. */
3248_ACEOF
3249cat confdefs.h >>conftest.$ac_ext
3250cat >>conftest.$ac_ext <<_ACEOF
3251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003252$ac_includes_default
3253#include <minix/config.h>
3254_ACEOF
3255rm -f conftest.$ac_objext
3256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3257 (eval $ac_compile) 2>&5
3258 ac_status=$?
3259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3260 (exit $ac_status); } &&
3261 { ac_try='test -s conftest.$ac_objext'
3262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3263 (eval $ac_try) 2>&5
3264 ac_status=$?
3265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3266 (exit $ac_status); }; }; then
3267 ac_header_compiler=yes
3268else
3269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003270sed 's/^/| /' conftest.$ac_ext >&5
3271
Martin v. Löwis11437992002-04-12 09:54:03 +00003272ac_header_compiler=no
3273fi
3274rm -f conftest.$ac_objext conftest.$ac_ext
3275echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3276echo "${ECHO_T}$ac_header_compiler" >&6
3277
3278# Is the header present?
3279echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3280echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3281cat >conftest.$ac_ext <<_ACEOF
3282#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003283/* confdefs.h. */
3284_ACEOF
3285cat confdefs.h >>conftest.$ac_ext
3286cat >>conftest.$ac_ext <<_ACEOF
3287/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003288#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003289_ACEOF
3290if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3291 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3292 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003293 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003294 rm -f conftest.er1
3295 cat conftest.err >&5
3296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3297 (exit $ac_status); } >/dev/null; then
3298 if test -s conftest.err; then
3299 ac_cpp_err=$ac_c_preproc_warn_flag
3300 else
3301 ac_cpp_err=
3302 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003303else
Martin v. Löwis11437992002-04-12 09:54:03 +00003304 ac_cpp_err=yes
3305fi
3306if test -z "$ac_cpp_err"; then
3307 ac_header_preproc=yes
3308else
3309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003310sed 's/^/| /' conftest.$ac_ext >&5
3311
Martin v. Löwis11437992002-04-12 09:54:03 +00003312 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003313fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003314rm -f conftest.err conftest.$ac_ext
3315echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3316echo "${ECHO_T}$ac_header_preproc" >&6
3317
3318# So? What about this header?
3319case $ac_header_compiler:$ac_header_preproc in
3320 yes:no )
3321 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3322echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3323 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003324echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3325 (
3326 cat <<\_ASBOX
3327## ------------------------------------ ##
3328## Report this to bug-autoconf@gnu.org. ##
3329## ------------------------------------ ##
3330_ASBOX
3331 ) |
3332 sed "s/^/$as_me: WARNING: /" >&2
3333 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003334 no:yes )
3335 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3336echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3337 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3338echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3339 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003340echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3341 (
3342 cat <<\_ASBOX
3343## ------------------------------------ ##
3344## Report this to bug-autoconf@gnu.org. ##
3345## ------------------------------------ ##
3346_ASBOX
3347 ) |
3348 sed "s/^/$as_me: WARNING: /" >&2
3349 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003350esac
3351echo "$as_me:$LINENO: checking for minix/config.h" >&5
3352echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3353if test "${ac_cv_header_minix_config_h+set}" = set; then
3354 echo $ECHO_N "(cached) $ECHO_C" >&6
3355else
3356 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003358echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3359echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3360
3361fi
3362if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003363 MINIX=yes
3364else
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003366fi
3367
Martin v. Löwis11437992002-04-12 09:54:03 +00003368
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003369if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003370
3371cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003372#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003373_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003374
Martin v. Löwis11437992002-04-12 09:54:03 +00003375
3376cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003377#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003378_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003379
Martin v. Löwis11437992002-04-12 09:54:03 +00003380
3381cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003382#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003383_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003384
3385fi
3386
3387
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003388# Check for unsupported systems
3389case $ac_sys_system/$ac_sys_release in
3390SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3391 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3392 echo See README for details.
3393 exit 1;;
3394esac
3395
3396if test "$MINIX" = yes; then
3397 echo This system \(MINIX\) is no longer supported.
3398 echo Read README for details.
3399 exit 1
3400fi
3401
Michael W. Hudson54241132001-12-07 15:38:26 +00003402
Martin v. Löwis11437992002-04-12 09:54:03 +00003403echo "$as_me:$LINENO: checking for --with-suffix" >&5
3404echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003405
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003406# Check whether --with-suffix or --without-suffix was given.
3407if test "${with_suffix+set}" = set; then
3408 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003409
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003410 case $withval in
3411 no) EXEEXT=;;
3412 yes) EXEEXT=.exe;;
3413 *) EXEEXT=$withval;;
3414 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003415fi;
3416echo "$as_me:$LINENO: result: $EXEEXT" >&5
3417echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003418
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003419# Test whether we're running on a non-case-sensitive system, in which
3420# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003421
Martin v. Löwis11437992002-04-12 09:54:03 +00003422echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3423echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003424if test ! -d CaseSensitiveTestDir; then
3425mkdir CaseSensitiveTestDir
3426fi
3427
3428if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003429then
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 echo "$as_me:$LINENO: result: yes" >&5
3431echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003432 BUILDEXEEXT=.exe
3433else
Martin v. Löwis11437992002-04-12 09:54:03 +00003434 echo "$as_me:$LINENO: result: no" >&5
3435echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003436 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003437fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003438rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003439
Guido van Rossumdd997f71998-10-07 19:58:26 +00003440case $MACHDEP in
3441bsdos*)
3442 case $CC in
3443 gcc) CC="$CC -D_HAVE_BSDI";;
3444 esac;;
3445esac
3446
Guido van Rossum24b1e751997-08-21 02:29:16 +00003447case $ac_sys_system in
3448hp*|HP*)
3449 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003450 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003451 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003452Monterey*)
3453 case $CC in
3454 cc) CC="$CC -Wl,-Bexport";;
3455 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003456SunOS*)
3457 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003458
3459cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003460#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003461_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003462
3463 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003464esac
3465
Michael W. Hudson54241132001-12-07 15:38:26 +00003466
3467
Martin v. Löwis11437992002-04-12 09:54:03 +00003468echo "$as_me:$LINENO: checking LIBRARY" >&5
3469echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003470if test -z "$LIBRARY"
3471then
3472 LIBRARY='libpython$(VERSION).a'
3473fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003474echo "$as_me:$LINENO: result: $LIBRARY" >&5
3475echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003476
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003477# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003478# name of the library into which to insert object files). BLDLIBRARY is also
3479# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3480# is blank as the main program is not linked directly against LDLIBRARY.
3481# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3482# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3483# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3484# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003485#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003486# RUNSHARED is used to run shared python without installed libraries
3487#
3488# INSTSONAME is the name of the shared library that will be use to install
3489# on the system - some systems like version suffix, others don't
3490
3491
Michael W. Hudson54241132001-12-07 15:38:26 +00003492
3493
3494
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003495
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003496LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003497BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003498INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003499DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003500LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003501RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003502
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003503# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003504# If CXX is set, and if it is needed to link a main function that was
3505# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3506# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003507# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003508# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510echo "$as_me:$LINENO: checking LINKCC" >&5
3511echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003512if test -z "$LINKCC"
3513then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003514 if test -z "$CXX"; then
3515 LINKCC="\$(PURIFY) \$(CC)"
3516 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003517 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003518 $CXX -c conftest.$ac_ext 2>&5
3519 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3520 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3521 then
3522 LINKCC="\$(PURIFY) \$(CC)"
3523 else
3524 LINKCC="\$(PURIFY) \$(CXX)"
3525 fi
3526 rm -fr conftest*
3527 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003528 case $ac_sys_system in
3529 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003530 exp_extra="\"\""
3531 if test $ac_sys_release -ge 5 -o \
3532 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3533 exp_extra="."
3534 fi
3535 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003536 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003537 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003538 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003539 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003540 esac
3541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003542echo "$as_me:$LINENO: result: $LINKCC" >&5
3543echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003544
Martin v. Löwis11437992002-04-12 09:54:03 +00003545echo "$as_me:$LINENO: checking for --enable-shared" >&5
3546echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003547# Check whether --enable-shared or --disable-shared was given.
3548if test "${enable_shared+set}" = set; then
3549 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003550
Martin v. Löwis11437992002-04-12 09:54:03 +00003551fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003552
3553if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003554then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003555 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003556 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003557 enable_shared="yes";;
3558 *)
3559 enable_shared="no";;
3560 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003562echo "$as_me:$LINENO: result: $enable_shared" >&5
3563echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003564
3565
Martin v. Löwis11437992002-04-12 09:54:03 +00003566echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3567echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003568
Guido van Rossumb8552162001-09-05 14:58:11 +00003569# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3570# library that we build, but we do not want to link against it (we
3571# will find it with a -framework option). For this reason there is an
3572# extra variable BLDLIBRARY against which Python and the extension
3573# modules are linked, BLDLIBRARY. This is normally the same as
3574# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003575if test "$enable_framework"
3576then
3577 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003578 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003579 BLDLIBRARY=''
3580else
3581 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003582fi
Jack Jansene578a632001-08-15 01:27:14 +00003583
Martin v. Löwis1142de32002-03-29 16:28:31 +00003584# Other platforms follow
3585if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003586
3587cat >>confdefs.h <<\_ACEOF
3588#define Py_ENABLE_SHARED 1
3589_ACEOF
3590
Martin v. Löwis1142de32002-03-29 16:28:31 +00003591 case $ac_sys_system in
3592 BeOS*)
3593 LDLIBRARY='libpython$(VERSION).so'
3594 ;;
3595 CYGWIN*)
3596 LDLIBRARY='libpython$(VERSION).dll.a'
3597 DLLLIBRARY='libpython$(VERSION).dll'
3598 ;;
3599 SunOS*)
3600 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003601 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003602 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003603 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003604 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003605 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003606 LDLIBRARY='libpython$(VERSION).so'
3607 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003608 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003609 INSTSONAME="$LDLIBRARY".$SOVERSION
3610 ;;
3611 hp*|HP*)
3612 LDLIBRARY='libpython$(VERSION).sl'
3613 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003614 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003615 ;;
3616 OSF*)
3617 LDLIBRARY='libpython$(VERSION).so'
3618 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003619 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003620 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003621 atheos*)
3622 LDLIBRARY='libpython$(VERSION).so'
3623 BLDLIBRARY='-L. -lpython$(VERSION)'
3624 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3625 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003626 esac
3627 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3628 case $MACHDEP in
3629 dguxR4)
3630 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003631 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003632 ;;
3633 esac
Jason Tishler30765592003-09-04 11:04:06 +00003634else # shared is disabled
3635 case $ac_sys_system in
3636 CYGWIN*)
3637 BLDLIBRARY='$(LIBRARY)'
3638 LDLIBRARY='libpython$(VERSION).dll.a'
3639 ;;
3640 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003641fi
3642
Martin v. Löwis11437992002-04-12 09:54:03 +00003643echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3644echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646if test -n "$ac_tool_prefix"; then
3647 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3648set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3649echo "$as_me:$LINENO: checking for $ac_word" >&5
3650echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3651if test "${ac_cv_prog_RANLIB+set}" = set; then
3652 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003653else
3654 if test -n "$RANLIB"; then
3655 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3656else
Martin v. Löwis11437992002-04-12 09:54:03 +00003657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3658for as_dir in $PATH
3659do
3660 IFS=$as_save_IFS
3661 test -z "$as_dir" && as_dir=.
3662 for ac_exec_ext in '' $ac_executable_extensions; do
3663 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3664 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3665 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3666 break 2
3667 fi
3668done
3669done
3670
Guido van Rossum627b2d71993-12-24 10:39:16 +00003671fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003672fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003673RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003674if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 echo "$as_me:$LINENO: result: $RANLIB" >&5
3676echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003677else
Martin v. Löwis11437992002-04-12 09:54:03 +00003678 echo "$as_me:$LINENO: result: no" >&5
3679echo "${ECHO_T}no" >&6
3680fi
3681
3682fi
3683if test -z "$ac_cv_prog_RANLIB"; then
3684 ac_ct_RANLIB=$RANLIB
3685 # Extract the first word of "ranlib", so it can be a program name with args.
3686set dummy ranlib; ac_word=$2
3687echo "$as_me:$LINENO: checking for $ac_word" >&5
3688echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3689if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3690 echo $ECHO_N "(cached) $ECHO_C" >&6
3691else
3692 if test -n "$ac_ct_RANLIB"; then
3693 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3694else
3695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3696for as_dir in $PATH
3697do
3698 IFS=$as_save_IFS
3699 test -z "$as_dir" && as_dir=.
3700 for ac_exec_ext in '' $ac_executable_extensions; do
3701 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3702 ac_cv_prog_ac_ct_RANLIB="ranlib"
3703 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3704 break 2
3705 fi
3706done
3707done
3708
3709 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3710fi
3711fi
3712ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3713if test -n "$ac_ct_RANLIB"; then
3714 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3715echo "${ECHO_T}$ac_ct_RANLIB" >&6
3716else
3717 echo "$as_me:$LINENO: result: no" >&5
3718echo "${ECHO_T}no" >&6
3719fi
3720
3721 RANLIB=$ac_ct_RANLIB
3722else
3723 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003724fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003725
3726
Guido van Rossum7f43da71994-08-01 12:15:30 +00003727for ac_prog in ar aal
3728do
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003730set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003731echo "$as_me:$LINENO: checking for $ac_word" >&5
3732echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3733if test "${ac_cv_prog_AR+set}" = set; then
3734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003735else
3736 if test -n "$AR"; then
3737 ac_cv_prog_AR="$AR" # Let the user override the test.
3738else
Martin v. Löwis11437992002-04-12 09:54:03 +00003739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3740for as_dir in $PATH
3741do
3742 IFS=$as_save_IFS
3743 test -z "$as_dir" && as_dir=.
3744 for ac_exec_ext in '' $ac_executable_extensions; do
3745 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3746 ac_cv_prog_AR="$ac_prog"
3747 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3748 break 2
3749 fi
3750done
3751done
3752
Guido van Rossum7f43da71994-08-01 12:15:30 +00003753fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003754fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003755AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003756if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 echo "$as_me:$LINENO: result: $AR" >&5
3758echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003759else
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 echo "$as_me:$LINENO: result: no" >&5
3761echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003762fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003765done
3766test -n "$AR" || AR="ar"
3767
Michael W. Hudson54241132001-12-07 15:38:26 +00003768
Neil Schemenauera42c8272001-03-31 00:01:55 +00003769case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003770bsdos*|hp*|HP*)
3771 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003772 if test -z "$INSTALL"
3773 then
3774 INSTALL="${srcdir}/install-sh -c"
3775 fi
3776esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003777ac_aux_dir=
3778for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3779 if test -f $ac_dir/install-sh; then
3780 ac_aux_dir=$ac_dir
3781 ac_install_sh="$ac_aux_dir/install-sh -c"
3782 break
3783 elif test -f $ac_dir/install.sh; then
3784 ac_aux_dir=$ac_dir
3785 ac_install_sh="$ac_aux_dir/install.sh -c"
3786 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 elif test -f $ac_dir/shtool; then
3788 ac_aux_dir=$ac_dir
3789 ac_install_sh="$ac_aux_dir/shtool install -c"
3790 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003791 fi
3792done
3793if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3795echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3796 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003797fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003798ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3799ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3800ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003801
3802# Find a good install program. We prefer a C program (faster),
3803# so one script is as good as another. But avoid the broken or
3804# incompatible versions:
3805# SysV /etc/install, /usr/sbin/install
3806# SunOS /usr/etc/install
3807# IRIX /sbin/install
3808# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003809# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003810# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3811# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3812# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3813# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003814echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3815echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003816if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003817if test "${ac_cv_path_install+set}" = set; then
3818 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003819else
Martin v. Löwis11437992002-04-12 09:54:03 +00003820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3821for as_dir in $PATH
3822do
3823 IFS=$as_save_IFS
3824 test -z "$as_dir" && as_dir=.
3825 # Account for people who put trailing slashes in PATH elements.
3826case $as_dir/ in
3827 ./ | .// | /cC/* | \
3828 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3829 /usr/ucb/* ) ;;
3830 *)
3831 # OSF1 and SCO ODT 3.0 have their own names for install.
3832 # Don't use installbsd from OSF since it installs stuff as root
3833 # by default.
3834 for ac_prog in ginstall scoinst install; do
3835 for ac_exec_ext in '' $ac_executable_extensions; do
3836 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3837 if test $ac_prog = install &&
3838 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3839 # AIX install. It has an incompatible calling convention.
3840 :
3841 elif test $ac_prog = install &&
3842 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3843 # program-specific install script used by HP pwplus--don't use.
3844 :
3845 else
3846 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3847 break 3
3848 fi
3849 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003850 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 done
3852 ;;
3853esac
3854done
3855
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003856
3857fi
3858 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003860 else
3861 # As a last resort, use the slow shell script. We don't cache a
3862 # path for INSTALL within a source directory, because that will
3863 # break other packages using the cache if that directory is
3864 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003865 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003866 fi
3867fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003868echo "$as_me:$LINENO: result: $INSTALL" >&5
3869echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003870
3871# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3872# It thinks the first close brace ends the variable substitution.
3873test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3874
Martin v. Löwis11437992002-04-12 09:54:03 +00003875test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003876
3877test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3878
Michael W. Hudson54241132001-12-07 15:38:26 +00003879
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003880# Not every filesystem supports hard links
3881
3882if test -z "$LN" ; then
3883 case $ac_sys_system in
3884 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003885 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003886 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003887 *) LN=ln;;
3888 esac
3889fi
3890
Fred Drake109d9862001-07-11 06:27:56 +00003891# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003892echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3893echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3894
Fred Drake109d9862001-07-11 06:27:56 +00003895# Check whether --with-pydebug or --without-pydebug was given.
3896if test "${with_pydebug+set}" = set; then
3897 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003898
Fred Drake109d9862001-07-11 06:27:56 +00003899if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003900then
3901
3902cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003903#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003904_ACEOF
3905
3906 echo "$as_me:$LINENO: result: yes" >&5
3907echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003908 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003909else echo "$as_me:$LINENO: result: no" >&5
3910echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003911fi
3912else
Martin v. Löwis11437992002-04-12 09:54:03 +00003913 echo "$as_me:$LINENO: result: no" >&5
3914echo "${ECHO_T}no" >&6
3915fi;
Fred Drake109d9862001-07-11 06:27:56 +00003916
Skip Montanarodecc6a42003-01-01 20:07:49 +00003917# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3918# merged with this chunk of code?
3919
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003920# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003921# ------------------------
3922# (The following bit of code is complicated enough - please keep things
3923# indented properly. Just pretend you're editing Python code. ;-)
3924
3925# There are two parallel sets of case statements below, one that checks to
3926# see if OPT was set and one that does BASECFLAGS setting based upon
3927# compiler and platform. BASECFLAGS tweaks need to be made even if the
3928# user set OPT.
3929
3930# tweak OPT based on compiler and platform, only if the user didn't set
3931# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003932
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003933if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003934then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003935 case $GCC in
3936 yes)
3937 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003938 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003939 if test "$Py_DEBUG" = 'true' ; then
3940 # Optimization messes up debuggers, so turn it off for
3941 # debug builds.
3942 OPT="-g -Wall -Wstrict-prototypes"
3943 else
3944 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003945 fi
3946 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003947 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003948 OPT="-O3 -Wall -Wstrict-prototypes"
3949 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003950 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003951 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003952 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3953 ;;
3954 esac
Fred Drake109d9862001-07-11 06:27:56 +00003955 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003956
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003957 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003958 OPT="-O"
3959 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003960 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003961
3962 # The current (beta) Monterey compiler dies with optimizations
3963 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003964 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003965 Monterey*)
3966 OPT=""
3967 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003968 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003969
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003970fi
3971
Skip Montanarodecc6a42003-01-01 20:07:49 +00003972
3973# tweak BASECFLAGS based on compiler and platform
3974case $GCC in
3975yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003976 # Python violates C99 rules, by casting between incompatible
3977 # pointer types. GCC may generate bad code as a result of that,
3978 # so use -fno-strict-aliasing if supported.
3979 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3980echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3981 ac_save_cc="$CC"
3982 CC="$CC -fno-strict-aliasing"
3983 if test "$cross_compiling" = yes; then
3984 ac_cv_no_strict_aliasing_ok=no
3985else
3986 cat >conftest.$ac_ext <<_ACEOF
3987#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003988/* confdefs.h. */
3989_ACEOF
3990cat confdefs.h >>conftest.$ac_ext
3991cat >>conftest.$ac_ext <<_ACEOF
3992/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003993int main() { return 0; }
3994_ACEOF
3995rm -f conftest$ac_exeext
3996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3997 (eval $ac_link) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4002 (eval $ac_try) 2>&5
4003 ac_status=$?
4004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4005 (exit $ac_status); }; }; then
4006 ac_cv_no_strict_aliasing_ok=yes
4007else
4008 echo "$as_me: program exited with status $ac_status" >&5
4009echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004010sed 's/^/| /' conftest.$ac_ext >&5
4011
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004012( exit $ac_status )
4013ac_cv_no_strict_aliasing_ok=no
4014fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004015rm -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 +00004016fi
4017 CC="$ac_save_cc"
4018 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4019echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
4020 if test $ac_cv_no_strict_aliasing_ok = yes
4021 then
4022 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4023 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004024 case $ac_sys_system in
4025 SCO_SV*)
4026 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4027 ;;
4028 # is there any other compiler on Darwin besides gcc?
4029 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004030 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004031 ;;
4032 esac
4033 ;;
4034
4035*)
4036 case $ac_sys_system in
4037 OpenUNIX*|UnixWare*)
4038 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4039 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004040 OSF*)
4041 BASECFLAGS="$BASECFLAGS -ieee -std"
4042 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004043 SCO_SV*)
4044 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4045 ;;
4046 esac
4047 ;;
4048esac
4049
Fred Drakee1ceaa02001-12-04 20:55:47 +00004050if test "$Py_DEBUG" = 'true'; then
4051 :
4052else
4053 OPT="-DNDEBUG $OPT"
4054fi
4055
Guido van Rossum563e7081996-09-10 18:20:48 +00004056if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004057then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004058 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004059fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004060
Martin v. Löwis11437992002-04-12 09:54:03 +00004061echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4062echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
4063if test "${ac_cv_opt_olimit_ok+set}" = set; then
4064 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004065else
4066 ac_save_cc="$CC"
4067CC="$CC -OPT:Olimit=0"
4068if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004069 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004070else
Martin v. Löwis11437992002-04-12 09:54:03 +00004071 cat >conftest.$ac_ext <<_ACEOF
4072#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004073/* confdefs.h. */
4074_ACEOF
4075cat confdefs.h >>conftest.$ac_ext
4076cat >>conftest.$ac_ext <<_ACEOF
4077/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004078int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004079_ACEOF
4080rm -f conftest$ac_exeext
4081if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4082 (eval $ac_link) 2>&5
4083 ac_status=$?
4084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4087 (eval $ac_try) 2>&5
4088 ac_status=$?
4089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4090 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004091 ac_cv_opt_olimit_ok=yes
4092else
Martin v. Löwis11437992002-04-12 09:54:03 +00004093 echo "$as_me: program exited with status $ac_status" >&5
4094echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004095sed 's/^/| /' conftest.$ac_ext >&5
4096
Martin v. Löwis11437992002-04-12 09:54:03 +00004097( exit $ac_status )
4098ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004099fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004100rm -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 +00004101fi
Guido van Rossum91922671997-10-09 20:24:13 +00004102CC="$ac_save_cc"
4103fi
4104
Martin v. Löwis11437992002-04-12 09:54:03 +00004105echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4106echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004107if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004108 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004109 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4110 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4111 # environment?
4112 Darwin*)
4113 ;;
4114 *)
4115 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4116 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004117 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004118else
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4120echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
4121 if test "${ac_cv_olimit_ok+set}" = set; then
4122 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004123else
4124 ac_save_cc="$CC"
4125 CC="$CC -Olimit 1500"
4126 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004127 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004128else
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 cat >conftest.$ac_ext <<_ACEOF
4130#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004131/* confdefs.h. */
4132_ACEOF
4133cat confdefs.h >>conftest.$ac_ext
4134cat >>conftest.$ac_ext <<_ACEOF
4135/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004136int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004137_ACEOF
4138rm -f conftest$ac_exeext
4139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4140 (eval $ac_link) 2>&5
4141 ac_status=$?
4142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4143 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4145 (eval $ac_try) 2>&5
4146 ac_status=$?
4147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4148 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004149 ac_cv_olimit_ok=yes
4150else
Martin v. Löwis11437992002-04-12 09:54:03 +00004151 echo "$as_me: program exited with status $ac_status" >&5
4152echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004153sed 's/^/| /' conftest.$ac_ext >&5
4154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155( exit $ac_status )
4156ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004157fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004158rm -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 +00004159fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004160 CC="$ac_save_cc"
4161fi
4162
Martin v. Löwis11437992002-04-12 09:54:03 +00004163 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4164echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004165 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004166 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004167 fi
4168fi
4169
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004170# On some compilers, pthreads are available without further options
4171# (e.g. MacOS X). On some of these systems, the compiler will not
4172# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4173# So we have to see first whether pthreads are available without
4174# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00004175echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4176echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
4177if test "${ac_cv_pthread_is_default+set}" = set; then
4178 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004179else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004180 if test "$cross_compiling" = yes; then
4181 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004182else
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 cat >conftest.$ac_ext <<_ACEOF
4184#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004185/* confdefs.h. */
4186_ACEOF
4187cat confdefs.h >>conftest.$ac_ext
4188cat >>conftest.$ac_ext <<_ACEOF
4189/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004190
Martin v. Löwis130fb172001-07-19 11:00:41 +00004191#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004192
4193void* routine(void* p){return NULL;}
4194
4195int main(){
4196 pthread_t p;
4197 if(pthread_create(&p,NULL,routine,NULL)!=0)
4198 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004199 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004200 return 0;
4201}
4202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203_ACEOF
4204rm -f conftest$ac_exeext
4205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4206 (eval $ac_link) 2>&5
4207 ac_status=$?
4208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4211 (eval $ac_try) 2>&5
4212 ac_status=$?
4213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4214 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004215
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004216 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004217 ac_cv_kthread=no
4218 ac_cv_pthread=no
4219
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004220else
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 echo "$as_me: program exited with status $ac_status" >&5
4222echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004223sed 's/^/| /' conftest.$ac_ext >&5
4224
Martin v. Löwis11437992002-04-12 09:54:03 +00004225( exit $ac_status )
4226ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004227fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004228rm -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 +00004229fi
4230
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004231fi
4232
Martin v. Löwis11437992002-04-12 09:54:03 +00004233echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4234echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004235
Michael W. Hudson54241132001-12-07 15:38:26 +00004236
Martin v. Löwis11437992002-04-12 09:54:03 +00004237if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004238then
4239 ac_cv_kpthread=no
4240else
4241# -Kpthread, if available, provides the right #defines
4242# and linker options to make pthread_create available
4243# Some compilers won't report that they do not support -Kpthread,
4244# so we need to run a program to see whether it really made the
4245# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004246echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4247echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4248if test "${ac_cv_kpthread+set}" = set; then
4249 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004250else
4251 ac_save_cc="$CC"
4252CC="$CC -Kpthread"
4253if test "$cross_compiling" = yes; then
4254 ac_cv_kpthread=no
4255else
Martin v. Löwis11437992002-04-12 09:54:03 +00004256 cat >conftest.$ac_ext <<_ACEOF
4257#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004258/* confdefs.h. */
4259_ACEOF
4260cat confdefs.h >>conftest.$ac_ext
4261cat >>conftest.$ac_ext <<_ACEOF
4262/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004263
4264#include <pthread.h>
4265
4266void* routine(void* p){return NULL;}
4267
4268int main(){
4269 pthread_t p;
4270 if(pthread_create(&p,NULL,routine,NULL)!=0)
4271 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004272 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004273 return 0;
4274}
4275
Martin v. Löwis11437992002-04-12 09:54:03 +00004276_ACEOF
4277rm -f conftest$ac_exeext
4278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4279 (eval $ac_link) 2>&5
4280 ac_status=$?
4281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4284 (eval $ac_try) 2>&5
4285 ac_status=$?
4286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4287 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004288 ac_cv_kpthread=yes
4289else
Martin v. Löwis11437992002-04-12 09:54:03 +00004290 echo "$as_me: program exited with status $ac_status" >&5
4291echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004292sed 's/^/| /' conftest.$ac_ext >&5
4293
Martin v. Löwis11437992002-04-12 09:54:03 +00004294( exit $ac_status )
4295ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004296fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004297rm -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 +00004298fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004299CC="$ac_save_cc"
4300fi
4301
Martin v. Löwis11437992002-04-12 09:54:03 +00004302echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4303echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004304fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004305
Skip Montanarod8d39a02003-07-10 20:44:10 +00004306if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004307then
4308# -Kthread, if available, provides the right #defines
4309# and linker options to make pthread_create available
4310# Some compilers won't report that they do not support -Kthread,
4311# so we need to run a program to see whether it really made the
4312# function available.
4313echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4314echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4315if test "${ac_cv_kthread+set}" = set; then
4316 echo $ECHO_N "(cached) $ECHO_C" >&6
4317else
4318 ac_save_cc="$CC"
4319CC="$CC -Kthread"
4320if test "$cross_compiling" = yes; then
4321 ac_cv_kthread=no
4322else
4323 cat >conftest.$ac_ext <<_ACEOF
4324#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004325/* confdefs.h. */
4326_ACEOF
4327cat confdefs.h >>conftest.$ac_ext
4328cat >>conftest.$ac_ext <<_ACEOF
4329/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004330
4331#include <pthread.h>
4332
4333void* routine(void* p){return NULL;}
4334
4335int main(){
4336 pthread_t p;
4337 if(pthread_create(&p,NULL,routine,NULL)!=0)
4338 return 1;
4339 (void)pthread_detach(p);
4340 return 0;
4341}
4342
4343_ACEOF
4344rm -f conftest$ac_exeext
4345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4346 (eval $ac_link) 2>&5
4347 ac_status=$?
4348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4351 (eval $ac_try) 2>&5
4352 ac_status=$?
4353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4354 (exit $ac_status); }; }; then
4355 ac_cv_kthread=yes
4356else
4357 echo "$as_me: program exited with status $ac_status" >&5
4358echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004359sed 's/^/| /' conftest.$ac_ext >&5
4360
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004361( exit $ac_status )
4362ac_cv_kthread=no
4363fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004364rm -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 +00004365fi
4366CC="$ac_save_cc"
4367fi
4368
4369echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4370echo "${ECHO_T}$ac_cv_kthread" >&6
4371fi
4372
Skip Montanarod8d39a02003-07-10 20:44:10 +00004373if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004374then
4375# -pthread, if available, provides the right #defines
4376# and linker options to make pthread_create available
4377# Some compilers won't report that they do not support -pthread,
4378# so we need to run a program to see whether it really made the
4379# function available.
4380echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4381echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4382if test "${ac_cv_thread+set}" = set; then
4383 echo $ECHO_N "(cached) $ECHO_C" >&6
4384else
4385 ac_save_cc="$CC"
4386CC="$CC -pthread"
4387if test "$cross_compiling" = yes; then
4388 ac_cv_pthread=no
4389else
4390 cat >conftest.$ac_ext <<_ACEOF
4391#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004392/* confdefs.h. */
4393_ACEOF
4394cat confdefs.h >>conftest.$ac_ext
4395cat >>conftest.$ac_ext <<_ACEOF
4396/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004397
4398#include <pthread.h>
4399
4400void* routine(void* p){return NULL;}
4401
4402int main(){
4403 pthread_t p;
4404 if(pthread_create(&p,NULL,routine,NULL)!=0)
4405 return 1;
4406 (void)pthread_detach(p);
4407 return 0;
4408}
4409
4410_ACEOF
4411rm -f conftest$ac_exeext
4412if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4413 (eval $ac_link) 2>&5
4414 ac_status=$?
4415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4416 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4418 (eval $ac_try) 2>&5
4419 ac_status=$?
4420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4421 (exit $ac_status); }; }; then
4422 ac_cv_pthread=yes
4423else
4424 echo "$as_me: program exited with status $ac_status" >&5
4425echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004426sed 's/^/| /' conftest.$ac_ext >&5
4427
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004428( exit $ac_status )
4429ac_cv_pthread=no
4430fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004431rm -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 +00004432fi
4433CC="$ac_save_cc"
4434fi
4435
4436echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4437echo "${ECHO_T}$ac_cv_pthread" >&6
4438fi
4439
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004440# If we have set a CC compiler flag for thread support then
4441# check if it works for CXX, too.
4442ac_cv_cxx_thread=no
4443if test ! -z "$CXX"
4444then
4445echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4446echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4447ac_save_cxx="$CXX"
4448
4449if test "$ac_cv_kpthread" = "yes"
4450then
4451 CXX="$CXX -Kpthread"
4452 ac_cv_cxx_thread=yes
4453elif test "$ac_cv_kthread" = "yes"
4454then
4455 CXX="$CXX -Kthread"
4456 ac_cv_cxx_thread=yes
4457elif test "$ac_cv_pthread" = "yes"
4458then
4459 CXX="$CXX -pthread"
4460 ac_cv_cxx_thread=yes
4461fi
4462
4463if test $ac_cv_cxx_thread = yes
4464then
4465 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4466 $CXX -c conftest.$ac_ext 2>&5
4467 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4468 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4469 then
4470 ac_cv_cxx_thread=yes
4471 else
4472 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004473 fi
4474 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004475fi
4476fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004477CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004478echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4479echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4480
Michael W. Hudson54241132001-12-07 15:38:26 +00004481
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004482# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004483echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4484echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4485if test "${ac_cv_header_stdc+set}" = set; then
4486 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004487else
Martin v. Löwis11437992002-04-12 09:54:03 +00004488 cat >conftest.$ac_ext <<_ACEOF
4489#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004490/* confdefs.h. */
4491_ACEOF
4492cat confdefs.h >>conftest.$ac_ext
4493cat >>conftest.$ac_ext <<_ACEOF
4494/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004495#include <stdlib.h>
4496#include <stdarg.h>
4497#include <string.h>
4498#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004499
Skip Montanaro6dead952003-09-25 14:50:04 +00004500int
4501main ()
4502{
4503
4504 ;
4505 return 0;
4506}
Martin v. Löwis11437992002-04-12 09:54:03 +00004507_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004508rm -f conftest.$ac_objext
4509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4510 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004511 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004513 (exit $ac_status); } &&
4514 { ac_try='test -s conftest.$ac_objext'
4515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4516 (eval $ac_try) 2>&5
4517 ac_status=$?
4518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4519 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004520 ac_cv_header_stdc=yes
4521else
Martin v. Löwis11437992002-04-12 09:54:03 +00004522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004523sed 's/^/| /' conftest.$ac_ext >&5
4524
4525ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004526fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004527rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004528
4529if test $ac_cv_header_stdc = yes; then
4530 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004531 cat >conftest.$ac_ext <<_ACEOF
4532#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004533/* confdefs.h. */
4534_ACEOF
4535cat confdefs.h >>conftest.$ac_ext
4536cat >>conftest.$ac_ext <<_ACEOF
4537/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004538#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004539
4540_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004541if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004542 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004543 :
4544else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004545 ac_cv_header_stdc=no
4546fi
4547rm -f conftest*
4548
4549fi
4550
4551if test $ac_cv_header_stdc = yes; then
4552 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004553 cat >conftest.$ac_ext <<_ACEOF
4554#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004555/* confdefs.h. */
4556_ACEOF
4557cat confdefs.h >>conftest.$ac_ext
4558cat >>conftest.$ac_ext <<_ACEOF
4559/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004560#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004561
4562_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004564 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004565 :
4566else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004567 ac_cv_header_stdc=no
4568fi
4569rm -f conftest*
4570
4571fi
4572
4573if test $ac_cv_header_stdc = yes; then
4574 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004575 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004576 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004577else
Martin v. Löwis11437992002-04-12 09:54:03 +00004578 cat >conftest.$ac_ext <<_ACEOF
4579#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004580/* confdefs.h. */
4581_ACEOF
4582cat confdefs.h >>conftest.$ac_ext
4583cat >>conftest.$ac_ext <<_ACEOF
4584/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004585#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004586#if ((' ' & 0x0FF) == 0x020)
4587# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4588# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4589#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004590# define ISLOWER(c) \
4591 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004592 || ('j' <= (c) && (c) <= 'r') \
4593 || ('s' <= (c) && (c) <= 'z'))
4594# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4595#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004596
Martin v. Löwis11437992002-04-12 09:54:03 +00004597#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4598int
4599main ()
4600{
4601 int i;
4602 for (i = 0; i < 256; i++)
4603 if (XOR (islower (i), ISLOWER (i))
4604 || toupper (i) != TOUPPER (i))
4605 exit(2);
4606 exit (0);
4607}
4608_ACEOF
4609rm -f conftest$ac_exeext
4610if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4611 (eval $ac_link) 2>&5
4612 ac_status=$?
4613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4614 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4616 (eval $ac_try) 2>&5
4617 ac_status=$?
4618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4619 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004620 :
4621else
Martin v. Löwis11437992002-04-12 09:54:03 +00004622 echo "$as_me: program exited with status $ac_status" >&5
4623echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004624sed 's/^/| /' conftest.$ac_ext >&5
4625
Martin v. Löwis11437992002-04-12 09:54:03 +00004626( exit $ac_status )
4627ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004628fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004629rm -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 +00004630fi
4631fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004632fi
4633echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4634echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004635if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004636
4637cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004638#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004639_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004640
4641fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004642
Martin v. Löwis11437992002-04-12 09:54:03 +00004643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004680
Barry Warsawfe33b792003-01-07 22:42:49 +00004681
Neal Norwitz82251032003-05-23 14:35:24 +00004682
Martin v. Löwis11437992002-04-12 09:54:03 +00004683for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004684libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004685signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4686unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004687sys/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 +00004688sys/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 +00004689sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004690sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004691do
Martin v. Löwis11437992002-04-12 09:54:03 +00004692as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4693if eval "test \"\${$as_ac_Header+set}\" = set"; then
4694 echo "$as_me:$LINENO: checking for $ac_header" >&5
4695echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4696if eval "test \"\${$as_ac_Header+set}\" = set"; then
4697 echo $ECHO_N "(cached) $ECHO_C" >&6
4698fi
4699echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4700echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004701else
Martin v. Löwis11437992002-04-12 09:54:03 +00004702 # Is the header compilable?
4703echo "$as_me:$LINENO: checking $ac_header usability" >&5
4704echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4705cat >conftest.$ac_ext <<_ACEOF
4706#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004707/* confdefs.h. */
4708_ACEOF
4709cat confdefs.h >>conftest.$ac_ext
4710cat >>conftest.$ac_ext <<_ACEOF
4711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004712$ac_includes_default
4713#include <$ac_header>
4714_ACEOF
4715rm -f conftest.$ac_objext
4716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4717 (eval $ac_compile) 2>&5
4718 ac_status=$?
4719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4720 (exit $ac_status); } &&
4721 { ac_try='test -s conftest.$ac_objext'
4722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4723 (eval $ac_try) 2>&5
4724 ac_status=$?
4725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4726 (exit $ac_status); }; }; then
4727 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004728else
Martin v. Löwis11437992002-04-12 09:54:03 +00004729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004730sed 's/^/| /' conftest.$ac_ext >&5
4731
Martin v. Löwis11437992002-04-12 09:54:03 +00004732ac_header_compiler=no
4733fi
4734rm -f conftest.$ac_objext conftest.$ac_ext
4735echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4736echo "${ECHO_T}$ac_header_compiler" >&6
4737
4738# Is the header present?
4739echo "$as_me:$LINENO: checking $ac_header presence" >&5
4740echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4741cat >conftest.$ac_ext <<_ACEOF
4742#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004743/* confdefs.h. */
4744_ACEOF
4745cat confdefs.h >>conftest.$ac_ext
4746cat >>conftest.$ac_ext <<_ACEOF
4747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004748#include <$ac_header>
4749_ACEOF
4750if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4751 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4752 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004753 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004754 rm -f conftest.er1
4755 cat conftest.err >&5
4756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4757 (exit $ac_status); } >/dev/null; then
4758 if test -s conftest.err; then
4759 ac_cpp_err=$ac_c_preproc_warn_flag
4760 else
4761 ac_cpp_err=
4762 fi
4763else
4764 ac_cpp_err=yes
4765fi
4766if test -z "$ac_cpp_err"; then
4767 ac_header_preproc=yes
4768else
4769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004770sed 's/^/| /' conftest.$ac_ext >&5
4771
Martin v. Löwis11437992002-04-12 09:54:03 +00004772 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004774rm -f conftest.err conftest.$ac_ext
4775echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4776echo "${ECHO_T}$ac_header_preproc" >&6
4777
4778# So? What about this header?
4779case $ac_header_compiler:$ac_header_preproc in
4780 yes:no )
4781 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4782echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4783 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004784echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4785 (
4786 cat <<\_ASBOX
4787## ------------------------------------ ##
4788## Report this to bug-autoconf@gnu.org. ##
4789## ------------------------------------ ##
4790_ASBOX
4791 ) |
4792 sed "s/^/$as_me: WARNING: /" >&2
4793 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 no:yes )
4795 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4796echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4797 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4798echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4799 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004800echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4801 (
4802 cat <<\_ASBOX
4803## ------------------------------------ ##
4804## Report this to bug-autoconf@gnu.org. ##
4805## ------------------------------------ ##
4806_ASBOX
4807 ) |
4808 sed "s/^/$as_me: WARNING: /" >&2
4809 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004810esac
4811echo "$as_me:$LINENO: checking for $ac_header" >&5
4812echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4813if eval "test \"\${$as_ac_Header+set}\" = set"; then
4814 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004815else
Martin v. Löwis11437992002-04-12 09:54:03 +00004816 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004817fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004818echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4819echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4820
4821fi
4822if test `eval echo '${'$as_ac_Header'}'` = yes; then
4823 cat >>confdefs.h <<_ACEOF
4824#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4825_ACEOF
4826
4827fi
4828
Guido van Rossum627b2d71993-12-24 10:39:16 +00004829done
4830
Martin v. Löwis11437992002-04-12 09:54:03 +00004831
4832
4833
4834
4835
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004836ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004837for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4838 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4839echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4840echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4841if eval "test \"\${$as_ac_Header+set}\" = set"; then
4842 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004843else
Martin v. Löwis11437992002-04-12 09:54:03 +00004844 cat >conftest.$ac_ext <<_ACEOF
4845#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004846/* confdefs.h. */
4847_ACEOF
4848cat confdefs.h >>conftest.$ac_ext
4849cat >>conftest.$ac_ext <<_ACEOF
4850/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004851#include <sys/types.h>
4852#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004853
Martin v. Löwis11437992002-04-12 09:54:03 +00004854int
4855main ()
4856{
4857if ((DIR *) 0)
4858return 0;
4859 ;
4860 return 0;
4861}
4862_ACEOF
4863rm -f conftest.$ac_objext
4864if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4865 (eval $ac_compile) 2>&5
4866 ac_status=$?
4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868 (exit $ac_status); } &&
4869 { ac_try='test -s conftest.$ac_objext'
4870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4871 (eval $ac_try) 2>&5
4872 ac_status=$?
4873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4874 (exit $ac_status); }; }; then
4875 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004876else
Martin v. Löwis11437992002-04-12 09:54:03 +00004877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004878sed 's/^/| /' conftest.$ac_ext >&5
4879
Martin v. Löwis11437992002-04-12 09:54:03 +00004880eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004882rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004883fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004884echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4885echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4886if test `eval echo '${'$as_ac_Header'}'` = yes; then
4887 cat >>confdefs.h <<_ACEOF
4888#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4889_ACEOF
4890
4891ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004892fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004893
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004894done
4895# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4896if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004897 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4898echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4899if test "${ac_cv_search_opendir+set}" = set; then
4900 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004901else
Martin v. Löwis11437992002-04-12 09:54:03 +00004902 ac_func_search_save_LIBS=$LIBS
4903ac_cv_search_opendir=no
4904cat >conftest.$ac_ext <<_ACEOF
4905#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004906/* confdefs.h. */
4907_ACEOF
4908cat confdefs.h >>conftest.$ac_ext
4909cat >>conftest.$ac_ext <<_ACEOF
4910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004911
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004912/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004913#ifdef __cplusplus
4914extern "C"
4915#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004916/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004917 builtin and then its argument prototype would still apply. */
4918char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004919int
4920main ()
4921{
4922opendir ();
4923 ;
4924 return 0;
4925}
4926_ACEOF
4927rm -f conftest.$ac_objext conftest$ac_exeext
4928if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4929 (eval $ac_link) 2>&5
4930 ac_status=$?
4931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4932 (exit $ac_status); } &&
4933 { ac_try='test -s conftest$ac_exeext'
4934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4935 (eval $ac_try) 2>&5
4936 ac_status=$?
4937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938 (exit $ac_status); }; }; then
4939 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004940else
Martin v. Löwis11437992002-04-12 09:54:03 +00004941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004942sed 's/^/| /' conftest.$ac_ext >&5
4943
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004944fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004945rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4946if test "$ac_cv_search_opendir" = no; then
4947 for ac_lib in dir; do
4948 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4949 cat >conftest.$ac_ext <<_ACEOF
4950#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004951/* confdefs.h. */
4952_ACEOF
4953cat confdefs.h >>conftest.$ac_ext
4954cat >>conftest.$ac_ext <<_ACEOF
4955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004956
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004957/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004958#ifdef __cplusplus
4959extern "C"
4960#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004961/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004962 builtin and then its argument prototype would still apply. */
4963char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004964int
4965main ()
4966{
4967opendir ();
4968 ;
4969 return 0;
4970}
4971_ACEOF
4972rm -f conftest.$ac_objext conftest$ac_exeext
4973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4974 (eval $ac_link) 2>&5
4975 ac_status=$?
4976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 (exit $ac_status); } &&
4978 { ac_try='test -s conftest$ac_exeext'
4979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4980 (eval $ac_try) 2>&5
4981 ac_status=$?
4982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983 (exit $ac_status); }; }; then
4984 ac_cv_search_opendir="-l$ac_lib"
4985break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004986else
Martin v. Löwis11437992002-04-12 09:54:03 +00004987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004988sed 's/^/| /' conftest.$ac_ext >&5
4989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004990fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004991rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4992 done
4993fi
4994LIBS=$ac_func_search_save_LIBS
4995fi
4996echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4997echo "${ECHO_T}$ac_cv_search_opendir" >&6
4998if test "$ac_cv_search_opendir" != no; then
4999 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005002
Michael W. Hudson54241132001-12-07 15:38:26 +00005003else
Martin v. Löwis11437992002-04-12 09:54:03 +00005004 echo "$as_me:$LINENO: checking for library containing opendir" >&5
5005echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
5006if test "${ac_cv_search_opendir+set}" = set; then
5007 echo $ECHO_N "(cached) $ECHO_C" >&6
5008else
5009 ac_func_search_save_LIBS=$LIBS
5010ac_cv_search_opendir=no
5011cat >conftest.$ac_ext <<_ACEOF
5012#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005013/* confdefs.h. */
5014_ACEOF
5015cat confdefs.h >>conftest.$ac_ext
5016cat >>conftest.$ac_ext <<_ACEOF
5017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005018
5019/* Override any gcc2 internal prototype to avoid an error. */
5020#ifdef __cplusplus
5021extern "C"
5022#endif
5023/* We use char because int might match the return type of a gcc2
5024 builtin and then its argument prototype would still apply. */
5025char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005026int
5027main ()
5028{
5029opendir ();
5030 ;
5031 return 0;
5032}
5033_ACEOF
5034rm -f conftest.$ac_objext conftest$ac_exeext
5035if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5036 (eval $ac_link) 2>&5
5037 ac_status=$?
5038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5039 (exit $ac_status); } &&
5040 { ac_try='test -s conftest$ac_exeext'
5041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5042 (eval $ac_try) 2>&5
5043 ac_status=$?
5044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5045 (exit $ac_status); }; }; then
5046 ac_cv_search_opendir="none required"
5047else
5048 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005049sed 's/^/| /' conftest.$ac_ext >&5
5050
Martin v. Löwis11437992002-04-12 09:54:03 +00005051fi
5052rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5053if test "$ac_cv_search_opendir" = no; then
5054 for ac_lib in x; do
5055 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5056 cat >conftest.$ac_ext <<_ACEOF
5057#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005058/* confdefs.h. */
5059_ACEOF
5060cat confdefs.h >>conftest.$ac_ext
5061cat >>conftest.$ac_ext <<_ACEOF
5062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005063
5064/* Override any gcc2 internal prototype to avoid an error. */
5065#ifdef __cplusplus
5066extern "C"
5067#endif
5068/* We use char because int might match the return type of a gcc2
5069 builtin and then its argument prototype would still apply. */
5070char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005071int
5072main ()
5073{
5074opendir ();
5075 ;
5076 return 0;
5077}
5078_ACEOF
5079rm -f conftest.$ac_objext conftest$ac_exeext
5080if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5081 (eval $ac_link) 2>&5
5082 ac_status=$?
5083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5084 (exit $ac_status); } &&
5085 { ac_try='test -s conftest$ac_exeext'
5086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5087 (eval $ac_try) 2>&5
5088 ac_status=$?
5089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5090 (exit $ac_status); }; }; then
5091 ac_cv_search_opendir="-l$ac_lib"
5092break
5093else
5094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005095sed 's/^/| /' conftest.$ac_ext >&5
5096
Martin v. Löwis11437992002-04-12 09:54:03 +00005097fi
5098rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5099 done
5100fi
5101LIBS=$ac_func_search_save_LIBS
5102fi
5103echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5104echo "${ECHO_T}$ac_cv_search_opendir" >&6
5105if test "$ac_cv_search_opendir" != no; then
5106 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5107
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005108fi
5109
5110fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005111
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005112echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5113echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5114if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5115 echo $ECHO_N "(cached) $ECHO_C" >&6
5116else
5117 cat >conftest.$ac_ext <<_ACEOF
5118#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005119/* confdefs.h. */
5120_ACEOF
5121cat confdefs.h >>conftest.$ac_ext
5122cat >>conftest.$ac_ext <<_ACEOF
5123/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005124#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005125int
5126main ()
5127{
5128return makedev(0, 0);
5129 ;
5130 return 0;
5131}
5132_ACEOF
5133rm -f conftest.$ac_objext conftest$ac_exeext
5134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5135 (eval $ac_link) 2>&5
5136 ac_status=$?
5137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138 (exit $ac_status); } &&
5139 { ac_try='test -s conftest$ac_exeext'
5140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5141 (eval $ac_try) 2>&5
5142 ac_status=$?
5143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5144 (exit $ac_status); }; }; then
5145 ac_cv_header_sys_types_h_makedev=yes
5146else
5147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005148sed 's/^/| /' conftest.$ac_ext >&5
5149
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005150ac_cv_header_sys_types_h_makedev=no
5151fi
5152rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5153
5154fi
5155echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5156echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5157
5158if test $ac_cv_header_sys_types_h_makedev = no; then
5159if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5160 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5161echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5162if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5163 echo $ECHO_N "(cached) $ECHO_C" >&6
5164fi
5165echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5166echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5167else
5168 # Is the header compilable?
5169echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5170echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5171cat >conftest.$ac_ext <<_ACEOF
5172#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005173/* confdefs.h. */
5174_ACEOF
5175cat confdefs.h >>conftest.$ac_ext
5176cat >>conftest.$ac_ext <<_ACEOF
5177/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005178$ac_includes_default
5179#include <sys/mkdev.h>
5180_ACEOF
5181rm -f conftest.$ac_objext
5182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5183 (eval $ac_compile) 2>&5
5184 ac_status=$?
5185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5186 (exit $ac_status); } &&
5187 { ac_try='test -s conftest.$ac_objext'
5188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5189 (eval $ac_try) 2>&5
5190 ac_status=$?
5191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5192 (exit $ac_status); }; }; then
5193 ac_header_compiler=yes
5194else
5195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005196sed 's/^/| /' conftest.$ac_ext >&5
5197
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005198ac_header_compiler=no
5199fi
5200rm -f conftest.$ac_objext conftest.$ac_ext
5201echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5202echo "${ECHO_T}$ac_header_compiler" >&6
5203
5204# Is the header present?
5205echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5206echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5207cat >conftest.$ac_ext <<_ACEOF
5208#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005209/* confdefs.h. */
5210_ACEOF
5211cat confdefs.h >>conftest.$ac_ext
5212cat >>conftest.$ac_ext <<_ACEOF
5213/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005214#include <sys/mkdev.h>
5215_ACEOF
5216if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5217 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5218 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005219 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005220 rm -f conftest.er1
5221 cat conftest.err >&5
5222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5223 (exit $ac_status); } >/dev/null; then
5224 if test -s conftest.err; then
5225 ac_cpp_err=$ac_c_preproc_warn_flag
5226 else
5227 ac_cpp_err=
5228 fi
5229else
5230 ac_cpp_err=yes
5231fi
5232if test -z "$ac_cpp_err"; then
5233 ac_header_preproc=yes
5234else
5235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005236sed 's/^/| /' conftest.$ac_ext >&5
5237
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005238 ac_header_preproc=no
5239fi
5240rm -f conftest.err conftest.$ac_ext
5241echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5242echo "${ECHO_T}$ac_header_preproc" >&6
5243
5244# So? What about this header?
5245case $ac_header_compiler:$ac_header_preproc in
5246 yes:no )
5247 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5248echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5249 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005250echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
5251 (
5252 cat <<\_ASBOX
5253## ------------------------------------ ##
5254## Report this to bug-autoconf@gnu.org. ##
5255## ------------------------------------ ##
5256_ASBOX
5257 ) |
5258 sed "s/^/$as_me: WARNING: /" >&2
5259 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005260 no:yes )
5261 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5262echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
5263 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5264echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5265 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005266echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
5267 (
5268 cat <<\_ASBOX
5269## ------------------------------------ ##
5270## Report this to bug-autoconf@gnu.org. ##
5271## ------------------------------------ ##
5272_ASBOX
5273 ) |
5274 sed "s/^/$as_me: WARNING: /" >&2
5275 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005276esac
5277echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5278echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5279if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5280 echo $ECHO_N "(cached) $ECHO_C" >&6
5281else
5282 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5283fi
5284echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5285echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5286
5287fi
5288if test $ac_cv_header_sys_mkdev_h = yes; then
5289
5290cat >>confdefs.h <<\_ACEOF
5291#define MAJOR_IN_MKDEV 1
5292_ACEOF
5293
5294fi
5295
5296
5297
5298 if test $ac_cv_header_sys_mkdev_h = no; then
5299 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5300 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5301echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5302if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5303 echo $ECHO_N "(cached) $ECHO_C" >&6
5304fi
5305echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5306echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5307else
5308 # Is the header compilable?
5309echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5310echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5311cat >conftest.$ac_ext <<_ACEOF
5312#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005313/* confdefs.h. */
5314_ACEOF
5315cat confdefs.h >>conftest.$ac_ext
5316cat >>conftest.$ac_ext <<_ACEOF
5317/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005318$ac_includes_default
5319#include <sys/sysmacros.h>
5320_ACEOF
5321rm -f conftest.$ac_objext
5322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5323 (eval $ac_compile) 2>&5
5324 ac_status=$?
5325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5326 (exit $ac_status); } &&
5327 { ac_try='test -s conftest.$ac_objext'
5328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5329 (eval $ac_try) 2>&5
5330 ac_status=$?
5331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5332 (exit $ac_status); }; }; then
5333 ac_header_compiler=yes
5334else
5335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005336sed 's/^/| /' conftest.$ac_ext >&5
5337
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005338ac_header_compiler=no
5339fi
5340rm -f conftest.$ac_objext conftest.$ac_ext
5341echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5342echo "${ECHO_T}$ac_header_compiler" >&6
5343
5344# Is the header present?
5345echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5346echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5347cat >conftest.$ac_ext <<_ACEOF
5348#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005349/* confdefs.h. */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005354#include <sys/sysmacros.h>
5355_ACEOF
5356if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5357 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5358 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005359 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005360 rm -f conftest.er1
5361 cat conftest.err >&5
5362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5363 (exit $ac_status); } >/dev/null; then
5364 if test -s conftest.err; then
5365 ac_cpp_err=$ac_c_preproc_warn_flag
5366 else
5367 ac_cpp_err=
5368 fi
5369else
5370 ac_cpp_err=yes
5371fi
5372if test -z "$ac_cpp_err"; then
5373 ac_header_preproc=yes
5374else
5375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005376sed 's/^/| /' conftest.$ac_ext >&5
5377
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005378 ac_header_preproc=no
5379fi
5380rm -f conftest.err conftest.$ac_ext
5381echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5382echo "${ECHO_T}$ac_header_preproc" >&6
5383
5384# So? What about this header?
5385case $ac_header_compiler:$ac_header_preproc in
5386 yes:no )
5387 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5388echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5389 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005390echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5391 (
5392 cat <<\_ASBOX
5393## ------------------------------------ ##
5394## Report this to bug-autoconf@gnu.org. ##
5395## ------------------------------------ ##
5396_ASBOX
5397 ) |
5398 sed "s/^/$as_me: WARNING: /" >&2
5399 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005400 no:yes )
5401 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5402echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5403 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5404echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5405 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005406echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5407 (
5408 cat <<\_ASBOX
5409## ------------------------------------ ##
5410## Report this to bug-autoconf@gnu.org. ##
5411## ------------------------------------ ##
5412_ASBOX
5413 ) |
5414 sed "s/^/$as_me: WARNING: /" >&2
5415 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005416esac
5417echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5418echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5419if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5420 echo $ECHO_N "(cached) $ECHO_C" >&6
5421else
5422 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5423fi
5424echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5425echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5426
5427fi
5428if test $ac_cv_header_sys_sysmacros_h = yes; then
5429
5430cat >>confdefs.h <<\_ACEOF
5431#define MAJOR_IN_SYSMACROS 1
5432_ACEOF
5433
5434fi
5435
5436
5437 fi
5438fi
5439
Michael W. Hudson54241132001-12-07 15:38:26 +00005440
Guido van Rossum627b2d71993-12-24 10:39:16 +00005441# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005442was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005443echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5444echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5445cat >conftest.$ac_ext <<_ACEOF
5446#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005447/* confdefs.h. */
5448_ACEOF
5449cat confdefs.h >>conftest.$ac_ext
5450cat >>conftest.$ac_ext <<_ACEOF
5451/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005452#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005453
5454_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005456 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005457 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005458else
Martin v. Löwis11437992002-04-12 09:54:03 +00005459
5460
5461cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005462#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005463_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005464
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005465
Guido van Rossum627b2d71993-12-24 10:39:16 +00005466fi
5467rm -f conftest*
5468
Martin v. Löwis11437992002-04-12 09:54:03 +00005469echo "$as_me:$LINENO: result: $was_it_defined" >&5
5470echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005471
Neal Norwitz11690112002-07-30 01:08:28 +00005472# Check whether using makedev requires defining _OSF_SOURCE
5473echo "$as_me:$LINENO: checking for makedev" >&5
5474echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5475cat >conftest.$ac_ext <<_ACEOF
5476#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005477/* confdefs.h. */
5478_ACEOF
5479cat confdefs.h >>conftest.$ac_ext
5480cat >>conftest.$ac_ext <<_ACEOF
5481/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005482#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005483int
5484main ()
5485{
5486 makedev(0, 0)
5487 ;
5488 return 0;
5489}
5490_ACEOF
5491rm -f conftest.$ac_objext conftest$ac_exeext
5492if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5493 (eval $ac_link) 2>&5
5494 ac_status=$?
5495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5496 (exit $ac_status); } &&
5497 { ac_try='test -s conftest$ac_exeext'
5498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5499 (eval $ac_try) 2>&5
5500 ac_status=$?
5501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5502 (exit $ac_status); }; }; then
5503 ac_cv_has_makedev=yes
5504else
5505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005506sed 's/^/| /' conftest.$ac_ext >&5
5507
Neal Norwitz11690112002-07-30 01:08:28 +00005508ac_cv_has_makedev=no
5509fi
5510rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5511if test "$ac_cv_has_makedev" = "no"; then
5512 # we didn't link, try if _OSF_SOURCE will allow us to link
5513 cat >conftest.$ac_ext <<_ACEOF
5514#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005515/* confdefs.h. */
5516_ACEOF
5517cat confdefs.h >>conftest.$ac_ext
5518cat >>conftest.$ac_ext <<_ACEOF
5519/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005520
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005521#define _OSF_SOURCE 1
5522#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005523
Neal Norwitz11690112002-07-30 01:08:28 +00005524int
5525main ()
5526{
5527 makedev(0, 0)
5528 ;
5529 return 0;
5530}
5531_ACEOF
5532rm -f conftest.$ac_objext conftest$ac_exeext
5533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5534 (eval $ac_link) 2>&5
5535 ac_status=$?
5536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5537 (exit $ac_status); } &&
5538 { ac_try='test -s conftest$ac_exeext'
5539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5540 (eval $ac_try) 2>&5
5541 ac_status=$?
5542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5543 (exit $ac_status); }; }; then
5544 ac_cv_has_makedev=yes
5545else
5546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005547sed 's/^/| /' conftest.$ac_ext >&5
5548
Neal Norwitz11690112002-07-30 01:08:28 +00005549ac_cv_has_makedev=no
5550fi
5551rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5552 if test "$ac_cv_has_makedev" = "yes"; then
5553
5554cat >>confdefs.h <<\_ACEOF
5555#define _OSF_SOURCE 1
5556_ACEOF
5557
5558 fi
5559fi
5560echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5561echo "${ECHO_T}$ac_cv_has_makedev" >&6
5562if test "$ac_cv_has_makedev" = "yes"; then
5563
5564cat >>confdefs.h <<\_ACEOF
5565#define HAVE_MAKEDEV 1
5566_ACEOF
5567
5568fi
5569
Martin v. Löwis399a6892002-10-04 10:22:02 +00005570# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5571# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5572# defined, but the compiler does not support pragma redefine_extname,
5573# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5574# structures (such as rlimit64) without declaring them. As a
5575# work-around, disable LFS on such configurations
5576
5577use_lfs=yes
5578echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5579echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5580cat >conftest.$ac_ext <<_ACEOF
5581#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005582/* confdefs.h. */
5583_ACEOF
5584cat confdefs.h >>conftest.$ac_ext
5585cat >>conftest.$ac_ext <<_ACEOF
5586/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005587
5588#define _LARGEFILE_SOURCE 1
5589#define _FILE_OFFSET_BITS 64
5590#include <sys/resource.h>
5591
Martin v. Löwis399a6892002-10-04 10:22:02 +00005592int
5593main ()
5594{
5595struct rlimit foo;
5596 ;
5597 return 0;
5598}
5599_ACEOF
5600rm -f conftest.$ac_objext
5601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5602 (eval $ac_compile) 2>&5
5603 ac_status=$?
5604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5605 (exit $ac_status); } &&
5606 { ac_try='test -s conftest.$ac_objext'
5607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5608 (eval $ac_try) 2>&5
5609 ac_status=$?
5610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5611 (exit $ac_status); }; }; then
5612 sol_lfs_bug=no
5613else
5614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005615sed 's/^/| /' conftest.$ac_ext >&5
5616
Martin v. Löwis399a6892002-10-04 10:22:02 +00005617sol_lfs_bug=yes
5618fi
5619rm -f conftest.$ac_objext conftest.$ac_ext
5620echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5621echo "${ECHO_T}$sol_lfs_bug" >&6
5622if test "$sol_lfs_bug" = "yes"; then
5623 use_lfs=no
5624fi
5625
5626if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005627# Two defines needed to enable largefile support on various platforms
5628# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005629
Martin v. Löwis11437992002-04-12 09:54:03 +00005630cat >>confdefs.h <<\_ACEOF
5631#define _LARGEFILE_SOURCE 1
5632_ACEOF
5633
5634
5635cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005636#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005637_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005638
Martin v. Löwis399a6892002-10-04 10:22:02 +00005639fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005640
Guido van Rossum84e7b241996-08-19 21:59:00 +00005641# Add some code to confdefs.h so that the test for off_t works on SCO
5642cat >> confdefs.h <<\EOF
5643#if defined(SCO_DS)
5644#undef _OFF_T
5645#endif
5646EOF
5647
Guido van Rossumef2255b2000-03-10 22:30:29 +00005648# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005649echo "$as_me:$LINENO: checking for mode_t" >&5
5650echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5651if test "${ac_cv_type_mode_t+set}" = set; then
5652 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005653else
Martin v. Löwis11437992002-04-12 09:54:03 +00005654 cat >conftest.$ac_ext <<_ACEOF
5655#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005656/* confdefs.h. */
5657_ACEOF
5658cat confdefs.h >>conftest.$ac_ext
5659cat >>conftest.$ac_ext <<_ACEOF
5660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005661$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005662int
5663main ()
5664{
5665if ((mode_t *) 0)
5666 return 0;
5667if (sizeof (mode_t))
5668 return 0;
5669 ;
5670 return 0;
5671}
5672_ACEOF
5673rm -f conftest.$ac_objext
5674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5675 (eval $ac_compile) 2>&5
5676 ac_status=$?
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678 (exit $ac_status); } &&
5679 { ac_try='test -s conftest.$ac_objext'
5680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5681 (eval $ac_try) 2>&5
5682 ac_status=$?
5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005685 ac_cv_type_mode_t=yes
5686else
Martin v. Löwis11437992002-04-12 09:54:03 +00005687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005688sed 's/^/| /' conftest.$ac_ext >&5
5689
Martin v. Löwis11437992002-04-12 09:54:03 +00005690ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005691fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005692rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005693fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005694echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5695echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5696if test $ac_cv_type_mode_t = yes; then
5697 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005698else
Martin v. Löwis11437992002-04-12 09:54:03 +00005699
5700cat >>confdefs.h <<_ACEOF
5701#define mode_t int
5702_ACEOF
5703
5704fi
5705
5706echo "$as_me:$LINENO: checking for off_t" >&5
5707echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5708if test "${ac_cv_type_off_t+set}" = set; then
5709 echo $ECHO_N "(cached) $ECHO_C" >&6
5710else
5711 cat >conftest.$ac_ext <<_ACEOF
5712#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005713/* confdefs.h. */
5714_ACEOF
5715cat confdefs.h >>conftest.$ac_ext
5716cat >>conftest.$ac_ext <<_ACEOF
5717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005718$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005719int
5720main ()
5721{
5722if ((off_t *) 0)
5723 return 0;
5724if (sizeof (off_t))
5725 return 0;
5726 ;
5727 return 0;
5728}
5729_ACEOF
5730rm -f conftest.$ac_objext
5731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5732 (eval $ac_compile) 2>&5
5733 ac_status=$?
5734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5735 (exit $ac_status); } &&
5736 { ac_try='test -s conftest.$ac_objext'
5737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5738 (eval $ac_try) 2>&5
5739 ac_status=$?
5740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5741 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005742 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005743else
Martin v. Löwis11437992002-04-12 09:54:03 +00005744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005745sed 's/^/| /' conftest.$ac_ext >&5
5746
Martin v. Löwis11437992002-04-12 09:54:03 +00005747ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005748fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005749rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005750fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005751echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5752echo "${ECHO_T}$ac_cv_type_off_t" >&6
5753if test $ac_cv_type_off_t = yes; then
5754 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005755else
Martin v. Löwis11437992002-04-12 09:54:03 +00005756
5757cat >>confdefs.h <<_ACEOF
5758#define off_t long
5759_ACEOF
5760
5761fi
5762
5763echo "$as_me:$LINENO: checking for pid_t" >&5
5764echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5765if test "${ac_cv_type_pid_t+set}" = set; then
5766 echo $ECHO_N "(cached) $ECHO_C" >&6
5767else
5768 cat >conftest.$ac_ext <<_ACEOF
5769#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005770/* confdefs.h. */
5771_ACEOF
5772cat confdefs.h >>conftest.$ac_ext
5773cat >>conftest.$ac_ext <<_ACEOF
5774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005775$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005776int
5777main ()
5778{
5779if ((pid_t *) 0)
5780 return 0;
5781if (sizeof (pid_t))
5782 return 0;
5783 ;
5784 return 0;
5785}
5786_ACEOF
5787rm -f conftest.$ac_objext
5788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5789 (eval $ac_compile) 2>&5
5790 ac_status=$?
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); } &&
5793 { ac_try='test -s conftest.$ac_objext'
5794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5795 (eval $ac_try) 2>&5
5796 ac_status=$?
5797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5798 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005799 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005800else
Martin v. Löwis11437992002-04-12 09:54:03 +00005801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005802sed 's/^/| /' conftest.$ac_ext >&5
5803
Martin v. Löwis11437992002-04-12 09:54:03 +00005804ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005805fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005806rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005808echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5809echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5810if test $ac_cv_type_pid_t = yes; then
5811 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005812else
Martin v. Löwis11437992002-04-12 09:54:03 +00005813
5814cat >>confdefs.h <<_ACEOF
5815#define pid_t int
5816_ACEOF
5817
5818fi
5819
5820echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5821echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5822if test "${ac_cv_type_signal+set}" = set; then
5823 echo $ECHO_N "(cached) $ECHO_C" >&6
5824else
5825 cat >conftest.$ac_ext <<_ACEOF
5826#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005827/* confdefs.h. */
5828_ACEOF
5829cat confdefs.h >>conftest.$ac_ext
5830cat >>conftest.$ac_ext <<_ACEOF
5831/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005832#include <sys/types.h>
5833#include <signal.h>
5834#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005835# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005836#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005837#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005838extern "C" void (*signal (int, void (*)(int)))(int);
5839#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005840void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005841#endif
5842
Martin v. Löwis11437992002-04-12 09:54:03 +00005843int
5844main ()
5845{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005846int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005847 ;
5848 return 0;
5849}
5850_ACEOF
5851rm -f conftest.$ac_objext
5852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5853 (eval $ac_compile) 2>&5
5854 ac_status=$?
5855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5856 (exit $ac_status); } &&
5857 { ac_try='test -s conftest.$ac_objext'
5858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5859 (eval $ac_try) 2>&5
5860 ac_status=$?
5861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5862 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005863 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005864else
Martin v. Löwis11437992002-04-12 09:54:03 +00005865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005866sed 's/^/| /' conftest.$ac_ext >&5
5867
Martin v. Löwis11437992002-04-12 09:54:03 +00005868ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005869fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005870rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005871fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005872echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5873echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005874
Martin v. Löwis11437992002-04-12 09:54:03 +00005875cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005876#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005877_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005878
Michael W. Hudson54241132001-12-07 15:38:26 +00005879
Martin v. Löwis11437992002-04-12 09:54:03 +00005880echo "$as_me:$LINENO: checking for size_t" >&5
5881echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5882if test "${ac_cv_type_size_t+set}" = set; then
5883 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005884else
Martin v. Löwis11437992002-04-12 09:54:03 +00005885 cat >conftest.$ac_ext <<_ACEOF
5886#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005887/* confdefs.h. */
5888_ACEOF
5889cat confdefs.h >>conftest.$ac_ext
5890cat >>conftest.$ac_ext <<_ACEOF
5891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005892$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005893int
5894main ()
5895{
5896if ((size_t *) 0)
5897 return 0;
5898if (sizeof (size_t))
5899 return 0;
5900 ;
5901 return 0;
5902}
5903_ACEOF
5904rm -f conftest.$ac_objext
5905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5906 (eval $ac_compile) 2>&5
5907 ac_status=$?
5908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5909 (exit $ac_status); } &&
5910 { ac_try='test -s conftest.$ac_objext'
5911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5912 (eval $ac_try) 2>&5
5913 ac_status=$?
5914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5915 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005916 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005917else
Martin v. Löwis11437992002-04-12 09:54:03 +00005918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005919sed 's/^/| /' conftest.$ac_ext >&5
5920
Martin v. Löwis11437992002-04-12 09:54:03 +00005921ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005922fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005923rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005924fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005925echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5926echo "${ECHO_T}$ac_cv_type_size_t" >&6
5927if test $ac_cv_type_size_t = yes; then
5928 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005929else
Martin v. Löwis11437992002-04-12 09:54:03 +00005930
5931cat >>confdefs.h <<_ACEOF
5932#define size_t unsigned
5933_ACEOF
5934
5935fi
5936
5937echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5938echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5939if test "${ac_cv_type_uid_t+set}" = set; then
5940 echo $ECHO_N "(cached) $ECHO_C" >&6
5941else
5942 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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005949#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005950
5951_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005953 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005954 ac_cv_type_uid_t=yes
5955else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005956 ac_cv_type_uid_t=no
5957fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005958rm -f conftest*
5959
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005960fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005961echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5962echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005963if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005964
Martin v. Löwis11437992002-04-12 09:54:03 +00005965cat >>confdefs.h <<\_ACEOF
5966#define uid_t int
5967_ACEOF
5968
5969
5970cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005971#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005972_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005973
5974fi
5975
Jack Jansendd19cf82001-12-06 22:36:17 +00005976
Michael W. Hudson54241132001-12-07 15:38:26 +00005977# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005978echo "$as_me:$LINENO: checking for int" >&5
5979echo $ECHO_N "checking for int... $ECHO_C" >&6
5980if test "${ac_cv_type_int+set}" = set; then
5981 echo $ECHO_N "(cached) $ECHO_C" >&6
5982else
5983 cat >conftest.$ac_ext <<_ACEOF
5984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005985/* confdefs.h. */
5986_ACEOF
5987cat confdefs.h >>conftest.$ac_ext
5988cat >>conftest.$ac_ext <<_ACEOF
5989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005990$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005991int
5992main ()
5993{
5994if ((int *) 0)
5995 return 0;
5996if (sizeof (int))
5997 return 0;
5998 ;
5999 return 0;
6000}
6001_ACEOF
6002rm -f conftest.$ac_objext
6003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6004 (eval $ac_compile) 2>&5
6005 ac_status=$?
6006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6007 (exit $ac_status); } &&
6008 { ac_try='test -s conftest.$ac_objext'
6009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6010 (eval $ac_try) 2>&5
6011 ac_status=$?
6012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6013 (exit $ac_status); }; }; then
6014 ac_cv_type_int=yes
6015else
6016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006017sed 's/^/| /' conftest.$ac_ext >&5
6018
Martin v. Löwis11437992002-04-12 09:54:03 +00006019ac_cv_type_int=no
6020fi
6021rm -f conftest.$ac_objext conftest.$ac_ext
6022fi
6023echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6024echo "${ECHO_T}$ac_cv_type_int" >&6
6025
6026echo "$as_me:$LINENO: checking size of int" >&5
6027echo $ECHO_N "checking size of int... $ECHO_C" >&6
6028if test "${ac_cv_sizeof_int+set}" = set; then
6029 echo $ECHO_N "(cached) $ECHO_C" >&6
6030else
6031 if test "$ac_cv_type_int" = yes; then
6032 # The cast to unsigned long works around a bug in the HP C Compiler
6033 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6034 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6035 # This bug is HP SR number 8606223364.
6036 if test "$cross_compiling" = yes; then
6037 # Depending upon the size, compute the lo and hi bounds.
6038cat >conftest.$ac_ext <<_ACEOF
6039#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006040/* confdefs.h. */
6041_ACEOF
6042cat confdefs.h >>conftest.$ac_ext
6043cat >>conftest.$ac_ext <<_ACEOF
6044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006045$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006046int
6047main ()
6048{
6049static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6050test_array [0] = 0
6051
6052 ;
6053 return 0;
6054}
6055_ACEOF
6056rm -f conftest.$ac_objext
6057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6058 (eval $ac_compile) 2>&5
6059 ac_status=$?
6060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6061 (exit $ac_status); } &&
6062 { ac_try='test -s conftest.$ac_objext'
6063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6064 (eval $ac_try) 2>&5
6065 ac_status=$?
6066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6067 (exit $ac_status); }; }; then
6068 ac_lo=0 ac_mid=0
6069 while :; do
6070 cat >conftest.$ac_ext <<_ACEOF
6071#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006072/* confdefs.h. */
6073_ACEOF
6074cat confdefs.h >>conftest.$ac_ext
6075cat >>conftest.$ac_ext <<_ACEOF
6076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006077$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006078int
6079main ()
6080{
6081static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6082test_array [0] = 0
6083
6084 ;
6085 return 0;
6086}
6087_ACEOF
6088rm -f conftest.$ac_objext
6089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6090 (eval $ac_compile) 2>&5
6091 ac_status=$?
6092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093 (exit $ac_status); } &&
6094 { ac_try='test -s conftest.$ac_objext'
6095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6096 (eval $ac_try) 2>&5
6097 ac_status=$?
6098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099 (exit $ac_status); }; }; then
6100 ac_hi=$ac_mid; break
6101else
6102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006103sed 's/^/| /' conftest.$ac_ext >&5
6104
Martin v. Löwis11437992002-04-12 09:54:03 +00006105ac_lo=`expr $ac_mid + 1`
6106 if test $ac_lo -le $ac_mid; then
6107 ac_lo= ac_hi=
6108 break
6109 fi
6110 ac_mid=`expr 2 '*' $ac_mid + 1`
6111fi
6112rm -f conftest.$ac_objext conftest.$ac_ext
6113 done
6114else
6115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006116sed 's/^/| /' conftest.$ac_ext >&5
6117
Martin v. Löwis11437992002-04-12 09:54:03 +00006118cat >conftest.$ac_ext <<_ACEOF
6119#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006120/* confdefs.h. */
6121_ACEOF
6122cat confdefs.h >>conftest.$ac_ext
6123cat >>conftest.$ac_ext <<_ACEOF
6124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006125$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006126int
6127main ()
6128{
6129static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6130test_array [0] = 0
6131
6132 ;
6133 return 0;
6134}
6135_ACEOF
6136rm -f conftest.$ac_objext
6137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6138 (eval $ac_compile) 2>&5
6139 ac_status=$?
6140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6141 (exit $ac_status); } &&
6142 { ac_try='test -s conftest.$ac_objext'
6143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6144 (eval $ac_try) 2>&5
6145 ac_status=$?
6146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6147 (exit $ac_status); }; }; then
6148 ac_hi=-1 ac_mid=-1
6149 while :; do
6150 cat >conftest.$ac_ext <<_ACEOF
6151#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006152/* confdefs.h. */
6153_ACEOF
6154cat confdefs.h >>conftest.$ac_ext
6155cat >>conftest.$ac_ext <<_ACEOF
6156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006157$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006158int
6159main ()
6160{
6161static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6162test_array [0] = 0
6163
6164 ;
6165 return 0;
6166}
6167_ACEOF
6168rm -f conftest.$ac_objext
6169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6170 (eval $ac_compile) 2>&5
6171 ac_status=$?
6172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173 (exit $ac_status); } &&
6174 { ac_try='test -s conftest.$ac_objext'
6175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6176 (eval $ac_try) 2>&5
6177 ac_status=$?
6178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6179 (exit $ac_status); }; }; then
6180 ac_lo=$ac_mid; break
6181else
6182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006183sed 's/^/| /' conftest.$ac_ext >&5
6184
Martin v. Löwis11437992002-04-12 09:54:03 +00006185ac_hi=`expr '(' $ac_mid ')' - 1`
6186 if test $ac_mid -le $ac_hi; then
6187 ac_lo= ac_hi=
6188 break
6189 fi
6190 ac_mid=`expr 2 '*' $ac_mid`
6191fi
6192rm -f conftest.$ac_objext conftest.$ac_ext
6193 done
6194else
6195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006196sed 's/^/| /' conftest.$ac_ext >&5
6197
Martin v. Löwis11437992002-04-12 09:54:03 +00006198ac_lo= ac_hi=
6199fi
6200rm -f conftest.$ac_objext conftest.$ac_ext
6201fi
6202rm -f conftest.$ac_objext conftest.$ac_ext
6203# Binary search between lo and hi bounds.
6204while test "x$ac_lo" != "x$ac_hi"; do
6205 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6206 cat >conftest.$ac_ext <<_ACEOF
6207#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006208/* confdefs.h. */
6209_ACEOF
6210cat confdefs.h >>conftest.$ac_ext
6211cat >>conftest.$ac_ext <<_ACEOF
6212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006213$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006214int
6215main ()
6216{
6217static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6218test_array [0] = 0
6219
6220 ;
6221 return 0;
6222}
6223_ACEOF
6224rm -f conftest.$ac_objext
6225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6226 (eval $ac_compile) 2>&5
6227 ac_status=$?
6228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6229 (exit $ac_status); } &&
6230 { ac_try='test -s conftest.$ac_objext'
6231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6232 (eval $ac_try) 2>&5
6233 ac_status=$?
6234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6235 (exit $ac_status); }; }; then
6236 ac_hi=$ac_mid
6237else
6238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006239sed 's/^/| /' conftest.$ac_ext >&5
6240
Martin v. Löwis11437992002-04-12 09:54:03 +00006241ac_lo=`expr '(' $ac_mid ')' + 1`
6242fi
6243rm -f conftest.$ac_objext conftest.$ac_ext
6244done
6245case $ac_lo in
6246?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006247'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6248See \`config.log' for more details." >&5
6249echo "$as_me: error: cannot compute sizeof (int), 77
6250See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006251 { (exit 1); exit 1; }; } ;;
6252esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006253else
6254 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006255 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6256See \`config.log' for more details." >&5
6257echo "$as_me: error: cannot run test program while cross compiling
6258See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006259 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006260else
Martin v. Löwis11437992002-04-12 09:54:03 +00006261 cat >conftest.$ac_ext <<_ACEOF
6262#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006263/* confdefs.h. */
6264_ACEOF
6265cat confdefs.h >>conftest.$ac_ext
6266cat >>conftest.$ac_ext <<_ACEOF
6267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006268$ac_includes_default
6269long longval () { return (long) (sizeof (int)); }
6270unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006271#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006272#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006273int
6274main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006275{
Martin v. Löwis11437992002-04-12 09:54:03 +00006276
6277 FILE *f = fopen ("conftest.val", "w");
6278 if (! f)
6279 exit (1);
6280 if (((long) (sizeof (int))) < 0)
6281 {
6282 long i = longval ();
6283 if (i != ((long) (sizeof (int))))
6284 exit (1);
6285 fprintf (f, "%ld\n", i);
6286 }
6287 else
6288 {
6289 unsigned long i = ulongval ();
6290 if (i != ((long) (sizeof (int))))
6291 exit (1);
6292 fprintf (f, "%lu\n", i);
6293 }
6294 exit (ferror (f) || fclose (f) != 0);
6295
6296 ;
6297 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006298}
Martin v. Löwis11437992002-04-12 09:54:03 +00006299_ACEOF
6300rm -f conftest$ac_exeext
6301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6302 (eval $ac_link) 2>&5
6303 ac_status=$?
6304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6305 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6307 (eval $ac_try) 2>&5
6308 ac_status=$?
6309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6310 (exit $ac_status); }; }; then
6311 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006312else
Martin v. Löwis11437992002-04-12 09:54:03 +00006313 echo "$as_me: program exited with status $ac_status" >&5
6314echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006315sed 's/^/| /' conftest.$ac_ext >&5
6316
Martin v. Löwis11437992002-04-12 09:54:03 +00006317( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006318{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6319See \`config.log' for more details." >&5
6320echo "$as_me: error: cannot compute sizeof (int), 77
6321See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006322 { (exit 1); exit 1; }; }
6323fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006324rm -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 +00006325fi
6326fi
6327rm -f conftest.val
6328else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006329 ac_cv_sizeof_int=0
6330fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006331fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006332echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6333echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6334cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006335#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006336_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006337
6338
Martin v. Löwis11437992002-04-12 09:54:03 +00006339echo "$as_me:$LINENO: checking for long" >&5
6340echo $ECHO_N "checking for long... $ECHO_C" >&6
6341if test "${ac_cv_type_long+set}" = set; then
6342 echo $ECHO_N "(cached) $ECHO_C" >&6
6343else
6344 cat >conftest.$ac_ext <<_ACEOF
6345#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006346/* confdefs.h. */
6347_ACEOF
6348cat confdefs.h >>conftest.$ac_ext
6349cat >>conftest.$ac_ext <<_ACEOF
6350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006351$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006352int
6353main ()
6354{
6355if ((long *) 0)
6356 return 0;
6357if (sizeof (long))
6358 return 0;
6359 ;
6360 return 0;
6361}
6362_ACEOF
6363rm -f conftest.$ac_objext
6364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6365 (eval $ac_compile) 2>&5
6366 ac_status=$?
6367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6368 (exit $ac_status); } &&
6369 { ac_try='test -s conftest.$ac_objext'
6370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6371 (eval $ac_try) 2>&5
6372 ac_status=$?
6373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6374 (exit $ac_status); }; }; then
6375 ac_cv_type_long=yes
6376else
6377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006378sed 's/^/| /' conftest.$ac_ext >&5
6379
Martin v. Löwis11437992002-04-12 09:54:03 +00006380ac_cv_type_long=no
6381fi
6382rm -f conftest.$ac_objext conftest.$ac_ext
6383fi
6384echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6385echo "${ECHO_T}$ac_cv_type_long" >&6
6386
6387echo "$as_me:$LINENO: checking size of long" >&5
6388echo $ECHO_N "checking size of long... $ECHO_C" >&6
6389if test "${ac_cv_sizeof_long+set}" = set; then
6390 echo $ECHO_N "(cached) $ECHO_C" >&6
6391else
6392 if test "$ac_cv_type_long" = yes; then
6393 # The cast to unsigned long works around a bug in the HP C Compiler
6394 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6395 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6396 # This bug is HP SR number 8606223364.
6397 if test "$cross_compiling" = yes; then
6398 # Depending upon the size, compute the lo and hi bounds.
6399cat >conftest.$ac_ext <<_ACEOF
6400#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006401/* confdefs.h. */
6402_ACEOF
6403cat confdefs.h >>conftest.$ac_ext
6404cat >>conftest.$ac_ext <<_ACEOF
6405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006406$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006407int
6408main ()
6409{
6410static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6411test_array [0] = 0
6412
6413 ;
6414 return 0;
6415}
6416_ACEOF
6417rm -f conftest.$ac_objext
6418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6419 (eval $ac_compile) 2>&5
6420 ac_status=$?
6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422 (exit $ac_status); } &&
6423 { ac_try='test -s conftest.$ac_objext'
6424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6425 (eval $ac_try) 2>&5
6426 ac_status=$?
6427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6428 (exit $ac_status); }; }; then
6429 ac_lo=0 ac_mid=0
6430 while :; do
6431 cat >conftest.$ac_ext <<_ACEOF
6432#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006433/* confdefs.h. */
6434_ACEOF
6435cat confdefs.h >>conftest.$ac_ext
6436cat >>conftest.$ac_ext <<_ACEOF
6437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006438$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006439int
6440main ()
6441{
6442static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6443test_array [0] = 0
6444
6445 ;
6446 return 0;
6447}
6448_ACEOF
6449rm -f conftest.$ac_objext
6450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6451 (eval $ac_compile) 2>&5
6452 ac_status=$?
6453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6454 (exit $ac_status); } &&
6455 { ac_try='test -s conftest.$ac_objext'
6456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6457 (eval $ac_try) 2>&5
6458 ac_status=$?
6459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6460 (exit $ac_status); }; }; then
6461 ac_hi=$ac_mid; break
6462else
6463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006464sed 's/^/| /' conftest.$ac_ext >&5
6465
Martin v. Löwis11437992002-04-12 09:54:03 +00006466ac_lo=`expr $ac_mid + 1`
6467 if test $ac_lo -le $ac_mid; then
6468 ac_lo= ac_hi=
6469 break
6470 fi
6471 ac_mid=`expr 2 '*' $ac_mid + 1`
6472fi
6473rm -f conftest.$ac_objext conftest.$ac_ext
6474 done
6475else
6476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006477sed 's/^/| /' conftest.$ac_ext >&5
6478
Martin v. Löwis11437992002-04-12 09:54:03 +00006479cat >conftest.$ac_ext <<_ACEOF
6480#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006481/* confdefs.h. */
6482_ACEOF
6483cat confdefs.h >>conftest.$ac_ext
6484cat >>conftest.$ac_ext <<_ACEOF
6485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006486$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006487int
6488main ()
6489{
6490static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6491test_array [0] = 0
6492
6493 ;
6494 return 0;
6495}
6496_ACEOF
6497rm -f conftest.$ac_objext
6498if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6499 (eval $ac_compile) 2>&5
6500 ac_status=$?
6501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6502 (exit $ac_status); } &&
6503 { ac_try='test -s conftest.$ac_objext'
6504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6505 (eval $ac_try) 2>&5
6506 ac_status=$?
6507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6508 (exit $ac_status); }; }; then
6509 ac_hi=-1 ac_mid=-1
6510 while :; do
6511 cat >conftest.$ac_ext <<_ACEOF
6512#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006513/* confdefs.h. */
6514_ACEOF
6515cat confdefs.h >>conftest.$ac_ext
6516cat >>conftest.$ac_ext <<_ACEOF
6517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006518$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006519int
6520main ()
6521{
6522static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6523test_array [0] = 0
6524
6525 ;
6526 return 0;
6527}
6528_ACEOF
6529rm -f conftest.$ac_objext
6530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6531 (eval $ac_compile) 2>&5
6532 ac_status=$?
6533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6534 (exit $ac_status); } &&
6535 { ac_try='test -s conftest.$ac_objext'
6536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6537 (eval $ac_try) 2>&5
6538 ac_status=$?
6539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6540 (exit $ac_status); }; }; then
6541 ac_lo=$ac_mid; break
6542else
6543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006544sed 's/^/| /' conftest.$ac_ext >&5
6545
Martin v. Löwis11437992002-04-12 09:54:03 +00006546ac_hi=`expr '(' $ac_mid ')' - 1`
6547 if test $ac_mid -le $ac_hi; then
6548 ac_lo= ac_hi=
6549 break
6550 fi
6551 ac_mid=`expr 2 '*' $ac_mid`
6552fi
6553rm -f conftest.$ac_objext conftest.$ac_ext
6554 done
6555else
6556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006557sed 's/^/| /' conftest.$ac_ext >&5
6558
Martin v. Löwis11437992002-04-12 09:54:03 +00006559ac_lo= ac_hi=
6560fi
6561rm -f conftest.$ac_objext conftest.$ac_ext
6562fi
6563rm -f conftest.$ac_objext conftest.$ac_ext
6564# Binary search between lo and hi bounds.
6565while test "x$ac_lo" != "x$ac_hi"; do
6566 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6567 cat >conftest.$ac_ext <<_ACEOF
6568#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006569/* confdefs.h. */
6570_ACEOF
6571cat confdefs.h >>conftest.$ac_ext
6572cat >>conftest.$ac_ext <<_ACEOF
6573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006574$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006575int
6576main ()
6577{
6578static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6579test_array [0] = 0
6580
6581 ;
6582 return 0;
6583}
6584_ACEOF
6585rm -f conftest.$ac_objext
6586if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6587 (eval $ac_compile) 2>&5
6588 ac_status=$?
6589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590 (exit $ac_status); } &&
6591 { ac_try='test -s conftest.$ac_objext'
6592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6593 (eval $ac_try) 2>&5
6594 ac_status=$?
6595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6596 (exit $ac_status); }; }; then
6597 ac_hi=$ac_mid
6598else
6599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006600sed 's/^/| /' conftest.$ac_ext >&5
6601
Martin v. Löwis11437992002-04-12 09:54:03 +00006602ac_lo=`expr '(' $ac_mid ')' + 1`
6603fi
6604rm -f conftest.$ac_objext conftest.$ac_ext
6605done
6606case $ac_lo in
6607?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006608'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6609See \`config.log' for more details." >&5
6610echo "$as_me: error: cannot compute sizeof (long), 77
6611See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006612 { (exit 1); exit 1; }; } ;;
6613esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006614else
6615 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006616 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6617See \`config.log' for more details." >&5
6618echo "$as_me: error: cannot run test program while cross compiling
6619See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006620 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006621else
Martin v. Löwis11437992002-04-12 09:54:03 +00006622 cat >conftest.$ac_ext <<_ACEOF
6623#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006624/* confdefs.h. */
6625_ACEOF
6626cat confdefs.h >>conftest.$ac_ext
6627cat >>conftest.$ac_ext <<_ACEOF
6628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006629$ac_includes_default
6630long longval () { return (long) (sizeof (long)); }
6631unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006632#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006633#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006634int
6635main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006636{
Martin v. Löwis11437992002-04-12 09:54:03 +00006637
6638 FILE *f = fopen ("conftest.val", "w");
6639 if (! f)
6640 exit (1);
6641 if (((long) (sizeof (long))) < 0)
6642 {
6643 long i = longval ();
6644 if (i != ((long) (sizeof (long))))
6645 exit (1);
6646 fprintf (f, "%ld\n", i);
6647 }
6648 else
6649 {
6650 unsigned long i = ulongval ();
6651 if (i != ((long) (sizeof (long))))
6652 exit (1);
6653 fprintf (f, "%lu\n", i);
6654 }
6655 exit (ferror (f) || fclose (f) != 0);
6656
6657 ;
6658 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006659}
Martin v. Löwis11437992002-04-12 09:54:03 +00006660_ACEOF
6661rm -f conftest$ac_exeext
6662if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6663 (eval $ac_link) 2>&5
6664 ac_status=$?
6665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6666 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6668 (eval $ac_try) 2>&5
6669 ac_status=$?
6670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6671 (exit $ac_status); }; }; then
6672 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006673else
Martin v. Löwis11437992002-04-12 09:54:03 +00006674 echo "$as_me: program exited with status $ac_status" >&5
6675echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006676sed 's/^/| /' conftest.$ac_ext >&5
6677
Martin v. Löwis11437992002-04-12 09:54:03 +00006678( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006679{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6680See \`config.log' for more details." >&5
6681echo "$as_me: error: cannot compute sizeof (long), 77
6682See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006683 { (exit 1); exit 1; }; }
6684fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006685rm -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 +00006686fi
6687fi
6688rm -f conftest.val
6689else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006690 ac_cv_sizeof_long=0
6691fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006692fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006693echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6694echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6695cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006696#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006697_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006698
6699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700echo "$as_me:$LINENO: checking for void *" >&5
6701echo $ECHO_N "checking for void *... $ECHO_C" >&6
6702if test "${ac_cv_type_void_p+set}" = set; then
6703 echo $ECHO_N "(cached) $ECHO_C" >&6
6704else
6705 cat >conftest.$ac_ext <<_ACEOF
6706#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006707/* confdefs.h. */
6708_ACEOF
6709cat confdefs.h >>conftest.$ac_ext
6710cat >>conftest.$ac_ext <<_ACEOF
6711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006712$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006713int
6714main ()
6715{
6716if ((void * *) 0)
6717 return 0;
6718if (sizeof (void *))
6719 return 0;
6720 ;
6721 return 0;
6722}
6723_ACEOF
6724rm -f conftest.$ac_objext
6725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6726 (eval $ac_compile) 2>&5
6727 ac_status=$?
6728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6729 (exit $ac_status); } &&
6730 { ac_try='test -s conftest.$ac_objext'
6731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6732 (eval $ac_try) 2>&5
6733 ac_status=$?
6734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6735 (exit $ac_status); }; }; then
6736 ac_cv_type_void_p=yes
6737else
6738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006739sed 's/^/| /' conftest.$ac_ext >&5
6740
Martin v. Löwis11437992002-04-12 09:54:03 +00006741ac_cv_type_void_p=no
6742fi
6743rm -f conftest.$ac_objext conftest.$ac_ext
6744fi
6745echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6746echo "${ECHO_T}$ac_cv_type_void_p" >&6
6747
6748echo "$as_me:$LINENO: checking size of void *" >&5
6749echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6750if test "${ac_cv_sizeof_void_p+set}" = set; then
6751 echo $ECHO_N "(cached) $ECHO_C" >&6
6752else
6753 if test "$ac_cv_type_void_p" = yes; then
6754 # The cast to unsigned long works around a bug in the HP C Compiler
6755 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6756 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6757 # This bug is HP SR number 8606223364.
6758 if test "$cross_compiling" = yes; then
6759 # Depending upon the size, compute the lo and hi bounds.
6760cat >conftest.$ac_ext <<_ACEOF
6761#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006762/* confdefs.h. */
6763_ACEOF
6764cat confdefs.h >>conftest.$ac_ext
6765cat >>conftest.$ac_ext <<_ACEOF
6766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006767$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006768int
6769main ()
6770{
6771static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6772test_array [0] = 0
6773
6774 ;
6775 return 0;
6776}
6777_ACEOF
6778rm -f conftest.$ac_objext
6779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6780 (eval $ac_compile) 2>&5
6781 ac_status=$?
6782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6783 (exit $ac_status); } &&
6784 { ac_try='test -s conftest.$ac_objext'
6785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6786 (eval $ac_try) 2>&5
6787 ac_status=$?
6788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6789 (exit $ac_status); }; }; then
6790 ac_lo=0 ac_mid=0
6791 while :; do
6792 cat >conftest.$ac_ext <<_ACEOF
6793#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006794/* confdefs.h. */
6795_ACEOF
6796cat confdefs.h >>conftest.$ac_ext
6797cat >>conftest.$ac_ext <<_ACEOF
6798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006799$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006800int
6801main ()
6802{
6803static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6804test_array [0] = 0
6805
6806 ;
6807 return 0;
6808}
6809_ACEOF
6810rm -f conftest.$ac_objext
6811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6812 (eval $ac_compile) 2>&5
6813 ac_status=$?
6814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6815 (exit $ac_status); } &&
6816 { ac_try='test -s conftest.$ac_objext'
6817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6818 (eval $ac_try) 2>&5
6819 ac_status=$?
6820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6821 (exit $ac_status); }; }; then
6822 ac_hi=$ac_mid; break
6823else
6824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006825sed 's/^/| /' conftest.$ac_ext >&5
6826
Martin v. Löwis11437992002-04-12 09:54:03 +00006827ac_lo=`expr $ac_mid + 1`
6828 if test $ac_lo -le $ac_mid; then
6829 ac_lo= ac_hi=
6830 break
6831 fi
6832 ac_mid=`expr 2 '*' $ac_mid + 1`
6833fi
6834rm -f conftest.$ac_objext conftest.$ac_ext
6835 done
6836else
6837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006838sed 's/^/| /' conftest.$ac_ext >&5
6839
Martin v. Löwis11437992002-04-12 09:54:03 +00006840cat >conftest.$ac_ext <<_ACEOF
6841#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006842/* confdefs.h. */
6843_ACEOF
6844cat confdefs.h >>conftest.$ac_ext
6845cat >>conftest.$ac_ext <<_ACEOF
6846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006847$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006848int
6849main ()
6850{
6851static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6852test_array [0] = 0
6853
6854 ;
6855 return 0;
6856}
6857_ACEOF
6858rm -f conftest.$ac_objext
6859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6860 (eval $ac_compile) 2>&5
6861 ac_status=$?
6862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6863 (exit $ac_status); } &&
6864 { ac_try='test -s conftest.$ac_objext'
6865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6866 (eval $ac_try) 2>&5
6867 ac_status=$?
6868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6869 (exit $ac_status); }; }; then
6870 ac_hi=-1 ac_mid=-1
6871 while :; do
6872 cat >conftest.$ac_ext <<_ACEOF
6873#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006874/* confdefs.h. */
6875_ACEOF
6876cat confdefs.h >>conftest.$ac_ext
6877cat >>conftest.$ac_ext <<_ACEOF
6878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006879$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006880int
6881main ()
6882{
6883static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6884test_array [0] = 0
6885
6886 ;
6887 return 0;
6888}
6889_ACEOF
6890rm -f conftest.$ac_objext
6891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6892 (eval $ac_compile) 2>&5
6893 ac_status=$?
6894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6895 (exit $ac_status); } &&
6896 { ac_try='test -s conftest.$ac_objext'
6897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6898 (eval $ac_try) 2>&5
6899 ac_status=$?
6900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6901 (exit $ac_status); }; }; then
6902 ac_lo=$ac_mid; break
6903else
6904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006905sed 's/^/| /' conftest.$ac_ext >&5
6906
Martin v. Löwis11437992002-04-12 09:54:03 +00006907ac_hi=`expr '(' $ac_mid ')' - 1`
6908 if test $ac_mid -le $ac_hi; then
6909 ac_lo= ac_hi=
6910 break
6911 fi
6912 ac_mid=`expr 2 '*' $ac_mid`
6913fi
6914rm -f conftest.$ac_objext conftest.$ac_ext
6915 done
6916else
6917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006918sed 's/^/| /' conftest.$ac_ext >&5
6919
Martin v. Löwis11437992002-04-12 09:54:03 +00006920ac_lo= ac_hi=
6921fi
6922rm -f conftest.$ac_objext conftest.$ac_ext
6923fi
6924rm -f conftest.$ac_objext conftest.$ac_ext
6925# Binary search between lo and hi bounds.
6926while test "x$ac_lo" != "x$ac_hi"; do
6927 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6928 cat >conftest.$ac_ext <<_ACEOF
6929#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006930/* confdefs.h. */
6931_ACEOF
6932cat confdefs.h >>conftest.$ac_ext
6933cat >>conftest.$ac_ext <<_ACEOF
6934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006935$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006936int
6937main ()
6938{
6939static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6940test_array [0] = 0
6941
6942 ;
6943 return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
6947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6948 (eval $ac_compile) 2>&5
6949 ac_status=$?
6950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6951 (exit $ac_status); } &&
6952 { ac_try='test -s conftest.$ac_objext'
6953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6954 (eval $ac_try) 2>&5
6955 ac_status=$?
6956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6957 (exit $ac_status); }; }; then
6958 ac_hi=$ac_mid
6959else
6960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006961sed 's/^/| /' conftest.$ac_ext >&5
6962
Martin v. Löwis11437992002-04-12 09:54:03 +00006963ac_lo=`expr '(' $ac_mid ')' + 1`
6964fi
6965rm -f conftest.$ac_objext conftest.$ac_ext
6966done
6967case $ac_lo in
6968?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006969'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6970See \`config.log' for more details." >&5
6971echo "$as_me: error: cannot compute sizeof (void *), 77
6972See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006973 { (exit 1); exit 1; }; } ;;
6974esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006975else
6976 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006977 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6978See \`config.log' for more details." >&5
6979echo "$as_me: error: cannot run test program while cross compiling
6980See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006981 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006982else
Martin v. Löwis11437992002-04-12 09:54:03 +00006983 cat >conftest.$ac_ext <<_ACEOF
6984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006985/* confdefs.h. */
6986_ACEOF
6987cat confdefs.h >>conftest.$ac_ext
6988cat >>conftest.$ac_ext <<_ACEOF
6989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006990$ac_includes_default
6991long longval () { return (long) (sizeof (void *)); }
6992unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006993#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006994#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006995int
6996main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006997{
Martin v. Löwis11437992002-04-12 09:54:03 +00006998
6999 FILE *f = fopen ("conftest.val", "w");
7000 if (! f)
7001 exit (1);
7002 if (((long) (sizeof (void *))) < 0)
7003 {
7004 long i = longval ();
7005 if (i != ((long) (sizeof (void *))))
7006 exit (1);
7007 fprintf (f, "%ld\n", i);
7008 }
7009 else
7010 {
7011 unsigned long i = ulongval ();
7012 if (i != ((long) (sizeof (void *))))
7013 exit (1);
7014 fprintf (f, "%lu\n", i);
7015 }
7016 exit (ferror (f) || fclose (f) != 0);
7017
7018 ;
7019 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007020}
Martin v. Löwis11437992002-04-12 09:54:03 +00007021_ACEOF
7022rm -f conftest$ac_exeext
7023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7024 (eval $ac_link) 2>&5
7025 ac_status=$?
7026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7029 (eval $ac_try) 2>&5
7030 ac_status=$?
7031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7032 (exit $ac_status); }; }; then
7033 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007034else
Martin v. Löwis11437992002-04-12 09:54:03 +00007035 echo "$as_me: program exited with status $ac_status" >&5
7036echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007037sed 's/^/| /' conftest.$ac_ext >&5
7038
Martin v. Löwis11437992002-04-12 09:54:03 +00007039( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007040{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7041See \`config.log' for more details." >&5
7042echo "$as_me: error: cannot compute sizeof (void *), 77
7043See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007044 { (exit 1); exit 1; }; }
7045fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007046rm -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 +00007047fi
7048fi
7049rm -f conftest.val
7050else
Guido van Rossumad678af1998-10-02 14:42:15 +00007051 ac_cv_sizeof_void_p=0
7052fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007053fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007054echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7055echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7056cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007057#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007058_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007059
7060
Martin v. Löwis11437992002-04-12 09:54:03 +00007061echo "$as_me:$LINENO: checking for char" >&5
7062echo $ECHO_N "checking for char... $ECHO_C" >&6
7063if test "${ac_cv_type_char+set}" = set; then
7064 echo $ECHO_N "(cached) $ECHO_C" >&6
7065else
7066 cat >conftest.$ac_ext <<_ACEOF
7067#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007068/* confdefs.h. */
7069_ACEOF
7070cat confdefs.h >>conftest.$ac_ext
7071cat >>conftest.$ac_ext <<_ACEOF
7072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007073$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007074int
7075main ()
7076{
7077if ((char *) 0)
7078 return 0;
7079if (sizeof (char))
7080 return 0;
7081 ;
7082 return 0;
7083}
7084_ACEOF
7085rm -f conftest.$ac_objext
7086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7087 (eval $ac_compile) 2>&5
7088 ac_status=$?
7089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7090 (exit $ac_status); } &&
7091 { ac_try='test -s conftest.$ac_objext'
7092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7093 (eval $ac_try) 2>&5
7094 ac_status=$?
7095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7096 (exit $ac_status); }; }; then
7097 ac_cv_type_char=yes
7098else
7099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007100sed 's/^/| /' conftest.$ac_ext >&5
7101
Martin v. Löwis11437992002-04-12 09:54:03 +00007102ac_cv_type_char=no
7103fi
7104rm -f conftest.$ac_objext conftest.$ac_ext
7105fi
7106echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
7107echo "${ECHO_T}$ac_cv_type_char" >&6
7108
7109echo "$as_me:$LINENO: checking size of char" >&5
7110echo $ECHO_N "checking size of char... $ECHO_C" >&6
7111if test "${ac_cv_sizeof_char+set}" = set; then
7112 echo $ECHO_N "(cached) $ECHO_C" >&6
7113else
7114 if test "$ac_cv_type_char" = yes; then
7115 # The cast to unsigned long works around a bug in the HP C Compiler
7116 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7117 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7118 # This bug is HP SR number 8606223364.
7119 if test "$cross_compiling" = yes; then
7120 # Depending upon the size, compute the lo and hi bounds.
7121cat >conftest.$ac_ext <<_ACEOF
7122#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007123/* confdefs.h. */
7124_ACEOF
7125cat confdefs.h >>conftest.$ac_ext
7126cat >>conftest.$ac_ext <<_ACEOF
7127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007128$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007129int
7130main ()
7131{
7132static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
7133test_array [0] = 0
7134
7135 ;
7136 return 0;
7137}
7138_ACEOF
7139rm -f conftest.$ac_objext
7140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7141 (eval $ac_compile) 2>&5
7142 ac_status=$?
7143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7144 (exit $ac_status); } &&
7145 { ac_try='test -s conftest.$ac_objext'
7146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7147 (eval $ac_try) 2>&5
7148 ac_status=$?
7149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7150 (exit $ac_status); }; }; then
7151 ac_lo=0 ac_mid=0
7152 while :; do
7153 cat >conftest.$ac_ext <<_ACEOF
7154#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007155/* confdefs.h. */
7156_ACEOF
7157cat confdefs.h >>conftest.$ac_ext
7158cat >>conftest.$ac_ext <<_ACEOF
7159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007160$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007161int
7162main ()
7163{
7164static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
7165test_array [0] = 0
7166
7167 ;
7168 return 0;
7169}
7170_ACEOF
7171rm -f conftest.$ac_objext
7172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7173 (eval $ac_compile) 2>&5
7174 ac_status=$?
7175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7176 (exit $ac_status); } &&
7177 { ac_try='test -s conftest.$ac_objext'
7178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7179 (eval $ac_try) 2>&5
7180 ac_status=$?
7181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7182 (exit $ac_status); }; }; then
7183 ac_hi=$ac_mid; break
7184else
7185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007186sed 's/^/| /' conftest.$ac_ext >&5
7187
Martin v. Löwis11437992002-04-12 09:54:03 +00007188ac_lo=`expr $ac_mid + 1`
7189 if test $ac_lo -le $ac_mid; then
7190 ac_lo= ac_hi=
7191 break
7192 fi
7193 ac_mid=`expr 2 '*' $ac_mid + 1`
7194fi
7195rm -f conftest.$ac_objext conftest.$ac_ext
7196 done
7197else
7198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007199sed 's/^/| /' conftest.$ac_ext >&5
7200
Martin v. Löwis11437992002-04-12 09:54:03 +00007201cat >conftest.$ac_ext <<_ACEOF
7202#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007203/* confdefs.h. */
7204_ACEOF
7205cat confdefs.h >>conftest.$ac_ext
7206cat >>conftest.$ac_ext <<_ACEOF
7207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007208$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007209int
7210main ()
7211{
7212static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
7213test_array [0] = 0
7214
7215 ;
7216 return 0;
7217}
7218_ACEOF
7219rm -f conftest.$ac_objext
7220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7221 (eval $ac_compile) 2>&5
7222 ac_status=$?
7223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7224 (exit $ac_status); } &&
7225 { ac_try='test -s conftest.$ac_objext'
7226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7227 (eval $ac_try) 2>&5
7228 ac_status=$?
7229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7230 (exit $ac_status); }; }; then
7231 ac_hi=-1 ac_mid=-1
7232 while :; do
7233 cat >conftest.$ac_ext <<_ACEOF
7234#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007235/* confdefs.h. */
7236_ACEOF
7237cat confdefs.h >>conftest.$ac_ext
7238cat >>conftest.$ac_ext <<_ACEOF
7239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007240$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007241int
7242main ()
7243{
7244static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
7245test_array [0] = 0
7246
7247 ;
7248 return 0;
7249}
7250_ACEOF
7251rm -f conftest.$ac_objext
7252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7253 (eval $ac_compile) 2>&5
7254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); } &&
7257 { ac_try='test -s conftest.$ac_objext'
7258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7259 (eval $ac_try) 2>&5
7260 ac_status=$?
7261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7262 (exit $ac_status); }; }; then
7263 ac_lo=$ac_mid; break
7264else
7265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007266sed 's/^/| /' conftest.$ac_ext >&5
7267
Martin v. Löwis11437992002-04-12 09:54:03 +00007268ac_hi=`expr '(' $ac_mid ')' - 1`
7269 if test $ac_mid -le $ac_hi; then
7270 ac_lo= ac_hi=
7271 break
7272 fi
7273 ac_mid=`expr 2 '*' $ac_mid`
7274fi
7275rm -f conftest.$ac_objext conftest.$ac_ext
7276 done
7277else
7278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007279sed 's/^/| /' conftest.$ac_ext >&5
7280
Martin v. Löwis11437992002-04-12 09:54:03 +00007281ac_lo= ac_hi=
7282fi
7283rm -f conftest.$ac_objext conftest.$ac_ext
7284fi
7285rm -f conftest.$ac_objext conftest.$ac_ext
7286# Binary search between lo and hi bounds.
7287while test "x$ac_lo" != "x$ac_hi"; do
7288 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7289 cat >conftest.$ac_ext <<_ACEOF
7290#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007291/* confdefs.h. */
7292_ACEOF
7293cat confdefs.h >>conftest.$ac_ext
7294cat >>conftest.$ac_ext <<_ACEOF
7295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007296$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007297int
7298main ()
7299{
7300static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
7301test_array [0] = 0
7302
7303 ;
7304 return 0;
7305}
7306_ACEOF
7307rm -f conftest.$ac_objext
7308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7309 (eval $ac_compile) 2>&5
7310 ac_status=$?
7311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7312 (exit $ac_status); } &&
7313 { ac_try='test -s conftest.$ac_objext'
7314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7315 (eval $ac_try) 2>&5
7316 ac_status=$?
7317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7318 (exit $ac_status); }; }; then
7319 ac_hi=$ac_mid
7320else
7321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007322sed 's/^/| /' conftest.$ac_ext >&5
7323
Martin v. Löwis11437992002-04-12 09:54:03 +00007324ac_lo=`expr '(' $ac_mid ')' + 1`
7325fi
7326rm -f conftest.$ac_objext conftest.$ac_ext
7327done
7328case $ac_lo in
7329?*) ac_cv_sizeof_char=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007330'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
7331See \`config.log' for more details." >&5
7332echo "$as_me: error: cannot compute sizeof (char), 77
7333See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007334 { (exit 1); exit 1; }; } ;;
7335esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007336else
7337 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007338 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7339See \`config.log' for more details." >&5
7340echo "$as_me: error: cannot run test program while cross compiling
7341See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007342 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007343else
Martin v. Löwis11437992002-04-12 09:54:03 +00007344 cat >conftest.$ac_ext <<_ACEOF
7345#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007346/* confdefs.h. */
7347_ACEOF
7348cat confdefs.h >>conftest.$ac_ext
7349cat >>conftest.$ac_ext <<_ACEOF
7350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007351$ac_includes_default
7352long longval () { return (long) (sizeof (char)); }
7353unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007354#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007355#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007356int
7357main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007358{
Martin v. Löwis11437992002-04-12 09:54:03 +00007359
7360 FILE *f = fopen ("conftest.val", "w");
7361 if (! f)
7362 exit (1);
7363 if (((long) (sizeof (char))) < 0)
7364 {
7365 long i = longval ();
7366 if (i != ((long) (sizeof (char))))
7367 exit (1);
7368 fprintf (f, "%ld\n", i);
7369 }
7370 else
7371 {
7372 unsigned long i = ulongval ();
7373 if (i != ((long) (sizeof (char))))
7374 exit (1);
7375 fprintf (f, "%lu\n", i);
7376 }
7377 exit (ferror (f) || fclose (f) != 0);
7378
7379 ;
7380 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007381}
Martin v. Löwis11437992002-04-12 09:54:03 +00007382_ACEOF
7383rm -f conftest$ac_exeext
7384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7385 (eval $ac_link) 2>&5
7386 ac_status=$?
7387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7388 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7390 (eval $ac_try) 2>&5
7391 ac_status=$?
7392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7393 (exit $ac_status); }; }; then
7394 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007395else
Martin v. Löwis11437992002-04-12 09:54:03 +00007396 echo "$as_me: program exited with status $ac_status" >&5
7397echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007398sed 's/^/| /' conftest.$ac_ext >&5
7399
Martin v. Löwis11437992002-04-12 09:54:03 +00007400( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007401{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
7402See \`config.log' for more details." >&5
7403echo "$as_me: error: cannot compute sizeof (char), 77
7404See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007405 { (exit 1); exit 1; }; }
7406fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007407rm -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 +00007408fi
7409fi
7410rm -f conftest.val
7411else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007412 ac_cv_sizeof_char=0
7413fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007414fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007415echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
7416echo "${ECHO_T}$ac_cv_sizeof_char" >&6
7417cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007418#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00007419_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007420
7421
Martin v. Löwis11437992002-04-12 09:54:03 +00007422echo "$as_me:$LINENO: checking for short" >&5
7423echo $ECHO_N "checking for short... $ECHO_C" >&6
7424if test "${ac_cv_type_short+set}" = set; then
7425 echo $ECHO_N "(cached) $ECHO_C" >&6
7426else
7427 cat >conftest.$ac_ext <<_ACEOF
7428#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007429/* confdefs.h. */
7430_ACEOF
7431cat confdefs.h >>conftest.$ac_ext
7432cat >>conftest.$ac_ext <<_ACEOF
7433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007434$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007435int
7436main ()
7437{
7438if ((short *) 0)
7439 return 0;
7440if (sizeof (short))
7441 return 0;
7442 ;
7443 return 0;
7444}
7445_ACEOF
7446rm -f conftest.$ac_objext
7447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7448 (eval $ac_compile) 2>&5
7449 ac_status=$?
7450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7451 (exit $ac_status); } &&
7452 { ac_try='test -s conftest.$ac_objext'
7453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7454 (eval $ac_try) 2>&5
7455 ac_status=$?
7456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7457 (exit $ac_status); }; }; then
7458 ac_cv_type_short=yes
7459else
7460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007461sed 's/^/| /' conftest.$ac_ext >&5
7462
Martin v. Löwis11437992002-04-12 09:54:03 +00007463ac_cv_type_short=no
7464fi
7465rm -f conftest.$ac_objext conftest.$ac_ext
7466fi
7467echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7468echo "${ECHO_T}$ac_cv_type_short" >&6
7469
7470echo "$as_me:$LINENO: checking size of short" >&5
7471echo $ECHO_N "checking size of short... $ECHO_C" >&6
7472if test "${ac_cv_sizeof_short+set}" = set; then
7473 echo $ECHO_N "(cached) $ECHO_C" >&6
7474else
7475 if test "$ac_cv_type_short" = yes; then
7476 # The cast to unsigned long works around a bug in the HP C Compiler
7477 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7478 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7479 # This bug is HP SR number 8606223364.
7480 if test "$cross_compiling" = yes; then
7481 # Depending upon the size, compute the lo and hi bounds.
7482cat >conftest.$ac_ext <<_ACEOF
7483#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007484/* confdefs.h. */
7485_ACEOF
7486cat confdefs.h >>conftest.$ac_ext
7487cat >>conftest.$ac_ext <<_ACEOF
7488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007489$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007490int
7491main ()
7492{
7493static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7494test_array [0] = 0
7495
7496 ;
7497 return 0;
7498}
7499_ACEOF
7500rm -f conftest.$ac_objext
7501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7502 (eval $ac_compile) 2>&5
7503 ac_status=$?
7504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7505 (exit $ac_status); } &&
7506 { ac_try='test -s conftest.$ac_objext'
7507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7508 (eval $ac_try) 2>&5
7509 ac_status=$?
7510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7511 (exit $ac_status); }; }; then
7512 ac_lo=0 ac_mid=0
7513 while :; do
7514 cat >conftest.$ac_ext <<_ACEOF
7515#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007516/* confdefs.h. */
7517_ACEOF
7518cat confdefs.h >>conftest.$ac_ext
7519cat >>conftest.$ac_ext <<_ACEOF
7520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007521$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007522int
7523main ()
7524{
7525static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7526test_array [0] = 0
7527
7528 ;
7529 return 0;
7530}
7531_ACEOF
7532rm -f conftest.$ac_objext
7533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7534 (eval $ac_compile) 2>&5
7535 ac_status=$?
7536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7537 (exit $ac_status); } &&
7538 { ac_try='test -s conftest.$ac_objext'
7539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7540 (eval $ac_try) 2>&5
7541 ac_status=$?
7542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543 (exit $ac_status); }; }; then
7544 ac_hi=$ac_mid; break
7545else
7546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007547sed 's/^/| /' conftest.$ac_ext >&5
7548
Martin v. Löwis11437992002-04-12 09:54:03 +00007549ac_lo=`expr $ac_mid + 1`
7550 if test $ac_lo -le $ac_mid; then
7551 ac_lo= ac_hi=
7552 break
7553 fi
7554 ac_mid=`expr 2 '*' $ac_mid + 1`
7555fi
7556rm -f conftest.$ac_objext conftest.$ac_ext
7557 done
7558else
7559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007560sed 's/^/| /' conftest.$ac_ext >&5
7561
Martin v. Löwis11437992002-04-12 09:54:03 +00007562cat >conftest.$ac_ext <<_ACEOF
7563#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007564/* confdefs.h. */
7565_ACEOF
7566cat confdefs.h >>conftest.$ac_ext
7567cat >>conftest.$ac_ext <<_ACEOF
7568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007569$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007570int
7571main ()
7572{
7573static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7574test_array [0] = 0
7575
7576 ;
7577 return 0;
7578}
7579_ACEOF
7580rm -f conftest.$ac_objext
7581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7582 (eval $ac_compile) 2>&5
7583 ac_status=$?
7584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7585 (exit $ac_status); } &&
7586 { ac_try='test -s conftest.$ac_objext'
7587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7588 (eval $ac_try) 2>&5
7589 ac_status=$?
7590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7591 (exit $ac_status); }; }; then
7592 ac_hi=-1 ac_mid=-1
7593 while :; do
7594 cat >conftest.$ac_ext <<_ACEOF
7595#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007596/* confdefs.h. */
7597_ACEOF
7598cat confdefs.h >>conftest.$ac_ext
7599cat >>conftest.$ac_ext <<_ACEOF
7600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007601$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007602int
7603main ()
7604{
7605static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7606test_array [0] = 0
7607
7608 ;
7609 return 0;
7610}
7611_ACEOF
7612rm -f conftest.$ac_objext
7613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7614 (eval $ac_compile) 2>&5
7615 ac_status=$?
7616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617 (exit $ac_status); } &&
7618 { ac_try='test -s conftest.$ac_objext'
7619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7620 (eval $ac_try) 2>&5
7621 ac_status=$?
7622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7623 (exit $ac_status); }; }; then
7624 ac_lo=$ac_mid; break
7625else
7626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007627sed 's/^/| /' conftest.$ac_ext >&5
7628
Martin v. Löwis11437992002-04-12 09:54:03 +00007629ac_hi=`expr '(' $ac_mid ')' - 1`
7630 if test $ac_mid -le $ac_hi; then
7631 ac_lo= ac_hi=
7632 break
7633 fi
7634 ac_mid=`expr 2 '*' $ac_mid`
7635fi
7636rm -f conftest.$ac_objext conftest.$ac_ext
7637 done
7638else
7639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007640sed 's/^/| /' conftest.$ac_ext >&5
7641
Martin v. Löwis11437992002-04-12 09:54:03 +00007642ac_lo= ac_hi=
7643fi
7644rm -f conftest.$ac_objext conftest.$ac_ext
7645fi
7646rm -f conftest.$ac_objext conftest.$ac_ext
7647# Binary search between lo and hi bounds.
7648while test "x$ac_lo" != "x$ac_hi"; do
7649 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7650 cat >conftest.$ac_ext <<_ACEOF
7651#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007652/* confdefs.h. */
7653_ACEOF
7654cat confdefs.h >>conftest.$ac_ext
7655cat >>conftest.$ac_ext <<_ACEOF
7656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007657$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007658int
7659main ()
7660{
7661static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7662test_array [0] = 0
7663
7664 ;
7665 return 0;
7666}
7667_ACEOF
7668rm -f conftest.$ac_objext
7669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7670 (eval $ac_compile) 2>&5
7671 ac_status=$?
7672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7673 (exit $ac_status); } &&
7674 { ac_try='test -s conftest.$ac_objext'
7675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7676 (eval $ac_try) 2>&5
7677 ac_status=$?
7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679 (exit $ac_status); }; }; then
7680 ac_hi=$ac_mid
7681else
7682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007683sed 's/^/| /' conftest.$ac_ext >&5
7684
Martin v. Löwis11437992002-04-12 09:54:03 +00007685ac_lo=`expr '(' $ac_mid ')' + 1`
7686fi
7687rm -f conftest.$ac_objext conftest.$ac_ext
7688done
7689case $ac_lo in
7690?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007691'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7692See \`config.log' for more details." >&5
7693echo "$as_me: error: cannot compute sizeof (short), 77
7694See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007695 { (exit 1); exit 1; }; } ;;
7696esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007697else
7698 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007699 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7700See \`config.log' for more details." >&5
7701echo "$as_me: error: cannot run test program while cross compiling
7702See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007703 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007704else
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 cat >conftest.$ac_ext <<_ACEOF
7706#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007707/* confdefs.h. */
7708_ACEOF
7709cat confdefs.h >>conftest.$ac_ext
7710cat >>conftest.$ac_ext <<_ACEOF
7711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007712$ac_includes_default
7713long longval () { return (long) (sizeof (short)); }
7714unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007715#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007716#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007717int
7718main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007719{
Martin v. Löwis11437992002-04-12 09:54:03 +00007720
7721 FILE *f = fopen ("conftest.val", "w");
7722 if (! f)
7723 exit (1);
7724 if (((long) (sizeof (short))) < 0)
7725 {
7726 long i = longval ();
7727 if (i != ((long) (sizeof (short))))
7728 exit (1);
7729 fprintf (f, "%ld\n", i);
7730 }
7731 else
7732 {
7733 unsigned long i = ulongval ();
7734 if (i != ((long) (sizeof (short))))
7735 exit (1);
7736 fprintf (f, "%lu\n", i);
7737 }
7738 exit (ferror (f) || fclose (f) != 0);
7739
7740 ;
7741 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007742}
Martin v. Löwis11437992002-04-12 09:54:03 +00007743_ACEOF
7744rm -f conftest$ac_exeext
7745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7746 (eval $ac_link) 2>&5
7747 ac_status=$?
7748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7751 (eval $ac_try) 2>&5
7752 ac_status=$?
7753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7754 (exit $ac_status); }; }; then
7755 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007756else
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 echo "$as_me: program exited with status $ac_status" >&5
7758echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007759sed 's/^/| /' conftest.$ac_ext >&5
7760
Martin v. Löwis11437992002-04-12 09:54:03 +00007761( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007762{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7763See \`config.log' for more details." >&5
7764echo "$as_me: error: cannot compute sizeof (short), 77
7765See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 { (exit 1); exit 1; }; }
7767fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007768rm -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 +00007769fi
7770fi
7771rm -f conftest.val
7772else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007773 ac_cv_sizeof_short=0
7774fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007775fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007776echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7777echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7778cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007779#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007780_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007781
7782
Martin v. Löwis11437992002-04-12 09:54:03 +00007783echo "$as_me:$LINENO: checking for float" >&5
7784echo $ECHO_N "checking for float... $ECHO_C" >&6
7785if test "${ac_cv_type_float+set}" = set; then
7786 echo $ECHO_N "(cached) $ECHO_C" >&6
7787else
7788 cat >conftest.$ac_ext <<_ACEOF
7789#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* confdefs.h. */
7791_ACEOF
7792cat confdefs.h >>conftest.$ac_ext
7793cat >>conftest.$ac_ext <<_ACEOF
7794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007795$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007796int
7797main ()
7798{
7799if ((float *) 0)
7800 return 0;
7801if (sizeof (float))
7802 return 0;
7803 ;
7804 return 0;
7805}
7806_ACEOF
7807rm -f conftest.$ac_objext
7808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7809 (eval $ac_compile) 2>&5
7810 ac_status=$?
7811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7812 (exit $ac_status); } &&
7813 { ac_try='test -s conftest.$ac_objext'
7814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7815 (eval $ac_try) 2>&5
7816 ac_status=$?
7817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7818 (exit $ac_status); }; }; then
7819 ac_cv_type_float=yes
7820else
7821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007822sed 's/^/| /' conftest.$ac_ext >&5
7823
Martin v. Löwis11437992002-04-12 09:54:03 +00007824ac_cv_type_float=no
7825fi
7826rm -f conftest.$ac_objext conftest.$ac_ext
7827fi
7828echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7829echo "${ECHO_T}$ac_cv_type_float" >&6
7830
7831echo "$as_me:$LINENO: checking size of float" >&5
7832echo $ECHO_N "checking size of float... $ECHO_C" >&6
7833if test "${ac_cv_sizeof_float+set}" = set; then
7834 echo $ECHO_N "(cached) $ECHO_C" >&6
7835else
7836 if test "$ac_cv_type_float" = yes; then
7837 # The cast to unsigned long works around a bug in the HP C Compiler
7838 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7839 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7840 # This bug is HP SR number 8606223364.
7841 if test "$cross_compiling" = yes; then
7842 # Depending upon the size, compute the lo and hi bounds.
7843cat >conftest.$ac_ext <<_ACEOF
7844#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007845/* confdefs.h. */
7846_ACEOF
7847cat confdefs.h >>conftest.$ac_ext
7848cat >>conftest.$ac_ext <<_ACEOF
7849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007850$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007851int
7852main ()
7853{
7854static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7855test_array [0] = 0
7856
7857 ;
7858 return 0;
7859}
7860_ACEOF
7861rm -f conftest.$ac_objext
7862if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7863 (eval $ac_compile) 2>&5
7864 ac_status=$?
7865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7866 (exit $ac_status); } &&
7867 { ac_try='test -s conftest.$ac_objext'
7868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7869 (eval $ac_try) 2>&5
7870 ac_status=$?
7871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7872 (exit $ac_status); }; }; then
7873 ac_lo=0 ac_mid=0
7874 while :; do
7875 cat >conftest.$ac_ext <<_ACEOF
7876#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007877/* confdefs.h. */
7878_ACEOF
7879cat confdefs.h >>conftest.$ac_ext
7880cat >>conftest.$ac_ext <<_ACEOF
7881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007882$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007883int
7884main ()
7885{
7886static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7887test_array [0] = 0
7888
7889 ;
7890 return 0;
7891}
7892_ACEOF
7893rm -f conftest.$ac_objext
7894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7895 (eval $ac_compile) 2>&5
7896 ac_status=$?
7897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898 (exit $ac_status); } &&
7899 { ac_try='test -s conftest.$ac_objext'
7900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7901 (eval $ac_try) 2>&5
7902 ac_status=$?
7903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904 (exit $ac_status); }; }; then
7905 ac_hi=$ac_mid; break
7906else
7907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007908sed 's/^/| /' conftest.$ac_ext >&5
7909
Martin v. Löwis11437992002-04-12 09:54:03 +00007910ac_lo=`expr $ac_mid + 1`
7911 if test $ac_lo -le $ac_mid; then
7912 ac_lo= ac_hi=
7913 break
7914 fi
7915 ac_mid=`expr 2 '*' $ac_mid + 1`
7916fi
7917rm -f conftest.$ac_objext conftest.$ac_ext
7918 done
7919else
7920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007921sed 's/^/| /' conftest.$ac_ext >&5
7922
Martin v. Löwis11437992002-04-12 09:54:03 +00007923cat >conftest.$ac_ext <<_ACEOF
7924#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007925/* confdefs.h. */
7926_ACEOF
7927cat confdefs.h >>conftest.$ac_ext
7928cat >>conftest.$ac_ext <<_ACEOF
7929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007930$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007931int
7932main ()
7933{
7934static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7935test_array [0] = 0
7936
7937 ;
7938 return 0;
7939}
7940_ACEOF
7941rm -f conftest.$ac_objext
7942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7943 (eval $ac_compile) 2>&5
7944 ac_status=$?
7945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7946 (exit $ac_status); } &&
7947 { ac_try='test -s conftest.$ac_objext'
7948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7949 (eval $ac_try) 2>&5
7950 ac_status=$?
7951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7952 (exit $ac_status); }; }; then
7953 ac_hi=-1 ac_mid=-1
7954 while :; do
7955 cat >conftest.$ac_ext <<_ACEOF
7956#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007957/* confdefs.h. */
7958_ACEOF
7959cat confdefs.h >>conftest.$ac_ext
7960cat >>conftest.$ac_ext <<_ACEOF
7961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007963int
7964main ()
7965{
7966static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7967test_array [0] = 0
7968
7969 ;
7970 return 0;
7971}
7972_ACEOF
7973rm -f conftest.$ac_objext
7974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7975 (eval $ac_compile) 2>&5
7976 ac_status=$?
7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978 (exit $ac_status); } &&
7979 { ac_try='test -s conftest.$ac_objext'
7980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7981 (eval $ac_try) 2>&5
7982 ac_status=$?
7983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7984 (exit $ac_status); }; }; then
7985 ac_lo=$ac_mid; break
7986else
7987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007988sed 's/^/| /' conftest.$ac_ext >&5
7989
Martin v. Löwis11437992002-04-12 09:54:03 +00007990ac_hi=`expr '(' $ac_mid ')' - 1`
7991 if test $ac_mid -le $ac_hi; then
7992 ac_lo= ac_hi=
7993 break
7994 fi
7995 ac_mid=`expr 2 '*' $ac_mid`
7996fi
7997rm -f conftest.$ac_objext conftest.$ac_ext
7998 done
7999else
8000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008001sed 's/^/| /' conftest.$ac_ext >&5
8002
Martin v. Löwis11437992002-04-12 09:54:03 +00008003ac_lo= ac_hi=
8004fi
8005rm -f conftest.$ac_objext conftest.$ac_ext
8006fi
8007rm -f conftest.$ac_objext conftest.$ac_ext
8008# Binary search between lo and hi bounds.
8009while test "x$ac_lo" != "x$ac_hi"; do
8010 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8011 cat >conftest.$ac_ext <<_ACEOF
8012#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008013/* confdefs.h. */
8014_ACEOF
8015cat confdefs.h >>conftest.$ac_ext
8016cat >>conftest.$ac_ext <<_ACEOF
8017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008018$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008019int
8020main ()
8021{
8022static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8023test_array [0] = 0
8024
8025 ;
8026 return 0;
8027}
8028_ACEOF
8029rm -f conftest.$ac_objext
8030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8031 (eval $ac_compile) 2>&5
8032 ac_status=$?
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); } &&
8035 { ac_try='test -s conftest.$ac_objext'
8036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8037 (eval $ac_try) 2>&5
8038 ac_status=$?
8039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8040 (exit $ac_status); }; }; then
8041 ac_hi=$ac_mid
8042else
8043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008044sed 's/^/| /' conftest.$ac_ext >&5
8045
Martin v. Löwis11437992002-04-12 09:54:03 +00008046ac_lo=`expr '(' $ac_mid ')' + 1`
8047fi
8048rm -f conftest.$ac_objext conftest.$ac_ext
8049done
8050case $ac_lo in
8051?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008052'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8053See \`config.log' for more details." >&5
8054echo "$as_me: error: cannot compute sizeof (float), 77
8055See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008056 { (exit 1); exit 1; }; } ;;
8057esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008058else
8059 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008060 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8061See \`config.log' for more details." >&5
8062echo "$as_me: error: cannot run test program while cross compiling
8063See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008064 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008065else
Martin v. Löwis11437992002-04-12 09:54:03 +00008066 cat >conftest.$ac_ext <<_ACEOF
8067#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008068/* confdefs.h. */
8069_ACEOF
8070cat confdefs.h >>conftest.$ac_ext
8071cat >>conftest.$ac_ext <<_ACEOF
8072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008073$ac_includes_default
8074long longval () { return (long) (sizeof (float)); }
8075unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008076#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008077#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008078int
8079main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008080{
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
8082 FILE *f = fopen ("conftest.val", "w");
8083 if (! f)
8084 exit (1);
8085 if (((long) (sizeof (float))) < 0)
8086 {
8087 long i = longval ();
8088 if (i != ((long) (sizeof (float))))
8089 exit (1);
8090 fprintf (f, "%ld\n", i);
8091 }
8092 else
8093 {
8094 unsigned long i = ulongval ();
8095 if (i != ((long) (sizeof (float))))
8096 exit (1);
8097 fprintf (f, "%lu\n", i);
8098 }
8099 exit (ferror (f) || fclose (f) != 0);
8100
8101 ;
8102 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008103}
Martin v. Löwis11437992002-04-12 09:54:03 +00008104_ACEOF
8105rm -f conftest$ac_exeext
8106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8107 (eval $ac_link) 2>&5
8108 ac_status=$?
8109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8110 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8112 (eval $ac_try) 2>&5
8113 ac_status=$?
8114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8115 (exit $ac_status); }; }; then
8116 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008117else
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 echo "$as_me: program exited with status $ac_status" >&5
8119echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008120sed 's/^/| /' conftest.$ac_ext >&5
8121
Martin v. Löwis11437992002-04-12 09:54:03 +00008122( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008123{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8124See \`config.log' for more details." >&5
8125echo "$as_me: error: cannot compute sizeof (float), 77
8126See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008127 { (exit 1); exit 1; }; }
8128fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008129rm -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 +00008130fi
8131fi
8132rm -f conftest.val
8133else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008134 ac_cv_sizeof_float=0
8135fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008136fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008137echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8138echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8139cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008140#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008141_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008142
8143
Martin v. Löwis11437992002-04-12 09:54:03 +00008144echo "$as_me:$LINENO: checking for double" >&5
8145echo $ECHO_N "checking for double... $ECHO_C" >&6
8146if test "${ac_cv_type_double+set}" = set; then
8147 echo $ECHO_N "(cached) $ECHO_C" >&6
8148else
8149 cat >conftest.$ac_ext <<_ACEOF
8150#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008151/* confdefs.h. */
8152_ACEOF
8153cat confdefs.h >>conftest.$ac_ext
8154cat >>conftest.$ac_ext <<_ACEOF
8155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008156$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008157int
8158main ()
8159{
8160if ((double *) 0)
8161 return 0;
8162if (sizeof (double))
8163 return 0;
8164 ;
8165 return 0;
8166}
8167_ACEOF
8168rm -f conftest.$ac_objext
8169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8170 (eval $ac_compile) 2>&5
8171 ac_status=$?
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); } &&
8174 { ac_try='test -s conftest.$ac_objext'
8175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8176 (eval $ac_try) 2>&5
8177 ac_status=$?
8178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8179 (exit $ac_status); }; }; then
8180 ac_cv_type_double=yes
8181else
8182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008183sed 's/^/| /' conftest.$ac_ext >&5
8184
Martin v. Löwis11437992002-04-12 09:54:03 +00008185ac_cv_type_double=no
8186fi
8187rm -f conftest.$ac_objext conftest.$ac_ext
8188fi
8189echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8190echo "${ECHO_T}$ac_cv_type_double" >&6
8191
8192echo "$as_me:$LINENO: checking size of double" >&5
8193echo $ECHO_N "checking size of double... $ECHO_C" >&6
8194if test "${ac_cv_sizeof_double+set}" = set; then
8195 echo $ECHO_N "(cached) $ECHO_C" >&6
8196else
8197 if test "$ac_cv_type_double" = yes; then
8198 # The cast to unsigned long works around a bug in the HP C Compiler
8199 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8200 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8201 # This bug is HP SR number 8606223364.
8202 if test "$cross_compiling" = yes; then
8203 # Depending upon the size, compute the lo and hi bounds.
8204cat >conftest.$ac_ext <<_ACEOF
8205#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008206/* confdefs.h. */
8207_ACEOF
8208cat confdefs.h >>conftest.$ac_ext
8209cat >>conftest.$ac_ext <<_ACEOF
8210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008211$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008212int
8213main ()
8214{
8215static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8216test_array [0] = 0
8217
8218 ;
8219 return 0;
8220}
8221_ACEOF
8222rm -f conftest.$ac_objext
8223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8224 (eval $ac_compile) 2>&5
8225 ac_status=$?
8226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8227 (exit $ac_status); } &&
8228 { ac_try='test -s conftest.$ac_objext'
8229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8230 (eval $ac_try) 2>&5
8231 ac_status=$?
8232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8233 (exit $ac_status); }; }; then
8234 ac_lo=0 ac_mid=0
8235 while :; do
8236 cat >conftest.$ac_ext <<_ACEOF
8237#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008238/* confdefs.h. */
8239_ACEOF
8240cat confdefs.h >>conftest.$ac_ext
8241cat >>conftest.$ac_ext <<_ACEOF
8242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008243$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008244int
8245main ()
8246{
8247static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8248test_array [0] = 0
8249
8250 ;
8251 return 0;
8252}
8253_ACEOF
8254rm -f conftest.$ac_objext
8255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8256 (eval $ac_compile) 2>&5
8257 ac_status=$?
8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8259 (exit $ac_status); } &&
8260 { ac_try='test -s conftest.$ac_objext'
8261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8262 (eval $ac_try) 2>&5
8263 ac_status=$?
8264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8265 (exit $ac_status); }; }; then
8266 ac_hi=$ac_mid; break
8267else
8268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008269sed 's/^/| /' conftest.$ac_ext >&5
8270
Martin v. Löwis11437992002-04-12 09:54:03 +00008271ac_lo=`expr $ac_mid + 1`
8272 if test $ac_lo -le $ac_mid; then
8273 ac_lo= ac_hi=
8274 break
8275 fi
8276 ac_mid=`expr 2 '*' $ac_mid + 1`
8277fi
8278rm -f conftest.$ac_objext conftest.$ac_ext
8279 done
8280else
8281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008282sed 's/^/| /' conftest.$ac_ext >&5
8283
Martin v. Löwis11437992002-04-12 09:54:03 +00008284cat >conftest.$ac_ext <<_ACEOF
8285#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008286/* confdefs.h. */
8287_ACEOF
8288cat confdefs.h >>conftest.$ac_ext
8289cat >>conftest.$ac_ext <<_ACEOF
8290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008291$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008292int
8293main ()
8294{
8295static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8296test_array [0] = 0
8297
8298 ;
8299 return 0;
8300}
8301_ACEOF
8302rm -f conftest.$ac_objext
8303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8304 (eval $ac_compile) 2>&5
8305 ac_status=$?
8306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8307 (exit $ac_status); } &&
8308 { ac_try='test -s conftest.$ac_objext'
8309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8310 (eval $ac_try) 2>&5
8311 ac_status=$?
8312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8313 (exit $ac_status); }; }; then
8314 ac_hi=-1 ac_mid=-1
8315 while :; do
8316 cat >conftest.$ac_ext <<_ACEOF
8317#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008318/* confdefs.h. */
8319_ACEOF
8320cat confdefs.h >>conftest.$ac_ext
8321cat >>conftest.$ac_ext <<_ACEOF
8322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008323$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008324int
8325main ()
8326{
8327static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8328test_array [0] = 0
8329
8330 ;
8331 return 0;
8332}
8333_ACEOF
8334rm -f conftest.$ac_objext
8335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8336 (eval $ac_compile) 2>&5
8337 ac_status=$?
8338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8339 (exit $ac_status); } &&
8340 { ac_try='test -s conftest.$ac_objext'
8341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8342 (eval $ac_try) 2>&5
8343 ac_status=$?
8344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8345 (exit $ac_status); }; }; then
8346 ac_lo=$ac_mid; break
8347else
8348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008349sed 's/^/| /' conftest.$ac_ext >&5
8350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351ac_hi=`expr '(' $ac_mid ')' - 1`
8352 if test $ac_mid -le $ac_hi; then
8353 ac_lo= ac_hi=
8354 break
8355 fi
8356 ac_mid=`expr 2 '*' $ac_mid`
8357fi
8358rm -f conftest.$ac_objext conftest.$ac_ext
8359 done
8360else
8361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008362sed 's/^/| /' conftest.$ac_ext >&5
8363
Martin v. Löwis11437992002-04-12 09:54:03 +00008364ac_lo= ac_hi=
8365fi
8366rm -f conftest.$ac_objext conftest.$ac_ext
8367fi
8368rm -f conftest.$ac_objext conftest.$ac_ext
8369# Binary search between lo and hi bounds.
8370while test "x$ac_lo" != "x$ac_hi"; do
8371 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8372 cat >conftest.$ac_ext <<_ACEOF
8373#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008374/* confdefs.h. */
8375_ACEOF
8376cat confdefs.h >>conftest.$ac_ext
8377cat >>conftest.$ac_ext <<_ACEOF
8378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008379$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008380int
8381main ()
8382{
8383static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8384test_array [0] = 0
8385
8386 ;
8387 return 0;
8388}
8389_ACEOF
8390rm -f conftest.$ac_objext
8391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8392 (eval $ac_compile) 2>&5
8393 ac_status=$?
8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395 (exit $ac_status); } &&
8396 { ac_try='test -s conftest.$ac_objext'
8397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8398 (eval $ac_try) 2>&5
8399 ac_status=$?
8400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8401 (exit $ac_status); }; }; then
8402 ac_hi=$ac_mid
8403else
8404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008405sed 's/^/| /' conftest.$ac_ext >&5
8406
Martin v. Löwis11437992002-04-12 09:54:03 +00008407ac_lo=`expr '(' $ac_mid ')' + 1`
8408fi
8409rm -f conftest.$ac_objext conftest.$ac_ext
8410done
8411case $ac_lo in
8412?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008413'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8414See \`config.log' for more details." >&5
8415echo "$as_me: error: cannot compute sizeof (double), 77
8416See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008417 { (exit 1); exit 1; }; } ;;
8418esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008419else
8420 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008421 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8422See \`config.log' for more details." >&5
8423echo "$as_me: error: cannot run test program while cross compiling
8424See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008426else
Martin v. Löwis11437992002-04-12 09:54:03 +00008427 cat >conftest.$ac_ext <<_ACEOF
8428#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008429/* confdefs.h. */
8430_ACEOF
8431cat confdefs.h >>conftest.$ac_ext
8432cat >>conftest.$ac_ext <<_ACEOF
8433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008434$ac_includes_default
8435long longval () { return (long) (sizeof (double)); }
8436unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008437#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008438#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008439int
8440main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008441{
Martin v. Löwis11437992002-04-12 09:54:03 +00008442
8443 FILE *f = fopen ("conftest.val", "w");
8444 if (! f)
8445 exit (1);
8446 if (((long) (sizeof (double))) < 0)
8447 {
8448 long i = longval ();
8449 if (i != ((long) (sizeof (double))))
8450 exit (1);
8451 fprintf (f, "%ld\n", i);
8452 }
8453 else
8454 {
8455 unsigned long i = ulongval ();
8456 if (i != ((long) (sizeof (double))))
8457 exit (1);
8458 fprintf (f, "%lu\n", i);
8459 }
8460 exit (ferror (f) || fclose (f) != 0);
8461
8462 ;
8463 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008464}
Martin v. Löwis11437992002-04-12 09:54:03 +00008465_ACEOF
8466rm -f conftest$ac_exeext
8467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8468 (eval $ac_link) 2>&5
8469 ac_status=$?
8470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8471 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8473 (eval $ac_try) 2>&5
8474 ac_status=$?
8475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8476 (exit $ac_status); }; }; then
8477 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008478else
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 echo "$as_me: program exited with status $ac_status" >&5
8480echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008481sed 's/^/| /' conftest.$ac_ext >&5
8482
Martin v. Löwis11437992002-04-12 09:54:03 +00008483( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008484{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8485See \`config.log' for more details." >&5
8486echo "$as_me: error: cannot compute sizeof (double), 77
8487See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 { (exit 1); exit 1; }; }
8489fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008490rm -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 +00008491fi
8492fi
8493rm -f conftest.val
8494else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008495 ac_cv_sizeof_double=0
8496fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008497fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008498echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8499echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8500cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008501#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008502_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008503
8504
Martin v. Löwis11437992002-04-12 09:54:03 +00008505echo "$as_me:$LINENO: checking for fpos_t" >&5
8506echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8507if test "${ac_cv_type_fpos_t+set}" = set; then
8508 echo $ECHO_N "(cached) $ECHO_C" >&6
8509else
8510 cat >conftest.$ac_ext <<_ACEOF
8511#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008512/* confdefs.h. */
8513_ACEOF
8514cat confdefs.h >>conftest.$ac_ext
8515cat >>conftest.$ac_ext <<_ACEOF
8516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008517$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008518int
8519main ()
8520{
8521if ((fpos_t *) 0)
8522 return 0;
8523if (sizeof (fpos_t))
8524 return 0;
8525 ;
8526 return 0;
8527}
8528_ACEOF
8529rm -f conftest.$ac_objext
8530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8531 (eval $ac_compile) 2>&5
8532 ac_status=$?
8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534 (exit $ac_status); } &&
8535 { ac_try='test -s conftest.$ac_objext'
8536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8537 (eval $ac_try) 2>&5
8538 ac_status=$?
8539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8540 (exit $ac_status); }; }; then
8541 ac_cv_type_fpos_t=yes
8542else
8543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008544sed 's/^/| /' conftest.$ac_ext >&5
8545
Martin v. Löwis11437992002-04-12 09:54:03 +00008546ac_cv_type_fpos_t=no
8547fi
8548rm -f conftest.$ac_objext conftest.$ac_ext
8549fi
8550echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8551echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8552
8553echo "$as_me:$LINENO: checking size of fpos_t" >&5
8554echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8555if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8556 echo $ECHO_N "(cached) $ECHO_C" >&6
8557else
8558 if test "$ac_cv_type_fpos_t" = yes; then
8559 # The cast to unsigned long works around a bug in the HP C Compiler
8560 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8561 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8562 # This bug is HP SR number 8606223364.
8563 if test "$cross_compiling" = yes; then
8564 # Depending upon the size, compute the lo and hi bounds.
8565cat >conftest.$ac_ext <<_ACEOF
8566#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008567/* confdefs.h. */
8568_ACEOF
8569cat confdefs.h >>conftest.$ac_ext
8570cat >>conftest.$ac_ext <<_ACEOF
8571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008572$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008573int
8574main ()
8575{
8576static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8577test_array [0] = 0
8578
8579 ;
8580 return 0;
8581}
8582_ACEOF
8583rm -f conftest.$ac_objext
8584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8585 (eval $ac_compile) 2>&5
8586 ac_status=$?
8587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8588 (exit $ac_status); } &&
8589 { ac_try='test -s conftest.$ac_objext'
8590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8591 (eval $ac_try) 2>&5
8592 ac_status=$?
8593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8594 (exit $ac_status); }; }; then
8595 ac_lo=0 ac_mid=0
8596 while :; do
8597 cat >conftest.$ac_ext <<_ACEOF
8598#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008599/* confdefs.h. */
8600_ACEOF
8601cat confdefs.h >>conftest.$ac_ext
8602cat >>conftest.$ac_ext <<_ACEOF
8603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008604$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008605int
8606main ()
8607{
8608static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8609test_array [0] = 0
8610
8611 ;
8612 return 0;
8613}
8614_ACEOF
8615rm -f conftest.$ac_objext
8616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8617 (eval $ac_compile) 2>&5
8618 ac_status=$?
8619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8620 (exit $ac_status); } &&
8621 { ac_try='test -s conftest.$ac_objext'
8622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8623 (eval $ac_try) 2>&5
8624 ac_status=$?
8625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8626 (exit $ac_status); }; }; then
8627 ac_hi=$ac_mid; break
8628else
8629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008630sed 's/^/| /' conftest.$ac_ext >&5
8631
Martin v. Löwis11437992002-04-12 09:54:03 +00008632ac_lo=`expr $ac_mid + 1`
8633 if test $ac_lo -le $ac_mid; then
8634 ac_lo= ac_hi=
8635 break
8636 fi
8637 ac_mid=`expr 2 '*' $ac_mid + 1`
8638fi
8639rm -f conftest.$ac_objext conftest.$ac_ext
8640 done
8641else
8642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008643sed 's/^/| /' conftest.$ac_ext >&5
8644
Martin v. Löwis11437992002-04-12 09:54:03 +00008645cat >conftest.$ac_ext <<_ACEOF
8646#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008647/* confdefs.h. */
8648_ACEOF
8649cat confdefs.h >>conftest.$ac_ext
8650cat >>conftest.$ac_ext <<_ACEOF
8651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008652$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008653int
8654main ()
8655{
8656static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8657test_array [0] = 0
8658
8659 ;
8660 return 0;
8661}
8662_ACEOF
8663rm -f conftest.$ac_objext
8664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8665 (eval $ac_compile) 2>&5
8666 ac_status=$?
8667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8668 (exit $ac_status); } &&
8669 { ac_try='test -s conftest.$ac_objext'
8670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8671 (eval $ac_try) 2>&5
8672 ac_status=$?
8673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8674 (exit $ac_status); }; }; then
8675 ac_hi=-1 ac_mid=-1
8676 while :; do
8677 cat >conftest.$ac_ext <<_ACEOF
8678#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008679/* confdefs.h. */
8680_ACEOF
8681cat confdefs.h >>conftest.$ac_ext
8682cat >>conftest.$ac_ext <<_ACEOF
8683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008684$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008685int
8686main ()
8687{
8688static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8689test_array [0] = 0
8690
8691 ;
8692 return 0;
8693}
8694_ACEOF
8695rm -f conftest.$ac_objext
8696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8697 (eval $ac_compile) 2>&5
8698 ac_status=$?
8699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8700 (exit $ac_status); } &&
8701 { ac_try='test -s conftest.$ac_objext'
8702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8703 (eval $ac_try) 2>&5
8704 ac_status=$?
8705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8706 (exit $ac_status); }; }; then
8707 ac_lo=$ac_mid; break
8708else
8709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008710sed 's/^/| /' conftest.$ac_ext >&5
8711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712ac_hi=`expr '(' $ac_mid ')' - 1`
8713 if test $ac_mid -le $ac_hi; then
8714 ac_lo= ac_hi=
8715 break
8716 fi
8717 ac_mid=`expr 2 '*' $ac_mid`
8718fi
8719rm -f conftest.$ac_objext conftest.$ac_ext
8720 done
8721else
8722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008723sed 's/^/| /' conftest.$ac_ext >&5
8724
Martin v. Löwis11437992002-04-12 09:54:03 +00008725ac_lo= ac_hi=
8726fi
8727rm -f conftest.$ac_objext conftest.$ac_ext
8728fi
8729rm -f conftest.$ac_objext conftest.$ac_ext
8730# Binary search between lo and hi bounds.
8731while test "x$ac_lo" != "x$ac_hi"; do
8732 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8733 cat >conftest.$ac_ext <<_ACEOF
8734#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008735/* confdefs.h. */
8736_ACEOF
8737cat confdefs.h >>conftest.$ac_ext
8738cat >>conftest.$ac_ext <<_ACEOF
8739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008740$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008741int
8742main ()
8743{
8744static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8745test_array [0] = 0
8746
8747 ;
8748 return 0;
8749}
8750_ACEOF
8751rm -f conftest.$ac_objext
8752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8753 (eval $ac_compile) 2>&5
8754 ac_status=$?
8755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8756 (exit $ac_status); } &&
8757 { ac_try='test -s conftest.$ac_objext'
8758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8759 (eval $ac_try) 2>&5
8760 ac_status=$?
8761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8762 (exit $ac_status); }; }; then
8763 ac_hi=$ac_mid
8764else
8765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008766sed 's/^/| /' conftest.$ac_ext >&5
8767
Martin v. Löwis11437992002-04-12 09:54:03 +00008768ac_lo=`expr '(' $ac_mid ')' + 1`
8769fi
8770rm -f conftest.$ac_objext conftest.$ac_ext
8771done
8772case $ac_lo in
8773?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008774'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8775See \`config.log' for more details." >&5
8776echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8777See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 { (exit 1); exit 1; }; } ;;
8779esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008780else
8781 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008782 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8783See \`config.log' for more details." >&5
8784echo "$as_me: error: cannot run test program while cross compiling
8785See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008787else
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 cat >conftest.$ac_ext <<_ACEOF
8789#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008790/* confdefs.h. */
8791_ACEOF
8792cat confdefs.h >>conftest.$ac_ext
8793cat >>conftest.$ac_ext <<_ACEOF
8794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008795$ac_includes_default
8796long longval () { return (long) (sizeof (fpos_t)); }
8797unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008798#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008799#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008800int
8801main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008802{
Martin v. Löwis11437992002-04-12 09:54:03 +00008803
8804 FILE *f = fopen ("conftest.val", "w");
8805 if (! f)
8806 exit (1);
8807 if (((long) (sizeof (fpos_t))) < 0)
8808 {
8809 long i = longval ();
8810 if (i != ((long) (sizeof (fpos_t))))
8811 exit (1);
8812 fprintf (f, "%ld\n", i);
8813 }
8814 else
8815 {
8816 unsigned long i = ulongval ();
8817 if (i != ((long) (sizeof (fpos_t))))
8818 exit (1);
8819 fprintf (f, "%lu\n", i);
8820 }
8821 exit (ferror (f) || fclose (f) != 0);
8822
8823 ;
8824 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008825}
Martin v. Löwis11437992002-04-12 09:54:03 +00008826_ACEOF
8827rm -f conftest$ac_exeext
8828if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8829 (eval $ac_link) 2>&5
8830 ac_status=$?
8831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8832 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8834 (eval $ac_try) 2>&5
8835 ac_status=$?
8836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8837 (exit $ac_status); }; }; then
8838 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008839else
Martin v. Löwis11437992002-04-12 09:54:03 +00008840 echo "$as_me: program exited with status $ac_status" >&5
8841echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008842sed 's/^/| /' conftest.$ac_ext >&5
8843
Martin v. Löwis11437992002-04-12 09:54:03 +00008844( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008845{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8846See \`config.log' for more details." >&5
8847echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8848See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 { (exit 1); exit 1; }; }
8850fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008851rm -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 +00008852fi
8853fi
8854rm -f conftest.val
8855else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008856 ac_cv_sizeof_fpos_t=0
8857fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008858fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008859echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8860echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8861cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008862#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008863_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008864
Michael W. Hudson54241132001-12-07 15:38:26 +00008865
8866
Martin v. Löwis11437992002-04-12 09:54:03 +00008867echo "$as_me:$LINENO: checking for long long support" >&5
8868echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008869have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008870cat >conftest.$ac_ext <<_ACEOF
8871#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008872/* confdefs.h. */
8873_ACEOF
8874cat confdefs.h >>conftest.$ac_ext
8875cat >>conftest.$ac_ext <<_ACEOF
8876/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008877
Martin v. Löwis11437992002-04-12 09:54:03 +00008878int
8879main ()
8880{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008881long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 ;
8883 return 0;
8884}
8885_ACEOF
8886rm -f conftest.$ac_objext
8887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8888 (eval $ac_compile) 2>&5
8889 ac_status=$?
8890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8891 (exit $ac_status); } &&
8892 { ac_try='test -s conftest.$ac_objext'
8893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8894 (eval $ac_try) 2>&5
8895 ac_status=$?
8896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8897 (exit $ac_status); }; }; then
8898
8899
8900cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008901#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008902_ACEOF
8903
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008904 have_long_long=yes
8905
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008906else
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008908sed 's/^/| /' conftest.$ac_ext >&5
8909
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008910fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008911rm -f conftest.$ac_objext conftest.$ac_ext
8912echo "$as_me:$LINENO: result: $have_long_long" >&5
8913echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008914if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008915echo "$as_me:$LINENO: checking for long long" >&5
8916echo $ECHO_N "checking for long long... $ECHO_C" >&6
8917if test "${ac_cv_type_long_long+set}" = set; then
8918 echo $ECHO_N "(cached) $ECHO_C" >&6
8919else
8920 cat >conftest.$ac_ext <<_ACEOF
8921#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008922/* confdefs.h. */
8923_ACEOF
8924cat confdefs.h >>conftest.$ac_ext
8925cat >>conftest.$ac_ext <<_ACEOF
8926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008927$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008928int
8929main ()
8930{
8931if ((long long *) 0)
8932 return 0;
8933if (sizeof (long long))
8934 return 0;
8935 ;
8936 return 0;
8937}
8938_ACEOF
8939rm -f conftest.$ac_objext
8940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8941 (eval $ac_compile) 2>&5
8942 ac_status=$?
8943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8944 (exit $ac_status); } &&
8945 { ac_try='test -s conftest.$ac_objext'
8946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8947 (eval $ac_try) 2>&5
8948 ac_status=$?
8949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8950 (exit $ac_status); }; }; then
8951 ac_cv_type_long_long=yes
8952else
8953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008954sed 's/^/| /' conftest.$ac_ext >&5
8955
Martin v. Löwis11437992002-04-12 09:54:03 +00008956ac_cv_type_long_long=no
8957fi
8958rm -f conftest.$ac_objext conftest.$ac_ext
8959fi
8960echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8961echo "${ECHO_T}$ac_cv_type_long_long" >&6
8962
8963echo "$as_me:$LINENO: checking size of long long" >&5
8964echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8965if test "${ac_cv_sizeof_long_long+set}" = set; then
8966 echo $ECHO_N "(cached) $ECHO_C" >&6
8967else
8968 if test "$ac_cv_type_long_long" = yes; then
8969 # The cast to unsigned long works around a bug in the HP C Compiler
8970 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8971 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8972 # This bug is HP SR number 8606223364.
8973 if test "$cross_compiling" = yes; then
8974 # Depending upon the size, compute the lo and hi bounds.
8975cat >conftest.$ac_ext <<_ACEOF
8976#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008977/* confdefs.h. */
8978_ACEOF
8979cat confdefs.h >>conftest.$ac_ext
8980cat >>conftest.$ac_ext <<_ACEOF
8981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008982$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008983int
8984main ()
8985{
8986static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8987test_array [0] = 0
8988
8989 ;
8990 return 0;
8991}
8992_ACEOF
8993rm -f conftest.$ac_objext
8994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8995 (eval $ac_compile) 2>&5
8996 ac_status=$?
8997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8998 (exit $ac_status); } &&
8999 { ac_try='test -s conftest.$ac_objext'
9000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9001 (eval $ac_try) 2>&5
9002 ac_status=$?
9003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9004 (exit $ac_status); }; }; then
9005 ac_lo=0 ac_mid=0
9006 while :; do
9007 cat >conftest.$ac_ext <<_ACEOF
9008#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009009/* confdefs.h. */
9010_ACEOF
9011cat confdefs.h >>conftest.$ac_ext
9012cat >>conftest.$ac_ext <<_ACEOF
9013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009014$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009015int
9016main ()
9017{
9018static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9019test_array [0] = 0
9020
9021 ;
9022 return 0;
9023}
9024_ACEOF
9025rm -f conftest.$ac_objext
9026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9027 (eval $ac_compile) 2>&5
9028 ac_status=$?
9029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030 (exit $ac_status); } &&
9031 { ac_try='test -s conftest.$ac_objext'
9032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9033 (eval $ac_try) 2>&5
9034 ac_status=$?
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); }; }; then
9037 ac_hi=$ac_mid; break
9038else
9039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009040sed 's/^/| /' conftest.$ac_ext >&5
9041
Martin v. Löwis11437992002-04-12 09:54:03 +00009042ac_lo=`expr $ac_mid + 1`
9043 if test $ac_lo -le $ac_mid; then
9044 ac_lo= ac_hi=
9045 break
9046 fi
9047 ac_mid=`expr 2 '*' $ac_mid + 1`
9048fi
9049rm -f conftest.$ac_objext conftest.$ac_ext
9050 done
9051else
9052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009053sed 's/^/| /' conftest.$ac_ext >&5
9054
Martin v. Löwis11437992002-04-12 09:54:03 +00009055cat >conftest.$ac_ext <<_ACEOF
9056#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009057/* confdefs.h. */
9058_ACEOF
9059cat confdefs.h >>conftest.$ac_ext
9060cat >>conftest.$ac_ext <<_ACEOF
9061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009062$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009063int
9064main ()
9065{
9066static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9067test_array [0] = 0
9068
9069 ;
9070 return 0;
9071}
9072_ACEOF
9073rm -f conftest.$ac_objext
9074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9075 (eval $ac_compile) 2>&5
9076 ac_status=$?
9077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078 (exit $ac_status); } &&
9079 { ac_try='test -s conftest.$ac_objext'
9080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9081 (eval $ac_try) 2>&5
9082 ac_status=$?
9083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9084 (exit $ac_status); }; }; then
9085 ac_hi=-1 ac_mid=-1
9086 while :; do
9087 cat >conftest.$ac_ext <<_ACEOF
9088#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009089/* confdefs.h. */
9090_ACEOF
9091cat confdefs.h >>conftest.$ac_ext
9092cat >>conftest.$ac_ext <<_ACEOF
9093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009094$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009095int
9096main ()
9097{
9098static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9099test_array [0] = 0
9100
9101 ;
9102 return 0;
9103}
9104_ACEOF
9105rm -f conftest.$ac_objext
9106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9107 (eval $ac_compile) 2>&5
9108 ac_status=$?
9109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110 (exit $ac_status); } &&
9111 { ac_try='test -s conftest.$ac_objext'
9112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9113 (eval $ac_try) 2>&5
9114 ac_status=$?
9115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9116 (exit $ac_status); }; }; then
9117 ac_lo=$ac_mid; break
9118else
9119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009120sed 's/^/| /' conftest.$ac_ext >&5
9121
Martin v. Löwis11437992002-04-12 09:54:03 +00009122ac_hi=`expr '(' $ac_mid ')' - 1`
9123 if test $ac_mid -le $ac_hi; then
9124 ac_lo= ac_hi=
9125 break
9126 fi
9127 ac_mid=`expr 2 '*' $ac_mid`
9128fi
9129rm -f conftest.$ac_objext conftest.$ac_ext
9130 done
9131else
9132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009133sed 's/^/| /' conftest.$ac_ext >&5
9134
Martin v. Löwis11437992002-04-12 09:54:03 +00009135ac_lo= ac_hi=
9136fi
9137rm -f conftest.$ac_objext conftest.$ac_ext
9138fi
9139rm -f conftest.$ac_objext conftest.$ac_ext
9140# Binary search between lo and hi bounds.
9141while test "x$ac_lo" != "x$ac_hi"; do
9142 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9143 cat >conftest.$ac_ext <<_ACEOF
9144#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009145/* confdefs.h. */
9146_ACEOF
9147cat confdefs.h >>conftest.$ac_ext
9148cat >>conftest.$ac_ext <<_ACEOF
9149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009150$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009151int
9152main ()
9153{
9154static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9155test_array [0] = 0
9156
9157 ;
9158 return 0;
9159}
9160_ACEOF
9161rm -f conftest.$ac_objext
9162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9163 (eval $ac_compile) 2>&5
9164 ac_status=$?
9165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9166 (exit $ac_status); } &&
9167 { ac_try='test -s conftest.$ac_objext'
9168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9169 (eval $ac_try) 2>&5
9170 ac_status=$?
9171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9172 (exit $ac_status); }; }; then
9173 ac_hi=$ac_mid
9174else
9175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009176sed 's/^/| /' conftest.$ac_ext >&5
9177
Martin v. Löwis11437992002-04-12 09:54:03 +00009178ac_lo=`expr '(' $ac_mid ')' + 1`
9179fi
9180rm -f conftest.$ac_objext conftest.$ac_ext
9181done
9182case $ac_lo in
9183?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009184'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9185See \`config.log' for more details." >&5
9186echo "$as_me: error: cannot compute sizeof (long long), 77
9187See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009188 { (exit 1); exit 1; }; } ;;
9189esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009190else
9191 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00009192 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9193See \`config.log' for more details." >&5
9194echo "$as_me: error: cannot run test program while cross compiling
9195See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009197else
Martin v. Löwis11437992002-04-12 09:54:03 +00009198 cat >conftest.$ac_ext <<_ACEOF
9199#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009200/* confdefs.h. */
9201_ACEOF
9202cat confdefs.h >>conftest.$ac_ext
9203cat >>conftest.$ac_ext <<_ACEOF
9204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009205$ac_includes_default
9206long longval () { return (long) (sizeof (long long)); }
9207unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009208#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009209#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009210int
9211main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009212{
Martin v. Löwis11437992002-04-12 09:54:03 +00009213
9214 FILE *f = fopen ("conftest.val", "w");
9215 if (! f)
9216 exit (1);
9217 if (((long) (sizeof (long long))) < 0)
9218 {
9219 long i = longval ();
9220 if (i != ((long) (sizeof (long long))))
9221 exit (1);
9222 fprintf (f, "%ld\n", i);
9223 }
9224 else
9225 {
9226 unsigned long i = ulongval ();
9227 if (i != ((long) (sizeof (long long))))
9228 exit (1);
9229 fprintf (f, "%lu\n", i);
9230 }
9231 exit (ferror (f) || fclose (f) != 0);
9232
9233 ;
9234 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009235}
Martin v. Löwis11437992002-04-12 09:54:03 +00009236_ACEOF
9237rm -f conftest$ac_exeext
9238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9239 (eval $ac_link) 2>&5
9240 ac_status=$?
9241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9242 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9244 (eval $ac_try) 2>&5
9245 ac_status=$?
9246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9247 (exit $ac_status); }; }; then
9248 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009249else
Martin v. Löwis11437992002-04-12 09:54:03 +00009250 echo "$as_me: program exited with status $ac_status" >&5
9251echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009252sed 's/^/| /' conftest.$ac_ext >&5
9253
Martin v. Löwis11437992002-04-12 09:54:03 +00009254( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009255{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9256See \`config.log' for more details." >&5
9257echo "$as_me: error: cannot compute sizeof (long long), 77
9258See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009259 { (exit 1); exit 1; }; }
9260fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009261rm -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 +00009262fi
9263fi
9264rm -f conftest.val
9265else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009266 ac_cv_sizeof_long_long=0
9267fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009268fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009269echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9270echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9271cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009272#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009273_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009274
Michael W. Hudson54241132001-12-07 15:38:26 +00009275
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009276fi
9277
Martin v. Löwis11437992002-04-12 09:54:03 +00009278echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9279echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009280have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009281cat >conftest.$ac_ext <<_ACEOF
9282#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009283/* confdefs.h. */
9284_ACEOF
9285cat confdefs.h >>conftest.$ac_ext
9286cat >>conftest.$ac_ext <<_ACEOF
9287/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009288
Martin v. Löwis11437992002-04-12 09:54:03 +00009289int
9290main ()
9291{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009292uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 ;
9294 return 0;
9295}
9296_ACEOF
9297rm -f conftest.$ac_objext
9298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9299 (eval $ac_compile) 2>&5
9300 ac_status=$?
9301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9302 (exit $ac_status); } &&
9303 { ac_try='test -s conftest.$ac_objext'
9304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9305 (eval $ac_try) 2>&5
9306 ac_status=$?
9307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9308 (exit $ac_status); }; }; then
9309
9310
9311cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009312#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009313_ACEOF
9314
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009315 have_uintptr_t=yes
9316
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009317else
Martin v. Löwis11437992002-04-12 09:54:03 +00009318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009319sed 's/^/| /' conftest.$ac_ext >&5
9320
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009321fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009322rm -f conftest.$ac_objext conftest.$ac_ext
9323echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9324echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009325if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009326echo "$as_me:$LINENO: checking for uintptr_t" >&5
9327echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9328if test "${ac_cv_type_uintptr_t+set}" = set; then
9329 echo $ECHO_N "(cached) $ECHO_C" >&6
9330else
9331 cat >conftest.$ac_ext <<_ACEOF
9332#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009333/* confdefs.h. */
9334_ACEOF
9335cat confdefs.h >>conftest.$ac_ext
9336cat >>conftest.$ac_ext <<_ACEOF
9337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009338$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009339int
9340main ()
9341{
9342if ((uintptr_t *) 0)
9343 return 0;
9344if (sizeof (uintptr_t))
9345 return 0;
9346 ;
9347 return 0;
9348}
9349_ACEOF
9350rm -f conftest.$ac_objext
9351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9352 (eval $ac_compile) 2>&5
9353 ac_status=$?
9354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9355 (exit $ac_status); } &&
9356 { ac_try='test -s conftest.$ac_objext'
9357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9358 (eval $ac_try) 2>&5
9359 ac_status=$?
9360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9361 (exit $ac_status); }; }; then
9362 ac_cv_type_uintptr_t=yes
9363else
9364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009365sed 's/^/| /' conftest.$ac_ext >&5
9366
Martin v. Löwis11437992002-04-12 09:54:03 +00009367ac_cv_type_uintptr_t=no
9368fi
9369rm -f conftest.$ac_objext conftest.$ac_ext
9370fi
9371echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9372echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9373
9374echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9375echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9376if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9377 echo $ECHO_N "(cached) $ECHO_C" >&6
9378else
9379 if test "$ac_cv_type_uintptr_t" = yes; then
9380 # The cast to unsigned long works around a bug in the HP C Compiler
9381 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9382 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9383 # This bug is HP SR number 8606223364.
9384 if test "$cross_compiling" = yes; then
9385 # Depending upon the size, compute the lo and hi bounds.
9386cat >conftest.$ac_ext <<_ACEOF
9387#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009388/* confdefs.h. */
9389_ACEOF
9390cat confdefs.h >>conftest.$ac_ext
9391cat >>conftest.$ac_ext <<_ACEOF
9392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009393$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009394int
9395main ()
9396{
9397static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9398test_array [0] = 0
9399
9400 ;
9401 return 0;
9402}
9403_ACEOF
9404rm -f conftest.$ac_objext
9405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9406 (eval $ac_compile) 2>&5
9407 ac_status=$?
9408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9409 (exit $ac_status); } &&
9410 { ac_try='test -s conftest.$ac_objext'
9411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9412 (eval $ac_try) 2>&5
9413 ac_status=$?
9414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9415 (exit $ac_status); }; }; then
9416 ac_lo=0 ac_mid=0
9417 while :; do
9418 cat >conftest.$ac_ext <<_ACEOF
9419#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009420/* confdefs.h. */
9421_ACEOF
9422cat confdefs.h >>conftest.$ac_ext
9423cat >>conftest.$ac_ext <<_ACEOF
9424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009425$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009426int
9427main ()
9428{
9429static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9430test_array [0] = 0
9431
9432 ;
9433 return 0;
9434}
9435_ACEOF
9436rm -f conftest.$ac_objext
9437if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9438 (eval $ac_compile) 2>&5
9439 ac_status=$?
9440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9441 (exit $ac_status); } &&
9442 { ac_try='test -s conftest.$ac_objext'
9443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9444 (eval $ac_try) 2>&5
9445 ac_status=$?
9446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9447 (exit $ac_status); }; }; then
9448 ac_hi=$ac_mid; break
9449else
9450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009451sed 's/^/| /' conftest.$ac_ext >&5
9452
Martin v. Löwis11437992002-04-12 09:54:03 +00009453ac_lo=`expr $ac_mid + 1`
9454 if test $ac_lo -le $ac_mid; then
9455 ac_lo= ac_hi=
9456 break
9457 fi
9458 ac_mid=`expr 2 '*' $ac_mid + 1`
9459fi
9460rm -f conftest.$ac_objext conftest.$ac_ext
9461 done
9462else
9463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009464sed 's/^/| /' conftest.$ac_ext >&5
9465
Martin v. Löwis11437992002-04-12 09:54:03 +00009466cat >conftest.$ac_ext <<_ACEOF
9467#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009468/* confdefs.h. */
9469_ACEOF
9470cat confdefs.h >>conftest.$ac_ext
9471cat >>conftest.$ac_ext <<_ACEOF
9472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009473$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009474int
9475main ()
9476{
9477static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9478test_array [0] = 0
9479
9480 ;
9481 return 0;
9482}
9483_ACEOF
9484rm -f conftest.$ac_objext
9485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9486 (eval $ac_compile) 2>&5
9487 ac_status=$?
9488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9489 (exit $ac_status); } &&
9490 { ac_try='test -s conftest.$ac_objext'
9491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9492 (eval $ac_try) 2>&5
9493 ac_status=$?
9494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9495 (exit $ac_status); }; }; then
9496 ac_hi=-1 ac_mid=-1
9497 while :; do
9498 cat >conftest.$ac_ext <<_ACEOF
9499#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009500/* confdefs.h. */
9501_ACEOF
9502cat confdefs.h >>conftest.$ac_ext
9503cat >>conftest.$ac_ext <<_ACEOF
9504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009505$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009506int
9507main ()
9508{
9509static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9510test_array [0] = 0
9511
9512 ;
9513 return 0;
9514}
9515_ACEOF
9516rm -f conftest.$ac_objext
9517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9518 (eval $ac_compile) 2>&5
9519 ac_status=$?
9520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9521 (exit $ac_status); } &&
9522 { ac_try='test -s conftest.$ac_objext'
9523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9524 (eval $ac_try) 2>&5
9525 ac_status=$?
9526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9527 (exit $ac_status); }; }; then
9528 ac_lo=$ac_mid; break
9529else
9530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009531sed 's/^/| /' conftest.$ac_ext >&5
9532
Martin v. Löwis11437992002-04-12 09:54:03 +00009533ac_hi=`expr '(' $ac_mid ')' - 1`
9534 if test $ac_mid -le $ac_hi; then
9535 ac_lo= ac_hi=
9536 break
9537 fi
9538 ac_mid=`expr 2 '*' $ac_mid`
9539fi
9540rm -f conftest.$ac_objext conftest.$ac_ext
9541 done
9542else
9543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009544sed 's/^/| /' conftest.$ac_ext >&5
9545
Martin v. Löwis11437992002-04-12 09:54:03 +00009546ac_lo= ac_hi=
9547fi
9548rm -f conftest.$ac_objext conftest.$ac_ext
9549fi
9550rm -f conftest.$ac_objext conftest.$ac_ext
9551# Binary search between lo and hi bounds.
9552while test "x$ac_lo" != "x$ac_hi"; do
9553 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9554 cat >conftest.$ac_ext <<_ACEOF
9555#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009556/* confdefs.h. */
9557_ACEOF
9558cat confdefs.h >>conftest.$ac_ext
9559cat >>conftest.$ac_ext <<_ACEOF
9560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009561$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009562int
9563main ()
9564{
9565static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9566test_array [0] = 0
9567
9568 ;
9569 return 0;
9570}
9571_ACEOF
9572rm -f conftest.$ac_objext
9573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9574 (eval $ac_compile) 2>&5
9575 ac_status=$?
9576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9577 (exit $ac_status); } &&
9578 { ac_try='test -s conftest.$ac_objext'
9579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9580 (eval $ac_try) 2>&5
9581 ac_status=$?
9582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9583 (exit $ac_status); }; }; then
9584 ac_hi=$ac_mid
9585else
9586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009587sed 's/^/| /' conftest.$ac_ext >&5
9588
Martin v. Löwis11437992002-04-12 09:54:03 +00009589ac_lo=`expr '(' $ac_mid ')' + 1`
9590fi
9591rm -f conftest.$ac_objext conftest.$ac_ext
9592done
9593case $ac_lo in
9594?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009595'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9596See \`config.log' for more details." >&5
9597echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9598See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 { (exit 1); exit 1; }; } ;;
9600esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009601else
9602 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00009603 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9604See \`config.log' for more details." >&5
9605echo "$as_me: error: cannot run test program while cross compiling
9606See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009607 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009608else
Martin v. Löwis11437992002-04-12 09:54:03 +00009609 cat >conftest.$ac_ext <<_ACEOF
9610#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009611/* confdefs.h. */
9612_ACEOF
9613cat confdefs.h >>conftest.$ac_ext
9614cat >>conftest.$ac_ext <<_ACEOF
9615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009616$ac_includes_default
9617long longval () { return (long) (sizeof (uintptr_t)); }
9618unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009619#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009620#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009621int
9622main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009623{
Martin v. Löwis11437992002-04-12 09:54:03 +00009624
9625 FILE *f = fopen ("conftest.val", "w");
9626 if (! f)
9627 exit (1);
9628 if (((long) (sizeof (uintptr_t))) < 0)
9629 {
9630 long i = longval ();
9631 if (i != ((long) (sizeof (uintptr_t))))
9632 exit (1);
9633 fprintf (f, "%ld\n", i);
9634 }
9635 else
9636 {
9637 unsigned long i = ulongval ();
9638 if (i != ((long) (sizeof (uintptr_t))))
9639 exit (1);
9640 fprintf (f, "%lu\n", i);
9641 }
9642 exit (ferror (f) || fclose (f) != 0);
9643
9644 ;
9645 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009646}
Martin v. Löwis11437992002-04-12 09:54:03 +00009647_ACEOF
9648rm -f conftest$ac_exeext
9649if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9650 (eval $ac_link) 2>&5
9651 ac_status=$?
9652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9653 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9655 (eval $ac_try) 2>&5
9656 ac_status=$?
9657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9658 (exit $ac_status); }; }; then
9659 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009660else
Martin v. Löwis11437992002-04-12 09:54:03 +00009661 echo "$as_me: program exited with status $ac_status" >&5
9662echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009663sed 's/^/| /' conftest.$ac_ext >&5
9664
Martin v. Löwis11437992002-04-12 09:54:03 +00009665( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009666{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9667See \`config.log' for more details." >&5
9668echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9669See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 { (exit 1); exit 1; }; }
9671fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009672rm -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 +00009673fi
9674fi
9675rm -f conftest.val
9676else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009677 ac_cv_sizeof_uintptr_t=0
9678fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009679fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009680echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9681echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9682cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009683#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009684_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009685
Michael W. Hudson54241132001-12-07 15:38:26 +00009686
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009687fi
9688
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009689# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009690echo "$as_me:$LINENO: checking size of off_t" >&5
9691echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9692if test "${ac_cv_sizeof_off_t+set}" = set; then
9693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009694else
9695 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009696 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009697else
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 cat >conftest.$ac_ext <<_ACEOF
9699#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009700/* confdefs.h. */
9701_ACEOF
9702cat confdefs.h >>conftest.$ac_ext
9703cat >>conftest.$ac_ext <<_ACEOF
9704/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009705#include <stdio.h>
9706#include <sys/types.h>
9707main()
9708{
9709 FILE *f=fopen("conftestval", "w");
9710 if (!f) exit(1);
9711 fprintf(f, "%d\n", sizeof(off_t));
9712 exit(0);
9713}
Martin v. Löwis11437992002-04-12 09:54:03 +00009714_ACEOF
9715rm -f conftest$ac_exeext
9716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9717 (eval $ac_link) 2>&5
9718 ac_status=$?
9719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9720 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9722 (eval $ac_try) 2>&5
9723 ac_status=$?
9724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9725 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009726 ac_cv_sizeof_off_t=`cat conftestval`
9727else
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 echo "$as_me: program exited with status $ac_status" >&5
9729echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009730sed 's/^/| /' conftest.$ac_ext >&5
9731
Martin v. Löwis11437992002-04-12 09:54:03 +00009732( exit $ac_status )
9733ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009734fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009735rm -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 +00009736fi
9737
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009738fi
9739
Martin v. Löwis11437992002-04-12 09:54:03 +00009740echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9741echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9742
9743cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009744#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009745_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009746
Michael W. Hudson54241132001-12-07 15:38:26 +00009747
Martin v. Löwis11437992002-04-12 09:54:03 +00009748echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9749echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009750if test "$have_long_long" = yes -a \
9751 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9752 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009753
Martin v. Löwis11437992002-04-12 09:54:03 +00009754cat >>confdefs.h <<\_ACEOF
9755#define HAVE_LARGEFILE_SUPPORT 1
9756_ACEOF
9757
9758 echo "$as_me:$LINENO: result: yes" >&5
9759echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009760else
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 echo "$as_me:$LINENO: result: no" >&5
9762echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009763fi
9764
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009765# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009766echo "$as_me:$LINENO: checking size of time_t" >&5
9767echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9768if test "${ac_cv_sizeof_time_t+set}" = set; then
9769 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009770else
9771 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009772 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009773else
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 cat >conftest.$ac_ext <<_ACEOF
9775#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009776/* confdefs.h. */
9777_ACEOF
9778cat confdefs.h >>conftest.$ac_ext
9779cat >>conftest.$ac_ext <<_ACEOF
9780/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009781#include <stdio.h>
9782#include <time.h>
9783main()
9784{
9785 FILE *f=fopen("conftestval", "w");
9786 if (!f) exit(1);
9787 fprintf(f, "%d\n", sizeof(time_t));
9788 exit(0);
9789}
Martin v. Löwis11437992002-04-12 09:54:03 +00009790_ACEOF
9791rm -f conftest$ac_exeext
9792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9793 (eval $ac_link) 2>&5
9794 ac_status=$?
9795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9796 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9798 (eval $ac_try) 2>&5
9799 ac_status=$?
9800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9801 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009802 ac_cv_sizeof_time_t=`cat conftestval`
9803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 echo "$as_me: program exited with status $ac_status" >&5
9805echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009806sed 's/^/| /' conftest.$ac_ext >&5
9807
Martin v. Löwis11437992002-04-12 09:54:03 +00009808( exit $ac_status )
9809ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009810fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009811rm -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 +00009812fi
9813
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009814fi
9815
Martin v. Löwis11437992002-04-12 09:54:03 +00009816echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9817echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9818
9819cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009820#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009821_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009822
Michael W. Hudson54241132001-12-07 15:38:26 +00009823
9824
Trent Mick635f6fb2000-08-23 21:33:05 +00009825# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009826ac_save_cc="$CC"
9827if test "$ac_cv_kpthread" = "yes"
9828then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009829elif test "$ac_cv_kthread" = "yes"
9830then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009831elif test "$ac_cv_pthread" = "yes"
9832then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009833fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009834echo "$as_me:$LINENO: checking for pthread_t" >&5
9835echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009836have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009837cat >conftest.$ac_ext <<_ACEOF
9838#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009839/* confdefs.h. */
9840_ACEOF
9841cat confdefs.h >>conftest.$ac_ext
9842cat >>conftest.$ac_ext <<_ACEOF
9843/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009844#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Guido van Rossum12580492000-09-24 16:47:19 +00009848pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ;
9850 return 0;
9851}
9852_ACEOF
9853rm -f conftest.$ac_objext
9854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9855 (eval $ac_compile) 2>&5
9856 ac_status=$?
9857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9858 (exit $ac_status); } &&
9859 { ac_try='test -s conftest.$ac_objext'
9860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9861 (eval $ac_try) 2>&5
9862 ac_status=$?
9863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9864 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009865 have_pthread_t=yes
9866else
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009868sed 's/^/| /' conftest.$ac_ext >&5
9869
Trent Mick635f6fb2000-08-23 21:33:05 +00009870fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009871rm -f conftest.$ac_objext conftest.$ac_ext
9872echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9873echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009874if test "$have_pthread_t" = yes ; then
9875 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9877echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9878 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9879 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009880else
9881 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009882 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009883else
Martin v. Löwis11437992002-04-12 09:54:03 +00009884 cat >conftest.$ac_ext <<_ACEOF
9885#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009886/* confdefs.h. */
9887_ACEOF
9888cat confdefs.h >>conftest.$ac_ext
9889cat >>conftest.$ac_ext <<_ACEOF
9890/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009891#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009892#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009893 main()
9894 {
9895 FILE *f=fopen("conftestval", "w");
9896 if (!f) exit(1);
9897 fprintf(f, "%d\n", sizeof(pthread_t));
9898 exit(0);
9899 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009900_ACEOF
9901rm -f conftest$ac_exeext
9902if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9903 (eval $ac_link) 2>&5
9904 ac_status=$?
9905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9906 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9908 (eval $ac_try) 2>&5
9909 ac_status=$?
9910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9911 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009912 ac_cv_sizeof_pthread_t=`cat conftestval`
9913else
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 echo "$as_me: program exited with status $ac_status" >&5
9915echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009916sed 's/^/| /' conftest.$ac_ext >&5
9917
Martin v. Löwis11437992002-04-12 09:54:03 +00009918( exit $ac_status )
9919ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009920fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009921rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009922fi
9923
Trent Mick635f6fb2000-08-23 21:33:05 +00009924fi
9925
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9927echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9928
9929cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009930#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009931_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009932
9933fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009934CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009935
Martin v. Löwis11437992002-04-12 09:54:03 +00009936echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9937echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009938# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9939if test "${enable_toolbox_glue+set}" = set; then
9940 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009941
Martin v. Löwis11437992002-04-12 09:54:03 +00009942fi;
Jack Jansene578a632001-08-15 01:27:14 +00009943
9944if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009945then
Jack Jansene578a632001-08-15 01:27:14 +00009946 case $ac_sys_system/$ac_sys_release in
9947 Darwin/*)
9948 enable_toolbox_glue="yes";;
9949 *)
9950 enable_toolbox_glue="no";;
9951 esac
9952fi
9953case "$enable_toolbox_glue" in
9954yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009955 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009956 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009957 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009958
9959cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009960#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009961_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009962
9963 ;;
9964*)
9965 extra_frameworks=""
9966 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009967 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009968 ;;
9969esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009970echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9971echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009972
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009973
9974case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009975 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009976 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009977 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009978 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009979 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009980 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009981 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009982 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009983 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009984 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009985esac
9986
Martin v. Löwis11437992002-04-12 09:54:03 +00009987echo "$as_me:$LINENO: checking for --enable-framework" >&5
9988echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009989if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009990then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009991 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009992 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009993 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009994 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009995
Martin v. Löwis11437992002-04-12 09:54:03 +00009996cat >>confdefs.h <<\_ACEOF
9997#define WITH_NEXT_FRAMEWORK 1
9998_ACEOF
9999
10000 echo "$as_me:$LINENO: result: yes" >&5
10001echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010002else
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 echo "$as_me:$LINENO: result: no" >&5
10004echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010005fi
10006
Martin v. Löwis11437992002-04-12 09:54:03 +000010007echo "$as_me:$LINENO: checking for dyld" >&5
10008echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010009case $ac_sys_system/$ac_sys_release in
10010 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010011
Martin v. Löwis11437992002-04-12 09:54:03 +000010012cat >>confdefs.h <<\_ACEOF
10013#define WITH_DYLD 1
10014_ACEOF
10015
10016 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10017echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010018 ;;
10019 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 echo "$as_me:$LINENO: result: no" >&5
10021echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010022 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010023esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010024
Guido van Rossum0a516c91994-09-12 10:58:40 +000010025# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010026
Michael W. Hudson54241132001-12-07 15:38:26 +000010027
10028
10029
10030
Guido van Rossum0a516c91994-09-12 10:58:40 +000010031# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010032# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010033echo "$as_me:$LINENO: checking SO" >&5
10034echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010035if test -z "$SO"
10036then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010037 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010038 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010039 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010040 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010041 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010042else
10043 # this might also be a termcap variable, see #610332
10044 echo
10045 echo '====================================================================='
10046 echo '+ +'
10047 echo '+ WARNING: You have set SO in your environment. +'
10048 echo '+ Do you really mean to change the extension for shared libraries? +'
10049 echo '+ Continuing in 10 seconds to let you to ponder. +'
10050 echo '+ +'
10051 echo '====================================================================='
10052 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010053fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010054echo "$as_me:$LINENO: result: $SO" >&5
10055echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010056# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +000010057# -- "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 +000010058# (Shared libraries in this instance are shared modules to be loaded into
10059# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010060echo "$as_me:$LINENO: checking LDSHARED" >&5
10061echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010062if test -z "$LDSHARED"
10063then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010064 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010065 AIX*)
10066 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010067 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010068 ;;
10069 BeOS*)
10070 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010071 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010072 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010073 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010074 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010075 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000010077 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010078 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010079 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000010080 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010081 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010082 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
10083 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010084 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010085 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10086 if test "$enable_framework" ; then
10087 # Link against the framework. All externals should be defined.
10088 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
10089 else
10090 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010091 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010092 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +000010093 Darwin/*)
10094 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10095 if test "$enable_framework" ; then
10096 # Link against the framework. All externals should be defined.
10097 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
10098 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010099 # No framework, use the Python app as bundle-loader
10100 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010101 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010102 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010103 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +000010104 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010105 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010106 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010107 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010108 then
10109 LDSHARED="cc -shared ${LDFLAGS}"
10110 else
10111 LDSHARED="ld -Bshareable ${LDFLAGS}"
10112 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010113 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010114 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010115 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010116 then LDSHARED='$(CC) -shared'
10117 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010118 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010119 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010120 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010121 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010122 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010123 *) LDSHARED="ld";;
10124 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010126echo "$as_me:$LINENO: result: $LDSHARED" >&5
10127echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010128BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010129# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010130# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010131echo "$as_me:$LINENO: checking CCSHARED" >&5
10132echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010133if test -z "$CCSHARED"
10134then
Guido van Rossum07397971997-04-29 21:49:50 +000010135 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010136 SunOS*) if test "$GCC" = yes;
10137 then CCSHARED="-fPIC";
10138 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010139 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010140 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010141 else CCSHARED="+z";
10142 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010143 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010144 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010145 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010146 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010147 if test "$GCC" = "yes"
10148 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010149 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010150 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010151 SCO_SV*)
10152 if test "$GCC" = "yes"
10153 then CCSHARED="-fPIC"
10154 else CCSHARED="-Kpic -belf"
10155 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010156 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010157 IRIX*/6*) case $CC in
10158 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010159 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010160 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010161 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010162 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010164echo "$as_me:$LINENO: result: $CCSHARED" >&5
10165echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010166# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010167# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010168echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10169echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010170if test -z "$LINKFORSHARED"
10171then
Guido van Rossum07397971997-04-29 21:49:50 +000010172 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010173 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010174 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010175 LINKFORSHARED="-Wl,-E -Wl,+s";;
10176# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010177 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010178 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010179 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +000010181 # -u __dummy makes the linker aware of the objc runtime
10182 # in System.framework; otherwise, __objcInit (referenced in
10183 # crt1.o) gets erroneously defined as common, which breaks dynamic
10184 # loading of any modules which reference it in System.framework.
10185 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
10186 # not used by the core itself but which needs to be in the core so
10187 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010188 # -prebind is no longer used, because it actually seems to give a
10189 # slowdown in stead of a speedup, maybe due to the large number of
10190 # dynamic loads Python does.
10191 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +000010192 if test "$enable_framework"
10193 then
10194 LINKFORSHARED="$LINKFORSHARED -framework Python"
10195 fi
10196 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010197 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010198 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010199 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010201 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10202 then
10203 LINKFORSHARED="-Wl,--export-dynamic"
10204 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010205 SunOS/5*) case $CC in
10206 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010207 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010208 then
10209 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010210 fi;;
10211 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010212 CYGWIN*)
10213 if test $enable_shared = "no"
10214 then
10215 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10216 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010217 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010218fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010219echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10220echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010221
Michael W. Hudson54241132001-12-07 15:38:26 +000010222
Martin v. Löwis11437992002-04-12 09:54:03 +000010223echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10224echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010225if test ! "$LIBRARY" = "$LDLIBRARY"
10226then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010227 case $ac_sys_system in
10228 CYGWIN*)
10229 # Cygwin needs CCSHARED when building extension DLLs
10230 # but not when building the interpreter DLL.
10231 CFLAGSFORSHARED='';;
10232 *)
10233 CFLAGSFORSHARED='$(CCSHARED)'
10234 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010235fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010236echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10237echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010238
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010239# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10240# library (with --enable-shared).
10241# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010242# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10243# if it is not required, since it creates a dependency of the shared library
10244# to LIBS. This, in turn, means that applications linking the shared libpython
10245# don't need to link LIBS explicitly. The default should be only changed
10246# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010247
10248echo "$as_me:$LINENO: checking SHLIBS" >&5
10249echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10250case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010251 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010252 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010253esac
10254echo "$as_me:$LINENO: result: $SHLIBS" >&5
10255echo "${ECHO_T}$SHLIBS" >&6
10256
10257
Guido van Rossum627b2d71993-12-24 10:39:16 +000010258# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010259
10260echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10261echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10262if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10263 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010264else
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010266LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010267cat >conftest.$ac_ext <<_ACEOF
10268#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010269/* confdefs.h. */
10270_ACEOF
10271cat confdefs.h >>conftest.$ac_ext
10272cat >>conftest.$ac_ext <<_ACEOF
10273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010274
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010275/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010276#ifdef __cplusplus
10277extern "C"
10278#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010279/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010280 builtin and then its argument prototype would still apply. */
10281char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010282int
10283main ()
10284{
10285dlopen ();
10286 ;
10287 return 0;
10288}
10289_ACEOF
10290rm -f conftest.$ac_objext conftest$ac_exeext
10291if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10292 (eval $ac_link) 2>&5
10293 ac_status=$?
10294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10295 (exit $ac_status); } &&
10296 { ac_try='test -s conftest$ac_exeext'
10297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10298 (eval $ac_try) 2>&5
10299 ac_status=$?
10300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10301 (exit $ac_status); }; }; then
10302 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010303else
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010305sed 's/^/| /' conftest.$ac_ext >&5
10306
Martin v. Löwis11437992002-04-12 09:54:03 +000010307ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010308fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010309rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10310LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010311fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010312echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10313echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10314if test $ac_cv_lib_dl_dlopen = yes; then
10315 cat >>confdefs.h <<_ACEOF
10316#define HAVE_LIBDL 1
10317_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010318
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010319 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010320
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010321fi
10322 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010323
10324echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10325echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10326if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10327 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010328else
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010330LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010331cat >conftest.$ac_ext <<_ACEOF
10332#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010333/* confdefs.h. */
10334_ACEOF
10335cat confdefs.h >>conftest.$ac_ext
10336cat >>conftest.$ac_ext <<_ACEOF
10337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010338
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010339/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010340#ifdef __cplusplus
10341extern "C"
10342#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010343/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010344 builtin and then its argument prototype would still apply. */
10345char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010346int
10347main ()
10348{
10349shl_load ();
10350 ;
10351 return 0;
10352}
10353_ACEOF
10354rm -f conftest.$ac_objext conftest$ac_exeext
10355if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10356 (eval $ac_link) 2>&5
10357 ac_status=$?
10358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10359 (exit $ac_status); } &&
10360 { ac_try='test -s conftest$ac_exeext'
10361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10362 (eval $ac_try) 2>&5
10363 ac_status=$?
10364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10365 (exit $ac_status); }; }; then
10366 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010367else
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010369sed 's/^/| /' conftest.$ac_ext >&5
10370
Martin v. Löwis11437992002-04-12 09:54:03 +000010371ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010372fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010373rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10374LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010376echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10377echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10378if test $ac_cv_lib_dld_shl_load = yes; then
10379 cat >>confdefs.h <<_ACEOF
10380#define HAVE_LIBDLD 1
10381_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010382
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010383 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010384
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010385fi
10386 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010387
10388# only check for sem_ini if thread support is requested
10389if test "$with_threads" = "yes" -o -z "$with_threads"; then
10390 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010391echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10392if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010394else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010395 ac_func_search_save_LIBS=$LIBS
10396ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010397cat >conftest.$ac_ext <<_ACEOF
10398#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010399/* confdefs.h. */
10400_ACEOF
10401cat confdefs.h >>conftest.$ac_ext
10402cat >>conftest.$ac_ext <<_ACEOF
10403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010404
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010405/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010406#ifdef __cplusplus
10407extern "C"
10408#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010409/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 builtin and then its argument prototype would still apply. */
10411char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010412int
10413main ()
10414{
10415sem_init ();
10416 ;
10417 return 0;
10418}
10419_ACEOF
10420rm -f conftest.$ac_objext conftest$ac_exeext
10421if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10422 (eval $ac_link) 2>&5
10423 ac_status=$?
10424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10425 (exit $ac_status); } &&
10426 { ac_try='test -s conftest$ac_exeext'
10427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10428 (eval $ac_try) 2>&5
10429 ac_status=$?
10430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10431 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010432 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010433else
Martin v. Löwis11437992002-04-12 09:54:03 +000010434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010435sed 's/^/| /' conftest.$ac_ext >&5
10436
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010439if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010440 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010441 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10442 cat >conftest.$ac_ext <<_ACEOF
10443#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010444/* confdefs.h. */
10445_ACEOF
10446cat confdefs.h >>conftest.$ac_ext
10447cat >>conftest.$ac_ext <<_ACEOF
10448/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010449
10450/* Override any gcc2 internal prototype to avoid an error. */
10451#ifdef __cplusplus
10452extern "C"
10453#endif
10454/* We use char because int might match the return type of a gcc2
10455 builtin and then its argument prototype would still apply. */
10456char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010457int
10458main ()
10459{
10460sem_init ();
10461 ;
10462 return 0;
10463}
Martin v. Löwis11437992002-04-12 09:54:03 +000010464_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010465rm -f conftest.$ac_objext conftest$ac_exeext
10466if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10467 (eval $ac_link) 2>&5
10468 ac_status=$?
10469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10470 (exit $ac_status); } &&
10471 { ac_try='test -s conftest$ac_exeext'
10472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10473 (eval $ac_try) 2>&5
10474 ac_status=$?
10475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10476 (exit $ac_status); }; }; then
10477 ac_cv_search_sem_init="-l$ac_lib"
10478break
10479else
10480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010481sed 's/^/| /' conftest.$ac_ext >&5
10482
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010483fi
10484rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10485 done
10486fi
10487LIBS=$ac_func_search_save_LIBS
10488fi
10489echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10490echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10491if test "$ac_cv_search_sem_init" != no; then
10492 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010493
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010494fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010495 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010496 # posix4 on Solaris 2.6
10497 # pthread (first!) on Linux
10498fi
10499
Martin v. Löwis19d17342003-06-14 21:03:05 +000010500# check if we need libintl for locale functions
10501echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10502echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10503if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10504 echo $ECHO_N "(cached) $ECHO_C" >&6
10505else
10506 ac_check_lib_save_LIBS=$LIBS
10507LIBS="-lintl $LIBS"
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öwis19d17342003-06-14 21:03:05 +000010515
10516/* Override any gcc2 internal prototype to avoid an error. */
10517#ifdef __cplusplus
10518extern "C"
10519#endif
10520/* We use char because int might match the return type of a gcc2
10521 builtin and then its argument prototype would still apply. */
10522char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010523int
10524main ()
10525{
10526textdomain ();
10527 ;
10528 return 0;
10529}
10530_ACEOF
10531rm -f conftest.$ac_objext conftest$ac_exeext
10532if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10533 (eval $ac_link) 2>&5
10534 ac_status=$?
10535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10536 (exit $ac_status); } &&
10537 { ac_try='test -s conftest$ac_exeext'
10538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10539 (eval $ac_try) 2>&5
10540 ac_status=$?
10541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10542 (exit $ac_status); }; }; then
10543 ac_cv_lib_intl_textdomain=yes
10544else
10545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010546sed 's/^/| /' conftest.$ac_ext >&5
10547
Martin v. Löwis19d17342003-06-14 21:03:05 +000010548ac_cv_lib_intl_textdomain=no
10549fi
10550rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10551LIBS=$ac_check_lib_save_LIBS
10552fi
10553echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10554echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10555if test $ac_cv_lib_intl_textdomain = yes; then
10556
10557cat >>confdefs.h <<\_ACEOF
10558#define WITH_LIBINTL 1
10559_ACEOF
10560
10561fi
10562
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010563
10564# checks for system dependent C++ extensions support
10565case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10567echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10568 cat >conftest.$ac_ext <<_ACEOF
10569#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010570/* confdefs.h. */
10571_ACEOF
10572cat confdefs.h >>conftest.$ac_ext
10573cat >>conftest.$ac_ext <<_ACEOF
10574/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010575#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010576int
10577main ()
10578{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010579loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010580 ;
10581 return 0;
10582}
10583_ACEOF
10584rm -f conftest.$ac_objext conftest$ac_exeext
10585if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10586 (eval $ac_link) 2>&5
10587 ac_status=$?
10588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10589 (exit $ac_status); } &&
10590 { ac_try='test -s conftest$ac_exeext'
10591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10592 (eval $ac_try) 2>&5
10593 ac_status=$?
10594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10595 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010596
Martin v. Löwis11437992002-04-12 09:54:03 +000010597cat >>confdefs.h <<\_ACEOF
10598#define AIX_GENUINE_CPLUSPLUS 1
10599_ACEOF
10600
10601 echo "$as_me:$LINENO: result: yes" >&5
10602echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010603else
Martin v. Löwis11437992002-04-12 09:54:03 +000010604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010605sed 's/^/| /' conftest.$ac_ext >&5
10606
Martin v. Löwis11437992002-04-12 09:54:03 +000010607echo "$as_me:$LINENO: result: no" >&5
10608echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010609fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010610rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010611 *) ;;
10612esac
10613
Guido van Rossum70c7f481998-03-26 18:44:10 +000010614# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +000010615# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010616# BeOS' sockets are stashed in libnet.
10617case "$ac_sys_system" in
10618IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +000010619*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010620echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10621echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10622if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10623 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010624else
Martin v. Löwis11437992002-04-12 09:54:03 +000010625 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010626LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010627cat >conftest.$ac_ext <<_ACEOF
10628#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010629/* confdefs.h. */
10630_ACEOF
10631cat confdefs.h >>conftest.$ac_ext
10632cat >>conftest.$ac_ext <<_ACEOF
10633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010634
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010635/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010636#ifdef __cplusplus
10637extern "C"
10638#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010639/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 builtin and then its argument prototype would still apply. */
10641char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010642int
10643main ()
10644{
10645t_open ();
10646 ;
10647 return 0;
10648}
10649_ACEOF
10650rm -f conftest.$ac_objext conftest$ac_exeext
10651if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10652 (eval $ac_link) 2>&5
10653 ac_status=$?
10654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10655 (exit $ac_status); } &&
10656 { ac_try='test -s conftest$ac_exeext'
10657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10658 (eval $ac_try) 2>&5
10659 ac_status=$?
10660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10661 (exit $ac_status); }; }; then
10662 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010663else
Martin v. Löwis11437992002-04-12 09:54:03 +000010664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010665sed 's/^/| /' conftest.$ac_ext >&5
10666
Martin v. Löwis11437992002-04-12 09:54:03 +000010667ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010668fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010669rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10670LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010671fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010672echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10673echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10674if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010675 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010676fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010677 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010678echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10679echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10680if test "${ac_cv_lib_socket_socket+set}" = set; then
10681 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010682else
Martin v. Löwis11437992002-04-12 09:54:03 +000010683 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010684LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010685cat >conftest.$ac_ext <<_ACEOF
10686#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010687/* confdefs.h. */
10688_ACEOF
10689cat confdefs.h >>conftest.$ac_ext
10690cat >>conftest.$ac_ext <<_ACEOF
10691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010692
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010693/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010694#ifdef __cplusplus
10695extern "C"
10696#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010697/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010698 builtin and then its argument prototype would still apply. */
10699char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010700int
10701main ()
10702{
10703socket ();
10704 ;
10705 return 0;
10706}
10707_ACEOF
10708rm -f conftest.$ac_objext conftest$ac_exeext
10709if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10710 (eval $ac_link) 2>&5
10711 ac_status=$?
10712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10713 (exit $ac_status); } &&
10714 { ac_try='test -s conftest$ac_exeext'
10715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10716 (eval $ac_try) 2>&5
10717 ac_status=$?
10718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10719 (exit $ac_status); }; }; then
10720 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010721else
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010723sed 's/^/| /' conftest.$ac_ext >&5
10724
Martin v. Löwis11437992002-04-12 09:54:03 +000010725ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010726fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010727rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10728LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010729fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010730echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10731echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10732if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010733 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010734fi
10735 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010736;;
10737esac
10738case "$ac_sys_system" in
10739BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010740echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10741echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10742if test "${ac_cv_lib_net_socket+set}" = set; then
10743 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010744else
Martin v. Löwis11437992002-04-12 09:54:03 +000010745 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010746LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010747cat >conftest.$ac_ext <<_ACEOF
10748#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010749/* confdefs.h. */
10750_ACEOF
10751cat confdefs.h >>conftest.$ac_ext
10752cat >>conftest.$ac_ext <<_ACEOF
10753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010754
Guido van Rossumad678af1998-10-02 14:42:15 +000010755/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010756#ifdef __cplusplus
10757extern "C"
10758#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010759/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 builtin and then its argument prototype would still apply. */
10761char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010762int
10763main ()
10764{
10765socket ();
10766 ;
10767 return 0;
10768}
10769_ACEOF
10770rm -f conftest.$ac_objext conftest$ac_exeext
10771if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10772 (eval $ac_link) 2>&5
10773 ac_status=$?
10774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10775 (exit $ac_status); } &&
10776 { ac_try='test -s conftest$ac_exeext'
10777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10778 (eval $ac_try) 2>&5
10779 ac_status=$?
10780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10781 (exit $ac_status); }; }; then
10782 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010783else
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010785sed 's/^/| /' conftest.$ac_ext >&5
10786
Martin v. Löwis11437992002-04-12 09:54:03 +000010787ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010788fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010789rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10790LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010791fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010792echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10793echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10794if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010795 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010796fi
10797 # BeOS
10798;;
10799esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010800
Martin v. Löwis11437992002-04-12 09:54:03 +000010801echo "$as_me:$LINENO: checking for --with-libs" >&5
10802echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10803
Guido van Rossuma68acba1996-07-31 17:36:39 +000010804# Check whether --with-libs or --without-libs was given.
10805if test "${with_libs+set}" = set; then
10806 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010807
10808echo "$as_me:$LINENO: result: $withval" >&5
10809echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010810LIBS="$withval $LIBS"
10811
10812else
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 echo "$as_me:$LINENO: result: no" >&5
10814echo "${ECHO_T}no" >&6
10815fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010816
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010817# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010818
10819
Martin v. Löwis11437992002-04-12 09:54:03 +000010820echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10821echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10822
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010823# Check whether --with-signal-module or --without-signal-module was given.
10824if test "${with_signal_module+set}" = set; then
10825 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010826
Martin v. Löwis11437992002-04-12 09:54:03 +000010827fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010828
10829if test -z "$with_signal_module"
10830then with_signal_module="yes"
10831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010832echo "$as_me:$LINENO: result: $with_signal_module" >&5
10833echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010834
10835if test "${with_signal_module}" = "yes"; then
10836 USE_SIGNAL_MODULE=""
10837 SIGNAL_OBJS=""
10838else
10839 USE_SIGNAL_MODULE="#"
10840 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10841fi
10842
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010843# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010844
Barry Warsawc0d24d82000-06-29 16:12:00 +000010845USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010846
Martin v. Löwis11437992002-04-12 09:54:03 +000010847echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10848echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10849
Guido van Rossumec2f0731997-01-22 20:54:01 +000010850
10851# Check whether --with-dec-threads or --without-dec-threads was given.
10852if test "${with_dec_threads+set}" = set; then
10853 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010854
10855echo "$as_me:$LINENO: result: $withval" >&5
10856echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010857LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010858if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010859 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010860fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010861else
Martin v. Löwis11437992002-04-12 09:54:03 +000010862 echo "$as_me:$LINENO: result: no" >&5
10863echo "${ECHO_T}no" >&6
10864fi;
10865
10866# Templates for things AC_DEFINEd more than once.
10867# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010868
10869
Martin v. Löwis11437992002-04-12 09:54:03 +000010870
10871
10872
10873
10874
10875echo "$as_me:$LINENO: checking for --with-threads" >&5
10876echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10877
Guido van Rossumec2f0731997-01-22 20:54:01 +000010878# Check whether --with-threads or --without-threads was given.
10879if test "${with_threads+set}" = set; then
10880 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010881
Martin v. Löwis11437992002-04-12 09:54:03 +000010882fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010883
Barry Warsawc0d24d82000-06-29 16:12:00 +000010884# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010885
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010886# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010887if test "${with_thread+set}" = set; then
10888 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010889 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010890fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000010891
10892if test -z "$with_threads"
10893then with_threads="yes"
10894fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010895echo "$as_me:$LINENO: result: $with_threads" >&5
10896echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000010897
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010898
Barry Warsawc0d24d82000-06-29 16:12:00 +000010899if test "$with_threads" = "no"
10900then
10901 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010902elif test "$ac_cv_pthread_is_default" = yes
10903then
Martin v. Löwis11437992002-04-12 09:54:03 +000010904 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010905#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010906_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010907
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010908 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010910#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010911_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010912
10913 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010914 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010915elif test "$ac_cv_kpthread" = "yes"
10916then
10917 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010918 if test "$ac_cv_cxx_thread" = "yes"; then
10919 CXX="$CXX -Kpthread"
10920 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010921 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010922#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010923_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010924
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010925 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010926 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010927elif test "$ac_cv_kthread" = "yes"
10928then
10929 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010930 if test "$ac_cv_cxx_thread" = "yes"; then
10931 CXX="$CXX -Kthread"
10932 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010933 cat >>confdefs.h <<\_ACEOF
10934#define WITH_THREAD 1
10935_ACEOF
10936
10937 posix_threads=yes
10938 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010939elif test "$ac_cv_pthread" = "yes"
10940then
10941 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010942 if test "$ac_cv_cxx_thread" = "yes"; then
10943 CXX="$CXX -pthread"
10944 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010945 cat >>confdefs.h <<\_ACEOF
10946#define WITH_THREAD 1
10947_ACEOF
10948
10949 posix_threads=yes
10950 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010951else
10952 if test ! -z "$with_threads" -a -d "$with_threads"
10953 then LDFLAGS="$LDFLAGS -L$with_threads"
10954 fi
10955 if test ! -z "$withval" -a -d "$withval"
10956 then LDFLAGS="$LDFLAGS -L$withval"
10957 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010958
10959 # According to the POSIX spec, a pthreads implementation must
10960 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10962echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10963 cat >conftest.$ac_ext <<_ACEOF
10964#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010965/* confdefs.h. */
10966_ACEOF
10967cat confdefs.h >>conftest.$ac_ext
10968cat >>conftest.$ac_ext <<_ACEOF
10969/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010970
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010971#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010972#ifdef _POSIX_THREADS
10973yes
10974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010975
10976_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010978 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010979 unistd_defines_pthreads=yes
10980else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010981 unistd_defines_pthreads=no
10982fi
10983rm -f conftest*
10984
Martin v. Löwis11437992002-04-12 09:54:03 +000010985 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10986echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010987
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010989#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010990_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010991
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 if test "${ac_cv_header_cthreads_h+set}" = set; then
10993 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10994echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10995if test "${ac_cv_header_cthreads_h+set}" = set; then
10996 echo $ECHO_N "(cached) $ECHO_C" >&6
10997fi
10998echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10999echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011000else
Martin v. Löwis11437992002-04-12 09:54:03 +000011001 # Is the header compilable?
11002echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11003echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11004cat >conftest.$ac_ext <<_ACEOF
11005#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011006/* confdefs.h. */
11007_ACEOF
11008cat confdefs.h >>conftest.$ac_ext
11009cat >>conftest.$ac_ext <<_ACEOF
11010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011011$ac_includes_default
11012#include <cthreads.h>
11013_ACEOF
11014rm -f conftest.$ac_objext
11015if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11016 (eval $ac_compile) 2>&5
11017 ac_status=$?
11018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11019 (exit $ac_status); } &&
11020 { ac_try='test -s conftest.$ac_objext'
11021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11022 (eval $ac_try) 2>&5
11023 ac_status=$?
11024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11025 (exit $ac_status); }; }; then
11026 ac_header_compiler=yes
11027else
11028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011029sed 's/^/| /' conftest.$ac_ext >&5
11030
Martin v. Löwis11437992002-04-12 09:54:03 +000011031ac_header_compiler=no
11032fi
11033rm -f conftest.$ac_objext conftest.$ac_ext
11034echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11035echo "${ECHO_T}$ac_header_compiler" >&6
11036
11037# Is the header present?
11038echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11039echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11040cat >conftest.$ac_ext <<_ACEOF
11041#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011042/* confdefs.h. */
11043_ACEOF
11044cat confdefs.h >>conftest.$ac_ext
11045cat >>conftest.$ac_ext <<_ACEOF
11046/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011047#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011048_ACEOF
11049if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11050 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11051 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011052 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 rm -f conftest.er1
11054 cat conftest.err >&5
11055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11056 (exit $ac_status); } >/dev/null; then
11057 if test -s conftest.err; then
11058 ac_cpp_err=$ac_c_preproc_warn_flag
11059 else
11060 ac_cpp_err=
11061 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011062else
Martin v. Löwis11437992002-04-12 09:54:03 +000011063 ac_cpp_err=yes
11064fi
11065if test -z "$ac_cpp_err"; then
11066 ac_header_preproc=yes
11067else
11068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011069sed 's/^/| /' conftest.$ac_ext >&5
11070
Martin v. Löwis11437992002-04-12 09:54:03 +000011071 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011072fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011073rm -f conftest.err conftest.$ac_ext
11074echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11075echo "${ECHO_T}$ac_header_preproc" >&6
11076
11077# So? What about this header?
11078case $ac_header_compiler:$ac_header_preproc in
11079 yes:no )
11080 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11081echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11082 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011083echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
11084 (
11085 cat <<\_ASBOX
11086## ------------------------------------ ##
11087## Report this to bug-autoconf@gnu.org. ##
11088## ------------------------------------ ##
11089_ASBOX
11090 ) |
11091 sed "s/^/$as_me: WARNING: /" >&2
11092 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011093 no:yes )
11094 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11095echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
11096 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11097echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11098 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011099echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
11100 (
11101 cat <<\_ASBOX
11102## ------------------------------------ ##
11103## Report this to bug-autoconf@gnu.org. ##
11104## ------------------------------------ ##
11105_ASBOX
11106 ) |
11107 sed "s/^/$as_me: WARNING: /" >&2
11108 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011109esac
11110echo "$as_me:$LINENO: checking for cthreads.h" >&5
11111echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11112if test "${ac_cv_header_cthreads_h+set}" = set; then
11113 echo $ECHO_N "(cached) $ECHO_C" >&6
11114else
11115 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011116fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011117echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11118echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11119
11120fi
11121if test $ac_cv_header_cthreads_h = yes; then
11122 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011123#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011124_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011125
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011127#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011128_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011129
Martin v. Löwis11437992002-04-12 09:54:03 +000011130
11131cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011132#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011133_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011134
11135 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011136 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011137else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011138
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11140 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11141echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11142if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11143 echo $ECHO_N "(cached) $ECHO_C" >&6
11144fi
11145echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11146echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011147else
Martin v. Löwis11437992002-04-12 09:54:03 +000011148 # Is the header compilable?
11149echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11150echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11151cat >conftest.$ac_ext <<_ACEOF
11152#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011153/* confdefs.h. */
11154_ACEOF
11155cat confdefs.h >>conftest.$ac_ext
11156cat >>conftest.$ac_ext <<_ACEOF
11157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011158$ac_includes_default
11159#include <mach/cthreads.h>
11160_ACEOF
11161rm -f conftest.$ac_objext
11162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11163 (eval $ac_compile) 2>&5
11164 ac_status=$?
11165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11166 (exit $ac_status); } &&
11167 { ac_try='test -s conftest.$ac_objext'
11168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11169 (eval $ac_try) 2>&5
11170 ac_status=$?
11171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11172 (exit $ac_status); }; }; then
11173 ac_header_compiler=yes
11174else
11175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011176sed 's/^/| /' conftest.$ac_ext >&5
11177
Martin v. Löwis11437992002-04-12 09:54:03 +000011178ac_header_compiler=no
11179fi
11180rm -f conftest.$ac_objext conftest.$ac_ext
11181echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11182echo "${ECHO_T}$ac_header_compiler" >&6
11183
11184# Is the header present?
11185echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11186echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11187cat >conftest.$ac_ext <<_ACEOF
11188#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011189/* confdefs.h. */
11190_ACEOF
11191cat confdefs.h >>conftest.$ac_ext
11192cat >>conftest.$ac_ext <<_ACEOF
11193/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011194#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011195_ACEOF
11196if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11197 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11198 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011199 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011200 rm -f conftest.er1
11201 cat conftest.err >&5
11202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11203 (exit $ac_status); } >/dev/null; then
11204 if test -s conftest.err; then
11205 ac_cpp_err=$ac_c_preproc_warn_flag
11206 else
11207 ac_cpp_err=
11208 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011209else
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 ac_cpp_err=yes
11211fi
11212if test -z "$ac_cpp_err"; then
11213 ac_header_preproc=yes
11214else
11215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011216sed 's/^/| /' conftest.$ac_ext >&5
11217
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011220rm -f conftest.err conftest.$ac_ext
11221echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11222echo "${ECHO_T}$ac_header_preproc" >&6
11223
11224# So? What about this header?
11225case $ac_header_compiler:$ac_header_preproc in
11226 yes:no )
11227 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11228echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11229 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011230echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
11231 (
11232 cat <<\_ASBOX
11233## ------------------------------------ ##
11234## Report this to bug-autoconf@gnu.org. ##
11235## ------------------------------------ ##
11236_ASBOX
11237 ) |
11238 sed "s/^/$as_me: WARNING: /" >&2
11239 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011240 no:yes )
11241 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11242echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
11243 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11244echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11245 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011246echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
11247 (
11248 cat <<\_ASBOX
11249## ------------------------------------ ##
11250## Report this to bug-autoconf@gnu.org. ##
11251## ------------------------------------ ##
11252_ASBOX
11253 ) |
11254 sed "s/^/$as_me: WARNING: /" >&2
11255 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011256esac
11257echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11258echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11259if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11260 echo $ECHO_N "(cached) $ECHO_C" >&6
11261else
11262 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011263fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011264echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11265echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11266
11267fi
11268if test $ac_cv_header_mach_cthreads_h = yes; then
11269 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011270#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011271_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011272
Martin v. Löwis11437992002-04-12 09:54:03 +000011273 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011274#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011275_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011276
Martin v. Löwis11437992002-04-12 09:54:03 +000011277
11278cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011279#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011280_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011281
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011282 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011283else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011284
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 echo "$as_me:$LINENO: checking for --with-pth" >&5
11286echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11287
11288# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011289if test "${with_pth+set}" = set; then
11290 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011291 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011292echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011293 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011294#define WITH_THREAD 1
11295_ACEOF
11296
11297
11298cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011299#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011300_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011301
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011302 LIBS="-lpth $LIBS"
11303 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011304else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011305 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011306echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011307
11308 # Just looking for pthread_create in libpthread is not enough:
11309 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11310 # So we really have to include pthread.h, and then link.
11311 _libs=$LIBS
11312 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11314echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11315 cat >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öwis8158b5a2001-10-08 13:17:28 +000011322#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011323
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011324void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011325int
11326main ()
11327{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011328
11329pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011330 ;
11331 return 0;
11332}
11333_ACEOF
11334rm -f conftest.$ac_objext conftest$ac_exeext
11335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11336 (eval $ac_link) 2>&5
11337 ac_status=$?
11338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11339 (exit $ac_status); } &&
11340 { ac_try='test -s conftest$ac_exeext'
11341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11342 (eval $ac_try) 2>&5
11343 ac_status=$?
11344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11345 (exit $ac_status); }; }; then
11346
11347 echo "$as_me:$LINENO: result: yes" >&5
11348echo "${ECHO_T}yes" >&6
11349 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011350#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011351_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011352
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011353 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011354 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011355else
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011357sed 's/^/| /' conftest.$ac_ext >&5
11358
Martin v. Löwis11437992002-04-12 09:54:03 +000011359
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011360 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11362echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11363if test "${ac_cv_func_pthread_detach+set}" = set; then
11364 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011365else
Martin v. Löwis11437992002-04-12 09:54:03 +000011366 cat >conftest.$ac_ext <<_ACEOF
11367#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* confdefs.h. */
11369_ACEOF
11370cat confdefs.h >>conftest.$ac_ext
11371cat >>conftest.$ac_ext <<_ACEOF
11372/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011373/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011374 which can conflict with char pthread_detach (); below.
11375 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011376 <limits.h> exists even on freestanding compilers. Under hpux,
11377 including <limits.h> includes <sys/time.h> and causes problems
11378 checking for functions defined therein. */
11379#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011380# include <limits.h>
11381#else
11382# include <assert.h>
11383#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011384/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011385#ifdef __cplusplus
11386extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011387{
Martin v. Löwis11437992002-04-12 09:54:03 +000011388#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011389/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 builtin and then its argument prototype would still apply. */
11391char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011392/* The GNU C library defines this for functions which it implements
11393 to always fail with ENOSYS. Some functions are actually named
11394 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011395#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011396choke me
11397#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011398char (*f) () = pthread_detach;
11399#endif
11400#ifdef __cplusplus
11401}
Guido van Rossumad678af1998-10-02 14:42:15 +000011402#endif
11403
Skip Montanaro6dead952003-09-25 14:50:04 +000011404int
11405main ()
11406{
11407return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 ;
11409 return 0;
11410}
11411_ACEOF
11412rm -f conftest.$ac_objext conftest$ac_exeext
11413if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11414 (eval $ac_link) 2>&5
11415 ac_status=$?
11416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11417 (exit $ac_status); } &&
11418 { ac_try='test -s conftest$ac_exeext'
11419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11420 (eval $ac_try) 2>&5
11421 ac_status=$?
11422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11423 (exit $ac_status); }; }; then
11424 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011425else
Martin v. Löwis11437992002-04-12 09:54:03 +000011426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011427sed 's/^/| /' conftest.$ac_ext >&5
11428
Martin v. Löwis11437992002-04-12 09:54:03 +000011429ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011431rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011433echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11434echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11435if test $ac_cv_func_pthread_detach = yes; then
11436 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011437#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011438_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011439
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011440 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011441 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011442else
Guido van Rossumad678af1998-10-02 14:42:15 +000011443
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011444 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11445 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11446echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11447if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11448 echo $ECHO_N "(cached) $ECHO_C" >&6
11449fi
11450echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11451echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11452else
11453 # Is the header compilable?
11454echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11455echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11456cat >conftest.$ac_ext <<_ACEOF
11457#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011458/* confdefs.h. */
11459_ACEOF
11460cat confdefs.h >>conftest.$ac_ext
11461cat >>conftest.$ac_ext <<_ACEOF
11462/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011463$ac_includes_default
11464#include <atheos/threads.h>
11465_ACEOF
11466rm -f conftest.$ac_objext
11467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11468 (eval $ac_compile) 2>&5
11469 ac_status=$?
11470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11471 (exit $ac_status); } &&
11472 { ac_try='test -s conftest.$ac_objext'
11473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11474 (eval $ac_try) 2>&5
11475 ac_status=$?
11476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11477 (exit $ac_status); }; }; then
11478 ac_header_compiler=yes
11479else
11480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011481sed 's/^/| /' conftest.$ac_ext >&5
11482
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011483ac_header_compiler=no
11484fi
11485rm -f conftest.$ac_objext conftest.$ac_ext
11486echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11487echo "${ECHO_T}$ac_header_compiler" >&6
11488
11489# Is the header present?
11490echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11491echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11492cat >conftest.$ac_ext <<_ACEOF
11493#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011494/* confdefs.h. */
11495_ACEOF
11496cat confdefs.h >>conftest.$ac_ext
11497cat >>conftest.$ac_ext <<_ACEOF
11498/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011499#include <atheos/threads.h>
11500_ACEOF
11501if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11502 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11503 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011504 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011505 rm -f conftest.er1
11506 cat conftest.err >&5
11507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11508 (exit $ac_status); } >/dev/null; then
11509 if test -s conftest.err; then
11510 ac_cpp_err=$ac_c_preproc_warn_flag
11511 else
11512 ac_cpp_err=
11513 fi
11514else
11515 ac_cpp_err=yes
11516fi
11517if test -z "$ac_cpp_err"; then
11518 ac_header_preproc=yes
11519else
11520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011521sed 's/^/| /' conftest.$ac_ext >&5
11522
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011523 ac_header_preproc=no
11524fi
11525rm -f conftest.err conftest.$ac_ext
11526echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11527echo "${ECHO_T}$ac_header_preproc" >&6
11528
11529# So? What about this header?
11530case $ac_header_compiler:$ac_header_preproc in
11531 yes:no )
11532 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11533echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11534 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011535echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
11536 (
11537 cat <<\_ASBOX
11538## ------------------------------------ ##
11539## Report this to bug-autoconf@gnu.org. ##
11540## ------------------------------------ ##
11541_ASBOX
11542 ) |
11543 sed "s/^/$as_me: WARNING: /" >&2
11544 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011545 no:yes )
11546 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11547echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
11548 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11549echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11550 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011551echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
11552 (
11553 cat <<\_ASBOX
11554## ------------------------------------ ##
11555## Report this to bug-autoconf@gnu.org. ##
11556## ------------------------------------ ##
11557_ASBOX
11558 ) |
11559 sed "s/^/$as_me: WARNING: /" >&2
11560 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011561esac
11562echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11563echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11564if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11565 echo $ECHO_N "(cached) $ECHO_C" >&6
11566else
11567 ac_cv_header_atheos_threads_h=$ac_header_preproc
11568fi
11569echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11570echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11571
11572fi
11573if test $ac_cv_header_atheos_threads_h = yes; then
11574 cat >>confdefs.h <<\_ACEOF
11575#define WITH_THREAD 1
11576_ACEOF
11577
11578
11579cat >>confdefs.h <<\_ACEOF
11580#define ATHEOS_THREADS 1
11581_ACEOF
11582
11583 THREADOBJ="Python/thread.o"
11584else
11585
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11587 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11588echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11589if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11590 echo $ECHO_N "(cached) $ECHO_C" >&6
11591fi
11592echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11593echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011594else
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 # Is the header compilable?
11596echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
11597echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
11598cat >conftest.$ac_ext <<_ACEOF
11599#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011600/* confdefs.h. */
11601_ACEOF
11602cat confdefs.h >>conftest.$ac_ext
11603cat >>conftest.$ac_ext <<_ACEOF
11604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011605$ac_includes_default
11606#include <kernel/OS.h>
11607_ACEOF
11608rm -f conftest.$ac_objext
11609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11610 (eval $ac_compile) 2>&5
11611 ac_status=$?
11612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11613 (exit $ac_status); } &&
11614 { ac_try='test -s conftest.$ac_objext'
11615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11616 (eval $ac_try) 2>&5
11617 ac_status=$?
11618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11619 (exit $ac_status); }; }; then
11620 ac_header_compiler=yes
11621else
11622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011623sed 's/^/| /' conftest.$ac_ext >&5
11624
Martin v. Löwis11437992002-04-12 09:54:03 +000011625ac_header_compiler=no
11626fi
11627rm -f conftest.$ac_objext conftest.$ac_ext
11628echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11629echo "${ECHO_T}$ac_header_compiler" >&6
11630
11631# Is the header present?
11632echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
11633echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
11634cat >conftest.$ac_ext <<_ACEOF
11635#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011636/* confdefs.h. */
11637_ACEOF
11638cat confdefs.h >>conftest.$ac_ext
11639cat >>conftest.$ac_ext <<_ACEOF
11640/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011641#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011642_ACEOF
11643if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11644 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11645 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011646 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011647 rm -f conftest.er1
11648 cat conftest.err >&5
11649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11650 (exit $ac_status); } >/dev/null; then
11651 if test -s conftest.err; then
11652 ac_cpp_err=$ac_c_preproc_warn_flag
11653 else
11654 ac_cpp_err=
11655 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011656else
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 ac_cpp_err=yes
11658fi
11659if test -z "$ac_cpp_err"; then
11660 ac_header_preproc=yes
11661else
11662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011663sed 's/^/| /' conftest.$ac_ext >&5
11664
Martin v. Löwis11437992002-04-12 09:54:03 +000011665 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011666fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011667rm -f conftest.err conftest.$ac_ext
11668echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11669echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011670
Martin v. Löwis11437992002-04-12 09:54:03 +000011671# So? What about this header?
11672case $ac_header_compiler:$ac_header_preproc in
11673 yes:no )
11674 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
11675echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11676 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011677echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11678 (
11679 cat <<\_ASBOX
11680## ------------------------------------ ##
11681## Report this to bug-autoconf@gnu.org. ##
11682## ------------------------------------ ##
11683_ASBOX
11684 ) |
11685 sed "s/^/$as_me: WARNING: /" >&2
11686 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011687 no:yes )
11688 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11689echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11690 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11691echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11692 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011693echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11694 (
11695 cat <<\_ASBOX
11696## ------------------------------------ ##
11697## Report this to bug-autoconf@gnu.org. ##
11698## ------------------------------------ ##
11699_ASBOX
11700 ) |
11701 sed "s/^/$as_me: WARNING: /" >&2
11702 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011703esac
11704echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11705echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11706if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11707 echo $ECHO_N "(cached) $ECHO_C" >&6
11708else
11709 ac_cv_header_kernel_OS_h=$ac_header_preproc
11710fi
11711echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11712echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11713
11714fi
11715if test $ac_cv_header_kernel_OS_h = yes; then
11716 cat >>confdefs.h <<\_ACEOF
11717#define WITH_THREAD 1
11718_ACEOF
11719
11720
11721cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011722#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011723_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011724
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011725 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011726else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011727
Martin v. Löwis11437992002-04-12 09:54:03 +000011728 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11729echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11730if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11731 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011732else
Martin v. Löwis11437992002-04-12 09:54:03 +000011733 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011734LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011735cat >conftest.$ac_ext <<_ACEOF
11736#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011737/* confdefs.h. */
11738_ACEOF
11739cat confdefs.h >>conftest.$ac_ext
11740cat >>conftest.$ac_ext <<_ACEOF
11741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011742
Greg Steinadf63d62000-07-05 10:38:09 +000011743/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011744#ifdef __cplusplus
11745extern "C"
11746#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011747/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 builtin and then its argument prototype would still apply. */
11749char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011750int
11751main ()
11752{
11753pthread_create ();
11754 ;
11755 return 0;
11756}
11757_ACEOF
11758rm -f conftest.$ac_objext conftest$ac_exeext
11759if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11760 (eval $ac_link) 2>&5
11761 ac_status=$?
11762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11763 (exit $ac_status); } &&
11764 { ac_try='test -s conftest$ac_exeext'
11765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11766 (eval $ac_try) 2>&5
11767 ac_status=$?
11768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11769 (exit $ac_status); }; }; then
11770 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011771else
Martin v. Löwis11437992002-04-12 09:54:03 +000011772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011773sed 's/^/| /' conftest.$ac_ext >&5
11774
Martin v. Löwis11437992002-04-12 09:54:03 +000011775ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011776fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011777rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11778LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011779fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011780echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11781echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11782if test $ac_cv_lib_pthreads_pthread_create = yes; then
11783 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011784#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011785_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011786
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011787 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011788 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011789 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011790else
Greg Steinadf63d62000-07-05 10:38:09 +000011791
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11793echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11794if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11795 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011796else
Martin v. Löwis11437992002-04-12 09:54:03 +000011797 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011798LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011799cat >conftest.$ac_ext <<_ACEOF
11800#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011801/* confdefs.h. */
11802_ACEOF
11803cat confdefs.h >>conftest.$ac_ext
11804cat >>conftest.$ac_ext <<_ACEOF
11805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011806
Guido van Rossum49545951997-12-02 19:28:29 +000011807/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011808#ifdef __cplusplus
11809extern "C"
11810#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011811/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011812 builtin and then its argument prototype would still apply. */
11813char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011814int
11815main ()
11816{
11817pthread_create ();
11818 ;
11819 return 0;
11820}
11821_ACEOF
11822rm -f conftest.$ac_objext conftest$ac_exeext
11823if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11824 (eval $ac_link) 2>&5
11825 ac_status=$?
11826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11827 (exit $ac_status); } &&
11828 { ac_try='test -s conftest$ac_exeext'
11829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11830 (eval $ac_try) 2>&5
11831 ac_status=$?
11832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11833 (exit $ac_status); }; }; then
11834 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011835else
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011837sed 's/^/| /' conftest.$ac_ext >&5
11838
Martin v. Löwis11437992002-04-12 09:54:03 +000011839ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011840fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011841rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11842LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011843fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011844echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11845echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11846if test $ac_cv_lib_c_r_pthread_create = yes; then
11847 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011848#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011849_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011850
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011851 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011852 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011853 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011854else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011855
Martin v. Löwis11437992002-04-12 09:54:03 +000011856 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11857echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11858if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11859 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011860else
Martin v. Löwis11437992002-04-12 09:54:03 +000011861 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011862LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011863cat >conftest.$ac_ext <<_ACEOF
11864#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011865/* confdefs.h. */
11866_ACEOF
11867cat confdefs.h >>conftest.$ac_ext
11868cat >>conftest.$ac_ext <<_ACEOF
11869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011870
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011871/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011872#ifdef __cplusplus
11873extern "C"
11874#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011875/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011876 builtin and then its argument prototype would still apply. */
11877char __d6_pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011878int
11879main ()
11880{
11881__d6_pthread_create ();
11882 ;
11883 return 0;
11884}
11885_ACEOF
11886rm -f conftest.$ac_objext conftest$ac_exeext
11887if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11888 (eval $ac_link) 2>&5
11889 ac_status=$?
11890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11891 (exit $ac_status); } &&
11892 { ac_try='test -s conftest$ac_exeext'
11893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11894 (eval $ac_try) 2>&5
11895 ac_status=$?
11896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11897 (exit $ac_status); }; }; then
11898 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011899else
Martin v. Löwis11437992002-04-12 09:54:03 +000011900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011901sed 's/^/| /' conftest.$ac_ext >&5
11902
Martin v. Löwis11437992002-04-12 09:54:03 +000011903ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011904fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011905rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11906LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011907fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011908echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11909echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11910if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11911 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011912#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011913_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011914
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011915 echo Systems with __d6_pthread_create are not supported anymore.
11916 echo See README
11917 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011918 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011919 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011920 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011921else
Guido van Rossum49545951997-12-02 19:28:29 +000011922
Martin v. Löwis11437992002-04-12 09:54:03 +000011923 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11924echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11925if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11926 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011927else
Martin v. Löwis11437992002-04-12 09:54:03 +000011928 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011929LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011930cat >conftest.$ac_ext <<_ACEOF
11931#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011932/* confdefs.h. */
11933_ACEOF
11934cat confdefs.h >>conftest.$ac_ext
11935cat >>conftest.$ac_ext <<_ACEOF
11936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011937
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011938/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011939#ifdef __cplusplus
11940extern "C"
11941#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011942/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011943 builtin and then its argument prototype would still apply. */
11944char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011945int
11946main ()
11947{
11948__pthread_create_system ();
11949 ;
11950 return 0;
11951}
11952_ACEOF
11953rm -f conftest.$ac_objext conftest$ac_exeext
11954if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11955 (eval $ac_link) 2>&5
11956 ac_status=$?
11957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11958 (exit $ac_status); } &&
11959 { ac_try='test -s conftest$ac_exeext'
11960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11961 (eval $ac_try) 2>&5
11962 ac_status=$?
11963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11964 (exit $ac_status); }; }; then
11965 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011966else
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011968sed 's/^/| /' conftest.$ac_ext >&5
11969
Martin v. Löwis11437992002-04-12 09:54:03 +000011970ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011971fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011972rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11973LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011974fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011975echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11976echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11977if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11978 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011979#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011980_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011981
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011982 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011983 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011984 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011985else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011986
Martin v. Löwis11437992002-04-12 09:54:03 +000011987 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11988echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11989if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11990 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011991else
Martin v. Löwis11437992002-04-12 09:54:03 +000011992 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011993LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011994cat >conftest.$ac_ext <<_ACEOF
11995#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011996/* confdefs.h. */
11997_ACEOF
11998cat confdefs.h >>conftest.$ac_ext
11999cat >>conftest.$ac_ext <<_ACEOF
12000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012001
Guido van Rossumb93a8621998-05-07 13:27:32 +000012002/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012003#ifdef __cplusplus
12004extern "C"
12005#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012006/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 builtin and then its argument prototype would still apply. */
12008char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012009int
12010main ()
12011{
12012pthread_create ();
12013 ;
12014 return 0;
12015}
12016_ACEOF
12017rm -f conftest.$ac_objext conftest$ac_exeext
12018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12019 (eval $ac_link) 2>&5
12020 ac_status=$?
12021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12022 (exit $ac_status); } &&
12023 { ac_try='test -s conftest$ac_exeext'
12024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12025 (eval $ac_try) 2>&5
12026 ac_status=$?
12027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12028 (exit $ac_status); }; }; then
12029 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012030else
Martin v. Löwis11437992002-04-12 09:54:03 +000012031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012032sed 's/^/| /' conftest.$ac_ext >&5
12033
Martin v. Löwis11437992002-04-12 09:54:03 +000012034ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012036rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12037LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012038fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012039echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12040echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12041if test $ac_cv_lib_cma_pthread_create = yes; then
12042 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012043#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012044_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012045
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012046 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012047 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012048 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012049else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012050
Martin v. Löwis130fb172001-07-19 11:00:41 +000012051 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012052fi
12053
Guido van Rossum627b2d71993-12-24 10:39:16 +000012054
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012055fi
12056
Guido van Rossum0be3e491997-05-22 20:33:33 +000012057fi
12058
Guido van Rossum49545951997-12-02 19:28:29 +000012059fi
12060
Guido van Rossumb93a8621998-05-07 13:27:32 +000012061fi
12062
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012063fi
12064
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012065
Michael W. Hudson54241132001-12-07 15:38:26 +000012066fi
12067
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012068
12069fi
12070
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012071fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012072rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12073fi;
12074fi
12075
12076
12077fi
12078
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012079
Michael W. Hudson54241132001-12-07 15:38:26 +000012080
Martin v. Löwis11437992002-04-12 09:54:03 +000012081 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12082echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12083if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12084 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012085else
Martin v. Löwis11437992002-04-12 09:54:03 +000012086 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012087LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012088cat >conftest.$ac_ext <<_ACEOF
12089#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012090/* confdefs.h. */
12091_ACEOF
12092cat confdefs.h >>conftest.$ac_ext
12093cat >>conftest.$ac_ext <<_ACEOF
12094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012095
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012096/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012097#ifdef __cplusplus
12098extern "C"
12099#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012100/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 builtin and then its argument prototype would still apply. */
12102char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012103int
12104main ()
12105{
12106usconfig ();
12107 ;
12108 return 0;
12109}
12110_ACEOF
12111rm -f conftest.$ac_objext conftest$ac_exeext
12112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12113 (eval $ac_link) 2>&5
12114 ac_status=$?
12115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12116 (exit $ac_status); } &&
12117 { ac_try='test -s conftest$ac_exeext'
12118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12119 (eval $ac_try) 2>&5
12120 ac_status=$?
12121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12122 (exit $ac_status); }; }; then
12123 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012124else
Martin v. Löwis11437992002-04-12 09:54:03 +000012125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012126sed 's/^/| /' conftest.$ac_ext >&5
12127
Martin v. Löwis11437992002-04-12 09:54:03 +000012128ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012129fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012130rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12131LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012132fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012133echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12134echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12135if test $ac_cv_lib_mpc_usconfig = yes; then
12136 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012137#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012138_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012139
Martin v. Löwis130fb172001-07-19 11:00:41 +000012140 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012141 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012142 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012143fi
12144
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012145
Neal Norwitza978ab02002-11-02 16:58:05 +000012146 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12148echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12149if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12150 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012151else
Martin v. Löwis11437992002-04-12 09:54:03 +000012152 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012153LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012154cat >conftest.$ac_ext <<_ACEOF
12155#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012156/* confdefs.h. */
12157_ACEOF
12158cat confdefs.h >>conftest.$ac_ext
12159cat >>conftest.$ac_ext <<_ACEOF
12160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012162/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012163#ifdef __cplusplus
12164extern "C"
12165#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012166/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 builtin and then its argument prototype would still apply. */
12168char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012169int
12170main ()
12171{
12172thr_create ();
12173 ;
12174 return 0;
12175}
12176_ACEOF
12177rm -f conftest.$ac_objext conftest$ac_exeext
12178if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12179 (eval $ac_link) 2>&5
12180 ac_status=$?
12181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12182 (exit $ac_status); } &&
12183 { ac_try='test -s conftest$ac_exeext'
12184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12185 (eval $ac_try) 2>&5
12186 ac_status=$?
12187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12188 (exit $ac_status); }; }; then
12189 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012190else
Martin v. Löwis11437992002-04-12 09:54:03 +000012191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012192sed 's/^/| /' conftest.$ac_ext >&5
12193
Martin v. Löwis11437992002-04-12 09:54:03 +000012194ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012195fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012196rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12197LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012198fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012199echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12200echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12201if test $ac_cv_lib_thread_thr_create = yes; then
12202 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012203#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012204_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012205
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012206 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012207 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012208 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012209fi
12210
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012211 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012212
Martin v. Löwis130fb172001-07-19 11:00:41 +000012213 if test "$USE_THREAD_MODULE" != "#"
12214 then
12215 # If the above checks didn't disable threads, (at least) OSF1
12216 # needs this '-threads' argument during linking.
12217 case $ac_sys_system in
12218 OSF1) LDLAST=-threads;;
12219 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012220 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012221fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012222
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012223if test "$posix_threads" = "yes"; then
12224 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012225
12226cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012227#define _POSIX_THREADS 1
12228_ACEOF
12229
12230 fi
12231
12232 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12233 case $ac_sys_system/$ac_sys_release in
12234 SunOS/5.6)
12235cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012236#define HAVE_PTHREAD_DESTRUCTOR 1
12237_ACEOF
12238
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012239 ;;
12240 SunOS/5.8)
12241cat >>confdefs.h <<\_ACEOF
12242#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12243_ACEOF
12244
12245 ;;
12246 esac
12247
12248 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12249echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12250 if test "${ac_cv_pthread_system_supported+set}" = set; then
12251 echo $ECHO_N "(cached) $ECHO_C" >&6
12252else
12253 if test "$cross_compiling" = yes; then
12254 ac_cv_pthread_system_supported=no
12255else
12256 cat >conftest.$ac_ext <<_ACEOF
12257#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012258/* confdefs.h. */
12259_ACEOF
12260cat confdefs.h >>conftest.$ac_ext
12261cat >>conftest.$ac_ext <<_ACEOF
12262/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012263#include <pthread.h>
12264 void *foo(void *parm) {
12265 return NULL;
12266 }
12267 main() {
12268 pthread_attr_t attr;
12269 pthread_t id;
12270 if (pthread_attr_init(&attr)) exit(-1);
12271 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12272 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12273 exit(0);
12274 }
12275_ACEOF
12276rm -f conftest$ac_exeext
12277if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12278 (eval $ac_link) 2>&5
12279 ac_status=$?
12280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12281 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12283 (eval $ac_try) 2>&5
12284 ac_status=$?
12285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12286 (exit $ac_status); }; }; then
12287 ac_cv_pthread_system_supported=yes
12288else
12289 echo "$as_me: program exited with status $ac_status" >&5
12290echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012291sed 's/^/| /' conftest.$ac_ext >&5
12292
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012293( exit $ac_status )
12294ac_cv_pthread_system_supported=no
12295fi
Skip Montanaro6dead952003-09-25 14:50:04 +000012296rm -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 +000012297fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012298
Guido van Rossum627b2d71993-12-24 10:39:16 +000012299fi
12300
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012301 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12302echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12303 if test "$ac_cv_pthread_system_supported" = "yes"; then
12304
12305cat >>confdefs.h <<\_ACEOF
12306#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12307_ACEOF
12308
12309 fi
12310
12311for ac_func in pthread_sigmask
12312do
12313as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12314echo "$as_me:$LINENO: checking for $ac_func" >&5
12315echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12316if eval "test \"\${$as_ac_var+set}\" = set"; then
12317 echo $ECHO_N "(cached) $ECHO_C" >&6
12318else
12319 cat >conftest.$ac_ext <<_ACEOF
12320#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012321/* confdefs.h. */
12322_ACEOF
12323cat confdefs.h >>conftest.$ac_ext
12324cat >>conftest.$ac_ext <<_ACEOF
12325/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012326/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012327 which can conflict with char $ac_func (); below.
12328 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012329 <limits.h> exists even on freestanding compilers. Under hpux,
12330 including <limits.h> includes <sys/time.h> and causes problems
12331 checking for functions defined therein. */
12332#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012333# include <limits.h>
12334#else
12335# include <assert.h>
12336#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012337/* Override any gcc2 internal prototype to avoid an error. */
12338#ifdef __cplusplus
12339extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012340{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012341#endif
12342/* We use char because int might match the return type of a gcc2
12343 builtin and then its argument prototype would still apply. */
12344char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012345/* The GNU C library defines this for functions which it implements
12346 to always fail with ENOSYS. Some functions are actually named
12347 something starting with __ and the normal name is an alias. */
12348#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12349choke me
12350#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012351char (*f) () = $ac_func;
12352#endif
12353#ifdef __cplusplus
12354}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012355#endif
12356
Skip Montanaro6dead952003-09-25 14:50:04 +000012357int
12358main ()
12359{
12360return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012361 ;
12362 return 0;
12363}
12364_ACEOF
12365rm -f conftest.$ac_objext conftest$ac_exeext
12366if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12367 (eval $ac_link) 2>&5
12368 ac_status=$?
12369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12370 (exit $ac_status); } &&
12371 { ac_try='test -s conftest$ac_exeext'
12372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12373 (eval $ac_try) 2>&5
12374 ac_status=$?
12375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12376 (exit $ac_status); }; }; then
12377 eval "$as_ac_var=yes"
12378else
12379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012380sed 's/^/| /' conftest.$ac_ext >&5
12381
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012382eval "$as_ac_var=no"
12383fi
12384rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12385fi
12386echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12387echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12388if test `eval echo '${'$as_ac_var'}'` = yes; then
12389 cat >>confdefs.h <<_ACEOF
12390#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12391_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012392 case $ac_sys_system in
12393 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012394
Jason Tishlerfac083d2003-07-22 15:20:49 +000012395cat >>confdefs.h <<\_ACEOF
12396#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12397_ACEOF
12398
12399 ;;
12400 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012401fi
12402done
12403
12404fi
12405
12406
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012407# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012408
12409
12410echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12411echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012412# Check whether --enable-ipv6 or --disable-ipv6 was given.
12413if test "${enable_ipv6+set}" = set; then
12414 enableval="$enable_ipv6"
12415 case "$enableval" in
12416 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 echo "$as_me:$LINENO: result: no" >&5
12418echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012419 ipv6=no
12420 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 *) echo "$as_me:$LINENO: result: yes" >&5
12422echo "${ECHO_T}yes" >&6
12423 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012424#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012425_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012426
12427 ipv6=yes
12428 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012429 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012430else
Martin v. Löwis11437992002-04-12 09:54:03 +000012431
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012432 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 echo "$as_me:$LINENO: result: no" >&5
12434echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012435 ipv6=no
12436
12437else
Martin v. Löwis11437992002-04-12 09:54:03 +000012438 cat >conftest.$ac_ext <<_ACEOF
12439#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012440/* confdefs.h. */
12441_ACEOF
12442cat confdefs.h >>conftest.$ac_ext
12443cat >>conftest.$ac_ext <<_ACEOF
12444/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012445 /* AF_INET6 available check */
12446#include <sys/types.h>
12447#include <sys/socket.h>
12448main()
12449{
12450 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12451 exit(1);
12452 else
12453 exit(0);
12454}
12455
Martin v. Löwis11437992002-04-12 09:54:03 +000012456_ACEOF
12457rm -f conftest$ac_exeext
12458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12459 (eval $ac_link) 2>&5
12460 ac_status=$?
12461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12462 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12464 (eval $ac_try) 2>&5
12465 ac_status=$?
12466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12467 (exit $ac_status); }; }; then
12468 echo "$as_me:$LINENO: result: yes" >&5
12469echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012470 ipv6=yes
12471else
Martin v. Löwis11437992002-04-12 09:54:03 +000012472 echo "$as_me: program exited with status $ac_status" >&5
12473echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012474sed 's/^/| /' conftest.$ac_ext >&5
12475
Martin v. Löwis11437992002-04-12 09:54:03 +000012476( exit $ac_status )
12477echo "$as_me:$LINENO: result: no" >&5
12478echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012479 ipv6=no
12480fi
Skip Montanaro6dead952003-09-25 14:50:04 +000012481rm -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 +000012482fi
12483
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012484if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012485 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12486echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12487 cat >conftest.$ac_ext <<_ACEOF
12488#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012489/* confdefs.h. */
12490_ACEOF
12491cat confdefs.h >>conftest.$ac_ext
12492cat >>conftest.$ac_ext <<_ACEOF
12493/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012494#include <sys/types.h>
12495#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012496int
12497main ()
12498{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012499struct sockaddr_in6 x;
12500x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012501 ;
12502 return 0;
12503}
12504_ACEOF
12505rm -f conftest.$ac_objext
12506if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12507 (eval $ac_compile) 2>&5
12508 ac_status=$?
12509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12510 (exit $ac_status); } &&
12511 { ac_try='test -s conftest.$ac_objext'
12512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12513 (eval $ac_try) 2>&5
12514 ac_status=$?
12515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12516 (exit $ac_status); }; }; then
12517 echo "$as_me:$LINENO: result: yes" >&5
12518echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012519 ipv6=yes
12520else
Martin v. Löwis11437992002-04-12 09:54:03 +000012521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012522sed 's/^/| /' conftest.$ac_ext >&5
12523
Martin v. Löwis11437992002-04-12 09:54:03 +000012524echo "$as_me:$LINENO: result: no" >&5
12525echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012526 ipv6=no
12527fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012528rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012529fi
12530
12531if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012532 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012533#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012534_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012535
12536fi
12537
Martin v. Löwis11437992002-04-12 09:54:03 +000012538fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012539
12540ipv6type=unknown
12541ipv6lib=none
12542ipv6trylibc=no
12543
12544if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
12546echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000012547 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12548 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012549 case $i in
12550 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 cat >conftest.$ac_ext <<_ACEOF
12552#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012553/* confdefs.h. */
12554_ACEOF
12555cat confdefs.h >>conftest.$ac_ext
12556cat >>conftest.$ac_ext <<_ACEOF
12557/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012558
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012559#include <netinet/in.h>
12560#ifdef IPV6_INRIA_VERSION
12561yes
12562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012563_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012565 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012566 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012567fi
12568rm -f conftest*
12569
12570 ;;
12571 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000012572 cat >conftest.$ac_ext <<_ACEOF
12573#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012574/* confdefs.h. */
12575_ACEOF
12576cat confdefs.h >>conftest.$ac_ext
12577cat >>conftest.$ac_ext <<_ACEOF
12578/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012579
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012580#include <netinet/in.h>
12581#ifdef __KAME__
12582yes
12583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012584_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012585if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012586 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012587 ipv6type=$i;
12588 ipv6lib=inet6
12589 ipv6libdir=/usr/local/v6/lib
12590 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012591fi
12592rm -f conftest*
12593
12594 ;;
12595 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000012596 cat >conftest.$ac_ext <<_ACEOF
12597#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012598/* confdefs.h. */
12599_ACEOF
12600cat confdefs.h >>conftest.$ac_ext
12601cat >>conftest.$ac_ext <<_ACEOF
12602/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012603
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012604#include <features.h>
12605#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12606yes
12607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012608_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012610 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012611 ipv6type=$i;
12612 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012613fi
12614rm -f conftest*
12615
12616 ;;
12617 linux-inet6)
12618 if test -d /usr/inet6; then
12619 ipv6type=$i
12620 ipv6lib=inet6
12621 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000012622 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012623 fi
12624 ;;
12625 solaris)
12626 if test -f /etc/netconfig; then
12627 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
12628 ipv6type=$i
12629 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012630 fi
12631 fi
12632 ;;
12633 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 cat >conftest.$ac_ext <<_ACEOF
12635#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012636/* confdefs.h. */
12637_ACEOF
12638cat confdefs.h >>conftest.$ac_ext
12639cat >>conftest.$ac_ext <<_ACEOF
12640/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012641
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012642#include <sys/param.h>
12643#ifdef _TOSHIBA_INET6
12644yes
12645#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012646_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012647if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012648 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012649 ipv6type=$i;
12650 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012651 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012652fi
12653rm -f conftest*
12654
12655 ;;
12656 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000012657 cat >conftest.$ac_ext <<_ACEOF
12658#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012659/* confdefs.h. */
12660_ACEOF
12661cat confdefs.h >>conftest.$ac_ext
12662cat >>conftest.$ac_ext <<_ACEOF
12663/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012664
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012665#include </usr/local/v6/include/sys/v6config.h>
12666#ifdef __V6D__
12667yes
12668#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012669_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012671 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012672 ipv6type=$i;
12673 ipv6lib=v6;
12674 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012675 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012676fi
12677rm -f conftest*
12678
12679 ;;
12680 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 cat >conftest.$ac_ext <<_ACEOF
12682#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* confdefs.h. */
12684_ACEOF
12685cat confdefs.h >>conftest.$ac_ext
12686cat >>conftest.$ac_ext <<_ACEOF
12687/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012688
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012689#include <sys/param.h>
12690#ifdef _ZETA_MINAMI_INET6
12691yes
12692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012693_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012694if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012695 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012696 ipv6type=$i;
12697 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012698 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012699fi
12700rm -f conftest*
12701
12702 ;;
12703 esac
12704 if test "$ipv6type" != "unknown"; then
12705 break
12706 fi
12707 done
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 echo "$as_me:$LINENO: result: $ipv6type" >&5
12709echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012710fi
12711
12712if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12713 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12714 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12715 echo "using lib$ipv6lib"
12716 else
12717 if test $ipv6trylibc = "yes"; then
12718 echo "using libc"
12719 else
12720 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12721 echo "You need to fetch lib$ipv6lib.a from appropriate"
12722 echo 'ipv6 kit and compile beforehand.'
12723 exit 1
12724 fi
12725 fi
12726fi
12727
Jack Jansen7b8c7542002-04-14 20:12:41 +000012728# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000012729echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
12730echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000012731
12732# Check whether --with-universal-newlines or --without-universal-newlines was given.
12733if test "${with_universal_newlines+set}" = set; then
12734 withval="$with_universal_newlines"
12735
12736fi;
12737
12738if test -z "$with_universal_newlines"
12739then with_universal_newlines="yes"
12740fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012741if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012742then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012743 echo --without-universal-newlines is unsupported, see README
12744 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012745else
Martin v. Löwise8aea582002-04-16 05:51:02 +000012746
12747cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000012748#define WITH_UNIVERSAL_NEWLINES 1
12749_ACEOF
12750
12751fi
12752echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
12753echo "${ECHO_T}$with_universal_newlines" >&6
12754
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012755# Check for --with-doc-strings
12756echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12757echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12758
12759# Check whether --with-doc-strings or --without-doc-strings was given.
12760if test "${with_doc_strings+set}" = set; then
12761 withval="$with_doc_strings"
12762
12763fi;
12764
12765if test -z "$with_doc_strings"
12766then with_doc_strings="yes"
12767fi
12768if test "$with_doc_strings" != "no"
12769then
12770
12771cat >>confdefs.h <<\_ACEOF
12772#define WITH_DOC_STRINGS 1
12773_ACEOF
12774
12775fi
12776echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12777echo "${ECHO_T}$with_doc_strings" >&6
12778
Neil Schemenauera35c6882001-02-27 04:45:05 +000012779# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012780echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12781echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12782
Neil Schemenauera35c6882001-02-27 04:45:05 +000012783# Check whether --with-pymalloc or --without-pymalloc was given.
12784if test "${with_pymalloc+set}" = set; then
12785 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012786
Martin v. Löwis11437992002-04-12 09:54:03 +000012787fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012788
Neil Schemenauer16c22972002-03-22 15:34:49 +000012789if test -z "$with_pymalloc"
12790then with_pymalloc="yes"
12791fi
12792if test "$with_pymalloc" != "no"
12793then
Martin v. Löwis11437992002-04-12 09:54:03 +000012794
12795cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012796#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012797_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012798
12799fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012800echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12801echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012802
Barry Warsawef82cd72000-06-30 16:21:01 +000012803# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012804echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12805echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12806
Barry Warsawef82cd72000-06-30 16:21:01 +000012807# Check whether --with-wctype-functions or --without-wctype-functions was given.
12808if test "${with_wctype_functions+set}" = set; then
12809 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012810
Barry Warsawef82cd72000-06-30 16:21:01 +000012811if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012812then
12813
12814cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012815#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012816_ACEOF
12817
12818 echo "$as_me:$LINENO: result: yes" >&5
12819echo "${ECHO_T}yes" >&6
12820else echo "$as_me:$LINENO: result: no" >&5
12821echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012822fi
12823else
Martin v. Löwis11437992002-04-12 09:54:03 +000012824 echo "$as_me:$LINENO: result: no" >&5
12825echo "${ECHO_T}no" >&6
12826fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012827
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012828# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012829
Guido van Rossum98935bf2001-09-05 19:13:16 +000012830DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012831
Martin v. Löwis11437992002-04-12 09:54:03 +000012832echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12833echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12834
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012835# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012836if test "${with_sgi_dl+set}" = set; then
12837 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012838
12839echo "$as_me:$LINENO: result: $withval" >&5
12840echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012841echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012842exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012843
12844cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012845#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012846_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012847
Guido van Rossume97ee181999-12-20 21:27:22 +000012848DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012849dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012850if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012851then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012852else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12853echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12854 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012855fi
12856DLINCLDIR=${dldir}
12857LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012858else
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 echo "$as_me:$LINENO: result: no" >&5
12860echo "${ECHO_T}no" >&6
12861fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012862
Martin v. Löwis11437992002-04-12 09:54:03 +000012863echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12864echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012865
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012866# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012867if test "${with_dl_dld+set}" = set; then
12868 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012869
12870echo "$as_me:$LINENO: result: $withval" >&5
12871echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012872echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012873exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012874
12875cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012876#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012877_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012878
Guido van Rossume97ee181999-12-20 21:27:22 +000012879DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012880dldir=`echo "$withval" | sed 's/,.*//'`
12881dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012882if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012883then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012884else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12885echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12886 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012887fi
12888DLINCLDIR=${dldir}
12889LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012890else
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 echo "$as_me:$LINENO: result: no" >&5
12892echo "${ECHO_T}no" >&6
12893fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012894
Guido van Rossume97ee181999-12-20 21:27:22 +000012895# the dlopen() function means we might want to use dynload_shlib.o. some
12896# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012897
Thomas Wouters3a584202000-08-05 23:28:51 +000012898for ac_func in dlopen
12899do
Martin v. Löwis11437992002-04-12 09:54:03 +000012900as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12901echo "$as_me:$LINENO: checking for $ac_func" >&5
12902echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12903if eval "test \"\${$as_ac_var+set}\" = set"; then
12904 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012905else
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 cat >conftest.$ac_ext <<_ACEOF
12907#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012908/* confdefs.h. */
12909_ACEOF
12910cat confdefs.h >>conftest.$ac_ext
12911cat >>conftest.$ac_ext <<_ACEOF
12912/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012913/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012914 which can conflict with char $ac_func (); below.
12915 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012916 <limits.h> exists even on freestanding compilers. Under hpux,
12917 including <limits.h> includes <sys/time.h> and causes problems
12918 checking for functions defined therein. */
12919#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012920# include <limits.h>
12921#else
12922# include <assert.h>
12923#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012924/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012925#ifdef __cplusplus
12926extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012927{
Martin v. Löwis11437992002-04-12 09:54:03 +000012928#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012929/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012930 builtin and then its argument prototype would still apply. */
12931char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012932/* The GNU C library defines this for functions which it implements
12933 to always fail with ENOSYS. Some functions are actually named
12934 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012935#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012936choke me
12937#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012938char (*f) () = $ac_func;
12939#endif
12940#ifdef __cplusplus
12941}
Guido van Rossume97ee181999-12-20 21:27:22 +000012942#endif
12943
Skip Montanaro6dead952003-09-25 14:50:04 +000012944int
12945main ()
12946{
12947return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012948 ;
12949 return 0;
12950}
12951_ACEOF
12952rm -f conftest.$ac_objext conftest$ac_exeext
12953if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12954 (eval $ac_link) 2>&5
12955 ac_status=$?
12956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12957 (exit $ac_status); } &&
12958 { ac_try='test -s conftest$ac_exeext'
12959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12960 (eval $ac_try) 2>&5
12961 ac_status=$?
12962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12963 (exit $ac_status); }; }; then
12964 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012965else
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012967sed 's/^/| /' conftest.$ac_ext >&5
12968
Martin v. Löwis11437992002-04-12 09:54:03 +000012969eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012970fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012971rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012972fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012973echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12974echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12975if test `eval echo '${'$as_ac_var'}'` = yes; then
12976 cat >>confdefs.h <<_ACEOF
12977#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12978_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012979
Guido van Rossume97ee181999-12-20 21:27:22 +000012980fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012981done
Guido van Rossume97ee181999-12-20 21:27:22 +000012982
Michael W. Hudson54241132001-12-07 15:38:26 +000012983
Guido van Rossume97ee181999-12-20 21:27:22 +000012984# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12985# loading of modules.
12986
Martin v. Löwis11437992002-04-12 09:54:03 +000012987echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12988echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012989if test -z "$DYNLOADFILE"
12990then
12991 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012992 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12993 if test "$ac_cv_func_dlopen" = yes
12994 then DYNLOADFILE="dynload_shlib.o"
12995 else DYNLOADFILE="dynload_aix.o"
12996 fi
12997 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012998 BeOS*) DYNLOADFILE="dynload_beos.o";;
12999 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000013000 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013001 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013002 *)
13003 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13004 # out any dynamic loading
13005 if test "$ac_cv_func_dlopen" = yes
13006 then DYNLOADFILE="dynload_shlib.o"
13007 else DYNLOADFILE="dynload_stub.o"
13008 fi
13009 ;;
13010 esac
13011fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013012echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13013echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013014if test "$DYNLOADFILE" != "dynload_stub.o"
13015then
Martin v. Löwis11437992002-04-12 09:54:03 +000013016
13017cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013018#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013019_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013020
13021fi
13022
Neil Schemenauer4e425612001-06-19 15:44:15 +000013023# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13024
Michael W. Hudson54241132001-12-07 15:38:26 +000013025
Martin v. Löwis11437992002-04-12 09:54:03 +000013026echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13027echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013028if test -z "$MACHDEP_OBJS"
13029then
Jack Jansene578a632001-08-15 01:27:14 +000013030 MACHDEP_OBJS=$extra_machdep_objs
13031else
13032 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013034echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13035echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013036
Guido van Rossum627b2d71993-12-24 10:39:16 +000013037# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000013109
Martin v. Löwisd5843682002-11-21 20:41:28 +000013110for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013111 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013112 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000013113 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013114 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013115 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013116 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013117 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013118 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013119 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013120 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013121 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013122do
Martin v. Löwis11437992002-04-12 09:54:03 +000013123as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13124echo "$as_me:$LINENO: checking for $ac_func" >&5
13125echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13126if eval "test \"\${$as_ac_var+set}\" = set"; then
13127 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013128else
Martin v. Löwis11437992002-04-12 09:54:03 +000013129 cat >conftest.$ac_ext <<_ACEOF
13130#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013131/* confdefs.h. */
13132_ACEOF
13133cat confdefs.h >>conftest.$ac_ext
13134cat >>conftest.$ac_ext <<_ACEOF
13135/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013136/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013137 which can conflict with char $ac_func (); below.
13138 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013139 <limits.h> exists even on freestanding compilers. Under hpux,
13140 including <limits.h> includes <sys/time.h> and causes problems
13141 checking for functions defined therein. */
13142#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013143# include <limits.h>
13144#else
13145# include <assert.h>
13146#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013147/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013148#ifdef __cplusplus
13149extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013150{
Martin v. Löwis11437992002-04-12 09:54:03 +000013151#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013152/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 builtin and then its argument prototype would still apply. */
13154char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013155/* The GNU C library defines this for functions which it implements
13156 to always fail with ENOSYS. Some functions are actually named
13157 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013158#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013159choke me
13160#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013161char (*f) () = $ac_func;
13162#endif
13163#ifdef __cplusplus
13164}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013165#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013166
Skip Montanaro6dead952003-09-25 14:50:04 +000013167int
13168main ()
13169{
13170return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013171 ;
13172 return 0;
13173}
13174_ACEOF
13175rm -f conftest.$ac_objext conftest$ac_exeext
13176if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13177 (eval $ac_link) 2>&5
13178 ac_status=$?
13179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13180 (exit $ac_status); } &&
13181 { ac_try='test -s conftest$ac_exeext'
13182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13183 (eval $ac_try) 2>&5
13184 ac_status=$?
13185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13186 (exit $ac_status); }; }; then
13187 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013188else
Martin v. Löwis11437992002-04-12 09:54:03 +000013189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013190sed 's/^/| /' conftest.$ac_ext >&5
13191
Martin v. Löwis11437992002-04-12 09:54:03 +000013192eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013194rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013195fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013196echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13197echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13198if test `eval echo '${'$as_ac_var'}'` = yes; then
13199 cat >>confdefs.h <<_ACEOF
13200#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13201_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013202
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013203fi
13204done
13205
Michael W. Hudson54241132001-12-07 15:38:26 +000013206
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013207# For some functions, having a definition is not sufficient, since
13208# we want to take their address.
13209echo "$as_me:$LINENO: checking for chroot" >&5
13210echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13211cat >conftest.$ac_ext <<_ACEOF
13212#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013213/* confdefs.h. */
13214_ACEOF
13215cat confdefs.h >>conftest.$ac_ext
13216cat >>conftest.$ac_ext <<_ACEOF
13217/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013218#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013219int
13220main ()
13221{
13222void *x=chroot
13223 ;
13224 return 0;
13225}
13226_ACEOF
13227rm -f conftest.$ac_objext
13228if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13229 (eval $ac_compile) 2>&5
13230 ac_status=$?
13231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13232 (exit $ac_status); } &&
13233 { ac_try='test -s conftest.$ac_objext'
13234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13235 (eval $ac_try) 2>&5
13236 ac_status=$?
13237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13238 (exit $ac_status); }; }; then
13239
13240cat >>confdefs.h <<\_ACEOF
13241#define HAVE_CHROOT 1
13242_ACEOF
13243
13244 echo "$as_me:$LINENO: result: yes" >&5
13245echo "${ECHO_T}yes" >&6
13246else
13247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013248sed 's/^/| /' conftest.$ac_ext >&5
13249
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013250echo "$as_me:$LINENO: result: no" >&5
13251echo "${ECHO_T}no" >&6
13252
13253fi
13254rm -f conftest.$ac_objext conftest.$ac_ext
13255echo "$as_me:$LINENO: checking for link" >&5
13256echo $ECHO_N "checking for link... $ECHO_C" >&6
13257cat >conftest.$ac_ext <<_ACEOF
13258#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013259/* confdefs.h. */
13260_ACEOF
13261cat confdefs.h >>conftest.$ac_ext
13262cat >>conftest.$ac_ext <<_ACEOF
13263/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013264#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013265int
13266main ()
13267{
13268void *x=link
13269 ;
13270 return 0;
13271}
13272_ACEOF
13273rm -f conftest.$ac_objext
13274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13275 (eval $ac_compile) 2>&5
13276 ac_status=$?
13277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13278 (exit $ac_status); } &&
13279 { ac_try='test -s conftest.$ac_objext'
13280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13281 (eval $ac_try) 2>&5
13282 ac_status=$?
13283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13284 (exit $ac_status); }; }; then
13285
13286cat >>confdefs.h <<\_ACEOF
13287#define HAVE_LINK 1
13288_ACEOF
13289
13290 echo "$as_me:$LINENO: result: yes" >&5
13291echo "${ECHO_T}yes" >&6
13292else
13293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013294sed 's/^/| /' conftest.$ac_ext >&5
13295
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013296echo "$as_me:$LINENO: result: no" >&5
13297echo "${ECHO_T}no" >&6
13298
13299fi
13300rm -f conftest.$ac_objext conftest.$ac_ext
13301echo "$as_me:$LINENO: checking for symlink" >&5
13302echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13303cat >conftest.$ac_ext <<_ACEOF
13304#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013305/* confdefs.h. */
13306_ACEOF
13307cat confdefs.h >>conftest.$ac_ext
13308cat >>conftest.$ac_ext <<_ACEOF
13309/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013310#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013311int
13312main ()
13313{
13314void *x=symlink
13315 ;
13316 return 0;
13317}
13318_ACEOF
13319rm -f conftest.$ac_objext
13320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13321 (eval $ac_compile) 2>&5
13322 ac_status=$?
13323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13324 (exit $ac_status); } &&
13325 { ac_try='test -s conftest.$ac_objext'
13326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13327 (eval $ac_try) 2>&5
13328 ac_status=$?
13329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13330 (exit $ac_status); }; }; then
13331
13332cat >>confdefs.h <<\_ACEOF
13333#define HAVE_SYMLINK 1
13334_ACEOF
13335
13336 echo "$as_me:$LINENO: result: yes" >&5
13337echo "${ECHO_T}yes" >&6
13338else
13339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013340sed 's/^/| /' conftest.$ac_ext >&5
13341
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013342echo "$as_me:$LINENO: result: no" >&5
13343echo "${ECHO_T}no" >&6
13344
13345fi
13346rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013347echo "$as_me:$LINENO: checking for fchdir" >&5
13348echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13349cat >conftest.$ac_ext <<_ACEOF
13350#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013351/* confdefs.h. */
13352_ACEOF
13353cat confdefs.h >>conftest.$ac_ext
13354cat >>conftest.$ac_ext <<_ACEOF
13355/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013356#include <unistd.h>
13357int
13358main ()
13359{
13360void *x=fchdir
13361 ;
13362 return 0;
13363}
13364_ACEOF
13365rm -f conftest.$ac_objext
13366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13367 (eval $ac_compile) 2>&5
13368 ac_status=$?
13369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13370 (exit $ac_status); } &&
13371 { ac_try='test -s conftest.$ac_objext'
13372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13373 (eval $ac_try) 2>&5
13374 ac_status=$?
13375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13376 (exit $ac_status); }; }; then
13377
13378cat >>confdefs.h <<\_ACEOF
13379#define HAVE_FCHDIR 1
13380_ACEOF
13381
13382 echo "$as_me:$LINENO: result: yes" >&5
13383echo "${ECHO_T}yes" >&6
13384else
13385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013386sed 's/^/| /' conftest.$ac_ext >&5
13387
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013388echo "$as_me:$LINENO: result: no" >&5
13389echo "${ECHO_T}no" >&6
13390
13391fi
13392rm -f conftest.$ac_objext conftest.$ac_ext
13393echo "$as_me:$LINENO: checking for fsync" >&5
13394echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13395cat >conftest.$ac_ext <<_ACEOF
13396#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013397/* confdefs.h. */
13398_ACEOF
13399cat confdefs.h >>conftest.$ac_ext
13400cat >>conftest.$ac_ext <<_ACEOF
13401/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013402#include <unistd.h>
13403int
13404main ()
13405{
13406void *x=fsync
13407 ;
13408 return 0;
13409}
13410_ACEOF
13411rm -f conftest.$ac_objext
13412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13413 (eval $ac_compile) 2>&5
13414 ac_status=$?
13415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13416 (exit $ac_status); } &&
13417 { ac_try='test -s conftest.$ac_objext'
13418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13419 (eval $ac_try) 2>&5
13420 ac_status=$?
13421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13422 (exit $ac_status); }; }; then
13423
13424cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013425#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013426_ACEOF
13427
13428 echo "$as_me:$LINENO: result: yes" >&5
13429echo "${ECHO_T}yes" >&6
13430else
13431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013432sed 's/^/| /' conftest.$ac_ext >&5
13433
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013434echo "$as_me:$LINENO: result: no" >&5
13435echo "${ECHO_T}no" >&6
13436
13437fi
13438rm -f conftest.$ac_objext conftest.$ac_ext
13439echo "$as_me:$LINENO: checking for fdatasync" >&5
13440echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13441cat >conftest.$ac_ext <<_ACEOF
13442#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013443/* confdefs.h. */
13444_ACEOF
13445cat confdefs.h >>conftest.$ac_ext
13446cat >>conftest.$ac_ext <<_ACEOF
13447/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013448#include <unistd.h>
13449int
13450main ()
13451{
13452void *x=fdatasync
13453 ;
13454 return 0;
13455}
13456_ACEOF
13457rm -f conftest.$ac_objext
13458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13459 (eval $ac_compile) 2>&5
13460 ac_status=$?
13461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13462 (exit $ac_status); } &&
13463 { ac_try='test -s conftest.$ac_objext'
13464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13465 (eval $ac_try) 2>&5
13466 ac_status=$?
13467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13468 (exit $ac_status); }; }; then
13469
13470cat >>confdefs.h <<\_ACEOF
13471#define HAVE_FDATASYNC 1
13472_ACEOF
13473
13474 echo "$as_me:$LINENO: result: yes" >&5
13475echo "${ECHO_T}yes" >&6
13476else
13477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013478sed 's/^/| /' conftest.$ac_ext >&5
13479
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013480echo "$as_me:$LINENO: result: no" >&5
13481echo "${ECHO_T}no" >&6
13482
13483fi
13484rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013485
Martin v. Löwisd5843682002-11-21 20:41:28 +000013486# On some systems (eg. FreeBSD 5), we would find a definition of the
13487# functions ctermid_r, setgroups in the library, but no prototype
13488# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13489# address to avoid compiler warnings and potential miscompilations
13490# because of the missing prototypes.
13491
13492echo "$as_me:$LINENO: checking for ctermid_r" >&5
13493echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13494cat >conftest.$ac_ext <<_ACEOF
13495#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013496/* confdefs.h. */
13497_ACEOF
13498cat confdefs.h >>conftest.$ac_ext
13499cat >>conftest.$ac_ext <<_ACEOF
13500/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013501
13502#include "confdefs.h"
13503#include <stdio.h>
13504
Martin v. Löwisd5843682002-11-21 20:41:28 +000013505int
13506main ()
13507{
13508void* p = ctermid_r
13509 ;
13510 return 0;
13511}
13512_ACEOF
13513rm -f conftest.$ac_objext
13514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13515 (eval $ac_compile) 2>&5
13516 ac_status=$?
13517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13518 (exit $ac_status); } &&
13519 { ac_try='test -s conftest.$ac_objext'
13520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13521 (eval $ac_try) 2>&5
13522 ac_status=$?
13523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13524 (exit $ac_status); }; }; then
13525
13526cat >>confdefs.h <<\_ACEOF
13527#define HAVE_CTERMID_R 1
13528_ACEOF
13529
13530 echo "$as_me:$LINENO: result: yes" >&5
13531echo "${ECHO_T}yes" >&6
13532else
13533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013534sed 's/^/| /' conftest.$ac_ext >&5
13535
Martin v. Löwisd5843682002-11-21 20:41:28 +000013536echo "$as_me:$LINENO: result: no" >&5
13537echo "${ECHO_T}no" >&6
13538
13539fi
13540rm -f conftest.$ac_objext conftest.$ac_ext
13541
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013542echo "$as_me:$LINENO: checking for flock" >&5
13543echo $ECHO_N "checking for flock... $ECHO_C" >&6
13544cat >conftest.$ac_ext <<_ACEOF
13545#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013546/* confdefs.h. */
13547_ACEOF
13548cat confdefs.h >>conftest.$ac_ext
13549cat >>conftest.$ac_ext <<_ACEOF
13550/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013551
13552#include "confdefs.h"
13553#include <sys/file.h>
13554
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013555int
13556main ()
13557{
13558void* p = flock
13559 ;
13560 return 0;
13561}
13562_ACEOF
13563rm -f conftest.$ac_objext
13564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13565 (eval $ac_compile) 2>&5
13566 ac_status=$?
13567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13568 (exit $ac_status); } &&
13569 { ac_try='test -s conftest.$ac_objext'
13570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13571 (eval $ac_try) 2>&5
13572 ac_status=$?
13573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13574 (exit $ac_status); }; }; then
13575
13576cat >>confdefs.h <<\_ACEOF
13577#define HAVE_FLOCK 1
13578_ACEOF
13579
13580 echo "$as_me:$LINENO: result: yes" >&5
13581echo "${ECHO_T}yes" >&6
13582else
13583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013584sed 's/^/| /' conftest.$ac_ext >&5
13585
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013586echo "$as_me:$LINENO: result: no" >&5
13587echo "${ECHO_T}no" >&6
13588
13589fi
13590rm -f conftest.$ac_objext conftest.$ac_ext
13591
13592echo "$as_me:$LINENO: checking for getpagesize" >&5
13593echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
13594cat >conftest.$ac_ext <<_ACEOF
13595#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013596/* confdefs.h. */
13597_ACEOF
13598cat confdefs.h >>conftest.$ac_ext
13599cat >>conftest.$ac_ext <<_ACEOF
13600/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013601
13602#include "confdefs.h"
13603#include <unistd.h>
13604
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013605int
13606main ()
13607{
13608void* p = getpagesize
13609 ;
13610 return 0;
13611}
13612_ACEOF
13613rm -f conftest.$ac_objext
13614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13615 (eval $ac_compile) 2>&5
13616 ac_status=$?
13617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13618 (exit $ac_status); } &&
13619 { ac_try='test -s conftest.$ac_objext'
13620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13621 (eval $ac_try) 2>&5
13622 ac_status=$?
13623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13624 (exit $ac_status); }; }; then
13625
13626cat >>confdefs.h <<\_ACEOF
13627#define HAVE_GETPAGESIZE 1
13628_ACEOF
13629
13630 echo "$as_me:$LINENO: result: yes" >&5
13631echo "${ECHO_T}yes" >&6
13632else
13633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013634sed 's/^/| /' conftest.$ac_ext >&5
13635
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013636echo "$as_me:$LINENO: result: no" >&5
13637echo "${ECHO_T}no" >&6
13638
13639fi
13640rm -f conftest.$ac_objext conftest.$ac_ext
13641
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013642for ac_prog in true
13643do
13644 # Extract the first word of "$ac_prog", so it can be a program name with args.
13645set dummy $ac_prog; ac_word=$2
13646echo "$as_me:$LINENO: checking for $ac_word" >&5
13647echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13648if test "${ac_cv_prog_TRUE+set}" = set; then
13649 echo $ECHO_N "(cached) $ECHO_C" >&6
13650else
13651 if test -n "$TRUE"; then
13652 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
13653else
13654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13655for as_dir in $PATH
13656do
13657 IFS=$as_save_IFS
13658 test -z "$as_dir" && as_dir=.
13659 for ac_exec_ext in '' $ac_executable_extensions; do
13660 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13661 ac_cv_prog_TRUE="$ac_prog"
13662 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13663 break 2
13664 fi
13665done
13666done
13667
13668fi
13669fi
13670TRUE=$ac_cv_prog_TRUE
13671if test -n "$TRUE"; then
13672 echo "$as_me:$LINENO: result: $TRUE" >&5
13673echo "${ECHO_T}$TRUE" >&6
13674else
13675 echo "$as_me:$LINENO: result: no" >&5
13676echo "${ECHO_T}no" >&6
13677fi
13678
13679 test -n "$TRUE" && break
13680done
13681test -n "$TRUE" || TRUE="/bin/true"
13682
13683
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013684echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
13685echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
13686if test "${ac_cv_lib_c_inet_aton+set}" = set; then
13687 echo $ECHO_N "(cached) $ECHO_C" >&6
13688else
13689 ac_check_lib_save_LIBS=$LIBS
13690LIBS="-lc $LIBS"
13691cat >conftest.$ac_ext <<_ACEOF
13692#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013693/* confdefs.h. */
13694_ACEOF
13695cat confdefs.h >>conftest.$ac_ext
13696cat >>conftest.$ac_ext <<_ACEOF
13697/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013698
13699/* Override any gcc2 internal prototype to avoid an error. */
13700#ifdef __cplusplus
13701extern "C"
13702#endif
13703/* We use char because int might match the return type of a gcc2
13704 builtin and then its argument prototype would still apply. */
13705char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013706int
13707main ()
13708{
13709inet_aton ();
13710 ;
13711 return 0;
13712}
13713_ACEOF
13714rm -f conftest.$ac_objext conftest$ac_exeext
13715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13716 (eval $ac_link) 2>&5
13717 ac_status=$?
13718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13719 (exit $ac_status); } &&
13720 { ac_try='test -s conftest$ac_exeext'
13721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13722 (eval $ac_try) 2>&5
13723 ac_status=$?
13724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13725 (exit $ac_status); }; }; then
13726 ac_cv_lib_c_inet_aton=yes
13727else
13728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013729sed 's/^/| /' conftest.$ac_ext >&5
13730
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013731ac_cv_lib_c_inet_aton=no
13732fi
13733rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13734LIBS=$ac_check_lib_save_LIBS
13735fi
13736echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
13737echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
13738if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013739 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013740else
13741
13742echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
13743echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
13744if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
13745 echo $ECHO_N "(cached) $ECHO_C" >&6
13746else
13747 ac_check_lib_save_LIBS=$LIBS
13748LIBS="-lresolv $LIBS"
13749cat >conftest.$ac_ext <<_ACEOF
13750#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013751/* confdefs.h. */
13752_ACEOF
13753cat confdefs.h >>conftest.$ac_ext
13754cat >>conftest.$ac_ext <<_ACEOF
13755/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013756
13757/* Override any gcc2 internal prototype to avoid an error. */
13758#ifdef __cplusplus
13759extern "C"
13760#endif
13761/* We use char because int might match the return type of a gcc2
13762 builtin and then its argument prototype would still apply. */
13763char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013764int
13765main ()
13766{
13767inet_aton ();
13768 ;
13769 return 0;
13770}
13771_ACEOF
13772rm -f conftest.$ac_objext conftest$ac_exeext
13773if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13774 (eval $ac_link) 2>&5
13775 ac_status=$?
13776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13777 (exit $ac_status); } &&
13778 { ac_try='test -s conftest$ac_exeext'
13779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13780 (eval $ac_try) 2>&5
13781 ac_status=$?
13782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13783 (exit $ac_status); }; }; then
13784 ac_cv_lib_resolv_inet_aton=yes
13785else
13786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013787sed 's/^/| /' conftest.$ac_ext >&5
13788
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013789ac_cv_lib_resolv_inet_aton=no
13790fi
13791rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13792LIBS=$ac_check_lib_save_LIBS
13793fi
13794echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13795echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13796if test $ac_cv_lib_resolv_inet_aton = yes; then
13797 cat >>confdefs.h <<_ACEOF
13798#define HAVE_LIBRESOLV 1
13799_ACEOF
13800
13801 LIBS="-lresolv $LIBS"
13802
13803fi
13804
13805
13806fi
13807
13808
Martin v. Löwise9416172003-05-03 10:12:45 +000013809echo "$as_me:$LINENO: checking for hstrerror" >&5
13810echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13811cat >conftest.$ac_ext <<_ACEOF
13812#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013813/* confdefs.h. */
13814_ACEOF
13815cat confdefs.h >>conftest.$ac_ext
13816cat >>conftest.$ac_ext <<_ACEOF
13817/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013818
13819#include "confdefs.h"
13820#include <netdb.h>
13821
Martin v. Löwise9416172003-05-03 10:12:45 +000013822int
13823main ()
13824{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013825void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013826 ;
13827 return 0;
13828}
13829_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013830rm -f conftest.$ac_objext conftest$ac_exeext
13831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13832 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013833 ac_status=$?
13834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13835 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013836 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13838 (eval $ac_try) 2>&5
13839 ac_status=$?
13840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13841 (exit $ac_status); }; }; then
13842
13843cat >>confdefs.h <<\_ACEOF
13844#define HAVE_HSTRERROR 1
13845_ACEOF
13846
13847 echo "$as_me:$LINENO: result: yes" >&5
13848echo "${ECHO_T}yes" >&6
13849else
13850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013851sed 's/^/| /' conftest.$ac_ext >&5
13852
Martin v. Löwise9416172003-05-03 10:12:45 +000013853echo "$as_me:$LINENO: result: no" >&5
13854echo "${ECHO_T}no" >&6
13855
13856fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013857rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013858
13859echo "$as_me:$LINENO: checking for inet_aton" >&5
13860echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13861cat >conftest.$ac_ext <<_ACEOF
13862#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013863/* confdefs.h. */
13864_ACEOF
13865cat confdefs.h >>conftest.$ac_ext
13866cat >>conftest.$ac_ext <<_ACEOF
13867/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013868
13869#include "confdefs.h"
13870#include <sys/socket.h>
13871#include <netinet/in.h>
13872#include <arpa/inet.h>
13873
Martin v. Löwise9416172003-05-03 10:12:45 +000013874int
13875main ()
13876{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013877void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013878 ;
13879 return 0;
13880}
13881_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013882rm -f conftest.$ac_objext conftest$ac_exeext
13883if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13884 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013885 ac_status=$?
13886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13887 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013888 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13890 (eval $ac_try) 2>&5
13891 ac_status=$?
13892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13893 (exit $ac_status); }; }; then
13894
13895cat >>confdefs.h <<\_ACEOF
13896#define HAVE_INET_ATON 1
13897_ACEOF
13898
13899 echo "$as_me:$LINENO: result: yes" >&5
13900echo "${ECHO_T}yes" >&6
13901else
13902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013903sed 's/^/| /' conftest.$ac_ext >&5
13904
Martin v. Löwise9416172003-05-03 10:12:45 +000013905echo "$as_me:$LINENO: result: no" >&5
13906echo "${ECHO_T}no" >&6
13907
13908fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013909rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013910
13911echo "$as_me:$LINENO: checking for inet_pton" >&5
13912echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13913cat >conftest.$ac_ext <<_ACEOF
13914#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013915/* confdefs.h. */
13916_ACEOF
13917cat confdefs.h >>conftest.$ac_ext
13918cat >>conftest.$ac_ext <<_ACEOF
13919/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013920
13921#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013922#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013923#include <sys/socket.h>
13924#include <netinet/in.h>
13925#include <arpa/inet.h>
13926
Martin v. Löwise9416172003-05-03 10:12:45 +000013927int
13928main ()
13929{
13930void* p = inet_pton
13931 ;
13932 return 0;
13933}
13934_ACEOF
13935rm -f conftest.$ac_objext
13936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13937 (eval $ac_compile) 2>&5
13938 ac_status=$?
13939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13940 (exit $ac_status); } &&
13941 { ac_try='test -s conftest.$ac_objext'
13942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13943 (eval $ac_try) 2>&5
13944 ac_status=$?
13945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13946 (exit $ac_status); }; }; then
13947
13948cat >>confdefs.h <<\_ACEOF
13949#define HAVE_INET_PTON 1
13950_ACEOF
13951
13952 echo "$as_me:$LINENO: result: yes" >&5
13953echo "${ECHO_T}yes" >&6
13954else
13955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013956sed 's/^/| /' conftest.$ac_ext >&5
13957
Martin v. Löwise9416172003-05-03 10:12:45 +000013958echo "$as_me:$LINENO: result: no" >&5
13959echo "${ECHO_T}no" >&6
13960
13961fi
13962rm -f conftest.$ac_objext conftest.$ac_ext
13963
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013964# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013965echo "$as_me:$LINENO: checking for setgroups" >&5
13966echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13967cat >conftest.$ac_ext <<_ACEOF
13968#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013969/* confdefs.h. */
13970_ACEOF
13971cat confdefs.h >>conftest.$ac_ext
13972cat >>conftest.$ac_ext <<_ACEOF
13973/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013974
13975#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013976#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013977#ifdef HAVE_GRP_H
13978#include <grp.h>
13979#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013980
Martin v. Löwisd5843682002-11-21 20:41:28 +000013981int
13982main ()
13983{
13984void* p = setgroups
13985 ;
13986 return 0;
13987}
13988_ACEOF
13989rm -f conftest.$ac_objext
13990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13991 (eval $ac_compile) 2>&5
13992 ac_status=$?
13993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13994 (exit $ac_status); } &&
13995 { ac_try='test -s conftest.$ac_objext'
13996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13997 (eval $ac_try) 2>&5
13998 ac_status=$?
13999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14000 (exit $ac_status); }; }; then
14001
14002cat >>confdefs.h <<\_ACEOF
14003#define HAVE_SETGROUPS 1
14004_ACEOF
14005
14006 echo "$as_me:$LINENO: result: yes" >&5
14007echo "${ECHO_T}yes" >&6
14008else
14009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014010sed 's/^/| /' conftest.$ac_ext >&5
14011
Martin v. Löwisd5843682002-11-21 20:41:28 +000014012echo "$as_me:$LINENO: result: no" >&5
14013echo "${ECHO_T}no" >&6
14014
14015fi
14016rm -f conftest.$ac_objext conftest.$ac_ext
14017
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014018# check for openpty and forkpty
14019
Martin v. Löwis11437992002-04-12 09:54:03 +000014020
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014021for ac_func in openpty
14022do
Martin v. Löwis11437992002-04-12 09:54:03 +000014023as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14024echo "$as_me:$LINENO: checking for $ac_func" >&5
14025echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14026if eval "test \"\${$as_ac_var+set}\" = set"; then
14027 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014028else
Martin v. Löwis11437992002-04-12 09:54:03 +000014029 cat >conftest.$ac_ext <<_ACEOF
14030#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014031/* confdefs.h. */
14032_ACEOF
14033cat confdefs.h >>conftest.$ac_ext
14034cat >>conftest.$ac_ext <<_ACEOF
14035/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014036/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014037 which can conflict with char $ac_func (); below.
14038 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014039 <limits.h> exists even on freestanding compilers. Under hpux,
14040 including <limits.h> includes <sys/time.h> and causes problems
14041 checking for functions defined therein. */
14042#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014043# include <limits.h>
14044#else
14045# include <assert.h>
14046#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014047/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014048#ifdef __cplusplus
14049extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014050{
Martin v. Löwis11437992002-04-12 09:54:03 +000014051#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014052/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 builtin and then its argument prototype would still apply. */
14054char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014055/* The GNU C library defines this for functions which it implements
14056 to always fail with ENOSYS. Some functions are actually named
14057 something starting with __ and the normal name is an alias. */
14058#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14059choke me
14060#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014061char (*f) () = $ac_func;
14062#endif
14063#ifdef __cplusplus
14064}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014065#endif
14066
Skip Montanaro6dead952003-09-25 14:50:04 +000014067int
14068main ()
14069{
14070return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014071 ;
14072 return 0;
14073}
14074_ACEOF
14075rm -f conftest.$ac_objext conftest$ac_exeext
14076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14077 (eval $ac_link) 2>&5
14078 ac_status=$?
14079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14080 (exit $ac_status); } &&
14081 { ac_try='test -s conftest$ac_exeext'
14082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14083 (eval $ac_try) 2>&5
14084 ac_status=$?
14085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14086 (exit $ac_status); }; }; then
14087 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014088else
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014090sed 's/^/| /' conftest.$ac_ext >&5
14091
Martin v. Löwis11437992002-04-12 09:54:03 +000014092eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014094rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014095fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014096echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14097echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14098if test `eval echo '${'$as_ac_var'}'` = yes; then
14099 cat >>confdefs.h <<_ACEOF
14100#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14101_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014102
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014103else
Martin v. Löwis11437992002-04-12 09:54:03 +000014104 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14105echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14106if test "${ac_cv_lib_util_openpty+set}" = set; then
14107 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014108else
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014110LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014111cat >conftest.$ac_ext <<_ACEOF
14112#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014113/* confdefs.h. */
14114_ACEOF
14115cat confdefs.h >>conftest.$ac_ext
14116cat >>conftest.$ac_ext <<_ACEOF
14117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014118
Fred Drake8cef4cf2000-06-28 16:40:38 +000014119/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014120#ifdef __cplusplus
14121extern "C"
14122#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014123/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014124 builtin and then its argument prototype would still apply. */
14125char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014126int
14127main ()
14128{
14129openpty ();
14130 ;
14131 return 0;
14132}
14133_ACEOF
14134rm -f conftest.$ac_objext conftest$ac_exeext
14135if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14136 (eval $ac_link) 2>&5
14137 ac_status=$?
14138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14139 (exit $ac_status); } &&
14140 { ac_try='test -s conftest$ac_exeext'
14141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14142 (eval $ac_try) 2>&5
14143 ac_status=$?
14144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14145 (exit $ac_status); }; }; then
14146 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014147else
Martin v. Löwis11437992002-04-12 09:54:03 +000014148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014149sed 's/^/| /' conftest.$ac_ext >&5
14150
Martin v. Löwis11437992002-04-12 09:54:03 +000014151ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014153rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14154LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014156echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14157echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14158if test $ac_cv_lib_util_openpty = yes; then
14159 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014160#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014161_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014162 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014163fi
14164
14165fi
14166done
14167
Martin v. Löwis11437992002-04-12 09:54:03 +000014168
Fred Drake8cef4cf2000-06-28 16:40:38 +000014169for ac_func in forkpty
14170do
Martin v. Löwis11437992002-04-12 09:54:03 +000014171as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14172echo "$as_me:$LINENO: checking for $ac_func" >&5
14173echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14174if eval "test \"\${$as_ac_var+set}\" = set"; then
14175 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014176else
Martin v. Löwis11437992002-04-12 09:54:03 +000014177 cat >conftest.$ac_ext <<_ACEOF
14178#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014179/* confdefs.h. */
14180_ACEOF
14181cat confdefs.h >>conftest.$ac_ext
14182cat >>conftest.$ac_ext <<_ACEOF
14183/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014184/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014185 which can conflict with char $ac_func (); below.
14186 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014187 <limits.h> exists even on freestanding compilers. Under hpux,
14188 including <limits.h> includes <sys/time.h> and causes problems
14189 checking for functions defined therein. */
14190#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014191# include <limits.h>
14192#else
14193# include <assert.h>
14194#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014195/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014196#ifdef __cplusplus
14197extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014198{
Martin v. Löwis11437992002-04-12 09:54:03 +000014199#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014200/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014201 builtin and then its argument prototype would still apply. */
14202char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014203/* The GNU C library defines this for functions which it implements
14204 to always fail with ENOSYS. Some functions are actually named
14205 something starting with __ and the normal name is an alias. */
14206#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14207choke me
14208#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014209char (*f) () = $ac_func;
14210#endif
14211#ifdef __cplusplus
14212}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014213#endif
14214
Skip Montanaro6dead952003-09-25 14:50:04 +000014215int
14216main ()
14217{
14218return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 ;
14220 return 0;
14221}
14222_ACEOF
14223rm -f conftest.$ac_objext conftest$ac_exeext
14224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14225 (eval $ac_link) 2>&5
14226 ac_status=$?
14227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14228 (exit $ac_status); } &&
14229 { ac_try='test -s conftest$ac_exeext'
14230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14231 (eval $ac_try) 2>&5
14232 ac_status=$?
14233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14234 (exit $ac_status); }; }; then
14235 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014236else
Martin v. Löwis11437992002-04-12 09:54:03 +000014237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014238sed 's/^/| /' conftest.$ac_ext >&5
14239
Martin v. Löwis11437992002-04-12 09:54:03 +000014240eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014242rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014243fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014244echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14245echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14246if test `eval echo '${'$as_ac_var'}'` = yes; then
14247 cat >>confdefs.h <<_ACEOF
14248#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14249_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014250
Fred Drake8cef4cf2000-06-28 16:40:38 +000014251else
Martin v. Löwis11437992002-04-12 09:54:03 +000014252 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14253echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14254if test "${ac_cv_lib_util_forkpty+set}" = set; then
14255 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014256else
Martin v. Löwis11437992002-04-12 09:54:03 +000014257 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014258LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014259cat >conftest.$ac_ext <<_ACEOF
14260#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014261/* confdefs.h. */
14262_ACEOF
14263cat confdefs.h >>conftest.$ac_ext
14264cat >>conftest.$ac_ext <<_ACEOF
14265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014266
Fred Drake8cef4cf2000-06-28 16:40:38 +000014267/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014268#ifdef __cplusplus
14269extern "C"
14270#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014271/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014272 builtin and then its argument prototype would still apply. */
14273char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014274int
14275main ()
14276{
14277forkpty ();
14278 ;
14279 return 0;
14280}
14281_ACEOF
14282rm -f conftest.$ac_objext conftest$ac_exeext
14283if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14284 (eval $ac_link) 2>&5
14285 ac_status=$?
14286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14287 (exit $ac_status); } &&
14288 { ac_try='test -s conftest$ac_exeext'
14289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14290 (eval $ac_try) 2>&5
14291 ac_status=$?
14292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14293 (exit $ac_status); }; }; then
14294 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014295else
Martin v. Löwis11437992002-04-12 09:54:03 +000014296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014297sed 's/^/| /' conftest.$ac_ext >&5
14298
Martin v. Löwis11437992002-04-12 09:54:03 +000014299ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014300fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014301rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14302LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014303fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014304echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14305echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14306if test $ac_cv_lib_util_forkpty = yes; then
14307 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014308#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014309_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014310 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014311fi
14312
14313fi
14314done
14315
Jack Jansendd19cf82001-12-06 22:36:17 +000014316
Michael W. Hudson54241132001-12-07 15:38:26 +000014317# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014318
14319
14320
14321
14322
14323
Fred Drake8cef4cf2000-06-28 16:40:38 +000014324for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14325do
Martin v. Löwis11437992002-04-12 09:54:03 +000014326as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14327echo "$as_me:$LINENO: checking for $ac_func" >&5
14328echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14329if eval "test \"\${$as_ac_var+set}\" = set"; then
14330 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014331else
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 cat >conftest.$ac_ext <<_ACEOF
14333#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014334/* confdefs.h. */
14335_ACEOF
14336cat confdefs.h >>conftest.$ac_ext
14337cat >>conftest.$ac_ext <<_ACEOF
14338/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014339/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014340 which can conflict with char $ac_func (); below.
14341 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014342 <limits.h> exists even on freestanding compilers. Under hpux,
14343 including <limits.h> includes <sys/time.h> and causes problems
14344 checking for functions defined therein. */
14345#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014346# include <limits.h>
14347#else
14348# include <assert.h>
14349#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014350/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014351#ifdef __cplusplus
14352extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014353{
Martin v. Löwis11437992002-04-12 09:54:03 +000014354#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014355/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 builtin and then its argument prototype would still apply. */
14357char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014358/* The GNU C library defines this for functions which it implements
14359 to always fail with ENOSYS. Some functions are actually named
14360 something starting with __ and the normal name is an alias. */
14361#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14362choke me
14363#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014364char (*f) () = $ac_func;
14365#endif
14366#ifdef __cplusplus
14367}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014368#endif
14369
Skip Montanaro6dead952003-09-25 14:50:04 +000014370int
14371main ()
14372{
14373return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 ;
14375 return 0;
14376}
14377_ACEOF
14378rm -f conftest.$ac_objext conftest$ac_exeext
14379if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14380 (eval $ac_link) 2>&5
14381 ac_status=$?
14382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14383 (exit $ac_status); } &&
14384 { ac_try='test -s conftest$ac_exeext'
14385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14386 (eval $ac_try) 2>&5
14387 ac_status=$?
14388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14389 (exit $ac_status); }; }; then
14390 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014391else
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014393sed 's/^/| /' conftest.$ac_ext >&5
14394
Martin v. Löwis11437992002-04-12 09:54:03 +000014395eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014397rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014399echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14400echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14401if test `eval echo '${'$as_ac_var'}'` = yes; then
14402 cat >>confdefs.h <<_ACEOF
14403#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14404_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014405
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014406fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014407done
14408
Michael W. Hudson54241132001-12-07 15:38:26 +000014409
Martin v. Löwis11437992002-04-12 09:54:03 +000014410
14411
14412
14413
14414
Martin v. Löwis1142de32002-03-29 16:28:31 +000014415for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000014416do
Martin v. Löwis11437992002-04-12 09:54:03 +000014417as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14418echo "$as_me:$LINENO: checking for $ac_func" >&5
14419echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14420if eval "test \"\${$as_ac_var+set}\" = set"; then
14421 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014422else
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 cat >conftest.$ac_ext <<_ACEOF
14424#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014425/* confdefs.h. */
14426_ACEOF
14427cat confdefs.h >>conftest.$ac_ext
14428cat >>conftest.$ac_ext <<_ACEOF
14429/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014430/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014431 which can conflict with char $ac_func (); below.
14432 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014433 <limits.h> exists even on freestanding compilers. Under hpux,
14434 including <limits.h> includes <sys/time.h> and causes problems
14435 checking for functions defined therein. */
14436#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014437# include <limits.h>
14438#else
14439# include <assert.h>
14440#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014441/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014442#ifdef __cplusplus
14443extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014444{
Martin v. Löwis11437992002-04-12 09:54:03 +000014445#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014446/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014447 builtin and then its argument prototype would still apply. */
14448char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014449/* The GNU C library defines this for functions which it implements
14450 to always fail with ENOSYS. Some functions are actually named
14451 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014452#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014453choke me
14454#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014455char (*f) () = $ac_func;
14456#endif
14457#ifdef __cplusplus
14458}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014459#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014460
Skip Montanaro6dead952003-09-25 14:50:04 +000014461int
14462main ()
14463{
14464return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 ;
14466 return 0;
14467}
14468_ACEOF
14469rm -f conftest.$ac_objext conftest$ac_exeext
14470if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14471 (eval $ac_link) 2>&5
14472 ac_status=$?
14473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14474 (exit $ac_status); } &&
14475 { ac_try='test -s conftest$ac_exeext'
14476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14477 (eval $ac_try) 2>&5
14478 ac_status=$?
14479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14480 (exit $ac_status); }; }; then
14481 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014482else
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014484sed 's/^/| /' conftest.$ac_ext >&5
14485
Martin v. Löwis11437992002-04-12 09:54:03 +000014486eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014488rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000014489fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014490echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14491echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14492if test `eval echo '${'$as_ac_var'}'` = yes; then
14493 cat >>confdefs.h <<_ACEOF
14494#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14495_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000014496
Martin v. Löwis1142de32002-03-29 16:28:31 +000014497else
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014499fi
14500done
14501
14502
Martin v. Löwis11437992002-04-12 09:54:03 +000014503
Martin v. Löwis1142de32002-03-29 16:28:31 +000014504for ac_func in getpgrp
14505do
Martin v. Löwis11437992002-04-12 09:54:03 +000014506as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14507echo "$as_me:$LINENO: checking for $ac_func" >&5
14508echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14509if eval "test \"\${$as_ac_var+set}\" = set"; then
14510 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000014511else
Martin v. Löwis11437992002-04-12 09:54:03 +000014512 cat >conftest.$ac_ext <<_ACEOF
14513#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014514/* confdefs.h. */
14515_ACEOF
14516cat confdefs.h >>conftest.$ac_ext
14517cat >>conftest.$ac_ext <<_ACEOF
14518/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000014519/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014520 which can conflict with char $ac_func (); below.
14521 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014522 <limits.h> exists even on freestanding compilers. Under hpux,
14523 including <limits.h> includes <sys/time.h> and causes problems
14524 checking for functions defined therein. */
14525#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014526# include <limits.h>
14527#else
14528# include <assert.h>
14529#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014530/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014531#ifdef __cplusplus
14532extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014533{
Martin v. Löwis11437992002-04-12 09:54:03 +000014534#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014535/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014536 builtin and then its argument prototype would still apply. */
14537char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000014538/* The GNU C library defines this for functions which it implements
14539 to always fail with ENOSYS. Some functions are actually named
14540 something starting with __ and the normal name is an alias. */
14541#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14542choke me
14543#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014544char (*f) () = $ac_func;
14545#endif
14546#ifdef __cplusplus
14547}
Martin v. Löwis1142de32002-03-29 16:28:31 +000014548#endif
14549
Skip Montanaro6dead952003-09-25 14:50:04 +000014550int
14551main ()
14552{
14553return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014554 ;
14555 return 0;
14556}
14557_ACEOF
14558rm -f conftest.$ac_objext conftest$ac_exeext
14559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14560 (eval $ac_link) 2>&5
14561 ac_status=$?
14562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14563 (exit $ac_status); } &&
14564 { ac_try='test -s conftest$ac_exeext'
14565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14566 (eval $ac_try) 2>&5
14567 ac_status=$?
14568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14569 (exit $ac_status); }; }; then
14570 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014571else
Martin v. Löwis11437992002-04-12 09:54:03 +000014572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014573sed 's/^/| /' conftest.$ac_ext >&5
14574
Martin v. Löwis11437992002-04-12 09:54:03 +000014575eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014576fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014577rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014578fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014579echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14580echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14581if test `eval echo '${'$as_ac_var'}'` = yes; then
14582 cat >>confdefs.h <<_ACEOF
14583#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14584_ACEOF
14585 cat >conftest.$ac_ext <<_ACEOF
14586#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014587/* confdefs.h. */
14588_ACEOF
14589cat confdefs.h >>conftest.$ac_ext
14590cat >>conftest.$ac_ext <<_ACEOF
14591/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014592#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014593int
14594main ()
14595{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014596getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 ;
14598 return 0;
14599}
14600_ACEOF
14601rm -f conftest.$ac_objext
14602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14603 (eval $ac_compile) 2>&5
14604 ac_status=$?
14605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14606 (exit $ac_status); } &&
14607 { ac_try='test -s conftest.$ac_objext'
14608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14609 (eval $ac_try) 2>&5
14610 ac_status=$?
14611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14612 (exit $ac_status); }; }; then
14613
14614cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014615#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014616_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014617
Martin v. Löwis11437992002-04-12 09:54:03 +000014618
Guido van Rossumf78abae1997-01-21 22:02:36 +000014619else
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014621sed 's/^/| /' conftest.$ac_ext >&5
14622
Guido van Rossum627b2d71993-12-24 10:39:16 +000014623fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014624rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014625
Guido van Rossum627b2d71993-12-24 10:39:16 +000014626fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014627done
Guido van Rossum627b2d71993-12-24 10:39:16 +000014628
Jack Jansen150753c2003-03-29 22:07:47 +000014629
14630for ac_func in setpgrp
14631do
14632as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14633echo "$as_me:$LINENO: checking for $ac_func" >&5
14634echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14635if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014636 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014637else
Martin v. Löwis11437992002-04-12 09:54:03 +000014638 cat >conftest.$ac_ext <<_ACEOF
14639#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014640/* confdefs.h. */
14641_ACEOF
14642cat confdefs.h >>conftest.$ac_ext
14643cat >>conftest.$ac_ext <<_ACEOF
14644/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014645/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014646 which can conflict with char $ac_func (); below.
14647 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014648 <limits.h> exists even on freestanding compilers. Under hpux,
14649 including <limits.h> includes <sys/time.h> and causes problems
14650 checking for functions defined therein. */
14651#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014652# include <limits.h>
14653#else
14654# include <assert.h>
14655#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014656/* Override any gcc2 internal prototype to avoid an error. */
14657#ifdef __cplusplus
14658extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014659{
Martin v. Löwis11437992002-04-12 09:54:03 +000014660#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014661/* We use char because int might match the return type of a gcc2
14662 builtin and then its argument prototype would still apply. */
14663char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000014664/* The GNU C library defines this for functions which it implements
14665 to always fail with ENOSYS. Some functions are actually named
14666 something starting with __ and the normal name is an alias. */
14667#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14668choke me
14669#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014670char (*f) () = $ac_func;
14671#endif
14672#ifdef __cplusplus
14673}
Jack Jansen150753c2003-03-29 22:07:47 +000014674#endif
14675
Skip Montanaro6dead952003-09-25 14:50:04 +000014676int
14677main ()
14678{
14679return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014680 ;
14681 return 0;
14682}
14683_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014684rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000014685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14686 (eval $ac_link) 2>&5
14687 ac_status=$?
14688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000014689 (exit $ac_status); } &&
14690 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14692 (eval $ac_try) 2>&5
14693 ac_status=$?
14694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14695 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000014696 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014697else
Jack Jansen150753c2003-03-29 22:07:47 +000014698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014699sed 's/^/| /' conftest.$ac_ext >&5
14700
Jack Jansen150753c2003-03-29 22:07:47 +000014701eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014702fi
Jack Jansen150753c2003-03-29 22:07:47 +000014703rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014704fi
Jack Jansen150753c2003-03-29 22:07:47 +000014705echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14706echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14707if test `eval echo '${'$as_ac_var'}'` = yes; then
14708 cat >>confdefs.h <<_ACEOF
14709#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14710_ACEOF
14711 cat >conftest.$ac_ext <<_ACEOF
14712#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014713/* confdefs.h. */
14714_ACEOF
14715cat confdefs.h >>conftest.$ac_ext
14716cat >>conftest.$ac_ext <<_ACEOF
14717/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014718#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000014719int
14720main ()
14721{
14722setpgrp(0,0);
14723 ;
14724 return 0;
14725}
14726_ACEOF
14727rm -f conftest.$ac_objext
14728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14729 (eval $ac_compile) 2>&5
14730 ac_status=$?
14731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14732 (exit $ac_status); } &&
14733 { ac_try='test -s conftest.$ac_objext'
14734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14735 (eval $ac_try) 2>&5
14736 ac_status=$?
14737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14738 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014739
14740cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014741#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014742_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014743
Jack Jansen150753c2003-03-29 22:07:47 +000014744
14745else
14746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014747sed 's/^/| /' conftest.$ac_ext >&5
14748
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014749fi
Jack Jansen150753c2003-03-29 22:07:47 +000014750rm -f conftest.$ac_objext conftest.$ac_ext
14751
14752fi
14753done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014754
Martin v. Löwis11437992002-04-12 09:54:03 +000014755
Thomas Wouters3a584202000-08-05 23:28:51 +000014756for ac_func in gettimeofday
14757do
Martin v. Löwis11437992002-04-12 09:54:03 +000014758as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14759echo "$as_me:$LINENO: checking for $ac_func" >&5
14760echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14761if eval "test \"\${$as_ac_var+set}\" = set"; then
14762 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014763else
Martin v. Löwis11437992002-04-12 09:54:03 +000014764 cat >conftest.$ac_ext <<_ACEOF
14765#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014766/* confdefs.h. */
14767_ACEOF
14768cat confdefs.h >>conftest.$ac_ext
14769cat >>conftest.$ac_ext <<_ACEOF
14770/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014771/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014772 which can conflict with char $ac_func (); below.
14773 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014774 <limits.h> exists even on freestanding compilers. Under hpux,
14775 including <limits.h> includes <sys/time.h> and causes problems
14776 checking for functions defined therein. */
14777#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014778# include <limits.h>
14779#else
14780# include <assert.h>
14781#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014782/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014783#ifdef __cplusplus
14784extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014785{
Martin v. Löwis11437992002-04-12 09:54:03 +000014786#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014787/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014788 builtin and then its argument prototype would still apply. */
14789char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014790/* The GNU C library defines this for functions which it implements
14791 to always fail with ENOSYS. Some functions are actually named
14792 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014793#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014794choke me
14795#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014796char (*f) () = $ac_func;
14797#endif
14798#ifdef __cplusplus
14799}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014800#endif
14801
Skip Montanaro6dead952003-09-25 14:50:04 +000014802int
14803main ()
14804{
14805return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 ;
14807 return 0;
14808}
14809_ACEOF
14810rm -f conftest.$ac_objext conftest$ac_exeext
14811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14812 (eval $ac_link) 2>&5
14813 ac_status=$?
14814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14815 (exit $ac_status); } &&
14816 { ac_try='test -s conftest$ac_exeext'
14817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14818 (eval $ac_try) 2>&5
14819 ac_status=$?
14820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14821 (exit $ac_status); }; }; then
14822 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014823else
Martin v. Löwis11437992002-04-12 09:54:03 +000014824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014825sed 's/^/| /' conftest.$ac_ext >&5
14826
Martin v. Löwis11437992002-04-12 09:54:03 +000014827eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014828fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014829rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014830fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014831echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14832echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14833if test `eval echo '${'$as_ac_var'}'` = yes; then
14834 cat >>confdefs.h <<_ACEOF
14835#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14836_ACEOF
14837 cat >conftest.$ac_ext <<_ACEOF
14838#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014839/* confdefs.h. */
14840_ACEOF
14841cat confdefs.h >>conftest.$ac_ext
14842cat >>conftest.$ac_ext <<_ACEOF
14843/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014844#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014845int
14846main ()
14847{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014848gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 ;
14850 return 0;
14851}
14852_ACEOF
14853rm -f conftest.$ac_objext
14854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14855 (eval $ac_compile) 2>&5
14856 ac_status=$?
14857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14858 (exit $ac_status); } &&
14859 { ac_try='test -s conftest.$ac_objext'
14860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14861 (eval $ac_try) 2>&5
14862 ac_status=$?
14863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14864 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014865 :
14866else
Martin v. Löwis11437992002-04-12 09:54:03 +000014867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014868sed 's/^/| /' conftest.$ac_ext >&5
14869
Martin v. Löwis11437992002-04-12 09:54:03 +000014870
14871cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014872#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014873_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014874
Martin v. Löwis11437992002-04-12 09:54:03 +000014875
Guido van Rossum627b2d71993-12-24 10:39:16 +000014876fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014877rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014878
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014879fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014880done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014881
Michael W. Hudson54241132001-12-07 15:38:26 +000014882
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014883echo "$as_me:$LINENO: checking for major" >&5
14884echo $ECHO_N "checking for major... $ECHO_C" >&6
14885cat >conftest.$ac_ext <<_ACEOF
14886#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014887/* confdefs.h. */
14888_ACEOF
14889cat confdefs.h >>conftest.$ac_ext
14890cat >>conftest.$ac_ext <<_ACEOF
14891/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014892
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014893#if defined(MAJOR_IN_MKDEV)
14894#include <sys/mkdev.h>
14895#elif defined(MAJOR_IN_SYSMACROS)
14896#include <sys/sysmacros.h>
14897#else
14898#include <sys/types.h>
14899#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014900
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014901int
14902main ()
14903{
14904
14905 makedev(major(0),minor(0));
14906
14907 ;
14908 return 0;
14909}
14910_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014911rm -f conftest.$ac_objext conftest$ac_exeext
14912if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14913 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014914 ac_status=$?
14915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14916 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014917 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14919 (eval $ac_try) 2>&5
14920 ac_status=$?
14921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14922 (exit $ac_status); }; }; then
14923
14924
14925cat >>confdefs.h <<\_ACEOF
14926#define HAVE_DEVICE_MACROS 1
14927_ACEOF
14928
14929 echo "$as_me:$LINENO: result: yes" >&5
14930echo "${ECHO_T}yes" >&6
14931
14932else
14933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014934sed 's/^/| /' conftest.$ac_ext >&5
14935
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014936
14937 echo "$as_me:$LINENO: result: no" >&5
14938echo "${ECHO_T}no" >&6
14939
14940fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014941rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014942
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014943# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014944# for [no]getaddrinfo in netdb.h.
14945echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14946echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14947cat >conftest.$ac_ext <<_ACEOF
14948#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014949/* confdefs.h. */
14950_ACEOF
14951cat confdefs.h >>conftest.$ac_ext
14952cat >>conftest.$ac_ext <<_ACEOF
14953/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014954
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014955#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014956#include <sys/socket.h>
14957#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014958#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014959
Martin v. Löwis11437992002-04-12 09:54:03 +000014960int
14961main ()
14962{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014963
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014964getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014965
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 ;
14967 return 0;
14968}
14969_ACEOF
14970rm -f conftest.$ac_objext conftest$ac_exeext
14971if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14972 (eval $ac_link) 2>&5
14973 ac_status=$?
14974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14975 (exit $ac_status); } &&
14976 { ac_try='test -s conftest$ac_exeext'
14977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14978 (eval $ac_try) 2>&5
14979 ac_status=$?
14980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14981 (exit $ac_status); }; }; then
14982
14983echo "$as_me:$LINENO: result: yes" >&5
14984echo "${ECHO_T}yes" >&6
14985echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14986echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014987if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 echo "$as_me:$LINENO: result: buggy" >&5
14989echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014990buggygetaddrinfo=yes
14991else
Martin v. Löwis11437992002-04-12 09:54:03 +000014992 cat >conftest.$ac_ext <<_ACEOF
14993#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014994/* confdefs.h. */
14995_ACEOF
14996cat confdefs.h >>conftest.$ac_ext
14997cat >>conftest.$ac_ext <<_ACEOF
14998/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014999
15000#include <sys/types.h>
15001#include <netdb.h>
15002#include <string.h>
15003#include <sys/socket.h>
15004#include <netinet/in.h>
15005
15006main()
15007{
15008 int passive, gaierr, inet4 = 0, inet6 = 0;
15009 struct addrinfo hints, *ai, *aitop;
15010 char straddr[INET6_ADDRSTRLEN], strport[16];
15011
15012 for (passive = 0; passive <= 1; passive++) {
15013 memset(&hints, 0, sizeof(hints));
15014 hints.ai_family = AF_UNSPEC;
15015 hints.ai_flags = passive ? AI_PASSIVE : 0;
15016 hints.ai_socktype = SOCK_STREAM;
15017 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15018 (void)gai_strerror(gaierr);
15019 goto bad;
15020 }
15021 for (ai = aitop; ai; ai = ai->ai_next) {
15022 if (ai->ai_addr == NULL ||
15023 ai->ai_addrlen == 0 ||
15024 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15025 straddr, sizeof(straddr), strport, sizeof(strport),
15026 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15027 goto bad;
15028 }
15029 switch (ai->ai_family) {
15030 case AF_INET:
15031 if (strcmp(strport, "54321") != 0) {
15032 goto bad;
15033 }
15034 if (passive) {
15035 if (strcmp(straddr, "0.0.0.0") != 0) {
15036 goto bad;
15037 }
15038 } else {
15039 if (strcmp(straddr, "127.0.0.1") != 0) {
15040 goto bad;
15041 }
15042 }
15043 inet4++;
15044 break;
15045 case AF_INET6:
15046 if (strcmp(strport, "54321") != 0) {
15047 goto bad;
15048 }
15049 if (passive) {
15050 if (strcmp(straddr, "::") != 0) {
15051 goto bad;
15052 }
15053 } else {
15054 if (strcmp(straddr, "::1") != 0) {
15055 goto bad;
15056 }
15057 }
15058 inet6++;
15059 break;
15060 case AF_UNSPEC:
15061 goto bad;
15062 break;
15063 default:
15064 /* another family support? */
15065 break;
15066 }
15067 }
15068 }
15069
15070 if (!(inet4 == 0 || inet4 == 2))
15071 goto bad;
15072 if (!(inet6 == 0 || inet6 == 2))
15073 goto bad;
15074
15075 if (aitop)
15076 freeaddrinfo(aitop);
15077 exit(0);
15078
15079 bad:
15080 if (aitop)
15081 freeaddrinfo(aitop);
15082 exit(1);
15083}
15084
Martin v. Löwis11437992002-04-12 09:54:03 +000015085_ACEOF
15086rm -f conftest$ac_exeext
15087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15088 (eval $ac_link) 2>&5
15089 ac_status=$?
15090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15091 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15093 (eval $ac_try) 2>&5
15094 ac_status=$?
15095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15096 (exit $ac_status); }; }; then
15097 echo "$as_me:$LINENO: result: good" >&5
15098echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015099buggygetaddrinfo=no
15100else
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 echo "$as_me: program exited with status $ac_status" >&5
15102echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015103sed 's/^/| /' conftest.$ac_ext >&5
15104
Martin v. Löwis11437992002-04-12 09:54:03 +000015105( exit $ac_status )
15106echo "$as_me:$LINENO: result: buggy" >&5
15107echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015108buggygetaddrinfo=yes
15109fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015110rm -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 +000015111fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015112else
Martin v. Löwis11437992002-04-12 09:54:03 +000015113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015114sed 's/^/| /' conftest.$ac_ext >&5
15115
Martin v. Löwis11437992002-04-12 09:54:03 +000015116
15117echo "$as_me:$LINENO: result: no" >&5
15118echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015119buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015120
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015121fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015122rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015123
15124if test "$buggygetaddrinfo" = "yes"; then
15125 if test "$ipv6" = "yes"; then
15126 echo 'Fatal: You must get working getaddrinfo() function.'
15127 echo ' or you can specify "--disable-ipv6"'.
15128 exit 1
15129 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015130else
Martin v. Löwis11437992002-04-12 09:54:03 +000015131
15132cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015133#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015134_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015135
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015137
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015138for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015139do
Martin v. Löwis11437992002-04-12 09:54:03 +000015140as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15141echo "$as_me:$LINENO: checking for $ac_func" >&5
15142echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15143if eval "test \"\${$as_ac_var+set}\" = set"; then
15144 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015145else
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 cat >conftest.$ac_ext <<_ACEOF
15147#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015148/* confdefs.h. */
15149_ACEOF
15150cat confdefs.h >>conftest.$ac_ext
15151cat >>conftest.$ac_ext <<_ACEOF
15152/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015153/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015154 which can conflict with char $ac_func (); below.
15155 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015156 <limits.h> exists even on freestanding compilers. Under hpux,
15157 including <limits.h> includes <sys/time.h> and causes problems
15158 checking for functions defined therein. */
15159#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015160# include <limits.h>
15161#else
15162# include <assert.h>
15163#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015164/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015165#ifdef __cplusplus
15166extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015167{
Martin v. Löwis11437992002-04-12 09:54:03 +000015168#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015169/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 builtin and then its argument prototype would still apply. */
15171char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015172/* The GNU C library defines this for functions which it implements
15173 to always fail with ENOSYS. Some functions are actually named
15174 something starting with __ and the normal name is an alias. */
15175#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15176choke me
15177#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015178char (*f) () = $ac_func;
15179#endif
15180#ifdef __cplusplus
15181}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015182#endif
15183
Skip Montanaro6dead952003-09-25 14:50:04 +000015184int
15185main ()
15186{
15187return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 ;
15189 return 0;
15190}
15191_ACEOF
15192rm -f conftest.$ac_objext conftest$ac_exeext
15193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15194 (eval $ac_link) 2>&5
15195 ac_status=$?
15196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15197 (exit $ac_status); } &&
15198 { ac_try='test -s conftest$ac_exeext'
15199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15200 (eval $ac_try) 2>&5
15201 ac_status=$?
15202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15203 (exit $ac_status); }; }; then
15204 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015205else
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015207sed 's/^/| /' conftest.$ac_ext >&5
15208
Martin v. Löwis11437992002-04-12 09:54:03 +000015209eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015211rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015212fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015213echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15214echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15215if test `eval echo '${'$as_ac_var'}'` = yes; then
15216 cat >>confdefs.h <<_ACEOF
15217#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15218_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015219
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015220fi
15221done
15222
Michael W. Hudson54241132001-12-07 15:38:26 +000015223
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015224# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015225echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15226echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15227if test "${ac_cv_header_time+set}" = set; then
15228 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015229else
Martin v. Löwis11437992002-04-12 09:54:03 +000015230 cat >conftest.$ac_ext <<_ACEOF
15231#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015232/* confdefs.h. */
15233_ACEOF
15234cat confdefs.h >>conftest.$ac_ext
15235cat >>conftest.$ac_ext <<_ACEOF
15236/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015237#include <sys/types.h>
15238#include <sys/time.h>
15239#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015240
Martin v. Löwis11437992002-04-12 09:54:03 +000015241int
15242main ()
15243{
15244if ((struct tm *) 0)
15245return 0;
15246 ;
15247 return 0;
15248}
15249_ACEOF
15250rm -f conftest.$ac_objext
15251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15252 (eval $ac_compile) 2>&5
15253 ac_status=$?
15254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255 (exit $ac_status); } &&
15256 { ac_try='test -s conftest.$ac_objext'
15257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15258 (eval $ac_try) 2>&5
15259 ac_status=$?
15260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15261 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015262 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015263else
Martin v. Löwis11437992002-04-12 09:54:03 +000015264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015265sed 's/^/| /' conftest.$ac_ext >&5
15266
Martin v. Löwis11437992002-04-12 09:54:03 +000015267ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015268fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015269rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015271echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15272echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015273if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015274
15275cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015276#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015277_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015278
15279fi
15280
Martin v. Löwis11437992002-04-12 09:54:03 +000015281echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15282echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
15283if test "${ac_cv_struct_tm+set}" = set; then
15284 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015285else
Martin v. Löwis11437992002-04-12 09:54:03 +000015286 cat >conftest.$ac_ext <<_ACEOF
15287#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015288/* confdefs.h. */
15289_ACEOF
15290cat confdefs.h >>conftest.$ac_ext
15291cat >>conftest.$ac_ext <<_ACEOF
15292/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015293#include <sys/types.h>
15294#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015295
Martin v. Löwis11437992002-04-12 09:54:03 +000015296int
15297main ()
15298{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015299struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000015300 ;
15301 return 0;
15302}
15303_ACEOF
15304rm -f conftest.$ac_objext
15305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15306 (eval $ac_compile) 2>&5
15307 ac_status=$?
15308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15309 (exit $ac_status); } &&
15310 { ac_try='test -s conftest.$ac_objext'
15311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15312 (eval $ac_try) 2>&5
15313 ac_status=$?
15314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15315 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015316 ac_cv_struct_tm=time.h
15317else
Martin v. Löwis11437992002-04-12 09:54:03 +000015318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015319sed 's/^/| /' conftest.$ac_ext >&5
15320
Martin v. Löwis11437992002-04-12 09:54:03 +000015321ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015322fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015323rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015324fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015325echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15326echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015327if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015328
15329cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015330#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015331_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015332
15333fi
15334
Martin v. Löwis11437992002-04-12 09:54:03 +000015335echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
15336echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
15337if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
15338 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015339else
Martin v. Löwis11437992002-04-12 09:54:03 +000015340 cat >conftest.$ac_ext <<_ACEOF
15341#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015342/* confdefs.h. */
15343_ACEOF
15344cat confdefs.h >>conftest.$ac_ext
15345cat >>conftest.$ac_ext <<_ACEOF
15346/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015347#include <sys/types.h>
15348#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015349
15350
Martin v. Löwis11437992002-04-12 09:54:03 +000015351int
15352main ()
15353{
15354static struct tm ac_aggr;
15355if (ac_aggr.tm_zone)
15356return 0;
15357 ;
15358 return 0;
15359}
15360_ACEOF
15361rm -f conftest.$ac_objext
15362if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15363 (eval $ac_compile) 2>&5
15364 ac_status=$?
15365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15366 (exit $ac_status); } &&
15367 { ac_try='test -s conftest.$ac_objext'
15368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15369 (eval $ac_try) 2>&5
15370 ac_status=$?
15371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15372 (exit $ac_status); }; }; then
15373 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015374else
Martin v. Löwis11437992002-04-12 09:54:03 +000015375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015376sed 's/^/| /' conftest.$ac_ext >&5
15377
15378cat >conftest.$ac_ext <<_ACEOF
15379#line $LINENO "configure"
15380/* confdefs.h. */
15381_ACEOF
15382cat confdefs.h >>conftest.$ac_ext
15383cat >>conftest.$ac_ext <<_ACEOF
15384/* end confdefs.h. */
15385#include <sys/types.h>
15386#include <$ac_cv_struct_tm>
15387
15388
15389int
15390main ()
15391{
15392static struct tm ac_aggr;
15393if (sizeof ac_aggr.tm_zone)
15394return 0;
15395 ;
15396 return 0;
15397}
15398_ACEOF
15399rm -f conftest.$ac_objext
15400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15401 (eval $ac_compile) 2>&5
15402 ac_status=$?
15403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15404 (exit $ac_status); } &&
15405 { ac_try='test -s conftest.$ac_objext'
15406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15407 (eval $ac_try) 2>&5
15408 ac_status=$?
15409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15410 (exit $ac_status); }; }; then
15411 ac_cv_member_struct_tm_tm_zone=yes
15412else
15413 echo "$as_me: failed program was:" >&5
15414sed 's/^/| /' conftest.$ac_ext >&5
15415
Martin v. Löwis11437992002-04-12 09:54:03 +000015416ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015417fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015418rm -f conftest.$ac_objext conftest.$ac_ext
15419fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015420rm -f conftest.$ac_objext conftest.$ac_ext
15421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015422echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
15423echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
15424if test $ac_cv_member_struct_tm_tm_zone = yes; then
15425
15426cat >>confdefs.h <<_ACEOF
15427#define HAVE_STRUCT_TM_TM_ZONE 1
15428_ACEOF
15429
15430
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015431fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015432
Martin v. Löwis11437992002-04-12 09:54:03 +000015433if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15434
15435cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015436#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015437_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015438
15439else
Martin v. Löwis11437992002-04-12 09:54:03 +000015440 echo "$as_me:$LINENO: checking for tzname" >&5
15441echo $ECHO_N "checking for tzname... $ECHO_C" >&6
15442if test "${ac_cv_var_tzname+set}" = set; then
15443 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015444else
Martin v. Löwis11437992002-04-12 09:54:03 +000015445 cat >conftest.$ac_ext <<_ACEOF
15446#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015447/* confdefs.h. */
15448_ACEOF
15449cat confdefs.h >>conftest.$ac_ext
15450cat >>conftest.$ac_ext <<_ACEOF
15451/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015452#include <time.h>
15453#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015454extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015456
Martin v. Löwis11437992002-04-12 09:54:03 +000015457int
15458main ()
15459{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015460atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000015461 ;
15462 return 0;
15463}
15464_ACEOF
15465rm -f conftest.$ac_objext conftest$ac_exeext
15466if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15467 (eval $ac_link) 2>&5
15468 ac_status=$?
15469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15470 (exit $ac_status); } &&
15471 { ac_try='test -s conftest$ac_exeext'
15472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15473 (eval $ac_try) 2>&5
15474 ac_status=$?
15475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15476 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015477 ac_cv_var_tzname=yes
15478else
Martin v. Löwis11437992002-04-12 09:54:03 +000015479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015480sed 's/^/| /' conftest.$ac_ext >&5
15481
Martin v. Löwis11437992002-04-12 09:54:03 +000015482ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015483fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015484rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000015485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015486echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
15487echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015488 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015489
15490cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015491#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015492_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015493
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015494 fi
15495fi
15496
Martin v. Löwis11437992002-04-12 09:54:03 +000015497echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
15498echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
15499if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
15500 echo $ECHO_N "(cached) $ECHO_C" >&6
15501else
15502 cat >conftest.$ac_ext <<_ACEOF
15503#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015504/* confdefs.h. */
15505_ACEOF
15506cat confdefs.h >>conftest.$ac_ext
15507cat >>conftest.$ac_ext <<_ACEOF
15508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015509$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015510int
15511main ()
15512{
15513static struct stat ac_aggr;
15514if (ac_aggr.st_rdev)
15515return 0;
15516 ;
15517 return 0;
15518}
15519_ACEOF
15520rm -f conftest.$ac_objext
15521if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15522 (eval $ac_compile) 2>&5
15523 ac_status=$?
15524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525 (exit $ac_status); } &&
15526 { ac_try='test -s conftest.$ac_objext'
15527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15528 (eval $ac_try) 2>&5
15529 ac_status=$?
15530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15531 (exit $ac_status); }; }; then
15532 ac_cv_member_struct_stat_st_rdev=yes
15533else
15534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015535sed 's/^/| /' conftest.$ac_ext >&5
15536
15537cat >conftest.$ac_ext <<_ACEOF
15538#line $LINENO "configure"
15539/* confdefs.h. */
15540_ACEOF
15541cat confdefs.h >>conftest.$ac_ext
15542cat >>conftest.$ac_ext <<_ACEOF
15543/* end confdefs.h. */
15544$ac_includes_default
15545int
15546main ()
15547{
15548static struct stat ac_aggr;
15549if (sizeof ac_aggr.st_rdev)
15550return 0;
15551 ;
15552 return 0;
15553}
15554_ACEOF
15555rm -f conftest.$ac_objext
15556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15557 (eval $ac_compile) 2>&5
15558 ac_status=$?
15559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15560 (exit $ac_status); } &&
15561 { ac_try='test -s conftest.$ac_objext'
15562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15563 (eval $ac_try) 2>&5
15564 ac_status=$?
15565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15566 (exit $ac_status); }; }; then
15567 ac_cv_member_struct_stat_st_rdev=yes
15568else
15569 echo "$as_me: failed program was:" >&5
15570sed 's/^/| /' conftest.$ac_ext >&5
15571
Martin v. Löwis11437992002-04-12 09:54:03 +000015572ac_cv_member_struct_stat_st_rdev=no
15573fi
15574rm -f conftest.$ac_objext conftest.$ac_ext
15575fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015576rm -f conftest.$ac_objext conftest.$ac_ext
15577fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015578echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
15579echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
15580if test $ac_cv_member_struct_stat_st_rdev = yes; then
15581
15582cat >>confdefs.h <<_ACEOF
15583#define HAVE_STRUCT_STAT_ST_RDEV 1
15584_ACEOF
15585
15586
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015587fi
15588
Martin v. Löwis11437992002-04-12 09:54:03 +000015589echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
15590echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
15591if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
15592 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015593else
Martin v. Löwis11437992002-04-12 09:54:03 +000015594 cat >conftest.$ac_ext <<_ACEOF
15595#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015596/* confdefs.h. */
15597_ACEOF
15598cat confdefs.h >>conftest.$ac_ext
15599cat >>conftest.$ac_ext <<_ACEOF
15600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015601$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015602int
15603main ()
15604{
15605static struct stat ac_aggr;
15606if (ac_aggr.st_blksize)
15607return 0;
15608 ;
15609 return 0;
15610}
15611_ACEOF
15612rm -f conftest.$ac_objext
15613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15614 (eval $ac_compile) 2>&5
15615 ac_status=$?
15616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15617 (exit $ac_status); } &&
15618 { ac_try='test -s conftest.$ac_objext'
15619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15620 (eval $ac_try) 2>&5
15621 ac_status=$?
15622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15623 (exit $ac_status); }; }; then
15624 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015625else
Martin v. Löwis11437992002-04-12 09:54:03 +000015626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015627sed 's/^/| /' conftest.$ac_ext >&5
15628
15629cat >conftest.$ac_ext <<_ACEOF
15630#line $LINENO "configure"
15631/* confdefs.h. */
15632_ACEOF
15633cat confdefs.h >>conftest.$ac_ext
15634cat >>conftest.$ac_ext <<_ACEOF
15635/* end confdefs.h. */
15636$ac_includes_default
15637int
15638main ()
15639{
15640static struct stat ac_aggr;
15641if (sizeof ac_aggr.st_blksize)
15642return 0;
15643 ;
15644 return 0;
15645}
15646_ACEOF
15647rm -f conftest.$ac_objext
15648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15649 (eval $ac_compile) 2>&5
15650 ac_status=$?
15651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15652 (exit $ac_status); } &&
15653 { ac_try='test -s conftest.$ac_objext'
15654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15655 (eval $ac_try) 2>&5
15656 ac_status=$?
15657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15658 (exit $ac_status); }; }; then
15659 ac_cv_member_struct_stat_st_blksize=yes
15660else
15661 echo "$as_me: failed program was:" >&5
15662sed 's/^/| /' conftest.$ac_ext >&5
15663
Martin v. Löwis11437992002-04-12 09:54:03 +000015664ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015665fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015666rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015667fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015668rm -f conftest.$ac_objext conftest.$ac_ext
15669fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015670echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
15671echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
15672if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015673
Martin v. Löwis11437992002-04-12 09:54:03 +000015674cat >>confdefs.h <<_ACEOF
15675#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
15676_ACEOF
15677
15678
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015679fi
15680
Martin v. Löwis11437992002-04-12 09:54:03 +000015681echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
15682echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
15683if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
15684 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015685else
Martin v. Löwis11437992002-04-12 09:54:03 +000015686 cat >conftest.$ac_ext <<_ACEOF
15687#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015688/* confdefs.h. */
15689_ACEOF
15690cat confdefs.h >>conftest.$ac_ext
15691cat >>conftest.$ac_ext <<_ACEOF
15692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015693$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015694int
15695main ()
15696{
15697static struct stat ac_aggr;
15698if (ac_aggr.st_blocks)
15699return 0;
15700 ;
15701 return 0;
15702}
15703_ACEOF
15704rm -f conftest.$ac_objext
15705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15706 (eval $ac_compile) 2>&5
15707 ac_status=$?
15708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15709 (exit $ac_status); } &&
15710 { ac_try='test -s conftest.$ac_objext'
15711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15712 (eval $ac_try) 2>&5
15713 ac_status=$?
15714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15715 (exit $ac_status); }; }; then
15716 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015717else
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015719sed 's/^/| /' conftest.$ac_ext >&5
15720
15721cat >conftest.$ac_ext <<_ACEOF
15722#line $LINENO "configure"
15723/* confdefs.h. */
15724_ACEOF
15725cat confdefs.h >>conftest.$ac_ext
15726cat >>conftest.$ac_ext <<_ACEOF
15727/* end confdefs.h. */
15728$ac_includes_default
15729int
15730main ()
15731{
15732static struct stat ac_aggr;
15733if (sizeof ac_aggr.st_blocks)
15734return 0;
15735 ;
15736 return 0;
15737}
15738_ACEOF
15739rm -f conftest.$ac_objext
15740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15741 (eval $ac_compile) 2>&5
15742 ac_status=$?
15743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15744 (exit $ac_status); } &&
15745 { ac_try='test -s conftest.$ac_objext'
15746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15747 (eval $ac_try) 2>&5
15748 ac_status=$?
15749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15750 (exit $ac_status); }; }; then
15751 ac_cv_member_struct_stat_st_blocks=yes
15752else
15753 echo "$as_me: failed program was:" >&5
15754sed 's/^/| /' conftest.$ac_ext >&5
15755
Martin v. Löwis11437992002-04-12 09:54:03 +000015756ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015757fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015758rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015759fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015760rm -f conftest.$ac_objext conftest.$ac_ext
15761fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015762echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
15763echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
15764if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015765
Martin v. Löwis11437992002-04-12 09:54:03 +000015766cat >>confdefs.h <<_ACEOF
15767#define HAVE_STRUCT_STAT_ST_BLOCKS 1
15768_ACEOF
15769
15770
15771cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015772#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015773_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015774
15775else
Martin v. Löwis11437992002-04-12 09:54:03 +000015776 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015777fi
15778
Michael W. Hudson54241132001-12-07 15:38:26 +000015779
Martin v. Löwis11437992002-04-12 09:54:03 +000015780
15781echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
15782echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
15783if test "${ac_cv_header_time_altzone+set}" = set; then
15784 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015785else
Martin v. Löwis11437992002-04-12 09:54:03 +000015786 cat >conftest.$ac_ext <<_ACEOF
15787#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015788/* confdefs.h. */
15789_ACEOF
15790cat confdefs.h >>conftest.$ac_ext
15791cat >>conftest.$ac_ext <<_ACEOF
15792/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015793#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015794int
15795main ()
15796{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015797return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015798 ;
15799 return 0;
15800}
15801_ACEOF
15802rm -f conftest.$ac_objext
15803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15804 (eval $ac_compile) 2>&5
15805 ac_status=$?
15806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15807 (exit $ac_status); } &&
15808 { ac_try='test -s conftest.$ac_objext'
15809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15810 (eval $ac_try) 2>&5
15811 ac_status=$?
15812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15813 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015814 ac_cv_header_time_altzone=yes
15815else
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015817sed 's/^/| /' conftest.$ac_ext >&5
15818
Martin v. Löwis11437992002-04-12 09:54:03 +000015819ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015820fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015821rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015822fi
15823
Martin v. Löwis11437992002-04-12 09:54:03 +000015824echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
15825echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015826if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015827
15828cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015829#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015830_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015831
15832fi
15833
Guido van Rossumda88dad1995-01-26 00:46:29 +000015834was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015835echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15836echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15837cat >conftest.$ac_ext <<_ACEOF
15838#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015839/* confdefs.h. */
15840_ACEOF
15841cat confdefs.h >>conftest.$ac_ext
15842cat >>conftest.$ac_ext <<_ACEOF
15843/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015844
15845#include <sys/types.h>
15846#include <sys/select.h>
15847#include <sys/time.h>
15848
Martin v. Löwis11437992002-04-12 09:54:03 +000015849int
15850main ()
15851{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015852;
Martin v. Löwis11437992002-04-12 09:54:03 +000015853 ;
15854 return 0;
15855}
15856_ACEOF
15857rm -f conftest.$ac_objext
15858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15859 (eval $ac_compile) 2>&5
15860 ac_status=$?
15861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15862 (exit $ac_status); } &&
15863 { ac_try='test -s conftest.$ac_objext'
15864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15865 (eval $ac_try) 2>&5
15866 ac_status=$?
15867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15868 (exit $ac_status); }; }; then
15869
15870
15871cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015872#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015873_ACEOF
15874
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015875 was_it_defined=yes
15876
Guido van Rossumf78abae1997-01-21 22:02:36 +000015877else
Martin v. Löwis11437992002-04-12 09:54:03 +000015878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015879sed 's/^/| /' conftest.$ac_ext >&5
15880
Guido van Rossum7f43da71994-08-01 12:15:30 +000015881fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015882rm -f conftest.$ac_objext conftest.$ac_ext
15883echo "$as_me:$LINENO: result: $was_it_defined" >&5
15884echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015885
Martin v. Löwis11437992002-04-12 09:54:03 +000015886echo "$as_me:$LINENO: checking for addrinfo" >&5
15887echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15888if test "${ac_cv_struct_addrinfo+set}" = set; then
15889 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015890else
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 cat >conftest.$ac_ext <<_ACEOF
15892#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015893/* confdefs.h. */
15894_ACEOF
15895cat confdefs.h >>conftest.$ac_ext
15896cat >>conftest.$ac_ext <<_ACEOF
15897/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015898
15899# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015900int
15901main ()
15902{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015903struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015904 ;
15905 return 0;
15906}
15907_ACEOF
15908rm -f conftest.$ac_objext
15909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15910 (eval $ac_compile) 2>&5
15911 ac_status=$?
15912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15913 (exit $ac_status); } &&
15914 { ac_try='test -s conftest.$ac_objext'
15915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15916 (eval $ac_try) 2>&5
15917 ac_status=$?
15918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15919 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015920 ac_cv_struct_addrinfo=yes
15921else
Martin v. Löwis11437992002-04-12 09:54:03 +000015922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015923sed 's/^/| /' conftest.$ac_ext >&5
15924
Martin v. Löwis11437992002-04-12 09:54:03 +000015925ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015926fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015927rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015928fi
15929
Martin v. Löwis11437992002-04-12 09:54:03 +000015930echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15931echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015932if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015933
15934cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015935#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015936_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015937
15938fi
15939
Martin v. Löwis11437992002-04-12 09:54:03 +000015940echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15941echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15942if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15943 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015944else
Martin v. Löwis11437992002-04-12 09:54:03 +000015945 cat >conftest.$ac_ext <<_ACEOF
15946#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015947/* confdefs.h. */
15948_ACEOF
15949cat confdefs.h >>conftest.$ac_ext
15950cat >>conftest.$ac_ext <<_ACEOF
15951/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015952
15953# include <sys/types.h>
15954# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015955int
15956main ()
15957{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015958struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 ;
15960 return 0;
15961}
15962_ACEOF
15963rm -f conftest.$ac_objext
15964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15965 (eval $ac_compile) 2>&5
15966 ac_status=$?
15967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15968 (exit $ac_status); } &&
15969 { ac_try='test -s conftest.$ac_objext'
15970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15971 (eval $ac_try) 2>&5
15972 ac_status=$?
15973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15974 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015975 ac_cv_struct_sockaddr_storage=yes
15976else
Martin v. Löwis11437992002-04-12 09:54:03 +000015977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015978sed 's/^/| /' conftest.$ac_ext >&5
15979
Martin v. Löwis11437992002-04-12 09:54:03 +000015980ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015981fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015982rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015983fi
15984
Martin v. Löwis11437992002-04-12 09:54:03 +000015985echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15986echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015987if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015988
15989cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015990#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015991_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015992
15993fi
15994
Guido van Rossum627b2d71993-12-24 10:39:16 +000015995# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015996
Michael W. Hudson54241132001-12-07 15:38:26 +000015997
Martin v. Löwis11437992002-04-12 09:54:03 +000015998echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15999echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
16000if test "${ac_cv_c_char_unsigned+set}" = set; then
16001 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000016002else
Martin v. Löwis11437992002-04-12 09:54:03 +000016003 cat >conftest.$ac_ext <<_ACEOF
16004#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016005/* confdefs.h. */
16006_ACEOF
16007cat confdefs.h >>conftest.$ac_ext
16008cat >>conftest.$ac_ext <<_ACEOF
16009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016010$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016011int
16012main ()
16013{
16014static int test_array [1 - 2 * !(((char) -1) < 0)];
16015test_array [0] = 0
16016
16017 ;
16018 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016019}
Martin v. Löwis11437992002-04-12 09:54:03 +000016020_ACEOF
16021rm -f conftest.$ac_objext
16022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16023 (eval $ac_compile) 2>&5
16024 ac_status=$?
16025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16026 (exit $ac_status); } &&
16027 { ac_try='test -s conftest.$ac_objext'
16028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16029 (eval $ac_try) 2>&5
16030 ac_status=$?
16031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16032 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016033 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016034else
16035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016036sed 's/^/| /' conftest.$ac_ext >&5
16037
Martin v. Löwis11437992002-04-12 09:54:03 +000016038ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016039fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016040rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016041fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016042echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16043echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016044if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016045 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016046#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016047_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016048
16049fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016050
Martin v. Löwis11437992002-04-12 09:54:03 +000016051echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
16052echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16053if test "${ac_cv_c_const+set}" = set; then
16054 echo $ECHO_N "(cached) $ECHO_C" >&6
16055else
16056 cat >conftest.$ac_ext <<_ACEOF
16057#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016058/* confdefs.h. */
16059_ACEOF
16060cat confdefs.h >>conftest.$ac_ext
16061cat >>conftest.$ac_ext <<_ACEOF
16062/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016063
Martin v. Löwis11437992002-04-12 09:54:03 +000016064int
16065main ()
16066{
16067/* FIXME: Include the comments suggested by Paul. */
16068#ifndef __cplusplus
16069 /* Ultrix mips cc rejects this. */
16070 typedef int charset[2];
16071 const charset x;
16072 /* SunOS 4.1.1 cc rejects this. */
16073 char const *const *ccp;
16074 char **p;
16075 /* NEC SVR4.0.2 mips cc rejects this. */
16076 struct point {int x, y;};
16077 static struct point const zero = {0,0};
16078 /* AIX XL C 1.02.0.0 rejects this.
16079 It does not let you subtract one const X* pointer from another in
16080 an arm of an if-expression whose if-part is not a constant
16081 expression */
16082 const char *g = "string";
16083 ccp = &g + (g ? g-g : 0);
16084 /* HPUX 7.0 cc rejects these. */
16085 ++ccp;
16086 p = (char**) ccp;
16087 ccp = (char const *const *) p;
16088 { /* SCO 3.2v4 cc rejects this. */
16089 char *t;
16090 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016091
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 *t++ = 0;
16093 }
16094 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16095 int x[] = {25, 17};
16096 const int *foo = &x[0];
16097 ++foo;
16098 }
16099 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16100 typedef const int *iptr;
16101 iptr p = 0;
16102 ++p;
16103 }
16104 { /* AIX XL C 1.02.0.0 rejects this saying
16105 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16106 struct s { int j; const int *ap[3]; };
16107 struct s *b; b->j = 5;
16108 }
16109 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16110 const int foo = 10;
16111 }
16112#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016113
Martin v. Löwis11437992002-04-12 09:54:03 +000016114 ;
16115 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016116}
Martin v. Löwis11437992002-04-12 09:54:03 +000016117_ACEOF
16118rm -f conftest.$ac_objext
16119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16120 (eval $ac_compile) 2>&5
16121 ac_status=$?
16122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16123 (exit $ac_status); } &&
16124 { ac_try='test -s conftest.$ac_objext'
16125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16126 (eval $ac_try) 2>&5
16127 ac_status=$?
16128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16129 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016130 ac_cv_c_const=yes
16131else
Martin v. Löwis11437992002-04-12 09:54:03 +000016132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016133sed 's/^/| /' conftest.$ac_ext >&5
16134
Martin v. Löwis11437992002-04-12 09:54:03 +000016135ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016137rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016139echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
16140echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016141if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016142
16143cat >>confdefs.h <<\_ACEOF
16144#define const
16145_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016146
16147fi
16148
Michael W. Hudson54241132001-12-07 15:38:26 +000016149
Guido van Rossumda88dad1995-01-26 00:46:29 +000016150works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016151echo "$as_me:$LINENO: checking for working volatile" >&5
16152echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
16153cat >conftest.$ac_ext <<_ACEOF
16154#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016155/* confdefs.h. */
16156_ACEOF
16157cat confdefs.h >>conftest.$ac_ext
16158cat >>conftest.$ac_ext <<_ACEOF
16159/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016160
Martin v. Löwis11437992002-04-12 09:54:03 +000016161int
16162main ()
16163{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016164volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016165 ;
16166 return 0;
16167}
16168_ACEOF
16169rm -f conftest.$ac_objext
16170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16171 (eval $ac_compile) 2>&5
16172 ac_status=$?
16173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16174 (exit $ac_status); } &&
16175 { ac_try='test -s conftest.$ac_objext'
16176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16177 (eval $ac_try) 2>&5
16178 ac_status=$?
16179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16180 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016181 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016182else
Martin v. Löwis11437992002-04-12 09:54:03 +000016183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016184sed 's/^/| /' conftest.$ac_ext >&5
16185
Martin v. Löwis11437992002-04-12 09:54:03 +000016186
16187cat >>confdefs.h <<\_ACEOF
16188#define volatile
16189_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016190
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016191
Guido van Rossum627b2d71993-12-24 10:39:16 +000016192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016193rm -f conftest.$ac_objext conftest.$ac_ext
16194echo "$as_me:$LINENO: result: $works" >&5
16195echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016196
Guido van Rossumda88dad1995-01-26 00:46:29 +000016197works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016198echo "$as_me:$LINENO: checking for working signed char" >&5
16199echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
16200cat >conftest.$ac_ext <<_ACEOF
16201#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016202/* confdefs.h. */
16203_ACEOF
16204cat confdefs.h >>conftest.$ac_ext
16205cat >>conftest.$ac_ext <<_ACEOF
16206/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016207
Martin v. Löwis11437992002-04-12 09:54:03 +000016208int
16209main ()
16210{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016211signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 ;
16213 return 0;
16214}
16215_ACEOF
16216rm -f conftest.$ac_objext
16217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16218 (eval $ac_compile) 2>&5
16219 ac_status=$?
16220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16221 (exit $ac_status); } &&
16222 { ac_try='test -s conftest.$ac_objext'
16223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16224 (eval $ac_try) 2>&5
16225 ac_status=$?
16226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16227 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016228 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016229else
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016231sed 's/^/| /' conftest.$ac_ext >&5
16232
Martin v. Löwis11437992002-04-12 09:54:03 +000016233
16234cat >>confdefs.h <<\_ACEOF
16235#define signed
16236_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016237
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016238
Guido van Rossum7f43da71994-08-01 12:15:30 +000016239fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016240rm -f conftest.$ac_objext conftest.$ac_ext
16241echo "$as_me:$LINENO: result: $works" >&5
16242echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016243
Guido van Rossumda88dad1995-01-26 00:46:29 +000016244have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016245echo "$as_me:$LINENO: checking for prototypes" >&5
16246echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
16247cat >conftest.$ac_ext <<_ACEOF
16248#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016249/* confdefs.h. */
16250_ACEOF
16251cat confdefs.h >>conftest.$ac_ext
16252cat >>conftest.$ac_ext <<_ACEOF
16253/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016254int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016255int
16256main ()
16257{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016258return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 ;
16260 return 0;
16261}
16262_ACEOF
16263rm -f conftest.$ac_objext
16264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16265 (eval $ac_compile) 2>&5
16266 ac_status=$?
16267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16268 (exit $ac_status); } &&
16269 { ac_try='test -s conftest.$ac_objext'
16270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16271 (eval $ac_try) 2>&5
16272 ac_status=$?
16273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16274 (exit $ac_status); }; }; then
16275
16276
16277cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016278#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016279_ACEOF
16280
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016281 have_prototypes=yes
16282
Guido van Rossumf78abae1997-01-21 22:02:36 +000016283else
Martin v. Löwis11437992002-04-12 09:54:03 +000016284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016285sed 's/^/| /' conftest.$ac_ext >&5
16286
Guido van Rossum7f43da71994-08-01 12:15:30 +000016287fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016288rm -f conftest.$ac_objext conftest.$ac_ext
16289echo "$as_me:$LINENO: result: $have_prototypes" >&5
16290echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016291
Guido van Rossumda88dad1995-01-26 00:46:29 +000016292works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016293echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
16294echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
16295cat >conftest.$ac_ext <<_ACEOF
16296#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016297/* confdefs.h. */
16298_ACEOF
16299cat confdefs.h >>conftest.$ac_ext
16300cat >>conftest.$ac_ext <<_ACEOF
16301/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016302
16303#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000016304int foo(int x, ...) {
16305 va_list va;
16306 va_start(va, x);
16307 va_arg(va, int);
16308 va_arg(va, char *);
16309 va_arg(va, double);
16310 return 0;
16311}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016312
Martin v. Löwis11437992002-04-12 09:54:03 +000016313int
16314main ()
16315{
Guido van Rossum90eea071996-08-30 20:58:57 +000016316return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000016317 ;
16318 return 0;
16319}
16320_ACEOF
16321rm -f conftest.$ac_objext
16322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16323 (eval $ac_compile) 2>&5
16324 ac_status=$?
16325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16326 (exit $ac_status); } &&
16327 { ac_try='test -s conftest.$ac_objext'
16328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16329 (eval $ac_try) 2>&5
16330 ac_status=$?
16331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16332 (exit $ac_status); }; }; then
16333
16334
16335cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016336#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016337_ACEOF
16338
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016339 works=yes
16340
Guido van Rossumf78abae1997-01-21 22:02:36 +000016341else
Martin v. Löwis11437992002-04-12 09:54:03 +000016342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016343sed 's/^/| /' conftest.$ac_ext >&5
16344
Guido van Rossum627b2d71993-12-24 10:39:16 +000016345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016346rm -f conftest.$ac_objext conftest.$ac_ext
16347echo "$as_me:$LINENO: result: $works" >&5
16348echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016349
Guido van Rossumda88dad1995-01-26 00:46:29 +000016350if test "$have_prototypes" = yes; then
16351bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016352echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
16353echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
16354cat >conftest.$ac_ext <<_ACEOF
16355#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016356/* confdefs.h. */
16357_ACEOF
16358cat confdefs.h >>conftest.$ac_ext
16359cat >>conftest.$ac_ext <<_ACEOF
16360/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016361#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016362int
16363main ()
16364{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016365char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 ;
16367 return 0;
16368}
16369_ACEOF
16370rm -f conftest.$ac_objext
16371if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16372 (eval $ac_compile) 2>&5
16373 ac_status=$?
16374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16375 (exit $ac_status); } &&
16376 { ac_try='test -s conftest.$ac_objext'
16377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16378 (eval $ac_try) 2>&5
16379 ac_status=$?
16380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16381 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000016382 :
16383else
Martin v. Löwis11437992002-04-12 09:54:03 +000016384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016385sed 's/^/| /' conftest.$ac_ext >&5
16386
Martin v. Löwis11437992002-04-12 09:54:03 +000016387
16388cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016389#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016390_ACEOF
16391
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016392 bad_prototypes=yes
16393
Guido van Rossum627b2d71993-12-24 10:39:16 +000016394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016395rm -f conftest.$ac_objext conftest.$ac_ext
16396echo "$as_me:$LINENO: result: $bad_prototypes" >&5
16397echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000016398fi
16399
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016400# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000016401echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
16402echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
16403cat >conftest.$ac_ext <<_ACEOF
16404#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016405/* confdefs.h. */
16406_ACEOF
16407cat confdefs.h >>conftest.$ac_ext
16408cat >>conftest.$ac_ext <<_ACEOF
16409/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016410#include <sys/types.h>
16411#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016412int
16413main ()
16414{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016415struct sockaddr x;
16416x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016417 ;
16418 return 0;
16419}
16420_ACEOF
16421rm -f conftest.$ac_objext
16422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16423 (eval $ac_compile) 2>&5
16424 ac_status=$?
16425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16426 (exit $ac_status); } &&
16427 { ac_try='test -s conftest.$ac_objext'
16428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16429 (eval $ac_try) 2>&5
16430 ac_status=$?
16431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16432 (exit $ac_status); }; }; then
16433 echo "$as_me:$LINENO: result: yes" >&5
16434echo "${ECHO_T}yes" >&6
16435
16436cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016437#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016438_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016439
16440else
Martin v. Löwis11437992002-04-12 09:54:03 +000016441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016442sed 's/^/| /' conftest.$ac_ext >&5
16443
Martin v. Löwis11437992002-04-12 09:54:03 +000016444echo "$as_me:$LINENO: result: no" >&5
16445echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016446fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016447rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016448
Guido van Rossumda88dad1995-01-26 00:46:29 +000016449va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016450echo "$as_me:$LINENO: checking whether va_list is an array" >&5
16451echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
16452cat >conftest.$ac_ext <<_ACEOF
16453#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016454/* confdefs.h. */
16455_ACEOF
16456cat confdefs.h >>conftest.$ac_ext
16457cat >>conftest.$ac_ext <<_ACEOF
16458/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016459
16460#ifdef HAVE_STDARG_PROTOTYPES
16461#include <stdarg.h>
16462#else
16463#include <varargs.h>
16464#endif
16465
Martin v. Löwis11437992002-04-12 09:54:03 +000016466int
16467main ()
16468{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016469va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000016470 ;
16471 return 0;
16472}
16473_ACEOF
16474rm -f conftest.$ac_objext
16475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16476 (eval $ac_compile) 2>&5
16477 ac_status=$?
16478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16479 (exit $ac_status); } &&
16480 { ac_try='test -s conftest.$ac_objext'
16481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16482 (eval $ac_try) 2>&5
16483 ac_status=$?
16484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16485 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016486 :
16487else
Martin v. Löwis11437992002-04-12 09:54:03 +000016488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016489sed 's/^/| /' conftest.$ac_ext >&5
16490
Martin v. Löwis11437992002-04-12 09:54:03 +000016491
16492
16493cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016494#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016495_ACEOF
16496
Guido van Rossumda88dad1995-01-26 00:46:29 +000016497 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016498
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016499fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016500rm -f conftest.$ac_objext conftest.$ac_ext
16501echo "$as_me:$LINENO: result: $va_list_is_array" >&5
16502echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016503
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016504# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000016505
16506
16507
16508echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
16509echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
16510if test "${ac_cv_func_gethostbyname_r+set}" = set; then
16511 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016512else
Martin v. Löwis11437992002-04-12 09:54:03 +000016513 cat >conftest.$ac_ext <<_ACEOF
16514#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016515/* confdefs.h. */
16516_ACEOF
16517cat confdefs.h >>conftest.$ac_ext
16518cat >>conftest.$ac_ext <<_ACEOF
16519/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016520/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016521 which can conflict with char gethostbyname_r (); below.
16522 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016523 <limits.h> exists even on freestanding compilers. Under hpux,
16524 including <limits.h> includes <sys/time.h> and causes problems
16525 checking for functions defined therein. */
16526#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016527# include <limits.h>
16528#else
16529# include <assert.h>
16530#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016531/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016532#ifdef __cplusplus
16533extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016534{
Martin v. Löwis11437992002-04-12 09:54:03 +000016535#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016536/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016537 builtin and then its argument prototype would still apply. */
16538char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016539/* The GNU C library defines this for functions which it implements
16540 to always fail with ENOSYS. Some functions are actually named
16541 something starting with __ and the normal name is an alias. */
16542#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
16543choke me
16544#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016545char (*f) () = gethostbyname_r;
16546#endif
16547#ifdef __cplusplus
16548}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016549#endif
16550
Skip Montanaro6dead952003-09-25 14:50:04 +000016551int
16552main ()
16553{
16554return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000016555 ;
16556 return 0;
16557}
16558_ACEOF
16559rm -f conftest.$ac_objext conftest$ac_exeext
16560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16561 (eval $ac_link) 2>&5
16562 ac_status=$?
16563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16564 (exit $ac_status); } &&
16565 { ac_try='test -s conftest$ac_exeext'
16566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16567 (eval $ac_try) 2>&5
16568 ac_status=$?
16569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16570 (exit $ac_status); }; }; then
16571 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016572else
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016574sed 's/^/| /' conftest.$ac_ext >&5
16575
Martin v. Löwis11437992002-04-12 09:54:03 +000016576ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016577fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016578rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016579fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016580echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
16581echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
16582if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016583
Martin v. Löwis11437992002-04-12 09:54:03 +000016584 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016585#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016586_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016587
Martin v. Löwis11437992002-04-12 09:54:03 +000016588 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
16589echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016590 OLD_CFLAGS=$CFLAGS
16591 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016592 cat >conftest.$ac_ext <<_ACEOF
16593#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016594/* confdefs.h. */
16595_ACEOF
16596cat confdefs.h >>conftest.$ac_ext
16597cat >>conftest.$ac_ext <<_ACEOF
16598/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016599
16600# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016601
Martin v. Löwis11437992002-04-12 09:54:03 +000016602int
16603main ()
16604{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016605
16606 char *name;
16607 struct hostent *he, *res;
16608 char buffer[2048];
16609 int buflen = 2048;
16610 int h_errnop;
16611
16612 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016613
16614 ;
16615 return 0;
16616}
16617_ACEOF
16618rm -f conftest.$ac_objext
16619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16620 (eval $ac_compile) 2>&5
16621 ac_status=$?
16622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16623 (exit $ac_status); } &&
16624 { ac_try='test -s conftest.$ac_objext'
16625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16626 (eval $ac_try) 2>&5
16627 ac_status=$?
16628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16629 (exit $ac_status); }; }; then
16630
16631 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016632#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016633_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016634
Martin v. Löwis11437992002-04-12 09:54:03 +000016635
16636cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016637#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016638_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016639
Martin v. Löwis11437992002-04-12 09:54:03 +000016640 echo "$as_me:$LINENO: result: yes" >&5
16641echo "${ECHO_T}yes" >&6
16642
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016643else
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016645sed 's/^/| /' conftest.$ac_ext >&5
16646
Martin v. Löwis11437992002-04-12 09:54:03 +000016647
16648 echo "$as_me:$LINENO: result: no" >&5
16649echo "${ECHO_T}no" >&6
16650 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
16651echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
16652 cat >conftest.$ac_ext <<_ACEOF
16653#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016654/* confdefs.h. */
16655_ACEOF
16656cat confdefs.h >>conftest.$ac_ext
16657cat >>conftest.$ac_ext <<_ACEOF
16658/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016659
16660# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016661
Martin v. Löwis11437992002-04-12 09:54:03 +000016662int
16663main ()
16664{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016665
16666 char *name;
16667 struct hostent *he;
16668 char buffer[2048];
16669 int buflen = 2048;
16670 int h_errnop;
16671
16672 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016673
16674 ;
16675 return 0;
16676}
16677_ACEOF
16678rm -f conftest.$ac_objext
16679if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16680 (eval $ac_compile) 2>&5
16681 ac_status=$?
16682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16683 (exit $ac_status); } &&
16684 { ac_try='test -s conftest.$ac_objext'
16685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16686 (eval $ac_try) 2>&5
16687 ac_status=$?
16688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16689 (exit $ac_status); }; }; then
16690
16691 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016692#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016693_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016694
Martin v. Löwis11437992002-04-12 09:54:03 +000016695
16696cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016697#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016698_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016699
Martin v. Löwis11437992002-04-12 09:54:03 +000016700 echo "$as_me:$LINENO: result: yes" >&5
16701echo "${ECHO_T}yes" >&6
16702
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016703else
Martin v. Löwis11437992002-04-12 09:54:03 +000016704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016705sed 's/^/| /' conftest.$ac_ext >&5
16706
Martin v. Löwis11437992002-04-12 09:54:03 +000016707
16708 echo "$as_me:$LINENO: result: no" >&5
16709echo "${ECHO_T}no" >&6
16710 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
16711echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
16712 cat >conftest.$ac_ext <<_ACEOF
16713#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016714/* confdefs.h. */
16715_ACEOF
16716cat confdefs.h >>conftest.$ac_ext
16717cat >>conftest.$ac_ext <<_ACEOF
16718/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016719
16720# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016721
Martin v. Löwis11437992002-04-12 09:54:03 +000016722int
16723main ()
16724{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016725
16726 char *name;
16727 struct hostent *he;
16728 struct hostent_data data;
16729
16730 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000016731
16732 ;
16733 return 0;
16734}
16735_ACEOF
16736rm -f conftest.$ac_objext
16737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16738 (eval $ac_compile) 2>&5
16739 ac_status=$?
16740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16741 (exit $ac_status); } &&
16742 { ac_try='test -s conftest.$ac_objext'
16743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16744 (eval $ac_try) 2>&5
16745 ac_status=$?
16746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16747 (exit $ac_status); }; }; then
16748
16749 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016750#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016751_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016752
Martin v. Löwis11437992002-04-12 09:54:03 +000016753
16754cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016755#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016756_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016757
Martin v. Löwis11437992002-04-12 09:54:03 +000016758 echo "$as_me:$LINENO: result: yes" >&5
16759echo "${ECHO_T}yes" >&6
16760
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016761else
Martin v. Löwis11437992002-04-12 09:54:03 +000016762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016763sed 's/^/| /' conftest.$ac_ext >&5
16764
Martin v. Löwis11437992002-04-12 09:54:03 +000016765
16766 echo "$as_me:$LINENO: result: no" >&5
16767echo "${ECHO_T}no" >&6
16768
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016770rm -f conftest.$ac_objext conftest.$ac_ext
16771
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016772fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016773rm -f conftest.$ac_objext conftest.$ac_ext
16774
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016775fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016776rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016777 CFLAGS=$OLD_CFLAGS
16778
16779else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016780
Martin v. Löwis11437992002-04-12 09:54:03 +000016781
16782for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000016783do
Martin v. Löwis11437992002-04-12 09:54:03 +000016784as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16785echo "$as_me:$LINENO: checking for $ac_func" >&5
16786echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16787if eval "test \"\${$as_ac_var+set}\" = set"; then
16788 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016789else
Martin v. Löwis11437992002-04-12 09:54:03 +000016790 cat >conftest.$ac_ext <<_ACEOF
16791#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016792/* confdefs.h. */
16793_ACEOF
16794cat confdefs.h >>conftest.$ac_ext
16795cat >>conftest.$ac_ext <<_ACEOF
16796/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016797/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016798 which can conflict with char $ac_func (); below.
16799 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016800 <limits.h> exists even on freestanding compilers. Under hpux,
16801 including <limits.h> includes <sys/time.h> and causes problems
16802 checking for functions defined therein. */
16803#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016804# include <limits.h>
16805#else
16806# include <assert.h>
16807#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016808/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016809#ifdef __cplusplus
16810extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016811{
Martin v. Löwis11437992002-04-12 09:54:03 +000016812#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016813/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 builtin and then its argument prototype would still apply. */
16815char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016816/* The GNU C library defines this for functions which it implements
16817 to always fail with ENOSYS. Some functions are actually named
16818 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016819#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016820choke me
16821#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016822char (*f) () = $ac_func;
16823#endif
16824#ifdef __cplusplus
16825}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016826#endif
16827
Skip Montanaro6dead952003-09-25 14:50:04 +000016828int
16829main ()
16830{
16831return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016832 ;
16833 return 0;
16834}
16835_ACEOF
16836rm -f conftest.$ac_objext conftest$ac_exeext
16837if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16838 (eval $ac_link) 2>&5
16839 ac_status=$?
16840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16841 (exit $ac_status); } &&
16842 { ac_try='test -s conftest$ac_exeext'
16843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16844 (eval $ac_try) 2>&5
16845 ac_status=$?
16846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16847 (exit $ac_status); }; }; then
16848 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016849else
Martin v. Löwis11437992002-04-12 09:54:03 +000016850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016851sed 's/^/| /' conftest.$ac_ext >&5
16852
Martin v. Löwis11437992002-04-12 09:54:03 +000016853eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016854fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016855rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016856fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016857echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16858echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16859if test `eval echo '${'$as_ac_var'}'` = yes; then
16860 cat >>confdefs.h <<_ACEOF
16861#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16862_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016863
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016864fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016865done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016866
Michael W. Hudson54241132001-12-07 15:38:26 +000016867
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016868fi
16869
Michael W. Hudson54241132001-12-07 15:38:26 +000016870
16871
16872
16873
16874
16875
Guido van Rossum627b2d71993-12-24 10:39:16 +000016876# checks for system services
16877# (none yet)
16878
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016879# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016880echo "$as_me:$LINENO: checking for __fpu_control" >&5
16881echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16882if test "${ac_cv_func___fpu_control+set}" = set; then
16883 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016884else
Martin v. Löwis11437992002-04-12 09:54:03 +000016885 cat >conftest.$ac_ext <<_ACEOF
16886#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016887/* confdefs.h. */
16888_ACEOF
16889cat confdefs.h >>conftest.$ac_ext
16890cat >>conftest.$ac_ext <<_ACEOF
16891/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016892/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016893 which can conflict with char __fpu_control (); below.
16894 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016895 <limits.h> exists even on freestanding compilers. Under hpux,
16896 including <limits.h> includes <sys/time.h> and causes problems
16897 checking for functions defined therein. */
16898#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016899# include <limits.h>
16900#else
16901# include <assert.h>
16902#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016903/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016904#ifdef __cplusplus
16905extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016906{
Martin v. Löwis11437992002-04-12 09:54:03 +000016907#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016908/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016909 builtin and then its argument prototype would still apply. */
16910char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016911/* The GNU C library defines this for functions which it implements
16912 to always fail with ENOSYS. Some functions are actually named
16913 something starting with __ and the normal name is an alias. */
16914#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16915choke me
16916#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016917char (*f) () = __fpu_control;
16918#endif
16919#ifdef __cplusplus
16920}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016921#endif
16922
Skip Montanaro6dead952003-09-25 14:50:04 +000016923int
16924main ()
16925{
16926return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016927 ;
16928 return 0;
16929}
16930_ACEOF
16931rm -f conftest.$ac_objext conftest$ac_exeext
16932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16933 (eval $ac_link) 2>&5
16934 ac_status=$?
16935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16936 (exit $ac_status); } &&
16937 { ac_try='test -s conftest$ac_exeext'
16938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16939 (eval $ac_try) 2>&5
16940 ac_status=$?
16941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16942 (exit $ac_status); }; }; then
16943 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016944else
Martin v. Löwis11437992002-04-12 09:54:03 +000016945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016946sed 's/^/| /' conftest.$ac_ext >&5
16947
Martin v. Löwis11437992002-04-12 09:54:03 +000016948ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016949fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016950rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016951fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016952echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16953echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16954if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016955 :
16956else
Martin v. Löwis11437992002-04-12 09:54:03 +000016957
16958echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16959echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16960if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16961 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016962else
Martin v. Löwis11437992002-04-12 09:54:03 +000016963 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016964LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016965cat >conftest.$ac_ext <<_ACEOF
16966#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016967/* confdefs.h. */
16968_ACEOF
16969cat confdefs.h >>conftest.$ac_ext
16970cat >>conftest.$ac_ext <<_ACEOF
16971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016972
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016973/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016974#ifdef __cplusplus
16975extern "C"
16976#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016977/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016978 builtin and then its argument prototype would still apply. */
16979char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016980int
16981main ()
16982{
16983__fpu_control ();
16984 ;
16985 return 0;
16986}
16987_ACEOF
16988rm -f conftest.$ac_objext conftest$ac_exeext
16989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16990 (eval $ac_link) 2>&5
16991 ac_status=$?
16992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16993 (exit $ac_status); } &&
16994 { ac_try='test -s conftest$ac_exeext'
16995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16996 (eval $ac_try) 2>&5
16997 ac_status=$?
16998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16999 (exit $ac_status); }; }; then
17000 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017001else
Martin v. Löwis11437992002-04-12 09:54:03 +000017002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017003sed 's/^/| /' conftest.$ac_ext >&5
17004
Martin v. Löwis11437992002-04-12 09:54:03 +000017005ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017007rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17008LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017010echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
17011echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
17012if test $ac_cv_lib_ieee___fpu_control = yes; then
17013 cat >>confdefs.h <<_ACEOF
17014#define HAVE_LIBIEEE 1
17015_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017016
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017017 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017018
Guido van Rossum627b2d71993-12-24 10:39:16 +000017019fi
17020
Michael W. Hudson54241132001-12-07 15:38:26 +000017021
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017022fi
17023
Michael W. Hudson54241132001-12-07 15:38:26 +000017024
Guido van Rossum7f253911997-05-09 02:42:48 +000017025# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000017026echo "$as_me:$LINENO: checking for --with-fpectl" >&5
17027echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
17028
Guido van Rossum7f253911997-05-09 02:42:48 +000017029# Check whether --with-fpectl or --without-fpectl was given.
17030if test "${with_fpectl+set}" = set; then
17031 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000017032
Guido van Rossum7f253911997-05-09 02:42:48 +000017033if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017034then
17035
17036cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000017037#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017038_ACEOF
17039
17040 echo "$as_me:$LINENO: result: yes" >&5
17041echo "${ECHO_T}yes" >&6
17042else echo "$as_me:$LINENO: result: no" >&5
17043echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017044fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017045else
Martin v. Löwis11437992002-04-12 09:54:03 +000017046 echo "$as_me:$LINENO: result: no" >&5
17047echo "${ECHO_T}no" >&6
17048fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000017049
Guido van Rossum7f43da71994-08-01 12:15:30 +000017050# check for --with-libm=...
17051
Guido van Rossum563e7081996-09-10 18:20:48 +000017052case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000017053Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000017054BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000017055*) LIBM=-lm
17056esac
Martin v. Löwis11437992002-04-12 09:54:03 +000017057echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
17058echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
17059
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017060# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017061if test "${with_libm+set}" = set; then
17062 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000017063
Guido van Rossum7f253911997-05-09 02:42:48 +000017064if test "$withval" = no
17065then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000017066 echo "$as_me:$LINENO: result: force LIBM empty" >&5
17067echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017068elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017069then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017070 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
17071echo "${ECHO_T}set LIBM=\"$withval\"" >&6
17072else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
17073echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
17074 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017075fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017076else
Martin v. Löwis11437992002-04-12 09:54:03 +000017077 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
17078echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
17079fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017080
17081# check for --with-libc=...
17082
Martin v. Löwis11437992002-04-12 09:54:03 +000017083echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
17084echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
17085
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017086# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017087if test "${with_libc+set}" = set; then
17088 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000017089
Guido van Rossum7f253911997-05-09 02:42:48 +000017090if test "$withval" = no
17091then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000017092 echo "$as_me:$LINENO: result: force LIBC empty" >&5
17093echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017094elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017095then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017096 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
17097echo "${ECHO_T}set LIBC=\"$withval\"" >&6
17098else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
17099echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
17100 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017101fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017102else
Martin v. Löwis11437992002-04-12 09:54:03 +000017103 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
17104echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
17105fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017106
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017107# check for hypot() in math library
17108LIBS_SAVE=$LIBS
17109LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000017110
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017111for ac_func in hypot
17112do
Martin v. Löwis11437992002-04-12 09:54:03 +000017113as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17114echo "$as_me:$LINENO: checking for $ac_func" >&5
17115echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17116if eval "test \"\${$as_ac_var+set}\" = set"; then
17117 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017118else
Martin v. Löwis11437992002-04-12 09:54:03 +000017119 cat >conftest.$ac_ext <<_ACEOF
17120#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017121/* confdefs.h. */
17122_ACEOF
17123cat confdefs.h >>conftest.$ac_ext
17124cat >>conftest.$ac_ext <<_ACEOF
17125/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017126/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017127 which can conflict with char $ac_func (); below.
17128 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017129 <limits.h> exists even on freestanding compilers. Under hpux,
17130 including <limits.h> includes <sys/time.h> and causes problems
17131 checking for functions defined therein. */
17132#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017133# include <limits.h>
17134#else
17135# include <assert.h>
17136#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017137/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017138#ifdef __cplusplus
17139extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017140{
Martin v. Löwis11437992002-04-12 09:54:03 +000017141#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017142/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017143 builtin and then its argument prototype would still apply. */
17144char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017145/* The GNU C library defines this for functions which it implements
17146 to always fail with ENOSYS. Some functions are actually named
17147 something starting with __ and the normal name is an alias. */
17148#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17149choke me
17150#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017151char (*f) () = $ac_func;
17152#endif
17153#ifdef __cplusplus
17154}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017155#endif
17156
Skip Montanaro6dead952003-09-25 14:50:04 +000017157int
17158main ()
17159{
17160return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017161 ;
17162 return 0;
17163}
17164_ACEOF
17165rm -f conftest.$ac_objext conftest$ac_exeext
17166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17167 (eval $ac_link) 2>&5
17168 ac_status=$?
17169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17170 (exit $ac_status); } &&
17171 { ac_try='test -s conftest$ac_exeext'
17172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17173 (eval $ac_try) 2>&5
17174 ac_status=$?
17175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17176 (exit $ac_status); }; }; then
17177 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017178else
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017180sed 's/^/| /' conftest.$ac_ext >&5
17181
Martin v. Löwis11437992002-04-12 09:54:03 +000017182eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017183fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017184rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017185fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017186echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17187echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17188if test `eval echo '${'$as_ac_var'}'` = yes; then
17189 cat >>confdefs.h <<_ACEOF
17190#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17191_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017192
Michael W. Hudson54241132001-12-07 15:38:26 +000017193else
Martin v. Löwis11437992002-04-12 09:54:03 +000017194 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017195fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017196done
17197
Michael W. Hudson54241132001-12-07 15:38:26 +000017198
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017199LIBS=$LIBS_SAVE
17200
Guido van Rossumef2255b2000-03-10 22:30:29 +000017201# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017202if test "${ac_cv_header_wchar_h+set}" = set; then
17203 echo "$as_me:$LINENO: checking for wchar.h" >&5
17204echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
17205if test "${ac_cv_header_wchar_h+set}" = set; then
17206 echo $ECHO_N "(cached) $ECHO_C" >&6
17207fi
17208echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
17209echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017210else
Martin v. Löwis11437992002-04-12 09:54:03 +000017211 # Is the header compilable?
17212echo "$as_me:$LINENO: checking wchar.h usability" >&5
17213echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
17214cat >conftest.$ac_ext <<_ACEOF
17215#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017216/* confdefs.h. */
17217_ACEOF
17218cat confdefs.h >>conftest.$ac_ext
17219cat >>conftest.$ac_ext <<_ACEOF
17220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017221$ac_includes_default
17222#include <wchar.h>
17223_ACEOF
17224rm -f conftest.$ac_objext
17225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17226 (eval $ac_compile) 2>&5
17227 ac_status=$?
17228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17229 (exit $ac_status); } &&
17230 { ac_try='test -s conftest.$ac_objext'
17231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17232 (eval $ac_try) 2>&5
17233 ac_status=$?
17234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17235 (exit $ac_status); }; }; then
17236 ac_header_compiler=yes
17237else
17238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017239sed 's/^/| /' conftest.$ac_ext >&5
17240
Martin v. Löwis11437992002-04-12 09:54:03 +000017241ac_header_compiler=no
17242fi
17243rm -f conftest.$ac_objext conftest.$ac_ext
17244echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17245echo "${ECHO_T}$ac_header_compiler" >&6
17246
17247# Is the header present?
17248echo "$as_me:$LINENO: checking wchar.h presence" >&5
17249echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
17250cat >conftest.$ac_ext <<_ACEOF
17251#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017252/* confdefs.h. */
17253_ACEOF
17254cat confdefs.h >>conftest.$ac_ext
17255cat >>conftest.$ac_ext <<_ACEOF
17256/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017257#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017258_ACEOF
17259if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17260 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17261 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017262 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000017263 rm -f conftest.er1
17264 cat conftest.err >&5
17265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17266 (exit $ac_status); } >/dev/null; then
17267 if test -s conftest.err; then
17268 ac_cpp_err=$ac_c_preproc_warn_flag
17269 else
17270 ac_cpp_err=
17271 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017272else
Martin v. Löwis11437992002-04-12 09:54:03 +000017273 ac_cpp_err=yes
17274fi
17275if test -z "$ac_cpp_err"; then
17276 ac_header_preproc=yes
17277else
17278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017279sed 's/^/| /' conftest.$ac_ext >&5
17280
Martin v. Löwis11437992002-04-12 09:54:03 +000017281 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017283rm -f conftest.err conftest.$ac_ext
17284echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17285echo "${ECHO_T}$ac_header_preproc" >&6
17286
17287# So? What about this header?
17288case $ac_header_compiler:$ac_header_preproc in
17289 yes:no )
17290 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
17291echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17292 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017293echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
17294 (
17295 cat <<\_ASBOX
17296## ------------------------------------ ##
17297## Report this to bug-autoconf@gnu.org. ##
17298## ------------------------------------ ##
17299_ASBOX
17300 ) |
17301 sed "s/^/$as_me: WARNING: /" >&2
17302 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017303 no:yes )
17304 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
17305echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
17306 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
17307echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
17308 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017309echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
17310 (
17311 cat <<\_ASBOX
17312## ------------------------------------ ##
17313## Report this to bug-autoconf@gnu.org. ##
17314## ------------------------------------ ##
17315_ASBOX
17316 ) |
17317 sed "s/^/$as_me: WARNING: /" >&2
17318 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017319esac
17320echo "$as_me:$LINENO: checking for wchar.h" >&5
17321echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
17322if test "${ac_cv_header_wchar_h+set}" = set; then
17323 echo $ECHO_N "(cached) $ECHO_C" >&6
17324else
17325 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000017326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017327echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
17328echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
17329
17330fi
17331if test $ac_cv_header_wchar_h = yes; then
17332
17333
17334cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017335#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017336_ACEOF
17337
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017338 wchar_h="yes"
17339
Guido van Rossumef2255b2000-03-10 22:30:29 +000017340else
Martin v. Löwis11437992002-04-12 09:54:03 +000017341 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000017342
17343fi
17344
Michael W. Hudson54241132001-12-07 15:38:26 +000017345
Martin v. Löwis11437992002-04-12 09:54:03 +000017346
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017347# determine wchar_t size
17348if test "$wchar_h" = yes
17349then
Martin v. Löwis11437992002-04-12 09:54:03 +000017350 echo "$as_me:$LINENO: checking for wchar_t" >&5
17351echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
17352if test "${ac_cv_type_wchar_t+set}" = set; then
17353 echo $ECHO_N "(cached) $ECHO_C" >&6
17354else
17355 cat >conftest.$ac_ext <<_ACEOF
17356#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017357/* confdefs.h. */
17358_ACEOF
17359cat confdefs.h >>conftest.$ac_ext
17360cat >>conftest.$ac_ext <<_ACEOF
17361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017362#include <wchar.h>
17363
Martin v. Löwis11437992002-04-12 09:54:03 +000017364int
17365main ()
17366{
17367if ((wchar_t *) 0)
17368 return 0;
17369if (sizeof (wchar_t))
17370 return 0;
17371 ;
17372 return 0;
17373}
17374_ACEOF
17375rm -f conftest.$ac_objext
17376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17377 (eval $ac_compile) 2>&5
17378 ac_status=$?
17379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17380 (exit $ac_status); } &&
17381 { ac_try='test -s conftest.$ac_objext'
17382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17383 (eval $ac_try) 2>&5
17384 ac_status=$?
17385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17386 (exit $ac_status); }; }; then
17387 ac_cv_type_wchar_t=yes
17388else
17389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017390sed 's/^/| /' conftest.$ac_ext >&5
17391
Martin v. Löwis11437992002-04-12 09:54:03 +000017392ac_cv_type_wchar_t=no
17393fi
17394rm -f conftest.$ac_objext conftest.$ac_ext
17395fi
17396echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
17397echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
17398
17399echo "$as_me:$LINENO: checking size of wchar_t" >&5
17400echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
17401if test "${ac_cv_sizeof_wchar_t+set}" = set; then
17402 echo $ECHO_N "(cached) $ECHO_C" >&6
17403else
17404 if test "$ac_cv_type_wchar_t" = yes; then
17405 # The cast to unsigned long works around a bug in the HP C Compiler
17406 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17407 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17408 # This bug is HP SR number 8606223364.
17409 if test "$cross_compiling" = yes; then
17410 # Depending upon the size, compute the lo and hi bounds.
17411cat >conftest.$ac_ext <<_ACEOF
17412#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017413/* confdefs.h. */
17414_ACEOF
17415cat confdefs.h >>conftest.$ac_ext
17416cat >>conftest.$ac_ext <<_ACEOF
17417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017418#include <wchar.h>
17419
Martin v. Löwis11437992002-04-12 09:54:03 +000017420int
17421main ()
17422{
17423static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
17424test_array [0] = 0
17425
17426 ;
17427 return 0;
17428}
17429_ACEOF
17430rm -f conftest.$ac_objext
17431if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17432 (eval $ac_compile) 2>&5
17433 ac_status=$?
17434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17435 (exit $ac_status); } &&
17436 { ac_try='test -s conftest.$ac_objext'
17437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17438 (eval $ac_try) 2>&5
17439 ac_status=$?
17440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17441 (exit $ac_status); }; }; then
17442 ac_lo=0 ac_mid=0
17443 while :; do
17444 cat >conftest.$ac_ext <<_ACEOF
17445#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017446/* confdefs.h. */
17447_ACEOF
17448cat confdefs.h >>conftest.$ac_ext
17449cat >>conftest.$ac_ext <<_ACEOF
17450/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017451#include <wchar.h>
17452
Martin v. Löwis11437992002-04-12 09:54:03 +000017453int
17454main ()
17455{
17456static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
17457test_array [0] = 0
17458
17459 ;
17460 return 0;
17461}
17462_ACEOF
17463rm -f conftest.$ac_objext
17464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17465 (eval $ac_compile) 2>&5
17466 ac_status=$?
17467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17468 (exit $ac_status); } &&
17469 { ac_try='test -s conftest.$ac_objext'
17470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17471 (eval $ac_try) 2>&5
17472 ac_status=$?
17473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17474 (exit $ac_status); }; }; then
17475 ac_hi=$ac_mid; break
17476else
17477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017478sed 's/^/| /' conftest.$ac_ext >&5
17479
Martin v. Löwis11437992002-04-12 09:54:03 +000017480ac_lo=`expr $ac_mid + 1`
17481 if test $ac_lo -le $ac_mid; then
17482 ac_lo= ac_hi=
17483 break
17484 fi
17485 ac_mid=`expr 2 '*' $ac_mid + 1`
17486fi
17487rm -f conftest.$ac_objext conftest.$ac_ext
17488 done
17489else
17490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017491sed 's/^/| /' conftest.$ac_ext >&5
17492
Martin v. Löwis11437992002-04-12 09:54:03 +000017493cat >conftest.$ac_ext <<_ACEOF
17494#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017495/* confdefs.h. */
17496_ACEOF
17497cat confdefs.h >>conftest.$ac_ext
17498cat >>conftest.$ac_ext <<_ACEOF
17499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017500#include <wchar.h>
17501
Martin v. Löwis11437992002-04-12 09:54:03 +000017502int
17503main ()
17504{
17505static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
17506test_array [0] = 0
17507
17508 ;
17509 return 0;
17510}
17511_ACEOF
17512rm -f conftest.$ac_objext
17513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17514 (eval $ac_compile) 2>&5
17515 ac_status=$?
17516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17517 (exit $ac_status); } &&
17518 { ac_try='test -s conftest.$ac_objext'
17519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17520 (eval $ac_try) 2>&5
17521 ac_status=$?
17522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17523 (exit $ac_status); }; }; then
17524 ac_hi=-1 ac_mid=-1
17525 while :; do
17526 cat >conftest.$ac_ext <<_ACEOF
17527#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017528/* confdefs.h. */
17529_ACEOF
17530cat confdefs.h >>conftest.$ac_ext
17531cat >>conftest.$ac_ext <<_ACEOF
17532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017533#include <wchar.h>
17534
Martin v. Löwis11437992002-04-12 09:54:03 +000017535int
17536main ()
17537{
17538static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
17539test_array [0] = 0
17540
17541 ;
17542 return 0;
17543}
17544_ACEOF
17545rm -f conftest.$ac_objext
17546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17547 (eval $ac_compile) 2>&5
17548 ac_status=$?
17549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17550 (exit $ac_status); } &&
17551 { ac_try='test -s conftest.$ac_objext'
17552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17553 (eval $ac_try) 2>&5
17554 ac_status=$?
17555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17556 (exit $ac_status); }; }; then
17557 ac_lo=$ac_mid; break
17558else
17559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017560sed 's/^/| /' conftest.$ac_ext >&5
17561
Martin v. Löwis11437992002-04-12 09:54:03 +000017562ac_hi=`expr '(' $ac_mid ')' - 1`
17563 if test $ac_mid -le $ac_hi; then
17564 ac_lo= ac_hi=
17565 break
17566 fi
17567 ac_mid=`expr 2 '*' $ac_mid`
17568fi
17569rm -f conftest.$ac_objext conftest.$ac_ext
17570 done
17571else
17572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017573sed 's/^/| /' conftest.$ac_ext >&5
17574
Martin v. Löwis11437992002-04-12 09:54:03 +000017575ac_lo= ac_hi=
17576fi
17577rm -f conftest.$ac_objext conftest.$ac_ext
17578fi
17579rm -f conftest.$ac_objext conftest.$ac_ext
17580# Binary search between lo and hi bounds.
17581while test "x$ac_lo" != "x$ac_hi"; do
17582 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17583 cat >conftest.$ac_ext <<_ACEOF
17584#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017585/* confdefs.h. */
17586_ACEOF
17587cat confdefs.h >>conftest.$ac_ext
17588cat >>conftest.$ac_ext <<_ACEOF
17589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017590#include <wchar.h>
17591
Martin v. Löwis11437992002-04-12 09:54:03 +000017592int
17593main ()
17594{
17595static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
17596test_array [0] = 0
17597
17598 ;
17599 return 0;
17600}
17601_ACEOF
17602rm -f conftest.$ac_objext
17603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17604 (eval $ac_compile) 2>&5
17605 ac_status=$?
17606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17607 (exit $ac_status); } &&
17608 { ac_try='test -s conftest.$ac_objext'
17609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17610 (eval $ac_try) 2>&5
17611 ac_status=$?
17612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17613 (exit $ac_status); }; }; then
17614 ac_hi=$ac_mid
17615else
17616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017617sed 's/^/| /' conftest.$ac_ext >&5
17618
Martin v. Löwis11437992002-04-12 09:54:03 +000017619ac_lo=`expr '(' $ac_mid ')' + 1`
17620fi
17621rm -f conftest.$ac_objext conftest.$ac_ext
17622done
17623case $ac_lo in
17624?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017625'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17626See \`config.log' for more details." >&5
17627echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17628See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017629 { (exit 1); exit 1; }; } ;;
17630esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017631else
17632 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017633 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17634See \`config.log' for more details." >&5
17635echo "$as_me: error: cannot run test program while cross compiling
17636See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017637 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000017638else
Martin v. Löwis11437992002-04-12 09:54:03 +000017639 cat >conftest.$ac_ext <<_ACEOF
17640#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017641/* confdefs.h. */
17642_ACEOF
17643cat confdefs.h >>conftest.$ac_ext
17644cat >>conftest.$ac_ext <<_ACEOF
17645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017646#include <wchar.h>
17647
17648long longval () { return (long) (sizeof (wchar_t)); }
17649unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000017650#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017651#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017652int
17653main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017654{
Martin v. Löwis11437992002-04-12 09:54:03 +000017655
17656 FILE *f = fopen ("conftest.val", "w");
17657 if (! f)
17658 exit (1);
17659 if (((long) (sizeof (wchar_t))) < 0)
17660 {
17661 long i = longval ();
17662 if (i != ((long) (sizeof (wchar_t))))
17663 exit (1);
17664 fprintf (f, "%ld\n", i);
17665 }
17666 else
17667 {
17668 unsigned long i = ulongval ();
17669 if (i != ((long) (sizeof (wchar_t))))
17670 exit (1);
17671 fprintf (f, "%lu\n", i);
17672 }
17673 exit (ferror (f) || fclose (f) != 0);
17674
17675 ;
17676 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000017677}
Martin v. Löwis11437992002-04-12 09:54:03 +000017678_ACEOF
17679rm -f conftest$ac_exeext
17680if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17681 (eval $ac_link) 2>&5
17682 ac_status=$?
17683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17684 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17686 (eval $ac_try) 2>&5
17687 ac_status=$?
17688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17689 (exit $ac_status); }; }; then
17690 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000017691else
Martin v. Löwis11437992002-04-12 09:54:03 +000017692 echo "$as_me: program exited with status $ac_status" >&5
17693echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017694sed 's/^/| /' conftest.$ac_ext >&5
17695
Martin v. Löwis11437992002-04-12 09:54:03 +000017696( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000017697{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17698See \`config.log' for more details." >&5
17699echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17700See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017701 { (exit 1); exit 1; }; }
17702fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017703rm -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 +000017704fi
17705fi
17706rm -f conftest.val
17707else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017708 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000017709fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017710fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017711echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
17712echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
17713cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017714#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017715_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017716
Michael W. Hudson54241132001-12-07 15:38:26 +000017717
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017718fi
17719
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017720echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
17721echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
17722have_ucs4_tcl=no
17723cat >conftest.$ac_ext <<_ACEOF
17724#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017725/* confdefs.h. */
17726_ACEOF
17727cat confdefs.h >>conftest.$ac_ext
17728cat >>conftest.$ac_ext <<_ACEOF
17729/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017730
17731#include <tcl.h>
17732#if TCL_UTF_MAX != 6
17733# error "NOT UCS4_TCL"
17734#endif
17735int
17736main ()
17737{
17738
17739 ;
17740 return 0;
17741}
17742_ACEOF
17743rm -f conftest.$ac_objext
17744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17745 (eval $ac_compile) 2>&5
17746 ac_status=$?
17747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17748 (exit $ac_status); } &&
17749 { ac_try='test -s conftest.$ac_objext'
17750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17751 (eval $ac_try) 2>&5
17752 ac_status=$?
17753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17754 (exit $ac_status); }; }; then
17755
17756
17757cat >>confdefs.h <<\_ACEOF
17758#define HAVE_UCS4_TCL 1
17759_ACEOF
17760
17761 have_ucs4_tcl=yes
17762
17763else
17764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017765sed 's/^/| /' conftest.$ac_ext >&5
17766
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017767fi
17768rm -f conftest.$ac_objext conftest.$ac_ext
17769echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
17770echo "${ECHO_T}$have_ucs4_tcl" >&6
17771
Skip Montanaro6dead952003-09-25 14:50:04 +000017772# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017773if test "$wchar_h" = yes
17774then
17775 # check whether wchar_t is signed or not
17776 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
17777echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
17778 if test "${ac_cv_wchar_t_signed+set}" = set; then
17779 echo $ECHO_N "(cached) $ECHO_C" >&6
17780else
17781
17782 if test "$cross_compiling" = yes; then
17783 ac_cv_wchar_t_signed=yes
17784else
17785 cat >conftest.$ac_ext <<_ACEOF
17786#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017787/* confdefs.h. */
17788_ACEOF
17789cat confdefs.h >>conftest.$ac_ext
17790cat >>conftest.$ac_ext <<_ACEOF
17791/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017792
17793 #include <wchar.h>
17794 int main()
17795 {
17796 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
17797 }
17798
17799_ACEOF
17800rm -f conftest$ac_exeext
17801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17802 (eval $ac_link) 2>&5
17803 ac_status=$?
17804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17805 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17807 (eval $ac_try) 2>&5
17808 ac_status=$?
17809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17810 (exit $ac_status); }; }; then
17811 ac_cv_wchar_t_signed=yes
17812else
17813 echo "$as_me: program exited with status $ac_status" >&5
17814echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017815sed 's/^/| /' conftest.$ac_ext >&5
17816
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017817( exit $ac_status )
17818ac_cv_wchar_t_signed=no
17819fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017820rm -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 +000017821fi
17822fi
17823
17824 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
17825echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
17826fi
17827
Martin v. Löwis11437992002-04-12 09:54:03 +000017828echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17829echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017830# Check whether --enable-unicode or --disable-unicode was given.
17831if test "${enable_unicode+set}" = set; then
17832 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017833
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017834else
17835 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017836fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017837
17838if test $enable_unicode = yes
17839then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017840 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017841 case "$have_ucs4_tcl" in
17842 yes) enable_unicode="ucs4"
17843 ;;
17844 *) enable_unicode="ucs2"
17845 ;;
17846 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017847fi
17848
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017849
17850
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017851case "$enable_unicode" in
17852ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017853 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017854#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017855_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017856
17857 ;;
17858ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017859 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017860#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017861_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017862
17863 ;;
17864esac
17865
Michael W. Hudson54241132001-12-07 15:38:26 +000017866
Martin v. Löwis11437992002-04-12 09:54:03 +000017867
17868
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017869
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017870if test "$enable_unicode" = "no"
17871then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017872 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017873 echo "$as_me:$LINENO: result: not used" >&5
17874echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017875else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017876 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017877
17878cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017879#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017880_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017881
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017882
17883 # wchar_t is only usable if it maps to an unsigned type
17884 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17885 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017886 then
17887 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017888
Martin v. Löwis11437992002-04-12 09:54:03 +000017889cat >>confdefs.h <<\_ACEOF
17890#define HAVE_USABLE_WCHAR_T 1
17891_ACEOF
17892
17893 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017894#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017895_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017896
17897 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17898 then
17899 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017900 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017901#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017902_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017903
17904 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17905 then
17906 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017907 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017908#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017909_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017910
17911 else
17912 PY_UNICODE_TYPE="no type found"
17913 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017914 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17915echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017916fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017917
17918# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017919echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17920echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17921if test "${ac_cv_c_bigendian+set}" = set; then
17922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017923else
Martin v. Löwis11437992002-04-12 09:54:03 +000017924 # See if sys/param.h defines the BYTE_ORDER macro.
17925cat >conftest.$ac_ext <<_ACEOF
17926#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017927/* confdefs.h. */
17928_ACEOF
17929cat confdefs.h >>conftest.$ac_ext
17930cat >>conftest.$ac_ext <<_ACEOF
17931/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017932#include <sys/types.h>
17933#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017934
Martin v. Löwis11437992002-04-12 09:54:03 +000017935int
17936main ()
17937{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017938#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17939 bogus endian macros
17940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017941
17942 ;
17943 return 0;
17944}
17945_ACEOF
17946rm -f conftest.$ac_objext
17947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17948 (eval $ac_compile) 2>&5
17949 ac_status=$?
17950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17951 (exit $ac_status); } &&
17952 { ac_try='test -s conftest.$ac_objext'
17953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17954 (eval $ac_try) 2>&5
17955 ac_status=$?
17956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17957 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017958 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017959cat >conftest.$ac_ext <<_ACEOF
17960#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017961/* confdefs.h. */
17962_ACEOF
17963cat confdefs.h >>conftest.$ac_ext
17964cat >>conftest.$ac_ext <<_ACEOF
17965/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017966#include <sys/types.h>
17967#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017968
Martin v. Löwis11437992002-04-12 09:54:03 +000017969int
17970main ()
17971{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017972#if BYTE_ORDER != BIG_ENDIAN
17973 not big endian
17974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017975
17976 ;
17977 return 0;
17978}
17979_ACEOF
17980rm -f conftest.$ac_objext
17981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17982 (eval $ac_compile) 2>&5
17983 ac_status=$?
17984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17985 (exit $ac_status); } &&
17986 { ac_try='test -s conftest.$ac_objext'
17987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17988 (eval $ac_try) 2>&5
17989 ac_status=$?
17990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17991 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017992 ac_cv_c_bigendian=yes
17993else
Martin v. Löwis11437992002-04-12 09:54:03 +000017994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017995sed 's/^/| /' conftest.$ac_ext >&5
17996
Martin v. Löwis11437992002-04-12 09:54:03 +000017997ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017998fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017999rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000018000else
Martin v. Löwis11437992002-04-12 09:54:03 +000018001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018002sed 's/^/| /' conftest.$ac_ext >&5
18003
Martin v. Löwis11437992002-04-12 09:54:03 +000018004# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000018005if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018006 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 ac_cv_c_bigendian=unknown
18008 cat >conftest.$ac_ext <<_ACEOF
18009#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018010/* confdefs.h. */
18011_ACEOF
18012cat confdefs.h >>conftest.$ac_ext
18013cat >>conftest.$ac_ext <<_ACEOF
18014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018015short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
18016short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
18017void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
18018short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18019short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18020void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018021int
18022main ()
18023{
18024 _ascii (); _ebcdic ();
18025 ;
18026 return 0;
18027}
18028_ACEOF
18029rm -f conftest.$ac_objext
18030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18031 (eval $ac_compile) 2>&5
18032 ac_status=$?
18033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18034 (exit $ac_status); } &&
18035 { ac_try='test -s conftest.$ac_objext'
18036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18037 (eval $ac_try) 2>&5
18038 ac_status=$?
18039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18040 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018041 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018042 ac_cv_c_bigendian=yes
18043fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018044if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018045 if test "$ac_cv_c_bigendian" = unknown; then
18046 ac_cv_c_bigendian=no
18047 else
18048 # finding both strings is unlikely to happen, but who knows?
18049 ac_cv_c_bigendian=unknown
18050 fi
18051fi
18052else
18053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018054sed 's/^/| /' conftest.$ac_ext >&5
18055
Martin v. Löwis11437992002-04-12 09:54:03 +000018056fi
18057rm -f conftest.$ac_objext conftest.$ac_ext
18058else
18059 cat >conftest.$ac_ext <<_ACEOF
18060#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018061/* confdefs.h. */
18062_ACEOF
18063cat confdefs.h >>conftest.$ac_ext
18064cat >>conftest.$ac_ext <<_ACEOF
18065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018066int
18067main ()
18068{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018069 /* Are we little or big endian? From Harbison&Steele. */
18070 union
18071 {
18072 long l;
18073 char c[sizeof (long)];
18074 } u;
18075 u.l = 1;
18076 exit (u.c[sizeof (long) - 1] == 1);
18077}
Martin v. Löwis11437992002-04-12 09:54:03 +000018078_ACEOF
18079rm -f conftest$ac_exeext
18080if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18081 (eval $ac_link) 2>&5
18082 ac_status=$?
18083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18084 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18086 (eval $ac_try) 2>&5
18087 ac_status=$?
18088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18089 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000018090 ac_cv_c_bigendian=no
18091else
Martin v. Löwis11437992002-04-12 09:54:03 +000018092 echo "$as_me: program exited with status $ac_status" >&5
18093echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018094sed 's/^/| /' conftest.$ac_ext >&5
18095
Martin v. Löwis11437992002-04-12 09:54:03 +000018096( exit $ac_status )
18097ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000018098fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018099rm -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 +000018100fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018101fi
18102rm -f conftest.$ac_objext conftest.$ac_ext
18103fi
18104echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
18105echo "${ECHO_T}$ac_cv_c_bigendian" >&6
18106case $ac_cv_c_bigendian in
18107 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000018108
Martin v. Löwis11437992002-04-12 09:54:03 +000018109cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018110#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018111_ACEOF
18112 ;;
18113 no)
18114 ;;
18115 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018116 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018117presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018118echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018119presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
18120 { (exit 1); exit 1; }; } ;;
18121esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000018122
Michael W. Hudson54241132001-12-07 15:38:26 +000018123
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018124# Check whether right shifting a negative integer extends the sign bit
18125# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000018126echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
18127echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
18128if test "${ac_cv_rshift_extends_sign+set}" = set; then
18129 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000018130else
Martin v. Löwis11437992002-04-12 09:54:03 +000018131
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018132if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000018133 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018134else
Martin v. Löwis11437992002-04-12 09:54:03 +000018135 cat >conftest.$ac_ext <<_ACEOF
18136#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018137/* confdefs.h. */
18138_ACEOF
18139cat confdefs.h >>conftest.$ac_ext
18140cat >>conftest.$ac_ext <<_ACEOF
18141/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018142
18143int main()
18144{
Vladimir Marangozova6180282000-07-12 05:05:06 +000018145 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018146}
18147
Martin v. Löwis11437992002-04-12 09:54:03 +000018148_ACEOF
18149rm -f conftest$ac_exeext
18150if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18151 (eval $ac_link) 2>&5
18152 ac_status=$?
18153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18154 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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
Vladimir Marangozova6180282000-07-12 05:05:06 +000018160 ac_cv_rshift_extends_sign=yes
18161else
Martin v. Löwis11437992002-04-12 09:54:03 +000018162 echo "$as_me: program exited with status $ac_status" >&5
18163echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018164sed 's/^/| /' conftest.$ac_ext >&5
18165
Martin v. Löwis11437992002-04-12 09:54:03 +000018166( exit $ac_status )
18167ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000018168fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018169rm -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 +000018170fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000018171fi
18172
Martin v. Löwis11437992002-04-12 09:54:03 +000018173echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
18174echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000018175if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018176then
Martin v. Löwis11437992002-04-12 09:54:03 +000018177
18178cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018179#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018180_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018181
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018182fi
18183
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018184# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018185echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
18186echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
18187if test "${ac_cv_have_getc_unlocked+set}" = set; then
18188 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018189else
Martin v. Löwis11437992002-04-12 09:54:03 +000018190
18191cat >conftest.$ac_ext <<_ACEOF
18192#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018193/* confdefs.h. */
18194_ACEOF
18195cat confdefs.h >>conftest.$ac_ext
18196cat >>conftest.$ac_ext <<_ACEOF
18197/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018198#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018199int
18200main ()
18201{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018202
18203 FILE *f = fopen("/dev/null", "r");
18204 flockfile(f);
18205 getc_unlocked(f);
18206 funlockfile(f);
18207
Martin v. Löwis11437992002-04-12 09:54:03 +000018208 ;
18209 return 0;
18210}
18211_ACEOF
18212rm -f conftest.$ac_objext conftest$ac_exeext
18213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18214 (eval $ac_link) 2>&5
18215 ac_status=$?
18216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18217 (exit $ac_status); } &&
18218 { ac_try='test -s conftest$ac_exeext'
18219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18220 (eval $ac_try) 2>&5
18221 ac_status=$?
18222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18223 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018224 ac_cv_have_getc_unlocked=yes
18225else
Martin v. Löwis11437992002-04-12 09:54:03 +000018226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018227sed 's/^/| /' conftest.$ac_ext >&5
18228
Martin v. Löwis11437992002-04-12 09:54:03 +000018229ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018231rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018232fi
18233
Martin v. Löwis11437992002-04-12 09:54:03 +000018234echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
18235echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018236if test "$ac_cv_have_getc_unlocked" = yes
18237then
Martin v. Löwis11437992002-04-12 09:54:03 +000018238
18239cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018240#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018241_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018242
18243fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018244
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018245# check for readline 2.2
18246cat >conftest.$ac_ext <<_ACEOF
18247#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018248/* confdefs.h. */
18249_ACEOF
18250cat confdefs.h >>conftest.$ac_ext
18251cat >>conftest.$ac_ext <<_ACEOF
18252/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018253#include <readline/readline.h>
18254_ACEOF
18255if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18256 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18257 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018258 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018259 rm -f conftest.er1
18260 cat conftest.err >&5
18261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18262 (exit $ac_status); } >/dev/null; then
18263 if test -s conftest.err; then
18264 ac_cpp_err=$ac_c_preproc_warn_flag
18265 else
18266 ac_cpp_err=
18267 fi
18268else
18269 ac_cpp_err=yes
18270fi
18271if test -z "$ac_cpp_err"; then
18272 have_readline=yes
18273else
18274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018275sed 's/^/| /' conftest.$ac_ext >&5
18276
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018277 have_readline=no
18278fi
18279rm -f conftest.err conftest.$ac_ext
18280if test $have_readline = yes
18281then
18282 cat >conftest.$ac_ext <<_ACEOF
18283#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018284/* confdefs.h. */
18285_ACEOF
18286cat confdefs.h >>conftest.$ac_ext
18287cat >>conftest.$ac_ext <<_ACEOF
18288/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018289#include <readline/readline.h>
18290
18291_ACEOF
18292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000018293 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018294
18295cat >>confdefs.h <<\_ACEOF
18296#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
18297_ACEOF
18298
18299fi
18300rm -f conftest*
18301
18302fi
18303
Martin v. Löwis0daad592001-09-30 21:09:59 +000018304# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000018305echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
18306echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
18307if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
18308 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000018309else
Martin v. Löwis11437992002-04-12 09:54:03 +000018310 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000018311LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018312cat >conftest.$ac_ext <<_ACEOF
18313#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018314/* confdefs.h. */
18315_ACEOF
18316cat confdefs.h >>conftest.$ac_ext
18317cat >>conftest.$ac_ext <<_ACEOF
18318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018319
Guido van Rossum353ae582001-07-10 16:45:32 +000018320/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018321#ifdef __cplusplus
18322extern "C"
18323#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000018324/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018325 builtin and then its argument prototype would still apply. */
18326char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018327int
18328main ()
18329{
18330rl_pre_input_hook ();
18331 ;
18332 return 0;
18333}
18334_ACEOF
18335rm -f conftest.$ac_objext conftest$ac_exeext
18336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18337 (eval $ac_link) 2>&5
18338 ac_status=$?
18339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18340 (exit $ac_status); } &&
18341 { ac_try='test -s conftest$ac_exeext'
18342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18343 (eval $ac_try) 2>&5
18344 ac_status=$?
18345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18346 (exit $ac_status); }; }; then
18347 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000018348else
Martin v. Löwis11437992002-04-12 09:54:03 +000018349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018350sed 's/^/| /' conftest.$ac_ext >&5
18351
Martin v. Löwis11437992002-04-12 09:54:03 +000018352ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000018353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018354rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18355LIBS=$ac_check_lib_save_LIBS
18356fi
18357echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
18358echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
18359if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018360
Martin v. Löwis11437992002-04-12 09:54:03 +000018361cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000018362#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018363_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000018364
Martin v. Löwis0daad592001-09-30 21:09:59 +000018365fi
18366
Michael W. Hudson54241132001-12-07 15:38:26 +000018367
Martin v. Löwis0daad592001-09-30 21:09:59 +000018368# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000018369echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
18370echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
18371if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
18372 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000018373else
Martin v. Löwis11437992002-04-12 09:54:03 +000018374 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000018375LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018376cat >conftest.$ac_ext <<_ACEOF
18377#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018378/* confdefs.h. */
18379_ACEOF
18380cat confdefs.h >>conftest.$ac_ext
18381cat >>conftest.$ac_ext <<_ACEOF
18382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018383
Martin v. Löwis0daad592001-09-30 21:09:59 +000018384/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018385#ifdef __cplusplus
18386extern "C"
18387#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000018388/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018389 builtin and then its argument prototype would still apply. */
18390char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018391int
18392main ()
18393{
18394rl_completion_matches ();
18395 ;
18396 return 0;
18397}
18398_ACEOF
18399rm -f conftest.$ac_objext conftest$ac_exeext
18400if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18401 (eval $ac_link) 2>&5
18402 ac_status=$?
18403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18404 (exit $ac_status); } &&
18405 { ac_try='test -s conftest$ac_exeext'
18406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18407 (eval $ac_try) 2>&5
18408 ac_status=$?
18409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18410 (exit $ac_status); }; }; then
18411 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000018412else
Martin v. Löwis11437992002-04-12 09:54:03 +000018413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018414sed 's/^/| /' conftest.$ac_ext >&5
18415
Martin v. Löwis11437992002-04-12 09:54:03 +000018416ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000018417fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018418rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18419LIBS=$ac_check_lib_save_LIBS
18420fi
18421echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
18422echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
18423if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018424
Martin v. Löwis11437992002-04-12 09:54:03 +000018425cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000018426#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018427_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000018428
Guido van Rossum353ae582001-07-10 16:45:32 +000018429fi
18430
Jack Jansendd19cf82001-12-06 22:36:17 +000018431
Martin v. Löwis11437992002-04-12 09:54:03 +000018432echo "$as_me:$LINENO: checking for broken nice()" >&5
18433echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
18434if test "${ac_cv_broken_nice+set}" = set; then
18435 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018436else
Martin v. Löwis11437992002-04-12 09:54:03 +000018437
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018438if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000018439 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018440else
Martin v. Löwis11437992002-04-12 09:54:03 +000018441 cat >conftest.$ac_ext <<_ACEOF
18442#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018443/* confdefs.h. */
18444_ACEOF
18445cat confdefs.h >>conftest.$ac_ext
18446cat >>conftest.$ac_ext <<_ACEOF
18447/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018448
18449int main()
18450{
18451 int val1 = nice(1);
18452 if (val1 != -1 && val1 == nice(2))
18453 exit(0);
18454 exit(1);
18455}
18456
Martin v. Löwis11437992002-04-12 09:54:03 +000018457_ACEOF
18458rm -f conftest$ac_exeext
18459if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18460 (eval $ac_link) 2>&5
18461 ac_status=$?
18462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18463 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18465 (eval $ac_try) 2>&5
18466 ac_status=$?
18467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18468 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018469 ac_cv_broken_nice=yes
18470else
Martin v. Löwis11437992002-04-12 09:54:03 +000018471 echo "$as_me: program exited with status $ac_status" >&5
18472echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018473sed 's/^/| /' conftest.$ac_ext >&5
18474
Martin v. Löwis11437992002-04-12 09:54:03 +000018475( exit $ac_status )
18476ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018477fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018478rm -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 +000018479fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018480fi
18481
Martin v. Löwis11437992002-04-12 09:54:03 +000018482echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
18483echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018484if test "$ac_cv_broken_nice" = yes
18485then
Martin v. Löwis11437992002-04-12 09:54:03 +000018486
18487cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018488#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018489_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018490
18491fi
18492
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018493# tzset(3) exists and works like we expect it to
18494echo "$as_me:$LINENO: checking for working tzset()" >&5
18495echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
18496if test "${ac_cv_working_tzset+set}" = set; then
18497 echo $ECHO_N "(cached) $ECHO_C" >&6
18498else
18499
18500if test "$cross_compiling" = yes; then
18501 ac_cv_working_tzset=no
18502else
18503 cat >conftest.$ac_ext <<_ACEOF
18504#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018505/* confdefs.h. */
18506_ACEOF
18507cat confdefs.h >>conftest.$ac_ext
18508cat >>conftest.$ac_ext <<_ACEOF
18509/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018510
18511#include <stdlib.h>
18512#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000018513#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018514int main()
18515{
Brett Cannon18367812003-09-19 00:59:16 +000018516 /* Note that we need to ensure that not only does tzset(3)
18517 do 'something' with localtime, but it works as documented
18518 in the library reference and as expected by the test suite.
18519
18520 Red Hat 6.2 doesn't understand the southern hemisphere
18521 after New Year's Day; it thinks swaps on that day.
18522 */
18523
18524 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
18525 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
18526
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018527 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018528 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018529 if (localtime(&groundhogday)->tm_hour != 0)
18530 exit(1);
18531
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018532 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018533 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018534 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018535 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000018536
18537 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
18538 tzset();
18539 if (localtime(&groundhogday)->tm_hour != 11)
18540 exit(1);
18541 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
18542 exit(1);
18543 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
18544 exit(1);
18545
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018546 exit(0);
18547}
18548
18549_ACEOF
18550rm -f conftest$ac_exeext
18551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18552 (eval $ac_link) 2>&5
18553 ac_status=$?
18554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18555 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18557 (eval $ac_try) 2>&5
18558 ac_status=$?
18559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18560 (exit $ac_status); }; }; then
18561 ac_cv_working_tzset=yes
18562else
18563 echo "$as_me: program exited with status $ac_status" >&5
18564echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018565sed 's/^/| /' conftest.$ac_ext >&5
18566
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018567( exit $ac_status )
18568ac_cv_working_tzset=no
18569fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018570rm -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 +000018571fi
18572fi
18573
18574echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
18575echo "${ECHO_T}$ac_cv_working_tzset" >&6
18576if test "$ac_cv_working_tzset" = yes
18577then
18578
18579cat >>confdefs.h <<\_ACEOF
18580#define HAVE_WORKING_TZSET 1
18581_ACEOF
18582
18583fi
18584
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018585# Look for subsecond timestamps in struct stat
18586echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
18587echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
18588if test "${ac_cv_stat_tv_nsec+set}" = set; then
18589 echo $ECHO_N "(cached) $ECHO_C" >&6
18590else
18591 cat >conftest.$ac_ext <<_ACEOF
18592#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018593/* confdefs.h. */
18594_ACEOF
18595cat confdefs.h >>conftest.$ac_ext
18596cat >>conftest.$ac_ext <<_ACEOF
18597/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018598#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018599int
18600main ()
18601{
18602
18603struct stat st;
18604st.st_mtim.tv_nsec = 1;
18605
18606 ;
18607 return 0;
18608}
18609_ACEOF
18610rm -f conftest.$ac_objext
18611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18612 (eval $ac_compile) 2>&5
18613 ac_status=$?
18614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18615 (exit $ac_status); } &&
18616 { ac_try='test -s conftest.$ac_objext'
18617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18618 (eval $ac_try) 2>&5
18619 ac_status=$?
18620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18621 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000018622 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018623else
18624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018625sed 's/^/| /' conftest.$ac_ext >&5
18626
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018627ac_cv_stat_tv_nsec=no
18628fi
18629rm -f conftest.$ac_objext conftest.$ac_ext
18630fi
18631
18632echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
18633echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
18634if test "$ac_cv_stat_tv_nsec" = yes
18635then
18636
18637cat >>confdefs.h <<\_ACEOF
18638#define HAVE_STAT_TV_NSEC 1
18639_ACEOF
18640
18641fi
18642
Jack Jansen666b1e72001-10-31 12:11:48 +000018643# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000018644echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
18645echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
18646if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
18647 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018648else
Martin v. Löwis11437992002-04-12 09:54:03 +000018649 cat >conftest.$ac_ext <<_ACEOF
18650#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018651/* confdefs.h. */
18652_ACEOF
18653cat confdefs.h >>conftest.$ac_ext
18654cat >>conftest.$ac_ext <<_ACEOF
18655/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018656#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018657int
18658main ()
18659{
Jack Jansen666b1e72001-10-31 12:11:48 +000018660
18661 int rtn;
18662 rtn = mvwdelch(0,0,0);
18663
Martin v. Löwis11437992002-04-12 09:54:03 +000018664 ;
18665 return 0;
18666}
18667_ACEOF
18668rm -f conftest.$ac_objext
18669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18670 (eval $ac_compile) 2>&5
18671 ac_status=$?
18672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18673 (exit $ac_status); } &&
18674 { ac_try='test -s conftest.$ac_objext'
18675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18676 (eval $ac_try) 2>&5
18677 ac_status=$?
18678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18679 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018680 ac_cv_mvwdelch_is_expression=yes
18681else
Martin v. Löwis11437992002-04-12 09:54:03 +000018682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018683sed 's/^/| /' conftest.$ac_ext >&5
18684
Martin v. Löwis11437992002-04-12 09:54:03 +000018685ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018686fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018687rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018688fi
18689
Martin v. Löwis11437992002-04-12 09:54:03 +000018690echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
18691echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018692
18693if test "$ac_cv_mvwdelch_is_expression" = yes
18694then
Martin v. Löwis11437992002-04-12 09:54:03 +000018695
18696cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018697#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018698_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018699
18700fi
18701
Martin v. Löwis11437992002-04-12 09:54:03 +000018702echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
18703echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
18704if test "${ac_cv_window_has_flags+set}" = set; then
18705 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018706else
Martin v. Löwis11437992002-04-12 09:54:03 +000018707 cat >conftest.$ac_ext <<_ACEOF
18708#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018709/* confdefs.h. */
18710_ACEOF
18711cat confdefs.h >>conftest.$ac_ext
18712cat >>conftest.$ac_ext <<_ACEOF
18713/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018714#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018715int
18716main ()
18717{
Jack Jansen666b1e72001-10-31 12:11:48 +000018718
18719 WINDOW *w;
18720 w->_flags = 0;
18721
Martin v. Löwis11437992002-04-12 09:54:03 +000018722 ;
18723 return 0;
18724}
18725_ACEOF
18726rm -f conftest.$ac_objext
18727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18728 (eval $ac_compile) 2>&5
18729 ac_status=$?
18730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18731 (exit $ac_status); } &&
18732 { ac_try='test -s conftest.$ac_objext'
18733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18734 (eval $ac_try) 2>&5
18735 ac_status=$?
18736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18737 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018738 ac_cv_window_has_flags=yes
18739else
Martin v. Löwis11437992002-04-12 09:54:03 +000018740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018741sed 's/^/| /' conftest.$ac_ext >&5
18742
Martin v. Löwis11437992002-04-12 09:54:03 +000018743ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018744fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018745rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018746fi
18747
Martin v. Löwis11437992002-04-12 09:54:03 +000018748echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
18749echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018750
Jack Jansen666b1e72001-10-31 12:11:48 +000018751
18752if test "$ac_cv_window_has_flags" = yes
18753then
Martin v. Löwis11437992002-04-12 09:54:03 +000018754
18755cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018756#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018757_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018758
18759fi
18760
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018761echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
18762echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
18763
18764if test -e /dev/ptmx
18765then
18766 echo "$as_me:$LINENO: result: yes" >&5
18767echo "${ECHO_T}yes" >&6
18768
18769cat >>confdefs.h <<\_ACEOF
18770#define HAVE_DEV_PTMX 1
18771_ACEOF
18772
18773else
18774 echo "$as_me:$LINENO: result: no" >&5
18775echo "${ECHO_T}no" >&6
18776fi
18777
Neal Norwitz865400f2003-03-21 01:42:58 +000018778echo "$as_me:$LINENO: checking for /dev/ptc" >&5
18779echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
18780
18781if test -e /dev/ptc
18782then
18783 echo "$as_me:$LINENO: result: yes" >&5
18784echo "${ECHO_T}yes" >&6
18785
18786cat >>confdefs.h <<\_ACEOF
18787#define HAVE_DEV_PTC 1
18788_ACEOF
18789
18790else
18791 echo "$as_me:$LINENO: result: no" >&5
18792echo "${ECHO_T}no" >&6
18793fi
18794
Martin v. Löwis11437992002-04-12 09:54:03 +000018795echo "$as_me:$LINENO: checking for socklen_t" >&5
18796echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
18797if test "${ac_cv_type_socklen_t+set}" = set; then
18798 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000018799else
Martin v. Löwis11437992002-04-12 09:54:03 +000018800 cat >conftest.$ac_ext <<_ACEOF
18801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018802/* confdefs.h. */
18803_ACEOF
18804cat confdefs.h >>conftest.$ac_ext
18805cat >>conftest.$ac_ext <<_ACEOF
18806/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000018807
18808#ifdef HAVE_SYS_TYPES_H
18809#include <sys/types.h>
18810#endif
18811#ifdef HAVE_SYS_SOCKET_H
18812#include <sys/socket.h>
18813#endif
18814
18815
Martin v. Löwis11437992002-04-12 09:54:03 +000018816int
18817main ()
18818{
18819if ((socklen_t *) 0)
18820 return 0;
18821if (sizeof (socklen_t))
18822 return 0;
18823 ;
18824 return 0;
18825}
18826_ACEOF
18827rm -f conftest.$ac_objext
18828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18829 (eval $ac_compile) 2>&5
18830 ac_status=$?
18831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18832 (exit $ac_status); } &&
18833 { ac_try='test -s conftest.$ac_objext'
18834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18835 (eval $ac_try) 2>&5
18836 ac_status=$?
18837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18838 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018839 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018840else
Martin v. Löwis11437992002-04-12 09:54:03 +000018841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018842sed 's/^/| /' conftest.$ac_ext >&5
18843
Martin v. Löwis11437992002-04-12 09:54:03 +000018844ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018845fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018846rm -f conftest.$ac_objext conftest.$ac_ext
18847fi
18848echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18849echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18850if test $ac_cv_type_socklen_t = yes; then
18851 :
18852else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018853
Martin v. Löwis01c04012002-11-11 14:58:44 +000018854cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018855#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018856_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018857
18858fi
18859
Michael W. Hudson54241132001-12-07 15:38:26 +000018860
Michael W. Hudson54241132001-12-07 15:38:26 +000018861
18862
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018863for h in `(cd $srcdir;echo Python/thread_*.h)`
18864do
18865 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18866done
18867
Michael W. Hudson54241132001-12-07 15:38:26 +000018868
Jack Jansen0b06be72002-06-21 14:48:38 +000018869SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018870echo "$as_me:$LINENO: checking for build directories" >&5
18871echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018872for dir in $SRCDIRS; do
18873 if test ! -d $dir; then
18874 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018875 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018876done
Martin v. Löwis11437992002-04-12 09:54:03 +000018877echo "$as_me:$LINENO: result: done" >&5
18878echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018879
Guido van Rossum627b2d71993-12-24 10:39:16 +000018880# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018881 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018882
Martin v. Löwis11437992002-04-12 09:54:03 +000018883cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018884# This file is a shell script that caches the results of configure
18885# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018886# scripts and configure runs, see configure's option --config-cache.
18887# It is not useful on other systems. If it contains results you don't
18888# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018889#
Martin v. Löwis11437992002-04-12 09:54:03 +000018890# config.status only pays attention to the cache file if you give it
18891# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018892#
Skip Montanaro6dead952003-09-25 14:50:04 +000018893# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018894# loading this file, other *unset* `ac_cv_foo' will be assigned the
18895# following values.
18896
18897_ACEOF
18898
Guido van Rossumf78abae1997-01-21 22:02:36 +000018899# The following way of writing the cache mishandles newlines in values,
18900# but we know of no workaround that is simple, portable, and efficient.
18901# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018902# Ultrix sh set writes to stderr and can't be redirected directly,
18903# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018904{
18905 (set) 2>&1 |
18906 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18907 *ac_space=\ *)
18908 # `set' does not quote correctly, so add quotes (double-quote
18909 # substitution turns \\\\ into \\, and sed turns \\ into \).
18910 sed -n \
18911 "s/'/'\\\\''/g;
18912 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18913 ;;
18914 *)
18915 # `set' quotes correctly as required by POSIX, so do not add quotes.
18916 sed -n \
18917 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18918 ;;
18919 esac;
18920} |
18921 sed '
18922 t clear
18923 : clear
18924 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18925 t end
18926 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18927 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018928if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018929 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018930 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18931 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018932 else
18933 echo "not updating unwritable cache $cache_file"
18934 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018935fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018936rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018937
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018938test "x$prefix" = xNONE && prefix=$ac_default_prefix
18939# Let make expand exec_prefix.
18940test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018941
Martin v. Löwis11437992002-04-12 09:54:03 +000018942# VPATH may cause trouble with some makes, so we remove $(srcdir),
18943# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18944# trailing colons and then remove the whole line if VPATH becomes empty
18945# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018946if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018947 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18948s/:*\$(srcdir):*/:/;
18949s/:*\${srcdir}:*/:/;
18950s/:*@srcdir@:*/:/;
18951s/^\([^=]*=[ ]*\):*/\1/;
18952s/:*$//;
18953s/^[^=]*=[ ]*$//;
18954}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018955fi
18956
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018957DEFS=-DHAVE_CONFIG_H
18958
Skip Montanaro6dead952003-09-25 14:50:04 +000018959ac_libobjs=
18960ac_ltlibobjs=
18961for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18962 # 1. Remove the extension, and $U if already installed.
18963 ac_i=`echo "$ac_i" |
18964 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18965 # 2. Add them.
18966 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18967 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18968done
18969LIBOBJS=$ac_libobjs
18970
18971LTLIBOBJS=$ac_ltlibobjs
18972
18973
Martin v. Löwis11437992002-04-12 09:54:03 +000018974
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018975: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018976ac_clean_files_save=$ac_clean_files
18977ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18978{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18979echo "$as_me: creating $CONFIG_STATUS" >&6;}
18980cat >$CONFIG_STATUS <<_ACEOF
18981#! $SHELL
18982# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018983# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018984# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018985# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018986
Martin v. Löwis11437992002-04-12 09:54:03 +000018987debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018988ac_cs_recheck=false
18989ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018990SHELL=\${CONFIG_SHELL-$SHELL}
18991_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018992
Martin v. Löwis11437992002-04-12 09:54:03 +000018993cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018994## --------------------- ##
18995## M4sh Initialization. ##
18996## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018997
Martin v. Löwis11437992002-04-12 09:54:03 +000018998# Be Bourne compatible
18999if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19000 emulate sh
19001 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019002 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19003 # is contrary to our usage. Disable this feature.
19004 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000019005elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19006 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000019007fi
Michael W. Hudson54241132001-12-07 15:38:26 +000019008
Martin v. Löwis11437992002-04-12 09:54:03 +000019009# Support unset when possible.
19010if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19011 as_unset=unset
19012else
19013 as_unset=false
19014fi
Michael W. Hudson54241132001-12-07 15:38:26 +000019015
Skip Montanaro6dead952003-09-25 14:50:04 +000019016
19017# Work around bugs in pre-3.0 UWIN ksh.
19018$as_unset ENV MAIL MAILPATH
19019PS1='$ '
19020PS2='> '
19021PS4='+ '
19022
19023# NLS nuisances.
19024for as_var in \
19025 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
19026 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
19027 LC_TELEPHONE LC_TIME
19028do
19029 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
19030 eval $as_var=C; export $as_var
19031 else
19032 $as_unset $as_var
19033 fi
19034done
19035
19036# Required to use basename.
19037if expr a : '\(a\)' >/dev/null 2>&1; then
19038 as_expr=expr
19039else
19040 as_expr=false
19041fi
19042
19043if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
19044 as_basename=basename
19045else
19046 as_basename=false
19047fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019048
19049
19050# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000019051as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000019052$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19053 X"$0" : 'X\(//\)$' \| \
19054 X"$0" : 'X\(/\)$' \| \
19055 . : '\(.\)' 2>/dev/null ||
19056echo X/"$0" |
19057 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
19058 /^X\/\(\/\/\)$/{ s//\1/; q; }
19059 /^X\/\(\/\).*/{ s//\1/; q; }
19060 s/.*/./; q'`
19061
Skip Montanaro6dead952003-09-25 14:50:04 +000019062
Martin v. Löwis11437992002-04-12 09:54:03 +000019063# PATH needs CR, and LINENO needs CR and PATH.
19064# Avoid depending upon Character Ranges.
19065as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19066as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19067as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19068as_cr_digits='0123456789'
19069as_cr_alnum=$as_cr_Letters$as_cr_digits
19070
19071# The user is always right.
19072if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019073 echo "#! /bin/sh" >conf$$.sh
19074 echo "exit 0" >>conf$$.sh
19075 chmod +x conf$$.sh
19076 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019077 PATH_SEPARATOR=';'
19078 else
19079 PATH_SEPARATOR=:
19080 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019081 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000019082fi
19083
19084
19085 as_lineno_1=$LINENO
19086 as_lineno_2=$LINENO
19087 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19088 test "x$as_lineno_1" != "x$as_lineno_2" &&
19089 test "x$as_lineno_3" = "x$as_lineno_2" || {
19090 # Find who we are. Look in the path if we contain no path at all
19091 # relative or not.
19092 case $0 in
19093 *[\\/]* ) as_myself=$0 ;;
19094 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19095for as_dir in $PATH
19096do
19097 IFS=$as_save_IFS
19098 test -z "$as_dir" && as_dir=.
19099 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19100done
19101
19102 ;;
19103 esac
19104 # We did not find ourselves, most probably we were run as `sh COMMAND'
19105 # in which case we are not to be found in the path.
19106 if test "x$as_myself" = x; then
19107 as_myself=$0
19108 fi
19109 if test ! -f "$as_myself"; then
19110 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
19111echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
19112 { (exit 1); exit 1; }; }
19113 fi
19114 case $CONFIG_SHELL in
19115 '')
19116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19117for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
19118do
19119 IFS=$as_save_IFS
19120 test -z "$as_dir" && as_dir=.
19121 for as_base in sh bash ksh sh5; do
19122 case $as_dir in
19123 /*)
19124 if ("$as_dir/$as_base" -c '
19125 as_lineno_1=$LINENO
19126 as_lineno_2=$LINENO
19127 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19128 test "x$as_lineno_1" != "x$as_lineno_2" &&
19129 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019130 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
19131 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019132 CONFIG_SHELL=$as_dir/$as_base
19133 export CONFIG_SHELL
19134 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
19135 fi;;
19136 esac
19137 done
19138done
19139;;
Jack Jansendd19cf82001-12-06 22:36:17 +000019140 esac
19141
Martin v. Löwis11437992002-04-12 09:54:03 +000019142 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19143 # uniformly replaced by the line number. The first 'sed' inserts a
19144 # line-number line before each line; the second 'sed' does the real
19145 # work. The second script uses 'N' to pair each line-number line
19146 # with the numbered line, and appends trailing '-' during
19147 # substitution so that $LINENO is not a special case at line end.
19148 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19149 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
19150 sed '=' <$as_myself |
19151 sed '
19152 N
19153 s,$,-,
19154 : loop
19155 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
19156 t loop
19157 s,-$,,
19158 s,^['$as_cr_digits']*\n,,
19159 ' >$as_me.lineno &&
19160 chmod +x $as_me.lineno ||
19161 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19162echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19163 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019164
Martin v. Löwis11437992002-04-12 09:54:03 +000019165 # Don't try to exec as it changes $[0], causing all sort of problems
19166 # (the dirname of $[0] is not the place where we might find the
19167 # original and so on. Autoconf is especially sensible to this).
19168 . ./$as_me.lineno
19169 # Exit status is that of the last command.
19170 exit
19171}
19172
19173
19174case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19175 *c*,-n*) ECHO_N= ECHO_C='
19176' ECHO_T=' ' ;;
19177 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19178 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
19179esac
19180
19181if expr a : '\(a\)' >/dev/null 2>&1; then
19182 as_expr=expr
19183else
19184 as_expr=false
19185fi
19186
19187rm -f conf$$ conf$$.exe conf$$.file
19188echo >conf$$.file
19189if ln -s conf$$.file conf$$ 2>/dev/null; then
19190 # We could just check for DJGPP; but this test a) works b) is more generic
19191 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19192 if test -f conf$$.exe; then
19193 # Don't use ln at all; we don't have any links
19194 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019195 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019196 as_ln_s='ln -s'
19197 fi
19198elif ln conf$$.file conf$$ 2>/dev/null; then
19199 as_ln_s=ln
19200else
19201 as_ln_s='cp -p'
19202fi
19203rm -f conf$$ conf$$.exe conf$$.file
19204
Skip Montanaro6dead952003-09-25 14:50:04 +000019205if mkdir -p . 2>/dev/null; then
19206 as_mkdir_p=:
19207else
19208 as_mkdir_p=false
19209fi
19210
Martin v. Löwis11437992002-04-12 09:54:03 +000019211as_executable_p="test -f"
19212
19213# Sed expression to map a string onto a valid CPP name.
19214as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
19215
19216# Sed expression to map a string onto a valid variable name.
19217as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19218
19219
19220# IFS
19221# We need space, tab and new line, in precisely that order.
19222as_nl='
19223'
19224IFS=" $as_nl"
19225
19226# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000019227$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000019228
19229exec 6>&1
19230
19231# Open the log real soon, to keep \$[0] and so on meaningful, and to
19232# report actual input values of CONFIG_FILES etc. instead of their
19233# values after options handling. Logging --version etc. is OK.
19234exec 5>>config.log
19235{
19236 echo
19237 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19238## Running $as_me. ##
19239_ASBOX
19240} >&5
19241cat >&5 <<_CSEOF
19242
Fred Drake9bd44622003-07-30 17:39:48 +000019243This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000019244generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000019245
19246 CONFIG_FILES = $CONFIG_FILES
19247 CONFIG_HEADERS = $CONFIG_HEADERS
19248 CONFIG_LINKS = $CONFIG_LINKS
19249 CONFIG_COMMANDS = $CONFIG_COMMANDS
19250 $ $0 $@
19251
19252_CSEOF
19253echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19254echo >&5
19255_ACEOF
19256
19257# Files that config.status was made for.
19258if test -n "$ac_config_files"; then
19259 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19260fi
19261
19262if test -n "$ac_config_headers"; then
19263 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19264fi
19265
19266if test -n "$ac_config_links"; then
19267 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19268fi
19269
19270if test -n "$ac_config_commands"; then
19271 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19272fi
19273
19274cat >>$CONFIG_STATUS <<\_ACEOF
19275
19276ac_cs_usage="\
19277\`$as_me' instantiates files from templates according to the
19278current configuration.
19279
19280Usage: $0 [OPTIONS] [FILE]...
19281
19282 -h, --help print this help, then exit
19283 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000019284 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000019285 -d, --debug don't remove temporary files
19286 --recheck update $as_me by reconfiguring in the same conditions
19287 --file=FILE[:TEMPLATE]
19288 instantiate the configuration file FILE
19289 --header=FILE[:TEMPLATE]
19290 instantiate the configuration header FILE
19291
19292Configuration files:
19293$config_files
19294
19295Configuration headers:
19296$config_headers
19297
19298Report bugs to <bug-autoconf@gnu.org>."
19299_ACEOF
19300
19301cat >>$CONFIG_STATUS <<_ACEOF
19302ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000019303python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000019304configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000019305 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19306
19307Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19308Free Software Foundation, Inc.
19309This config.status script is free software; the Free Software Foundation
19310gives unlimited permission to copy, distribute and modify it."
19311srcdir=$srcdir
19312INSTALL="$INSTALL"
19313_ACEOF
19314
19315cat >>$CONFIG_STATUS <<\_ACEOF
19316# If no file are specified by the user, then we need to provide default
19317# value. By we need to know if files were specified by the user.
19318ac_need_defaults=:
19319while test $# != 0
19320do
19321 case $1 in
19322 --*=*)
19323 ac_option=`expr "x$1" : 'x\([^=]*\)='`
19324 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019325 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000019326 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019327 -*)
19328 ac_option=$1
19329 ac_optarg=$2
19330 ac_shift=shift
19331 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019332 *) # This is not an option, so the user has probably given explicit
19333 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000019334 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000019335 ac_need_defaults=false;;
19336 esac
19337
Skip Montanaro6dead952003-09-25 14:50:04 +000019338 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000019339 # Handling of the options.
19340_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019341cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019342 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19343 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019344 --version | --vers* | -V )
19345 echo "$ac_cs_version"; exit 0 ;;
19346 --he | --h)
19347 # Conflict between --help and --header
19348 { { echo "$as_me:$LINENO: error: ambiguous option: $1
19349Try \`$0 --help' for more information." >&5
19350echo "$as_me: error: ambiguous option: $1
19351Try \`$0 --help' for more information." >&2;}
19352 { (exit 1); exit 1; }; };;
19353 --help | --hel | -h )
19354 echo "$ac_cs_usage"; exit 0 ;;
19355 --debug | --d* | -d )
19356 debug=: ;;
19357 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000019358 $ac_shift
19359 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000019360 ac_need_defaults=false;;
19361 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000019362 $ac_shift
19363 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000019364 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019365 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19366 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19367 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019368
19369 # This is an error.
19370 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19371Try \`$0 --help' for more information." >&5
19372echo "$as_me: error: unrecognized option: $1
19373Try \`$0 --help' for more information." >&2;}
19374 { (exit 1); exit 1; }; } ;;
19375
19376 *) ac_config_targets="$ac_config_targets $1" ;;
19377
19378 esac
19379 shift
19380done
19381
Skip Montanaro6dead952003-09-25 14:50:04 +000019382ac_configure_extra_args=
19383
19384if $ac_cs_silent; then
19385 exec 6>/dev/null
19386 ac_configure_extra_args="$ac_configure_extra_args --silent"
19387fi
19388
19389_ACEOF
19390cat >>$CONFIG_STATUS <<_ACEOF
19391if \$ac_cs_recheck; then
19392 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19393 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19394fi
19395
Martin v. Löwis11437992002-04-12 09:54:03 +000019396_ACEOF
19397
19398
19399
19400
19401
19402cat >>$CONFIG_STATUS <<\_ACEOF
19403for ac_config_target in $ac_config_targets
19404do
19405 case "$ac_config_target" in
19406 # Handling of arguments.
19407 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
19408 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
19409 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
19410 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19411echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19412 { (exit 1); exit 1; }; };;
19413 esac
19414done
19415
19416# If the user did not use the arguments to specify the items to instantiate,
19417# then the envvar interface is used. Set only those that are not.
19418# We use the long form for the default assignment because of an extremely
19419# bizarre bug on SunOS 4.1.3.
19420if $ac_need_defaults; then
19421 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19422 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19423fi
19424
Skip Montanaro6dead952003-09-25 14:50:04 +000019425# Have a temporary directory for convenience. Make it in the build tree
19426# simply because there is no reason to put it here, and in addition,
19427# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000019428# Create a temporary directory, and hook for its removal unless debugging.
19429$debug ||
19430{
19431 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19432 trap '{ (exit 1); exit 1; }' 1 2 13 15
19433}
19434
19435# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000019436
Martin v. Löwis11437992002-04-12 09:54:03 +000019437{
Skip Montanaro6dead952003-09-25 14:50:04 +000019438 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000019439 test -n "$tmp" && test -d "$tmp"
19440} ||
19441{
Skip Montanaro6dead952003-09-25 14:50:04 +000019442 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000019443 (umask 077 && mkdir $tmp)
19444} ||
19445{
Skip Montanaro6dead952003-09-25 14:50:04 +000019446 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000019447 { (exit 1); exit 1; }
19448}
19449
19450_ACEOF
19451
19452cat >>$CONFIG_STATUS <<_ACEOF
19453
19454#
19455# CONFIG_FILES section.
19456#
19457
19458# No need to generate the scripts if there are no CONFIG_FILES.
19459# This happens for instance when ./config.status config.h
19460if test -n "\$CONFIG_FILES"; then
19461 # Protect against being on the right side of a sed subst in config.status.
19462 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19463 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19464s,@SHELL@,$SHELL,;t t
19465s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19466s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19467s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19468s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19469s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19470s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19471s,@exec_prefix@,$exec_prefix,;t t
19472s,@prefix@,$prefix,;t t
19473s,@program_transform_name@,$program_transform_name,;t t
19474s,@bindir@,$bindir,;t t
19475s,@sbindir@,$sbindir,;t t
19476s,@libexecdir@,$libexecdir,;t t
19477s,@datadir@,$datadir,;t t
19478s,@sysconfdir@,$sysconfdir,;t t
19479s,@sharedstatedir@,$sharedstatedir,;t t
19480s,@localstatedir@,$localstatedir,;t t
19481s,@libdir@,$libdir,;t t
19482s,@includedir@,$includedir,;t t
19483s,@oldincludedir@,$oldincludedir,;t t
19484s,@infodir@,$infodir,;t t
19485s,@mandir@,$mandir,;t t
19486s,@build_alias@,$build_alias,;t t
19487s,@host_alias@,$host_alias,;t t
19488s,@target_alias@,$target_alias,;t t
19489s,@DEFS@,$DEFS,;t t
19490s,@ECHO_C@,$ECHO_C,;t t
19491s,@ECHO_N@,$ECHO_N,;t t
19492s,@ECHO_T@,$ECHO_T,;t t
19493s,@LIBS@,$LIBS,;t t
19494s,@VERSION@,$VERSION,;t t
19495s,@SOVERSION@,$SOVERSION,;t t
19496s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
19497s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
19498s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
19499s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
19500s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
19501s,@MACHDEP@,$MACHDEP,;t t
19502s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000019503s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000019504s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019505s,@CXX@,$CXX,;t t
19506s,@MAINOBJ@,$MAINOBJ,;t t
19507s,@EXEEXT@,$EXEEXT,;t t
19508s,@CC@,$CC,;t t
19509s,@CFLAGS@,$CFLAGS,;t t
19510s,@LDFLAGS@,$LDFLAGS,;t t
19511s,@CPPFLAGS@,$CPPFLAGS,;t t
19512s,@ac_ct_CC@,$ac_ct_CC,;t t
19513s,@OBJEXT@,$OBJEXT,;t t
19514s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019515s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019516s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
19517s,@LIBRARY@,$LIBRARY,;t t
19518s,@LDLIBRARY@,$LDLIBRARY,;t t
19519s,@DLLLIBRARY@,$DLLLIBRARY,;t t
19520s,@BLDLIBRARY@,$BLDLIBRARY,;t t
19521s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
19522s,@INSTSONAME@,$INSTSONAME,;t t
19523s,@RUNSHARED@,$RUNSHARED,;t t
19524s,@LINKCC@,$LINKCC,;t t
19525s,@RANLIB@,$RANLIB,;t t
19526s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19527s,@AR@,$AR,;t t
19528s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19529s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19530s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19531s,@LN@,$LN,;t t
19532s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000019533s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019534s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
19535s,@SO@,$SO,;t t
19536s,@LDSHARED@,$LDSHARED,;t t
19537s,@BLDSHARED@,$BLDSHARED,;t t
19538s,@CCSHARED@,$CCSHARED,;t t
19539s,@LINKFORSHARED@,$LINKFORSHARED,;t t
19540s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000019541s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019542s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
19543s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
19544s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
19545s,@LDLAST@,$LDLAST,;t t
19546s,@THREADOBJ@,$THREADOBJ,;t t
19547s,@DLINCLDIR@,$DLINCLDIR,;t t
19548s,@DYNLOADFILE@,$DYNLOADFILE,;t t
19549s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019550s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019551s,@LIBOBJS@,$LIBOBJS,;t t
19552s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
19553s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
19554s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
19555s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
19556s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
19557s,@LIBM@,$LIBM,;t t
19558s,@LIBC@,$LIBC,;t t
19559s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
19560s,@THREADHEADERS@,$THREADHEADERS,;t t
19561s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019562s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019563CEOF
19564
19565_ACEOF
19566
19567 cat >>$CONFIG_STATUS <<\_ACEOF
19568 # Split the substitutions into bite-sized pieces for seds with
19569 # small command number limits, like on Digital OSF/1 and HP-UX.
19570 ac_max_sed_lines=48
19571 ac_sed_frag=1 # Number of current file.
19572 ac_beg=1 # First line for current file.
19573 ac_end=$ac_max_sed_lines # Line after last line for current file.
19574 ac_more_lines=:
19575 ac_sed_cmds=
19576 while $ac_more_lines; do
19577 if test $ac_beg -gt 1; then
19578 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19579 else
19580 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19581 fi
19582 if test ! -s $tmp/subs.frag; then
19583 ac_more_lines=false
19584 else
19585 # The purpose of the label and of the branching condition is to
19586 # speed up the sed processing (if there are no `@' at all, there
19587 # is no need to browse any of the substitutions).
19588 # These are the two extra sed commands mentioned above.
19589 (echo ':t
19590 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19591 if test -z "$ac_sed_cmds"; then
19592 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19593 else
19594 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19595 fi
19596 ac_sed_frag=`expr $ac_sed_frag + 1`
19597 ac_beg=$ac_end
19598 ac_end=`expr $ac_end + $ac_max_sed_lines`
19599 fi
19600 done
19601 if test -z "$ac_sed_cmds"; then
19602 ac_sed_cmds=cat
19603 fi
19604fi # test -n "$CONFIG_FILES"
19605
19606_ACEOF
19607cat >>$CONFIG_STATUS <<\_ACEOF
19608for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19609 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19610 case $ac_file in
19611 - | *:- | *:-:* ) # input from stdin
19612 cat >$tmp/stdin
19613 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19614 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19615 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19616 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19617 * ) ac_file_in=$ac_file.in ;;
19618 esac
19619
19620 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19621 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19622$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19623 X"$ac_file" : 'X\(//\)[^/]' \| \
19624 X"$ac_file" : 'X\(//\)$' \| \
19625 X"$ac_file" : 'X\(/\)' \| \
19626 . : '\(.\)' 2>/dev/null ||
19627echo X"$ac_file" |
19628 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19629 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19630 /^X\(\/\/\)$/{ s//\1/; q; }
19631 /^X\(\/\).*/{ s//\1/; q; }
19632 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019633 { if $as_mkdir_p; then
19634 mkdir -p "$ac_dir"
19635 else
19636 as_dir="$ac_dir"
19637 as_dirs=
19638 while test ! -d "$as_dir"; do
19639 as_dirs="$as_dir $as_dirs"
19640 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19641$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19642 X"$as_dir" : 'X\(//\)[^/]' \| \
19643 X"$as_dir" : 'X\(//\)$' \| \
19644 X"$as_dir" : 'X\(/\)' \| \
19645 . : '\(.\)' 2>/dev/null ||
19646echo X"$as_dir" |
19647 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19648 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19649 /^X\(\/\/\)$/{ s//\1/; q; }
19650 /^X\(\/\).*/{ s//\1/; q; }
19651 s/.*/./; q'`
19652 done
19653 test ! -n "$as_dirs" || mkdir $as_dirs
19654 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19655echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19656 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019657
19658 ac_builddir=.
19659
19660if test "$ac_dir" != .; then
19661 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19662 # A "../" for each directory in $ac_dir_suffix.
19663 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19664else
19665 ac_dir_suffix= ac_top_builddir=
19666fi
19667
19668case $srcdir in
19669 .) # No --srcdir option. We are building in place.
19670 ac_srcdir=.
19671 if test -z "$ac_top_builddir"; then
19672 ac_top_srcdir=.
19673 else
19674 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19675 fi ;;
19676 [\\/]* | ?:[\\/]* ) # Absolute path.
19677 ac_srcdir=$srcdir$ac_dir_suffix;
19678 ac_top_srcdir=$srcdir ;;
19679 *) # Relative path.
19680 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19681 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19682esac
19683# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19684# absolute.
19685ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000019686ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000019687ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19688ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19689
19690
19691 case $INSTALL in
19692 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19693 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19694 esac
19695
19696 if test x"$ac_file" != x-; then
19697 { echo "$as_me:$LINENO: creating $ac_file" >&5
19698echo "$as_me: creating $ac_file" >&6;}
19699 rm -f "$ac_file"
19700 fi
19701 # Let's still pretend it is `configure' which instantiates (i.e., don't
19702 # use $as_me), people would be surprised to read:
19703 # /* config.h. Generated by config.status. */
19704 if test x"$ac_file" = x-; then
19705 configure_input=
19706 else
19707 configure_input="$ac_file. "
19708 fi
19709 configure_input=$configure_input"Generated from `echo $ac_file_in |
19710 sed 's,.*/,,'` by configure."
19711
19712 # First look for the input files in the build tree, otherwise in the
19713 # src tree.
19714 ac_file_inputs=`IFS=:
19715 for f in $ac_file_in; do
19716 case $f in
19717 -) echo $tmp/stdin ;;
19718 [\\/$]*)
19719 # Absolute (can't be DOS-style, as IFS=:)
19720 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19721echo "$as_me: error: cannot find input file: $f" >&2;}
19722 { (exit 1); exit 1; }; }
19723 echo $f;;
19724 *) # Relative
19725 if test -f "$f"; then
19726 # Build tree
19727 echo $f
19728 elif test -f "$srcdir/$f"; then
19729 # Source tree
19730 echo $srcdir/$f
19731 else
19732 # /dev/null tree
19733 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19734echo "$as_me: error: cannot find input file: $f" >&2;}
19735 { (exit 1); exit 1; }; }
19736 fi;;
19737 esac
19738 done` || { (exit 1); exit 1; }
19739_ACEOF
19740cat >>$CONFIG_STATUS <<_ACEOF
19741 sed "$ac_vpsub
19742$extrasub
19743_ACEOF
19744cat >>$CONFIG_STATUS <<\_ACEOF
19745:t
19746/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19747s,@configure_input@,$configure_input,;t t
19748s,@srcdir@,$ac_srcdir,;t t
19749s,@abs_srcdir@,$ac_abs_srcdir,;t t
19750s,@top_srcdir@,$ac_top_srcdir,;t t
19751s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19752s,@builddir@,$ac_builddir,;t t
19753s,@abs_builddir@,$ac_abs_builddir,;t t
19754s,@top_builddir@,$ac_top_builddir,;t t
19755s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19756s,@INSTALL@,$ac_INSTALL,;t t
19757" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19758 rm -f $tmp/stdin
19759 if test x"$ac_file" != x-; then
19760 mv $tmp/out $ac_file
19761 else
19762 cat $tmp/out
19763 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019764 fi
19765
Martin v. Löwis11437992002-04-12 09:54:03 +000019766done
19767_ACEOF
19768cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019769
Martin v. Löwis11437992002-04-12 09:54:03 +000019770#
19771# CONFIG_HEADER section.
19772#
Guido van Rossum627b2d71993-12-24 10:39:16 +000019773
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019774# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19775# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000019776#
19777# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000019778ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19779ac_dB='[ ].*$,\1#\2'
19780ac_dC=' '
19781ac_dD=',;t'
19782# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19783ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19784ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019785ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000019786ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019787
Martin v. Löwis11437992002-04-12 09:54:03 +000019788for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000019789 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000019790 case $ac_file in
19791 - | *:- | *:-:* ) # input from stdin
19792 cat >$tmp/stdin
19793 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19794 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19795 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19796 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19797 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019798 esac
19799
Martin v. Löwis11437992002-04-12 09:54:03 +000019800 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19801echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019802
Martin v. Löwis11437992002-04-12 09:54:03 +000019803 # First look for the input files in the build tree, otherwise in the
19804 # src tree.
19805 ac_file_inputs=`IFS=:
19806 for f in $ac_file_in; do
19807 case $f in
19808 -) echo $tmp/stdin ;;
19809 [\\/$]*)
19810 # Absolute (can't be DOS-style, as IFS=:)
19811 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19812echo "$as_me: error: cannot find input file: $f" >&2;}
19813 { (exit 1); exit 1; }; }
19814 echo $f;;
19815 *) # Relative
19816 if test -f "$f"; then
19817 # Build tree
19818 echo $f
19819 elif test -f "$srcdir/$f"; then
19820 # Source tree
19821 echo $srcdir/$f
19822 else
19823 # /dev/null tree
19824 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19825echo "$as_me: error: cannot find input file: $f" >&2;}
19826 { (exit 1); exit 1; }; }
19827 fi;;
19828 esac
19829 done` || { (exit 1); exit 1; }
19830 # Remove the trailing spaces.
19831 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019832
Martin v. Löwis11437992002-04-12 09:54:03 +000019833_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019834
Martin v. Löwis11437992002-04-12 09:54:03 +000019835# Transform confdefs.h into two sed scripts, `conftest.defines' and
19836# `conftest.undefs', that substitutes the proper values into
19837# config.h.in to produce config.h. The first handles `#define'
19838# templates, and the second `#undef' templates.
19839# And first: Protect against being on the right side of a sed subst in
19840# config.status. Protect against being in an unquoted here document
19841# in config.status.
19842rm -f conftest.defines conftest.undefs
19843# Using a here document instead of a string reduces the quoting nightmare.
19844# Putting comments in sed scripts is not portable.
19845#
19846# `end' is used to avoid that the second main sed command (meant for
19847# 0-ary CPP macros) applies to n-ary macro definitions.
19848# See the Autoconf documentation for `clear'.
19849cat >confdef2sed.sed <<\_ACEOF
19850s/[\\&,]/\\&/g
19851s,[\\$`],\\&,g
19852t clear
19853: clear
19854s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19855t end
19856s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19857: end
19858_ACEOF
19859# If some macros were called several times there might be several times
19860# the same #defines, which is useless. Nevertheless, we may not want to
19861# sort them, since we want the *last* AC-DEFINE to be honored.
19862uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19863sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19864rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019865
19866# This sed command replaces #undef with comments. This is necessary, for
19867# example, in the case of _POSIX_SOURCE, which is predefined and required
19868# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019869cat >>conftest.undefs <<\_ACEOF
19870s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19871_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019872
Martin v. Löwis11437992002-04-12 09:54:03 +000019873# Break up conftest.defines because some shells have a limit on the size
19874# of here documents, and old seds have small limits too (100 cmds).
19875echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019876echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019877echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19878echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019879rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019880while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019881do
Martin v. Löwis11437992002-04-12 09:54:03 +000019882 # Write a limited-size here document to $tmp/defines.sed.
19883 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19884 # Speed up: don't consider the non `#define' lines.
19885 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19886 # Work around the forget-to-reset-the-flag bug.
19887 echo 't clr' >>$CONFIG_STATUS
19888 echo ': clr' >>$CONFIG_STATUS
19889 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019890 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019891 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19892 rm -f $tmp/in
19893 mv $tmp/out $tmp/in
19894' >>$CONFIG_STATUS
19895 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19896 rm -f conftest.defines
19897 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019898done
Martin v. Löwis11437992002-04-12 09:54:03 +000019899rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019900echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019901echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019902
Martin v. Löwis11437992002-04-12 09:54:03 +000019903# Break up conftest.undefs because some shells have a limit on the size
19904# of here documents, and old seds have small limits too (100 cmds).
19905echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19906rm -f conftest.tail
19907while grep . conftest.undefs >/dev/null
19908do
19909 # Write a limited-size here document to $tmp/undefs.sed.
19910 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19911 # Speed up: don't consider the non `#undef'
19912 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19913 # Work around the forget-to-reset-the-flag bug.
19914 echo 't clr' >>$CONFIG_STATUS
19915 echo ': clr' >>$CONFIG_STATUS
19916 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19917 echo 'CEOF
19918 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19919 rm -f $tmp/in
19920 mv $tmp/out $tmp/in
19921' >>$CONFIG_STATUS
19922 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19923 rm -f conftest.undefs
19924 mv conftest.tail conftest.undefs
19925done
19926rm -f conftest.undefs
19927
19928cat >>$CONFIG_STATUS <<\_ACEOF
19929 # Let's still pretend it is `configure' which instantiates (i.e., don't
19930 # use $as_me), people would be surprised to read:
19931 # /* config.h. Generated by config.status. */
19932 if test x"$ac_file" = x-; then
19933 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019934 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019935 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019937 cat $tmp/in >>$tmp/config.h
19938 rm -f $tmp/in
19939 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019940 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019941 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19942echo "$as_me: $ac_file is unchanged" >&6;}
19943 else
19944 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19945$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19946 X"$ac_file" : 'X\(//\)[^/]' \| \
19947 X"$ac_file" : 'X\(//\)$' \| \
19948 X"$ac_file" : 'X\(/\)' \| \
19949 . : '\(.\)' 2>/dev/null ||
19950echo X"$ac_file" |
19951 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19952 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19953 /^X\(\/\/\)$/{ s//\1/; q; }
19954 /^X\(\/\).*/{ s//\1/; q; }
19955 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019956 { if $as_mkdir_p; then
19957 mkdir -p "$ac_dir"
19958 else
19959 as_dir="$ac_dir"
19960 as_dirs=
19961 while test ! -d "$as_dir"; do
19962 as_dirs="$as_dir $as_dirs"
19963 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19964$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19965 X"$as_dir" : 'X\(//\)[^/]' \| \
19966 X"$as_dir" : 'X\(//\)$' \| \
19967 X"$as_dir" : 'X\(/\)' \| \
19968 . : '\(.\)' 2>/dev/null ||
19969echo X"$as_dir" |
19970 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19971 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19972 /^X\(\/\/\)$/{ s//\1/; q; }
19973 /^X\(\/\).*/{ s//\1/; q; }
19974 s/.*/./; q'`
19975 done
19976 test ! -n "$as_dirs" || mkdir $as_dirs
19977 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19978echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19979 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019980
Martin v. Löwis11437992002-04-12 09:54:03 +000019981 rm -f $ac_file
19982 mv $tmp/config.h $ac_file
19983 fi
19984 else
19985 cat $tmp/config.h
19986 rm -f $tmp/config.h
19987 fi
19988done
19989_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019990
Martin v. Löwis11437992002-04-12 09:54:03 +000019991cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019992
Martin v. Löwis11437992002-04-12 09:54:03 +000019993{ (exit 0); exit 0; }
19994_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019995chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019996ac_clean_files=$ac_clean_files_save
19997
19998
19999# configure is writing to config.log, and then calls config.status.
20000# config.status does its own redirection, appending to config.log.
20001# Unfortunately, on DOS this fails, as config.log is still kept open
20002# by configure, so config.status won't be able to write to it; its
20003# output is simply discarded. So we exec the FD to /dev/null,
20004# effectively closing config.log, so it can be properly (re)opened and
20005# appended to by config.status. When coming back to configure, we
20006# need to make the FD available again.
20007if test "$no_create" != yes; then
20008 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000020009 ac_config_status_args=
20010 test "$silent" = yes &&
20011 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000020012 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000020013 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000020014 exec 5>>config.log
20015 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20016 # would make configure fail if this is the last instruction.
20017 $ac_cs_success || { (exit 1); exit 1; }
20018fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020019
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000020020
20021echo "creating Setup"
20022if test ! -f Modules/Setup
20023then
20024 cp $srcdir/Modules/Setup.dist Modules/Setup
20025fi
20026
20027echo "creating Setup.local"
20028if test ! -f Modules/Setup.local
20029then
20030 echo "# Edit this file for local setup changes" >Modules/Setup.local
20031fi
20032
20033echo "creating Makefile"
20034$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
20035 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000020036 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000020037mv config.c Modules