blob: 1475a04bdb3f1ccca0ba3ce06c11672a6a2346b4 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis2389c412003-10-31 15:42:07 +00002# From configure.in Revision: 1.438 .
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öwis35195ad2002-11-11 13:26:51 +00001461esac
1462
1463if test $define_xopen_source = yes
1464then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001465
1466cat >>confdefs.h <<\_ACEOF
1467#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001468_ACEOF
1469
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001470
1471 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1472 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1473 # several APIs are not declared. Since this is also needed in some
1474 # cases for HP-UX, we define it globally.
1475
1476
1477cat >>confdefs.h <<\_ACEOF
1478#define _XOPEN_SOURCE_EXTENDED 1
1479_ACEOF
1480
1481
1482cat >>confdefs.h <<\_ACEOF
1483#define _POSIX_C_SOURCE 200112L
1484_ACEOF
1485
1486
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001487fi
1488
Guido van Rossum91922671997-10-09 20:24:13 +00001489#
1490# SGI compilers allow the specification of the both the ABI and the
1491# ISA on the command line. Depending on the values of these switches,
1492# different and often incompatable code will be generated.
1493#
1494# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1495# thus supply support for various ABI/ISA combinations. The MACHDEP
1496# variable is also adjusted.
1497#
1498
1499if test ! -z "$SGI_ABI"
1500then
1501 CC="cc $SGI_ABI"
1502 LDFLAGS="$SGI_ABI $LDFLAGS"
1503 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1504fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001505echo "$as_me:$LINENO: result: $MACHDEP" >&5
1506echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001507
Jack Jansen83f898c2002-12-30 22:23:40 +00001508# And add extra plat-mac for darwin
1509
Jack Jansen7b59b422003-03-17 15:44:10 +00001510
Jack Jansen83f898c2002-12-30 22:23:40 +00001511echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1512echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1513if test -z "$EXTRAPLATDIR"
1514then
1515 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001516 darwin)
1517 EXTRAPLATDIR="\$(PLATMACDIRS)"
1518 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1519 ;;
1520 *)
1521 EXTRAPLATDIR=""
1522 EXTRAMACHDEPPATH=""
1523 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001524 esac
1525fi
1526echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1527echo "${ECHO_T}$EXTRAPLATDIR" >&6
1528
Guido van Rossum627b2d71993-12-24 10:39:16 +00001529# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001530
1531# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1532# for debug/optimization stuff. BASECFLAGS is for flags that are required
1533# just to get things to compile and link. Users are free to override OPT
1534# when running configure or make. The build should not break if they do.
1535# BASECFLAGS should generally not be messed with, however.
1536
1537# XXX shouldn't some/most/all of this code be merged with the stuff later
1538# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001539echo "$as_me:$LINENO: checking for --without-gcc" >&5
1540echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1541
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001542# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001543if test "${with_gcc+set}" = set; then
1544 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001545
Guido van Rossum7f43da71994-08-01 12:15:30 +00001546 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001547 no) CC=cc
1548 without_gcc=yes;;
1549 yes) CC=gcc
1550 without_gcc=no;;
1551 *) CC=$withval
1552 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001553 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001554else
Martin v. Löwis11437992002-04-12 09:54:03 +00001555
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001556 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001557 AIX*) CC=cc_r
1558 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001559 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001560 case $BE_HOST_CPU in
1561 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001562 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001563 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001564 BASECFLAGS="$BASECFLAGS -export pragma"
1565 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001566 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001567 ;;
1568 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001569 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001570 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001571 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001572 ;;
1573 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1575echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1576 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001577 ;;
1578 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001579 AR="\$(srcdir)/Modules/ar_beos"
1580 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001581 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001582 Monterey*)
1583 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001584 without_gcc=;;
1585 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001586 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001587fi;
1588echo "$as_me:$LINENO: result: $without_gcc" >&5
1589echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001590
1591
Guido van Rossum95012191999-12-16 17:50:52 +00001592
Fred Drakea1a84e72001-03-06 05:52:16 +00001593MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001594echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1595echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1596
Guido van Rossum95012191999-12-16 17:50:52 +00001597# Check whether --with-cxx or --without-cxx was given.
1598if test "${with_cxx+set}" = set; then
1599 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
Martin v. Löwis22352952000-12-13 17:37:02 +00001601 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001602 case $withval in
1603 no) CXX=
1604 with_cxx=no;;
1605 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001606 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001607 with_cxx=$withval;;
1608 esac
1609else
Martin v. Löwis11437992002-04-12 09:54:03 +00001610
Guido van Rossum95012191999-12-16 17:50:52 +00001611 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001612 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001613
Martin v. Löwis11437992002-04-12 09:54:03 +00001614fi;
1615echo "$as_me:$LINENO: result: $with_cxx" >&5
1616echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001617
1618if test "$with_cxx" = "yes"
1619then
Martin v. Löwis11437992002-04-12 09:54:03 +00001620 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1621echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1622 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001623fi
1624
1625
1626
1627
Martin v. Löwis11437992002-04-12 09:54:03 +00001628if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001629then
1630 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1631do
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 # 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 +00001633set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001634echo "$as_me:$LINENO: checking for $ac_word" >&5
1635echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1636if test "${ac_cv_prog_CXX+set}" = set; then
1637 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001638else
1639 if test -n "$CXX"; then
1640 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1641else
Martin v. Löwis11437992002-04-12 09:54:03 +00001642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1643for as_dir in $PATH
1644do
1645 IFS=$as_save_IFS
1646 test -z "$as_dir" && as_dir=.
1647 for ac_exec_ext in '' $ac_executable_extensions; do
1648 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1649 ac_cv_prog_CXX="$ac_prog"
1650 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1651 break 2
1652 fi
1653done
1654done
1655
Martin v. Löwis22352952000-12-13 17:37:02 +00001656fi
1657fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001658CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001659if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001660 echo "$as_me:$LINENO: result: $CXX" >&5
1661echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001662else
Martin v. Löwis11437992002-04-12 09:54:03 +00001663 echo "$as_me:$LINENO: result: no" >&5
1664echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001665fi
1666
Martin v. Löwis11437992002-04-12 09:54:03 +00001667 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001668done
1669test -n "$CXX" || CXX="notfound"
1670
1671 if test "$CXX" = "notfound"
1672 then
1673 CXX=
1674 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001675 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001676ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001677ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1678ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1679ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1680 cat >conftest.$ac_ext <<_ACEOF
1681#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001682/* confdefs.h. */
1683_ACEOF
1684cat confdefs.h >>conftest.$ac_ext
1685cat >>conftest.$ac_ext <<_ACEOF
1686/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001687
Martin v. Löwis11437992002-04-12 09:54:03 +00001688int
1689main ()
1690{
Michael W. Hudson54241132001-12-07 15:38:26 +00001691
Martin v. Löwis11437992002-04-12 09:54:03 +00001692 ;
1693 return 0;
1694}
1695_ACEOF
1696ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001697ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001698# Try to create an executable without -o first, disregard a.out.
1699# It will help us diagnose broken compilers, and finding out an intuition
1700# of exeext.
1701echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1702echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1703ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1704if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1705 (eval $ac_link_default) 2>&5
1706 ac_status=$?
1707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1708 (exit $ac_status); }; then
1709 # Find the output, starting from the most likely. This scheme is
1710# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1711# resort.
1712
1713# Be careful to initialize this variable, since it used to be cached.
1714# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1715ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001716# b.out is created by i960 compilers.
1717for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1718do
1719 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001721 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1722 ;;
1723 conftest.$ac_ext )
1724 # This is the source file.
1725 ;;
1726 [ab].out )
1727 # We found the default executable, but exeext='' is most
1728 # certainly right.
1729 break;;
1730 *.* )
1731 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1732 # FIXME: I believe we export ac_cv_exeext for Libtool,
1733 # but it would be cool to find out if it's true. Does anybody
1734 # maintain Libtool? --akim.
1735 export ac_cv_exeext
1736 break;;
1737 * )
1738 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 esac
1740done
1741else
1742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001743sed 's/^/| /' conftest.$ac_ext >&5
1744
1745{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1746See \`config.log' for more details." >&5
1747echo "$as_me: error: C++ compiler cannot create executables
1748See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001750fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001751
1752ac_exeext=$ac_cv_exeext
1753echo "$as_me:$LINENO: result: $ac_file" >&5
1754echo "${ECHO_T}$ac_file" >&6
1755
1756# Check the compiler produces executables we can run. If not, either
1757# the compiler is broken, or we cross compile.
1758echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1759echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1760# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1761# If not cross compiling, check that we can run a simple program.
1762if test "$cross_compiling" != yes; then
1763 if { ac_try='./$ac_file'
1764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1765 (eval $ac_try) 2>&5
1766 ac_status=$?
1767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1768 (exit $ac_status); }; }; then
1769 cross_compiling=no
1770 else
1771 if test "$cross_compiling" = maybe; then
1772 cross_compiling=yes
1773 else
1774 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001775If you meant to cross compile, use \`--host'.
1776See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001777echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001778If you meant to cross compile, use \`--host'.
1779See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001780 { (exit 1); exit 1; }; }
1781 fi
1782 fi
1783fi
1784echo "$as_me:$LINENO: result: yes" >&5
1785echo "${ECHO_T}yes" >&6
1786
Skip Montanaro6dead952003-09-25 14:50:04 +00001787rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001788ac_clean_files=$ac_clean_files_save
1789# Check the compiler produces executables we can run. If not, either
1790# the compiler is broken, or we cross compile.
1791echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1792echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1793echo "$as_me:$LINENO: result: $cross_compiling" >&5
1794echo "${ECHO_T}$cross_compiling" >&6
1795
1796echo "$as_me:$LINENO: checking for suffix of executables" >&5
1797echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1799 (eval $ac_link) 2>&5
1800 ac_status=$?
1801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1802 (exit $ac_status); }; then
1803 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1804# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1805# work properly (i.e., refer to `conftest.exe'), while it won't with
1806# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001807for ac_file in conftest.exe conftest conftest.*; do
1808 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001809 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001810 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001811 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1812 export ac_cv_exeext
1813 break;;
1814 * ) break;;
1815 esac
1816done
1817else
Skip Montanaro6dead952003-09-25 14:50:04 +00001818 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1819See \`config.log' for more details." >&5
1820echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1821See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001822 { (exit 1); exit 1; }; }
1823fi
1824
1825rm -f conftest$ac_cv_exeext
1826echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1827echo "${ECHO_T}$ac_cv_exeext" >&6
1828
1829rm -f conftest.$ac_ext
1830EXEEXT=$ac_cv_exeext
1831ac_exeext=$EXEEXT
1832
1833 ac_ext=c
1834ac_cpp='$CPP $CPPFLAGS'
1835ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1836ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1837ac_compiler_gnu=$ac_cv_c_compiler_gnu
1838
1839
Martin v. Löwis22352952000-12-13 17:37:02 +00001840
1841 fi
1842fi
1843
Guido van Rossum8b131c51995-03-09 14:10:13 +00001844# If the user switches compilers, we can't believe the cache
1845if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1846then
Martin v. Löwis11437992002-04-12 09:54:03 +00001847 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1848(it is also a good idea to do 'make clean' before compiling)" >&5
1849echo "$as_me: error: cached CC is different -- throw away $cache_file
1850(it is also a good idea to do 'make clean' before compiling)" >&2;}
1851 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001852fi
1853
Martin v. Löwis11437992002-04-12 09:54:03 +00001854ac_ext=c
1855ac_cpp='$CPP $CPPFLAGS'
1856ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1857ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1858ac_compiler_gnu=$ac_cv_c_compiler_gnu
1859if test -n "$ac_tool_prefix"; then
1860 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1861set dummy ${ac_tool_prefix}gcc; ac_word=$2
1862echo "$as_me:$LINENO: checking for $ac_word" >&5
1863echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1864if test "${ac_cv_prog_CC+set}" = set; then
1865 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001866else
1867 if test -n "$CC"; then
1868 ac_cv_prog_CC="$CC" # Let the user override the test.
1869else
Martin v. Löwis11437992002-04-12 09:54:03 +00001870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1871for as_dir in $PATH
1872do
1873 IFS=$as_save_IFS
1874 test -z "$as_dir" && as_dir=.
1875 for ac_exec_ext in '' $ac_executable_extensions; do
1876 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1877 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1878 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1879 break 2
1880 fi
1881done
1882done
1883
Jack Jansendd19cf82001-12-06 22:36:17 +00001884fi
1885fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001886CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001887if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001888 echo "$as_me:$LINENO: result: $CC" >&5
1889echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001890else
Martin v. Löwis11437992002-04-12 09:54:03 +00001891 echo "$as_me:$LINENO: result: no" >&5
1892echo "${ECHO_T}no" >&6
1893fi
1894
1895fi
1896if test -z "$ac_cv_prog_CC"; then
1897 ac_ct_CC=$CC
1898 # Extract the first word of "gcc", so it can be a program name with args.
1899set dummy gcc; ac_word=$2
1900echo "$as_me:$LINENO: checking for $ac_word" >&5
1901echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1902if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1903 echo $ECHO_N "(cached) $ECHO_C" >&6
1904else
1905 if test -n "$ac_ct_CC"; then
1906 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1907else
1908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1909for as_dir in $PATH
1910do
1911 IFS=$as_save_IFS
1912 test -z "$as_dir" && as_dir=.
1913 for ac_exec_ext in '' $ac_executable_extensions; do
1914 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1915 ac_cv_prog_ac_ct_CC="gcc"
1916 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1917 break 2
1918 fi
1919done
1920done
1921
1922fi
1923fi
1924ac_ct_CC=$ac_cv_prog_ac_ct_CC
1925if test -n "$ac_ct_CC"; then
1926 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1927echo "${ECHO_T}$ac_ct_CC" >&6
1928else
1929 echo "$as_me:$LINENO: result: no" >&5
1930echo "${ECHO_T}no" >&6
1931fi
1932
1933 CC=$ac_ct_CC
1934else
1935 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001936fi
1937
Jack Jansendd19cf82001-12-06 22:36:17 +00001938if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001939 if test -n "$ac_tool_prefix"; then
1940 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1941set dummy ${ac_tool_prefix}cc; ac_word=$2
1942echo "$as_me:$LINENO: checking for $ac_word" >&5
1943echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1944if test "${ac_cv_prog_CC+set}" = set; then
1945 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001946else
1947 if test -n "$CC"; then
1948 ac_cv_prog_CC="$CC" # Let the user override the test.
1949else
Martin v. Löwis11437992002-04-12 09:54:03 +00001950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1951for as_dir in $PATH
1952do
1953 IFS=$as_save_IFS
1954 test -z "$as_dir" && as_dir=.
1955 for ac_exec_ext in '' $ac_executable_extensions; do
1956 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1957 ac_cv_prog_CC="${ac_tool_prefix}cc"
1958 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1959 break 2
1960 fi
1961done
1962done
1963
1964fi
1965fi
1966CC=$ac_cv_prog_CC
1967if test -n "$CC"; then
1968 echo "$as_me:$LINENO: result: $CC" >&5
1969echo "${ECHO_T}$CC" >&6
1970else
1971 echo "$as_me:$LINENO: result: no" >&5
1972echo "${ECHO_T}no" >&6
1973fi
1974
1975fi
1976if test -z "$ac_cv_prog_CC"; then
1977 ac_ct_CC=$CC
1978 # Extract the first word of "cc", so it can be a program name with args.
1979set dummy cc; ac_word=$2
1980echo "$as_me:$LINENO: checking for $ac_word" >&5
1981echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1982if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1983 echo $ECHO_N "(cached) $ECHO_C" >&6
1984else
1985 if test -n "$ac_ct_CC"; then
1986 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1987else
1988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1989for as_dir in $PATH
1990do
1991 IFS=$as_save_IFS
1992 test -z "$as_dir" && as_dir=.
1993 for ac_exec_ext in '' $ac_executable_extensions; do
1994 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1995 ac_cv_prog_ac_ct_CC="cc"
1996 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1997 break 2
1998 fi
1999done
2000done
2001
2002fi
2003fi
2004ac_ct_CC=$ac_cv_prog_ac_ct_CC
2005if test -n "$ac_ct_CC"; then
2006 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2007echo "${ECHO_T}$ac_ct_CC" >&6
2008else
2009 echo "$as_me:$LINENO: result: no" >&5
2010echo "${ECHO_T}no" >&6
2011fi
2012
2013 CC=$ac_ct_CC
2014else
2015 CC="$ac_cv_prog_CC"
2016fi
2017
2018fi
2019if test -z "$CC"; then
2020 # Extract the first word of "cc", so it can be a program name with args.
2021set dummy cc; ac_word=$2
2022echo "$as_me:$LINENO: checking for $ac_word" >&5
2023echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2024if test "${ac_cv_prog_CC+set}" = set; then
2025 echo $ECHO_N "(cached) $ECHO_C" >&6
2026else
2027 if test -n "$CC"; then
2028 ac_cv_prog_CC="$CC" # Let the user override the test.
2029else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002030 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2032for as_dir in $PATH
2033do
2034 IFS=$as_save_IFS
2035 test -z "$as_dir" && as_dir=.
2036 for ac_exec_ext in '' $ac_executable_extensions; do
2037 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2038 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2039 ac_prog_rejected=yes
2040 continue
2041 fi
2042 ac_cv_prog_CC="cc"
2043 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2044 break 2
2045 fi
2046done
2047done
2048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002049if test $ac_prog_rejected = yes; then
2050 # We found a bogon in the path, so make sure we never use it.
2051 set dummy $ac_cv_prog_CC
2052 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002053 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002054 # We chose a different compiler from the bogus one.
2055 # However, it has the same basename, so the bogon will be chosen
2056 # first if we set CC to just the basename; use the full file name.
2057 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002058 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002059 fi
2060fi
2061fi
2062fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002063CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002064if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002065 echo "$as_me:$LINENO: result: $CC" >&5
2066echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002067else
Martin v. Löwis11437992002-04-12 09:54:03 +00002068 echo "$as_me:$LINENO: result: no" >&5
2069echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002070fi
2071
Martin v. Löwis11437992002-04-12 09:54:03 +00002072fi
2073if test -z "$CC"; then
2074 if test -n "$ac_tool_prefix"; then
2075 for ac_prog in cl
2076 do
2077 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2078set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2079echo "$as_me:$LINENO: checking for $ac_word" >&5
2080echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2081if test "${ac_cv_prog_CC+set}" = set; then
2082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002083else
2084 if test -n "$CC"; then
2085 ac_cv_prog_CC="$CC" # Let the user override the test.
2086else
Martin v. Löwis11437992002-04-12 09:54:03 +00002087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2088for as_dir in $PATH
2089do
2090 IFS=$as_save_IFS
2091 test -z "$as_dir" && as_dir=.
2092 for ac_exec_ext in '' $ac_executable_extensions; do
2093 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2094 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2095 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2096 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002097 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002098done
2099done
2100
2101fi
2102fi
2103CC=$ac_cv_prog_CC
2104if test -n "$CC"; then
2105 echo "$as_me:$LINENO: result: $CC" >&5
2106echo "${ECHO_T}$CC" >&6
2107else
2108 echo "$as_me:$LINENO: result: no" >&5
2109echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002110fi
2111
Martin v. Löwis11437992002-04-12 09:54:03 +00002112 test -n "$CC" && break
2113 done
2114fi
2115if test -z "$CC"; then
2116 ac_ct_CC=$CC
2117 for ac_prog in cl
2118do
2119 # Extract the first word of "$ac_prog", so it can be a program name with args.
2120set dummy $ac_prog; ac_word=$2
2121echo "$as_me:$LINENO: checking for $ac_word" >&5
2122echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2123if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2124 echo $ECHO_N "(cached) $ECHO_C" >&6
2125else
2126 if test -n "$ac_ct_CC"; then
2127 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2128else
2129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2130for as_dir in $PATH
2131do
2132 IFS=$as_save_IFS
2133 test -z "$as_dir" && as_dir=.
2134 for ac_exec_ext in '' $ac_executable_extensions; do
2135 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2136 ac_cv_prog_ac_ct_CC="$ac_prog"
2137 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2138 break 2
2139 fi
2140done
2141done
Jack Jansendd19cf82001-12-06 22:36:17 +00002142
Martin v. Löwis11437992002-04-12 09:54:03 +00002143fi
2144fi
2145ac_ct_CC=$ac_cv_prog_ac_ct_CC
2146if test -n "$ac_ct_CC"; then
2147 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2148echo "${ECHO_T}$ac_ct_CC" >&6
2149else
2150 echo "$as_me:$LINENO: result: no" >&5
2151echo "${ECHO_T}no" >&6
2152fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002153
Martin v. Löwis11437992002-04-12 09:54:03 +00002154 test -n "$ac_ct_CC" && break
2155done
Michael W. Hudson54241132001-12-07 15:38:26 +00002156
Martin v. Löwis11437992002-04-12 09:54:03 +00002157 CC=$ac_ct_CC
2158fi
2159
2160fi
2161
2162
Skip Montanaro6dead952003-09-25 14:50:04 +00002163test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2164See \`config.log' for more details." >&5
2165echo "$as_me: error: no acceptable C compiler found in \$PATH
2166See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002167 { (exit 1); exit 1; }; }
2168
2169# Provide some information about the compiler.
2170echo "$as_me:$LINENO:" \
2171 "checking for C compiler version" >&5
2172ac_compiler=`set X $ac_compile; echo $2`
2173{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2174 (eval $ac_compiler --version </dev/null >&5) 2>&5
2175 ac_status=$?
2176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2177 (exit $ac_status); }
2178{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2179 (eval $ac_compiler -v </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
2189cat >conftest.$ac_ext <<_ACEOF
2190#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002191/* confdefs.h. */
2192_ACEOF
2193cat confdefs.h >>conftest.$ac_ext
2194cat >>conftest.$ac_ext <<_ACEOF
2195/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002196
Martin v. Löwis11437992002-04-12 09:54:03 +00002197int
2198main ()
2199{
2200
2201 ;
2202 return 0;
2203}
2204_ACEOF
2205ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002206ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002207# Try to create an executable without -o first, disregard a.out.
2208# It will help us diagnose broken compilers, and finding out an intuition
2209# of exeext.
2210echo "$as_me:$LINENO: checking for C compiler default output" >&5
2211echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2212ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2213if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2214 (eval $ac_link_default) 2>&5
2215 ac_status=$?
2216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2217 (exit $ac_status); }; then
2218 # Find the output, starting from the most likely. This scheme is
2219# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2220# resort.
2221
2222# Be careful to initialize this variable, since it used to be cached.
2223# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2224ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002225# b.out is created by i960 compilers.
2226for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2227do
2228 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002229 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002230 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2231 ;;
2232 conftest.$ac_ext )
2233 # This is the source file.
2234 ;;
2235 [ab].out )
2236 # We found the default executable, but exeext='' is most
2237 # certainly right.
2238 break;;
2239 *.* )
2240 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2241 # FIXME: I believe we export ac_cv_exeext for Libtool,
2242 # but it would be cool to find out if it's true. Does anybody
2243 # maintain Libtool? --akim.
2244 export ac_cv_exeext
2245 break;;
2246 * )
2247 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002248 esac
2249done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002250else
Martin v. Löwis11437992002-04-12 09:54:03 +00002251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002252sed 's/^/| /' conftest.$ac_ext >&5
2253
2254{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2255See \`config.log' for more details." >&5
2256echo "$as_me: error: C compiler cannot create executables
2257See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002258 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002259fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002260
Martin v. Löwis11437992002-04-12 09:54:03 +00002261ac_exeext=$ac_cv_exeext
2262echo "$as_me:$LINENO: result: $ac_file" >&5
2263echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002264
Martin v. Löwis11437992002-04-12 09:54:03 +00002265# Check the compiler produces executables we can run. If not, either
2266# the compiler is broken, or we cross compile.
2267echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2268echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2269# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2270# If not cross compiling, check that we can run a simple program.
2271if test "$cross_compiling" != yes; then
2272 if { ac_try='./$ac_file'
2273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2274 (eval $ac_try) 2>&5
2275 ac_status=$?
2276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277 (exit $ac_status); }; }; then
2278 cross_compiling=no
2279 else
2280 if test "$cross_compiling" = maybe; then
2281 cross_compiling=yes
2282 else
2283 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002284If you meant to cross compile, use \`--host'.
2285See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002286echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002287If you meant to cross compile, use \`--host'.
2288See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002289 { (exit 1); exit 1; }; }
2290 fi
2291 fi
2292fi
2293echo "$as_me:$LINENO: result: yes" >&5
2294echo "${ECHO_T}yes" >&6
2295
Skip Montanaro6dead952003-09-25 14:50:04 +00002296rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002297ac_clean_files=$ac_clean_files_save
2298# Check the compiler produces executables we can run. If not, either
2299# the compiler is broken, or we cross compile.
2300echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2301echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2302echo "$as_me:$LINENO: result: $cross_compiling" >&5
2303echo "${ECHO_T}$cross_compiling" >&6
2304
2305echo "$as_me:$LINENO: checking for suffix of executables" >&5
2306echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2307if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2308 (eval $ac_link) 2>&5
2309 ac_status=$?
2310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2311 (exit $ac_status); }; then
2312 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2313# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2314# work properly (i.e., refer to `conftest.exe'), while it won't with
2315# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002316for ac_file in conftest.exe conftest conftest.*; do
2317 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002318 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002319 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002320 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2321 export ac_cv_exeext
2322 break;;
2323 * ) break;;
2324 esac
2325done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002326else
Skip Montanaro6dead952003-09-25 14:50:04 +00002327 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2328See \`config.log' for more details." >&5
2329echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2330See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002331 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002332fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002333
Martin v. Löwis11437992002-04-12 09:54:03 +00002334rm -f conftest$ac_cv_exeext
2335echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2336echo "${ECHO_T}$ac_cv_exeext" >&6
2337
2338rm -f conftest.$ac_ext
2339EXEEXT=$ac_cv_exeext
2340ac_exeext=$EXEEXT
2341echo "$as_me:$LINENO: checking for suffix of object files" >&5
2342echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2343if test "${ac_cv_objext+set}" = set; then
2344 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002345else
Martin v. Löwis11437992002-04-12 09:54:03 +00002346 cat >conftest.$ac_ext <<_ACEOF
2347#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002348/* confdefs.h. */
2349_ACEOF
2350cat confdefs.h >>conftest.$ac_ext
2351cat >>conftest.$ac_ext <<_ACEOF
2352/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002353
Martin v. Löwis11437992002-04-12 09:54:03 +00002354int
2355main ()
2356{
2357
2358 ;
2359 return 0;
2360}
2361_ACEOF
2362rm -f conftest.o conftest.obj
2363if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2364 (eval $ac_compile) 2>&5
2365 ac_status=$?
2366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2367 (exit $ac_status); }; then
2368 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2369 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002370 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002371 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2372 break;;
2373 esac
2374done
2375else
2376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002377sed 's/^/| /' conftest.$ac_ext >&5
2378
2379{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2380See \`config.log' for more details." >&5
2381echo "$as_me: error: cannot compute suffix of object files: cannot compile
2382See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002383 { (exit 1); exit 1; }; }
2384fi
2385
2386rm -f conftest.$ac_cv_objext conftest.$ac_ext
2387fi
2388echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2389echo "${ECHO_T}$ac_cv_objext" >&6
2390OBJEXT=$ac_cv_objext
2391ac_objext=$OBJEXT
2392echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2393echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2394if test "${ac_cv_c_compiler_gnu+set}" = set; then
2395 echo $ECHO_N "(cached) $ECHO_C" >&6
2396else
2397 cat >conftest.$ac_ext <<_ACEOF
2398#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002399/* confdefs.h. */
2400_ACEOF
2401cat confdefs.h >>conftest.$ac_ext
2402cat >>conftest.$ac_ext <<_ACEOF
2403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002404
Martin v. Löwis11437992002-04-12 09:54:03 +00002405int
2406main ()
2407{
2408#ifndef __GNUC__
2409 choke me
2410#endif
2411
2412 ;
2413 return 0;
2414}
2415_ACEOF
2416rm -f conftest.$ac_objext
2417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2418 (eval $ac_compile) 2>&5
2419 ac_status=$?
2420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2421 (exit $ac_status); } &&
2422 { ac_try='test -s conftest.$ac_objext'
2423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2424 (eval $ac_try) 2>&5
2425 ac_status=$?
2426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2427 (exit $ac_status); }; }; then
2428 ac_compiler_gnu=yes
2429else
2430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002431sed 's/^/| /' conftest.$ac_ext >&5
2432
Martin v. Löwis11437992002-04-12 09:54:03 +00002433ac_compiler_gnu=no
2434fi
2435rm -f conftest.$ac_objext conftest.$ac_ext
2436ac_cv_c_compiler_gnu=$ac_compiler_gnu
2437
2438fi
2439echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2440echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2441GCC=`test $ac_compiler_gnu = yes && echo yes`
2442ac_test_CFLAGS=${CFLAGS+set}
2443ac_save_CFLAGS=$CFLAGS
2444CFLAGS="-g"
2445echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2446echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2447if test "${ac_cv_prog_cc_g+set}" = set; then
2448 echo $ECHO_N "(cached) $ECHO_C" >&6
2449else
2450 cat >conftest.$ac_ext <<_ACEOF
2451#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002452/* confdefs.h. */
2453_ACEOF
2454cat confdefs.h >>conftest.$ac_ext
2455cat >>conftest.$ac_ext <<_ACEOF
2456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002457
Martin v. Löwis11437992002-04-12 09:54:03 +00002458int
2459main ()
2460{
2461
2462 ;
2463 return 0;
2464}
2465_ACEOF
2466rm -f conftest.$ac_objext
2467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2468 (eval $ac_compile) 2>&5
2469 ac_status=$?
2470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2471 (exit $ac_status); } &&
2472 { ac_try='test -s conftest.$ac_objext'
2473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2474 (eval $ac_try) 2>&5
2475 ac_status=$?
2476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2477 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002478 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002479else
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002481sed 's/^/| /' conftest.$ac_ext >&5
2482
Martin v. Löwis11437992002-04-12 09:54:03 +00002483ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002485rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002486fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002487echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2488echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002489if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002491elif test $ac_cv_prog_cc_g = yes; then
2492 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002493 CFLAGS="-g -O2"
2494 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002495 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002496 fi
2497else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002498 if test "$GCC" = yes; then
2499 CFLAGS="-O2"
2500 else
2501 CFLAGS=
2502 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002503fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002504echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2505echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2506if test "${ac_cv_prog_cc_stdc+set}" = set; then
2507 echo $ECHO_N "(cached) $ECHO_C" >&6
2508else
2509 ac_cv_prog_cc_stdc=no
2510ac_save_CC=$CC
2511cat >conftest.$ac_ext <<_ACEOF
2512#line $LINENO "configure"
2513/* confdefs.h. */
2514_ACEOF
2515cat confdefs.h >>conftest.$ac_ext
2516cat >>conftest.$ac_ext <<_ACEOF
2517/* end confdefs.h. */
2518#include <stdarg.h>
2519#include <stdio.h>
2520#include <sys/types.h>
2521#include <sys/stat.h>
2522/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2523struct buf { int x; };
2524FILE * (*rcsopen) (struct buf *, struct stat *, int);
2525static char *e (p, i)
2526 char **p;
2527 int i;
2528{
2529 return p[i];
2530}
2531static char *f (char * (*g) (char **, int), char **p, ...)
2532{
2533 char *s;
2534 va_list v;
2535 va_start (v,p);
2536 s = g (p, va_arg (v,int));
2537 va_end (v);
2538 return s;
2539}
2540int test (int i, double x);
2541struct s1 {int (*f) (int a);};
2542struct s2 {int (*f) (double a);};
2543int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2544int argc;
2545char **argv;
2546int
2547main ()
2548{
2549return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2550 ;
2551 return 0;
2552}
2553_ACEOF
2554# Don't try gcc -ansi; that turns off useful extensions and
2555# breaks some systems' header files.
2556# AIX -qlanglvl=ansi
2557# Ultrix and OSF/1 -std1
2558# HP-UX 10.20 and later -Ae
2559# HP-UX older versions -Aa -D_HPUX_SOURCE
2560# SVR4 -Xc -D__EXTENSIONS__
2561for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2562do
2563 CC="$ac_save_CC $ac_arg"
2564 rm -f conftest.$ac_objext
2565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2566 (eval $ac_compile) 2>&5
2567 ac_status=$?
2568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2569 (exit $ac_status); } &&
2570 { ac_try='test -s conftest.$ac_objext'
2571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2572 (eval $ac_try) 2>&5
2573 ac_status=$?
2574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2575 (exit $ac_status); }; }; then
2576 ac_cv_prog_cc_stdc=$ac_arg
2577break
2578else
2579 echo "$as_me: failed program was:" >&5
2580sed 's/^/| /' conftest.$ac_ext >&5
2581
2582fi
2583rm -f conftest.$ac_objext
2584done
2585rm -f conftest.$ac_ext conftest.$ac_objext
2586CC=$ac_save_CC
2587
2588fi
2589
2590case "x$ac_cv_prog_cc_stdc" in
2591 x|xno)
2592 echo "$as_me:$LINENO: result: none needed" >&5
2593echo "${ECHO_T}none needed" >&6 ;;
2594 *)
2595 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2596echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2597 CC="$CC $ac_cv_prog_cc_stdc" ;;
2598esac
2599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600# Some people use a C++ compiler to compile C. Since we use `exit',
2601# in C++ we need to declare it. In case someone uses the same compiler
2602# for both compiling C and C++ we need to have the C++ compiler decide
2603# the declaration of exit, since it's the most demanding environment.
2604cat >conftest.$ac_ext <<_ACEOF
2605#ifndef __cplusplus
2606 choke me
2607#endif
2608_ACEOF
2609rm -f conftest.$ac_objext
2610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2611 (eval $ac_compile) 2>&5
2612 ac_status=$?
2613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2614 (exit $ac_status); } &&
2615 { ac_try='test -s conftest.$ac_objext'
2616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2617 (eval $ac_try) 2>&5
2618 ac_status=$?
2619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2620 (exit $ac_status); }; }; then
2621 for ac_declaration in \
2622 ''\
2623 '#include <stdlib.h>' \
2624 'extern "C" void std::exit (int) throw (); using std::exit;' \
2625 'extern "C" void std::exit (int); using std::exit;' \
2626 'extern "C" void exit (int) throw ();' \
2627 'extern "C" void exit (int);' \
2628 'void exit (int);'
2629do
2630 cat >conftest.$ac_ext <<_ACEOF
2631#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002632/* confdefs.h. */
2633_ACEOF
2634cat confdefs.h >>conftest.$ac_ext
2635cat >>conftest.$ac_ext <<_ACEOF
2636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002637#include <stdlib.h>
2638$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002639int
2640main ()
2641{
2642exit (42);
2643 ;
2644 return 0;
2645}
2646_ACEOF
2647rm -f conftest.$ac_objext
2648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2649 (eval $ac_compile) 2>&5
2650 ac_status=$?
2651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2652 (exit $ac_status); } &&
2653 { ac_try='test -s conftest.$ac_objext'
2654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2655 (eval $ac_try) 2>&5
2656 ac_status=$?
2657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2658 (exit $ac_status); }; }; then
2659 :
2660else
2661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002662sed 's/^/| /' conftest.$ac_ext >&5
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664continue
2665fi
2666rm -f conftest.$ac_objext conftest.$ac_ext
2667 cat >conftest.$ac_ext <<_ACEOF
2668#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002669/* confdefs.h. */
2670_ACEOF
2671cat confdefs.h >>conftest.$ac_ext
2672cat >>conftest.$ac_ext <<_ACEOF
2673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002674$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002675int
2676main ()
2677{
2678exit (42);
2679 ;
2680 return 0;
2681}
2682_ACEOF
2683rm -f conftest.$ac_objext
2684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2685 (eval $ac_compile) 2>&5
2686 ac_status=$?
2687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2688 (exit $ac_status); } &&
2689 { ac_try='test -s conftest.$ac_objext'
2690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2691 (eval $ac_try) 2>&5
2692 ac_status=$?
2693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2694 (exit $ac_status); }; }; then
2695 break
2696else
2697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002698sed 's/^/| /' conftest.$ac_ext >&5
2699
Martin v. Löwis11437992002-04-12 09:54:03 +00002700fi
2701rm -f conftest.$ac_objext conftest.$ac_ext
2702done
2703rm -f conftest*
2704if test -n "$ac_declaration"; then
2705 echo '#ifdef __cplusplus' >>confdefs.h
2706 echo $ac_declaration >>confdefs.h
2707 echo '#endif' >>confdefs.h
2708fi
2709
2710else
2711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002712sed 's/^/| /' conftest.$ac_ext >&5
2713
Martin v. Löwis11437992002-04-12 09:54:03 +00002714fi
2715rm -f conftest.$ac_objext conftest.$ac_ext
2716ac_ext=c
2717ac_cpp='$CPP $CPPFLAGS'
2718ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2719ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2720ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002721
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002722
2723# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002724
2725ac_ext=c
2726ac_cpp='$CPP $CPPFLAGS'
2727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2729ac_compiler_gnu=$ac_cv_c_compiler_gnu
2730echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2731echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002732# On Suns, sometimes $CPP names a directory.
2733if test -n "$CPP" && test -d "$CPP"; then
2734 CPP=
2735fi
2736if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 if test "${ac_cv_prog_CPP+set}" = set; then
2738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002739else
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 # Double quotes because CPP needs to be expanded
2741 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2742 do
2743 ac_preproc_ok=false
2744for ac_c_preproc_warn_flag in '' yes
2745do
2746 # Use a header file that comes with gcc, so configuring glibc
2747 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002748 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2749 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002750 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 # not just through cpp. "Syntax error" is here to catch this case.
2752 cat >conftest.$ac_ext <<_ACEOF
2753#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002754/* confdefs.h. */
2755_ACEOF
2756cat confdefs.h >>conftest.$ac_ext
2757cat >>conftest.$ac_ext <<_ACEOF
2758/* end confdefs.h. */
2759#ifdef __STDC__
2760# include <limits.h>
2761#else
2762# include <assert.h>
2763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002764 Syntax error
2765_ACEOF
2766if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2767 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2768 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002769 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 rm -f conftest.er1
2771 cat conftest.err >&5
2772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2773 (exit $ac_status); } >/dev/null; then
2774 if test -s conftest.err; then
2775 ac_cpp_err=$ac_c_preproc_warn_flag
2776 else
2777 ac_cpp_err=
2778 fi
2779else
2780 ac_cpp_err=yes
2781fi
2782if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002783 :
2784else
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002786sed 's/^/| /' conftest.$ac_ext >&5
2787
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 # Broken: fails on valid input.
2789continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002790fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002791rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002792
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 # OK, works on sane cases. Now check whether non-existent headers
2794 # can be detected and how.
2795 cat >conftest.$ac_ext <<_ACEOF
2796#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002797/* confdefs.h. */
2798_ACEOF
2799cat confdefs.h >>conftest.$ac_ext
2800cat >>conftest.$ac_ext <<_ACEOF
2801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002802#include <ac_nonexistent.h>
2803_ACEOF
2804if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2805 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2806 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002807 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002808 rm -f conftest.er1
2809 cat conftest.err >&5
2810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2811 (exit $ac_status); } >/dev/null; then
2812 if test -s conftest.err; then
2813 ac_cpp_err=$ac_c_preproc_warn_flag
2814 else
2815 ac_cpp_err=
2816 fi
2817else
2818 ac_cpp_err=yes
2819fi
2820if test -z "$ac_cpp_err"; then
2821 # Broken: success on invalid input.
2822continue
2823else
2824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002825sed 's/^/| /' conftest.$ac_ext >&5
2826
Martin v. Löwis11437992002-04-12 09:54:03 +00002827 # Passes both tests.
2828ac_preproc_ok=:
2829break
2830fi
2831rm -f conftest.err conftest.$ac_ext
2832
2833done
2834# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2835rm -f conftest.err conftest.$ac_ext
2836if $ac_preproc_ok; then
2837 break
2838fi
2839
2840 done
2841 ac_cv_prog_CPP=$CPP
2842
2843fi
2844 CPP=$ac_cv_prog_CPP
2845else
2846 ac_cv_prog_CPP=$CPP
2847fi
2848echo "$as_me:$LINENO: result: $CPP" >&5
2849echo "${ECHO_T}$CPP" >&6
2850ac_preproc_ok=false
2851for ac_c_preproc_warn_flag in '' yes
2852do
2853 # Use a header file that comes with gcc, so configuring glibc
2854 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002855 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2856 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002857 # On the NeXT, cc -E runs the code through the compiler's parser,
2858 # not just through cpp. "Syntax error" is here to catch this case.
2859 cat >conftest.$ac_ext <<_ACEOF
2860#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002861/* confdefs.h. */
2862_ACEOF
2863cat confdefs.h >>conftest.$ac_ext
2864cat >>conftest.$ac_ext <<_ACEOF
2865/* end confdefs.h. */
2866#ifdef __STDC__
2867# include <limits.h>
2868#else
2869# include <assert.h>
2870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 Syntax error
2872_ACEOF
2873if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2874 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2875 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002876 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 rm -f conftest.er1
2878 cat conftest.err >&5
2879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2880 (exit $ac_status); } >/dev/null; then
2881 if test -s conftest.err; then
2882 ac_cpp_err=$ac_c_preproc_warn_flag
2883 else
2884 ac_cpp_err=
2885 fi
2886else
2887 ac_cpp_err=yes
2888fi
2889if test -z "$ac_cpp_err"; then
2890 :
2891else
2892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002893sed 's/^/| /' conftest.$ac_ext >&5
2894
Martin v. Löwis11437992002-04-12 09:54:03 +00002895 # Broken: fails on valid input.
2896continue
2897fi
2898rm -f conftest.err conftest.$ac_ext
2899
2900 # OK, works on sane cases. Now check whether non-existent headers
2901 # can be detected and how.
2902 cat >conftest.$ac_ext <<_ACEOF
2903#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002904/* confdefs.h. */
2905_ACEOF
2906cat confdefs.h >>conftest.$ac_ext
2907cat >>conftest.$ac_ext <<_ACEOF
2908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002909#include <ac_nonexistent.h>
2910_ACEOF
2911if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2912 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2913 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002914 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 rm -f conftest.er1
2916 cat conftest.err >&5
2917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2918 (exit $ac_status); } >/dev/null; then
2919 if test -s conftest.err; then
2920 ac_cpp_err=$ac_c_preproc_warn_flag
2921 else
2922 ac_cpp_err=
2923 fi
2924else
2925 ac_cpp_err=yes
2926fi
2927if test -z "$ac_cpp_err"; then
2928 # Broken: success on invalid input.
2929continue
2930else
2931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002932sed 's/^/| /' conftest.$ac_ext >&5
2933
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 # Passes both tests.
2935ac_preproc_ok=:
2936break
2937fi
2938rm -f conftest.err conftest.$ac_ext
2939
2940done
2941# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2942rm -f conftest.err conftest.$ac_ext
2943if $ac_preproc_ok; then
2944 :
2945else
Skip Montanaro6dead952003-09-25 14:50:04 +00002946 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2947See \`config.log' for more details." >&5
2948echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2949See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002950 { (exit 1); exit 1; }; }
2951fi
2952
2953ac_ext=c
2954ac_cpp='$CPP $CPPFLAGS'
2955ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2956ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2957ac_compiler_gnu=$ac_cv_c_compiler_gnu
2958
2959
Skip Montanaro6dead952003-09-25 14:50:04 +00002960echo "$as_me:$LINENO: checking for egrep" >&5
2961echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2962if test "${ac_cv_prog_egrep+set}" = set; then
2963 echo $ECHO_N "(cached) $ECHO_C" >&6
2964else
2965 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2966 then ac_cv_prog_egrep='grep -E'
2967 else ac_cv_prog_egrep='egrep'
2968 fi
2969fi
2970echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2971echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2972 EGREP=$ac_cv_prog_egrep
2973
2974
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
2976echo "$as_me:$LINENO: checking for AIX" >&5
2977echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2978cat >conftest.$ac_ext <<_ACEOF
2979#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002980/* confdefs.h. */
2981_ACEOF
2982cat confdefs.h >>conftest.$ac_ext
2983cat >>conftest.$ac_ext <<_ACEOF
2984/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002985#ifdef _AIX
2986 yes
2987#endif
2988
Martin v. Löwis11437992002-04-12 09:54:03 +00002989_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002991 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 echo "$as_me:$LINENO: result: yes" >&5
2993echo "${ECHO_T}yes" >&6
2994cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002995#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002996_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002997
2998else
Martin v. Löwis11437992002-04-12 09:54:03 +00002999 echo "$as_me:$LINENO: result: no" >&5
3000echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003001fi
3002rm -f conftest*
3003
Michael W. Hudson54241132001-12-07 15:38:26 +00003004
Martin v. Löwis11437992002-04-12 09:54:03 +00003005echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3006echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3007if test "${ac_cv_header_stdc+set}" = set; then
3008 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003009else
Martin v. Löwis11437992002-04-12 09:54:03 +00003010 cat >conftest.$ac_ext <<_ACEOF
3011#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003012/* confdefs.h. */
3013_ACEOF
3014cat confdefs.h >>conftest.$ac_ext
3015cat >>conftest.$ac_ext <<_ACEOF
3016/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003017#include <stdlib.h>
3018#include <stdarg.h>
3019#include <string.h>
3020#include <float.h>
3021
Skip Montanaro6dead952003-09-25 14:50:04 +00003022int
3023main ()
3024{
3025
3026 ;
3027 return 0;
3028}
Martin v. Löwis11437992002-04-12 09:54:03 +00003029_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003030rm -f conftest.$ac_objext
3031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3032 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003033 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00003034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003035 (exit $ac_status); } &&
3036 { ac_try='test -s conftest.$ac_objext'
3037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3038 (eval $ac_try) 2>&5
3039 ac_status=$?
3040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3041 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003042 ac_cv_header_stdc=yes
3043else
3044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003045sed 's/^/| /' conftest.$ac_ext >&5
3046
3047ac_cv_header_stdc=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003048fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003049rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003050
3051if test $ac_cv_header_stdc = yes; then
3052 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3053 cat >conftest.$ac_ext <<_ACEOF
3054#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003055/* confdefs.h. */
3056_ACEOF
3057cat confdefs.h >>conftest.$ac_ext
3058cat >>conftest.$ac_ext <<_ACEOF
3059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003060#include <string.h>
3061
3062_ACEOF
3063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003064 $EGREP "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003065 :
3066else
3067 ac_cv_header_stdc=no
3068fi
3069rm -f conftest*
3070
3071fi
3072
3073if test $ac_cv_header_stdc = yes; then
3074 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3075 cat >conftest.$ac_ext <<_ACEOF
3076#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003077/* confdefs.h. */
3078_ACEOF
3079cat confdefs.h >>conftest.$ac_ext
3080cat >>conftest.$ac_ext <<_ACEOF
3081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003082#include <stdlib.h>
3083
3084_ACEOF
3085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003086 $EGREP "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003087 :
3088else
3089 ac_cv_header_stdc=no
3090fi
3091rm -f conftest*
3092
3093fi
3094
3095if test $ac_cv_header_stdc = yes; then
3096 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3097 if test "$cross_compiling" = yes; then
3098 :
3099else
3100 cat >conftest.$ac_ext <<_ACEOF
3101#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003102/* confdefs.h. */
3103_ACEOF
3104cat confdefs.h >>conftest.$ac_ext
3105cat >>conftest.$ac_ext <<_ACEOF
3106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003107#include <ctype.h>
3108#if ((' ' & 0x0FF) == 0x020)
3109# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3110# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3111#else
Skip Montanaro6dead952003-09-25 14:50:04 +00003112# define ISLOWER(c) \
3113 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00003114 || ('j' <= (c) && (c) <= 'r') \
3115 || ('s' <= (c) && (c) <= 'z'))
3116# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3117#endif
3118
3119#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3120int
3121main ()
3122{
3123 int i;
3124 for (i = 0; i < 256; i++)
3125 if (XOR (islower (i), ISLOWER (i))
3126 || toupper (i) != TOUPPER (i))
3127 exit(2);
3128 exit (0);
3129}
3130_ACEOF
3131rm -f conftest$ac_exeext
3132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3133 (eval $ac_link) 2>&5
3134 ac_status=$?
3135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3138 (eval $ac_try) 2>&5
3139 ac_status=$?
3140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3141 (exit $ac_status); }; }; then
3142 :
3143else
3144 echo "$as_me: program exited with status $ac_status" >&5
3145echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003146sed 's/^/| /' conftest.$ac_ext >&5
3147
Martin v. Löwis11437992002-04-12 09:54:03 +00003148( exit $ac_status )
3149ac_cv_header_stdc=no
3150fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003151rm -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 +00003152fi
3153fi
3154fi
3155echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3156echo "${ECHO_T}$ac_cv_header_stdc" >&6
3157if test $ac_cv_header_stdc = yes; then
3158
3159cat >>confdefs.h <<\_ACEOF
3160#define STDC_HEADERS 1
3161_ACEOF
3162
3163fi
3164
3165# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3176 inttypes.h stdint.h unistd.h
3177do
3178as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3179echo "$as_me:$LINENO: checking for $ac_header" >&5
3180echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3181if eval "test \"\${$as_ac_Header+set}\" = set"; then
3182 echo $ECHO_N "(cached) $ECHO_C" >&6
3183else
3184 cat >conftest.$ac_ext <<_ACEOF
3185#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003186/* confdefs.h. */
3187_ACEOF
3188cat confdefs.h >>conftest.$ac_ext
3189cat >>conftest.$ac_ext <<_ACEOF
3190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003191$ac_includes_default
3192
3193#include <$ac_header>
3194_ACEOF
3195rm -f conftest.$ac_objext
3196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3197 (eval $ac_compile) 2>&5
3198 ac_status=$?
3199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3200 (exit $ac_status); } &&
3201 { ac_try='test -s conftest.$ac_objext'
3202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3203 (eval $ac_try) 2>&5
3204 ac_status=$?
3205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3206 (exit $ac_status); }; }; then
3207 eval "$as_ac_Header=yes"
3208else
3209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003210sed 's/^/| /' conftest.$ac_ext >&5
3211
Martin v. Löwis11437992002-04-12 09:54:03 +00003212eval "$as_ac_Header=no"
3213fi
3214rm -f conftest.$ac_objext conftest.$ac_ext
3215fi
3216echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3217echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3218if test `eval echo '${'$as_ac_Header'}'` = yes; then
3219 cat >>confdefs.h <<_ACEOF
3220#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3221_ACEOF
3222
3223fi
3224
3225done
3226
3227
3228if test "${ac_cv_header_minix_config_h+set}" = set; then
3229 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3230echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3231if test "${ac_cv_header_minix_config_h+set}" = set; then
3232 echo $ECHO_N "(cached) $ECHO_C" >&6
3233fi
3234echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3235echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3236else
3237 # Is the header compilable?
3238echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3239echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3240cat >conftest.$ac_ext <<_ACEOF
3241#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003242/* confdefs.h. */
3243_ACEOF
3244cat confdefs.h >>conftest.$ac_ext
3245cat >>conftest.$ac_ext <<_ACEOF
3246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003247$ac_includes_default
3248#include <minix/config.h>
3249_ACEOF
3250rm -f conftest.$ac_objext
3251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3252 (eval $ac_compile) 2>&5
3253 ac_status=$?
3254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3255 (exit $ac_status); } &&
3256 { ac_try='test -s conftest.$ac_objext'
3257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3258 (eval $ac_try) 2>&5
3259 ac_status=$?
3260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3261 (exit $ac_status); }; }; then
3262 ac_header_compiler=yes
3263else
3264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003265sed 's/^/| /' conftest.$ac_ext >&5
3266
Martin v. Löwis11437992002-04-12 09:54:03 +00003267ac_header_compiler=no
3268fi
3269rm -f conftest.$ac_objext conftest.$ac_ext
3270echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3271echo "${ECHO_T}$ac_header_compiler" >&6
3272
3273# Is the header present?
3274echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3275echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3276cat >conftest.$ac_ext <<_ACEOF
3277#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003278/* confdefs.h. */
3279_ACEOF
3280cat confdefs.h >>conftest.$ac_ext
3281cat >>conftest.$ac_ext <<_ACEOF
3282/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003283#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003284_ACEOF
3285if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3286 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3287 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003288 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003289 rm -f conftest.er1
3290 cat conftest.err >&5
3291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3292 (exit $ac_status); } >/dev/null; then
3293 if test -s conftest.err; then
3294 ac_cpp_err=$ac_c_preproc_warn_flag
3295 else
3296 ac_cpp_err=
3297 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003298else
Martin v. Löwis11437992002-04-12 09:54:03 +00003299 ac_cpp_err=yes
3300fi
3301if test -z "$ac_cpp_err"; then
3302 ac_header_preproc=yes
3303else
3304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003305sed 's/^/| /' conftest.$ac_ext >&5
3306
Martin v. Löwis11437992002-04-12 09:54:03 +00003307 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003309rm -f conftest.err conftest.$ac_ext
3310echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3311echo "${ECHO_T}$ac_header_preproc" >&6
3312
3313# So? What about this header?
3314case $ac_header_compiler:$ac_header_preproc in
3315 yes:no )
3316 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3317echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3318 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003319echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3320 (
3321 cat <<\_ASBOX
3322## ------------------------------------ ##
3323## Report this to bug-autoconf@gnu.org. ##
3324## ------------------------------------ ##
3325_ASBOX
3326 ) |
3327 sed "s/^/$as_me: WARNING: /" >&2
3328 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003329 no:yes )
3330 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3331echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3332 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3333echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3334 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003335echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3336 (
3337 cat <<\_ASBOX
3338## ------------------------------------ ##
3339## Report this to bug-autoconf@gnu.org. ##
3340## ------------------------------------ ##
3341_ASBOX
3342 ) |
3343 sed "s/^/$as_me: WARNING: /" >&2
3344 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003345esac
3346echo "$as_me:$LINENO: checking for minix/config.h" >&5
3347echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3348if test "${ac_cv_header_minix_config_h+set}" = set; then
3349 echo $ECHO_N "(cached) $ECHO_C" >&6
3350else
3351 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003352fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003353echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3354echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3355
3356fi
3357if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003358 MINIX=yes
3359else
Martin v. Löwis11437992002-04-12 09:54:03 +00003360 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003361fi
3362
Martin v. Löwis11437992002-04-12 09:54:03 +00003363
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003364if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003365
3366cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003367#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003368_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003369
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_1_SOURCE 2
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 _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003378_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003379
3380fi
3381
3382
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003383# Check for unsupported systems
3384case $ac_sys_system/$ac_sys_release in
3385SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3386 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3387 echo See README for details.
3388 exit 1;;
3389esac
3390
3391if test "$MINIX" = yes; then
3392 echo This system \(MINIX\) is no longer supported.
3393 echo Read README for details.
3394 exit 1
3395fi
3396
Michael W. Hudson54241132001-12-07 15:38:26 +00003397
Martin v. Löwis11437992002-04-12 09:54:03 +00003398echo "$as_me:$LINENO: checking for --with-suffix" >&5
3399echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003400
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003401# Check whether --with-suffix or --without-suffix was given.
3402if test "${with_suffix+set}" = set; then
3403 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003404
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003405 case $withval in
3406 no) EXEEXT=;;
3407 yes) EXEEXT=.exe;;
3408 *) EXEEXT=$withval;;
3409 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003410fi;
3411echo "$as_me:$LINENO: result: $EXEEXT" >&5
3412echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003413
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003414# Test whether we're running on a non-case-sensitive system, in which
3415# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003416
Martin v. Löwis11437992002-04-12 09:54:03 +00003417echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3418echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003419if test ! -d CaseSensitiveTestDir; then
3420mkdir CaseSensitiveTestDir
3421fi
3422
3423if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003424then
Martin v. Löwis11437992002-04-12 09:54:03 +00003425 echo "$as_me:$LINENO: result: yes" >&5
3426echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003427 BUILDEXEEXT=.exe
3428else
Martin v. Löwis11437992002-04-12 09:54:03 +00003429 echo "$as_me:$LINENO: result: no" >&5
3430echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003431 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003432fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003433rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003434
Guido van Rossumdd997f71998-10-07 19:58:26 +00003435case $MACHDEP in
3436bsdos*)
3437 case $CC in
3438 gcc) CC="$CC -D_HAVE_BSDI";;
3439 esac;;
3440esac
3441
Guido van Rossum24b1e751997-08-21 02:29:16 +00003442case $ac_sys_system in
3443hp*|HP*)
3444 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003445 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003446 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003447Monterey*)
3448 case $CC in
3449 cc) CC="$CC -Wl,-Bexport";;
3450 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003451SunOS*)
3452 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003453
3454cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003455#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003456_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003457
3458 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003459esac
3460
Michael W. Hudson54241132001-12-07 15:38:26 +00003461
3462
Martin v. Löwis11437992002-04-12 09:54:03 +00003463echo "$as_me:$LINENO: checking LIBRARY" >&5
3464echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003465if test -z "$LIBRARY"
3466then
3467 LIBRARY='libpython$(VERSION).a'
3468fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003469echo "$as_me:$LINENO: result: $LIBRARY" >&5
3470echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003471
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003472# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003473# name of the library into which to insert object files). BLDLIBRARY is also
3474# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3475# is blank as the main program is not linked directly against LDLIBRARY.
3476# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3477# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3478# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3479# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003480#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003481# RUNSHARED is used to run shared python without installed libraries
3482#
3483# INSTSONAME is the name of the shared library that will be use to install
3484# on the system - some systems like version suffix, others don't
3485
3486
Michael W. Hudson54241132001-12-07 15:38:26 +00003487
3488
3489
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003490
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003491LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003492BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003493INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003494DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003495LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003496RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003497
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003498# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003499# If CXX is set, and if it is needed to link a main function that was
3500# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3501# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003502# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003503# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003504
Martin v. Löwis11437992002-04-12 09:54:03 +00003505echo "$as_me:$LINENO: checking LINKCC" >&5
3506echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003507if test -z "$LINKCC"
3508then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003509 if test -z "$CXX"; then
3510 LINKCC="\$(PURIFY) \$(CC)"
3511 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003512 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003513 $CXX -c conftest.$ac_ext 2>&5
3514 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3515 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3516 then
3517 LINKCC="\$(PURIFY) \$(CC)"
3518 else
3519 LINKCC="\$(PURIFY) \$(CXX)"
3520 fi
3521 rm -fr conftest*
3522 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003523 case $ac_sys_system in
3524 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003525 exp_extra="\"\""
3526 if test $ac_sys_release -ge 5 -o \
3527 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3528 exp_extra="."
3529 fi
3530 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003531 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003532 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003533 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003534 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003535 esac
3536fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003537echo "$as_me:$LINENO: result: $LINKCC" >&5
3538echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003539
Martin v. Löwis11437992002-04-12 09:54:03 +00003540echo "$as_me:$LINENO: checking for --enable-shared" >&5
3541echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003542# Check whether --enable-shared or --disable-shared was given.
3543if test "${enable_shared+set}" = set; then
3544 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003545
Martin v. Löwis11437992002-04-12 09:54:03 +00003546fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003547
3548if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003549then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003550 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003551 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003552 enable_shared="yes";;
3553 *)
3554 enable_shared="no";;
3555 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003556fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003557echo "$as_me:$LINENO: result: $enable_shared" >&5
3558echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003559
3560
Martin v. Löwis11437992002-04-12 09:54:03 +00003561echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3562echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003563
Guido van Rossumb8552162001-09-05 14:58:11 +00003564# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3565# library that we build, but we do not want to link against it (we
3566# will find it with a -framework option). For this reason there is an
3567# extra variable BLDLIBRARY against which Python and the extension
3568# modules are linked, BLDLIBRARY. This is normally the same as
3569# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003570if test "$enable_framework"
3571then
3572 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003573 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003574 BLDLIBRARY=''
3575else
3576 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003577fi
Jack Jansene578a632001-08-15 01:27:14 +00003578
Martin v. Löwis1142de32002-03-29 16:28:31 +00003579# Other platforms follow
3580if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003581
3582cat >>confdefs.h <<\_ACEOF
3583#define Py_ENABLE_SHARED 1
3584_ACEOF
3585
Martin v. Löwis1142de32002-03-29 16:28:31 +00003586 case $ac_sys_system in
3587 BeOS*)
3588 LDLIBRARY='libpython$(VERSION).so'
3589 ;;
3590 CYGWIN*)
3591 LDLIBRARY='libpython$(VERSION).dll.a'
3592 DLLLIBRARY='libpython$(VERSION).dll'
3593 ;;
3594 SunOS*)
3595 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003596 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003597 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003598 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003599 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003600 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003601 LDLIBRARY='libpython$(VERSION).so'
3602 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003603 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003604 INSTSONAME="$LDLIBRARY".$SOVERSION
3605 ;;
3606 hp*|HP*)
3607 LDLIBRARY='libpython$(VERSION).sl'
3608 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003609 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003610 ;;
3611 OSF*)
3612 LDLIBRARY='libpython$(VERSION).so'
3613 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003614 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003615 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003616 atheos*)
3617 LDLIBRARY='libpython$(VERSION).so'
3618 BLDLIBRARY='-L. -lpython$(VERSION)'
3619 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3620 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003621 esac
3622 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3623 case $MACHDEP in
3624 dguxR4)
3625 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003626 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003627 ;;
3628 esac
Jason Tishler30765592003-09-04 11:04:06 +00003629else # shared is disabled
3630 case $ac_sys_system in
3631 CYGWIN*)
3632 BLDLIBRARY='$(LIBRARY)'
3633 LDLIBRARY='libpython$(VERSION).dll.a'
3634 ;;
3635 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003636fi
3637
Martin v. Löwis11437992002-04-12 09:54:03 +00003638echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3639echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003640
Martin v. Löwis11437992002-04-12 09:54:03 +00003641if test -n "$ac_tool_prefix"; then
3642 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3643set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3644echo "$as_me:$LINENO: checking for $ac_word" >&5
3645echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3646if test "${ac_cv_prog_RANLIB+set}" = set; then
3647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003648else
3649 if test -n "$RANLIB"; then
3650 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3651else
Martin v. Löwis11437992002-04-12 09:54:03 +00003652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3653for as_dir in $PATH
3654do
3655 IFS=$as_save_IFS
3656 test -z "$as_dir" && as_dir=.
3657 for ac_exec_ext in '' $ac_executable_extensions; do
3658 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3659 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3660 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3661 break 2
3662 fi
3663done
3664done
3665
Guido van Rossum627b2d71993-12-24 10:39:16 +00003666fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003668RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003669if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 echo "$as_me:$LINENO: result: $RANLIB" >&5
3671echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003672else
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 echo "$as_me:$LINENO: result: no" >&5
3674echo "${ECHO_T}no" >&6
3675fi
3676
3677fi
3678if test -z "$ac_cv_prog_RANLIB"; then
3679 ac_ct_RANLIB=$RANLIB
3680 # Extract the first word of "ranlib", so it can be a program name with args.
3681set dummy ranlib; ac_word=$2
3682echo "$as_me:$LINENO: checking for $ac_word" >&5
3683echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3684if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3685 echo $ECHO_N "(cached) $ECHO_C" >&6
3686else
3687 if test -n "$ac_ct_RANLIB"; then
3688 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3689else
3690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3691for as_dir in $PATH
3692do
3693 IFS=$as_save_IFS
3694 test -z "$as_dir" && as_dir=.
3695 for ac_exec_ext in '' $ac_executable_extensions; do
3696 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3697 ac_cv_prog_ac_ct_RANLIB="ranlib"
3698 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3699 break 2
3700 fi
3701done
3702done
3703
3704 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3705fi
3706fi
3707ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3708if test -n "$ac_ct_RANLIB"; then
3709 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3710echo "${ECHO_T}$ac_ct_RANLIB" >&6
3711else
3712 echo "$as_me:$LINENO: result: no" >&5
3713echo "${ECHO_T}no" >&6
3714fi
3715
3716 RANLIB=$ac_ct_RANLIB
3717else
3718 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003719fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003720
3721
Guido van Rossum7f43da71994-08-01 12:15:30 +00003722for ac_prog in ar aal
3723do
Martin v. Löwis11437992002-04-12 09:54:03 +00003724 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003725set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003726echo "$as_me:$LINENO: checking for $ac_word" >&5
3727echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3728if test "${ac_cv_prog_AR+set}" = set; then
3729 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003730else
3731 if test -n "$AR"; then
3732 ac_cv_prog_AR="$AR" # Let the user override the test.
3733else
Martin v. Löwis11437992002-04-12 09:54:03 +00003734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3735for as_dir in $PATH
3736do
3737 IFS=$as_save_IFS
3738 test -z "$as_dir" && as_dir=.
3739 for ac_exec_ext in '' $ac_executable_extensions; do
3740 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3741 ac_cv_prog_AR="$ac_prog"
3742 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3743 break 2
3744 fi
3745done
3746done
3747
Guido van Rossum7f43da71994-08-01 12:15:30 +00003748fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003749fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003750AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003751if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 echo "$as_me:$LINENO: result: $AR" >&5
3753echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003754else
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 echo "$as_me:$LINENO: result: no" >&5
3756echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003757fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003758
Martin v. Löwis11437992002-04-12 09:54:03 +00003759 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003760done
3761test -n "$AR" || AR="ar"
3762
Michael W. Hudson54241132001-12-07 15:38:26 +00003763
Neil Schemenauera42c8272001-03-31 00:01:55 +00003764case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003765bsdos*|hp*|HP*)
3766 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003767 if test -z "$INSTALL"
3768 then
3769 INSTALL="${srcdir}/install-sh -c"
3770 fi
3771esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003772ac_aux_dir=
3773for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3774 if test -f $ac_dir/install-sh; then
3775 ac_aux_dir=$ac_dir
3776 ac_install_sh="$ac_aux_dir/install-sh -c"
3777 break
3778 elif test -f $ac_dir/install.sh; then
3779 ac_aux_dir=$ac_dir
3780 ac_install_sh="$ac_aux_dir/install.sh -c"
3781 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003782 elif test -f $ac_dir/shtool; then
3783 ac_aux_dir=$ac_dir
3784 ac_install_sh="$ac_aux_dir/shtool install -c"
3785 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003786 fi
3787done
3788if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3790echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3791 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3794ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3795ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003796
3797# Find a good install program. We prefer a C program (faster),
3798# so one script is as good as another. But avoid the broken or
3799# incompatible versions:
3800# SysV /etc/install, /usr/sbin/install
3801# SunOS /usr/etc/install
3802# IRIX /sbin/install
3803# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003804# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003805# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3806# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3807# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3808# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003809echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3810echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003811if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003812if test "${ac_cv_path_install+set}" = set; then
3813 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003814else
Martin v. Löwis11437992002-04-12 09:54:03 +00003815 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3816for as_dir in $PATH
3817do
3818 IFS=$as_save_IFS
3819 test -z "$as_dir" && as_dir=.
3820 # Account for people who put trailing slashes in PATH elements.
3821case $as_dir/ in
3822 ./ | .// | /cC/* | \
3823 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3824 /usr/ucb/* ) ;;
3825 *)
3826 # OSF1 and SCO ODT 3.0 have their own names for install.
3827 # Don't use installbsd from OSF since it installs stuff as root
3828 # by default.
3829 for ac_prog in ginstall scoinst install; do
3830 for ac_exec_ext in '' $ac_executable_extensions; do
3831 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3832 if test $ac_prog = install &&
3833 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3834 # AIX install. It has an incompatible calling convention.
3835 :
3836 elif test $ac_prog = install &&
3837 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3838 # program-specific install script used by HP pwplus--don't use.
3839 :
3840 else
3841 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3842 break 3
3843 fi
3844 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003845 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003846 done
3847 ;;
3848esac
3849done
3850
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003851
3852fi
3853 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003855 else
3856 # As a last resort, use the slow shell script. We don't cache a
3857 # path for INSTALL within a source directory, because that will
3858 # break other packages using the cache if that directory is
3859 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003861 fi
3862fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003863echo "$as_me:$LINENO: result: $INSTALL" >&5
3864echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003865
3866# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3867# It thinks the first close brace ends the variable substitution.
3868test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003871
3872test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3873
Michael W. Hudson54241132001-12-07 15:38:26 +00003874
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003875# Not every filesystem supports hard links
3876
3877if test -z "$LN" ; then
3878 case $ac_sys_system in
3879 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003880 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003881 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003882 *) LN=ln;;
3883 esac
3884fi
3885
Fred Drake109d9862001-07-11 06:27:56 +00003886# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003887echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3888echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3889
Fred Drake109d9862001-07-11 06:27:56 +00003890# Check whether --with-pydebug or --without-pydebug was given.
3891if test "${with_pydebug+set}" = set; then
3892 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003893
Fred Drake109d9862001-07-11 06:27:56 +00003894if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003895then
3896
3897cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003898#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003899_ACEOF
3900
3901 echo "$as_me:$LINENO: result: yes" >&5
3902echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003903 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003904else echo "$as_me:$LINENO: result: no" >&5
3905echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003906fi
3907else
Martin v. Löwis11437992002-04-12 09:54:03 +00003908 echo "$as_me:$LINENO: result: no" >&5
3909echo "${ECHO_T}no" >&6
3910fi;
Fred Drake109d9862001-07-11 06:27:56 +00003911
Skip Montanarodecc6a42003-01-01 20:07:49 +00003912# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3913# merged with this chunk of code?
3914
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003915# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003916# ------------------------
3917# (The following bit of code is complicated enough - please keep things
3918# indented properly. Just pretend you're editing Python code. ;-)
3919
3920# There are two parallel sets of case statements below, one that checks to
3921# see if OPT was set and one that does BASECFLAGS setting based upon
3922# compiler and platform. BASECFLAGS tweaks need to be made even if the
3923# user set OPT.
3924
3925# tweak OPT based on compiler and platform, only if the user didn't set
3926# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003927
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003928if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003929then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003930 case $GCC in
3931 yes)
3932 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003933 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003934 if test "$Py_DEBUG" = 'true' ; then
3935 # Optimization messes up debuggers, so turn it off for
3936 # debug builds.
3937 OPT="-g -Wall -Wstrict-prototypes"
3938 else
3939 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003940 fi
3941 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003942 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003943 OPT="-O3 -Wall -Wstrict-prototypes"
3944 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003945 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003946 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003947 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3948 ;;
3949 esac
Fred Drake109d9862001-07-11 06:27:56 +00003950 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003951
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003952 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003953 OPT="-O"
3954 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003955 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003956
3957 # The current (beta) Monterey compiler dies with optimizations
3958 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003959 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003960 Monterey*)
3961 OPT=""
3962 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003963 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003964
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003965fi
3966
Skip Montanarodecc6a42003-01-01 20:07:49 +00003967
3968# tweak BASECFLAGS based on compiler and platform
3969case $GCC in
3970yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003971 # Python violates C99 rules, by casting between incompatible
3972 # pointer types. GCC may generate bad code as a result of that,
3973 # so use -fno-strict-aliasing if supported.
3974 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3975echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3976 ac_save_cc="$CC"
3977 CC="$CC -fno-strict-aliasing"
3978 if test "$cross_compiling" = yes; then
3979 ac_cv_no_strict_aliasing_ok=no
3980else
3981 cat >conftest.$ac_ext <<_ACEOF
3982#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003983/* confdefs.h. */
3984_ACEOF
3985cat confdefs.h >>conftest.$ac_ext
3986cat >>conftest.$ac_ext <<_ACEOF
3987/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003988int main() { return 0; }
3989_ACEOF
3990rm -f conftest$ac_exeext
3991if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3992 (eval $ac_link) 2>&5
3993 ac_status=$?
3994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3997 (eval $ac_try) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); }; }; then
4001 ac_cv_no_strict_aliasing_ok=yes
4002else
4003 echo "$as_me: program exited with status $ac_status" >&5
4004echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004005sed 's/^/| /' conftest.$ac_ext >&5
4006
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004007( exit $ac_status )
4008ac_cv_no_strict_aliasing_ok=no
4009fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004010rm -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 +00004011fi
4012 CC="$ac_save_cc"
4013 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4014echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
4015 if test $ac_cv_no_strict_aliasing_ok = yes
4016 then
4017 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4018 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004019 case $ac_sys_system in
4020 SCO_SV*)
4021 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4022 ;;
4023 # is there any other compiler on Darwin besides gcc?
4024 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004025 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004026 ;;
4027 esac
4028 ;;
4029
4030*)
4031 case $ac_sys_system in
4032 OpenUNIX*|UnixWare*)
4033 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4034 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004035 OSF*)
4036 BASECFLAGS="$BASECFLAGS -ieee -std"
4037 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004038 SCO_SV*)
4039 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4040 ;;
4041 esac
4042 ;;
4043esac
4044
Fred Drakee1ceaa02001-12-04 20:55:47 +00004045if test "$Py_DEBUG" = 'true'; then
4046 :
4047else
4048 OPT="-DNDEBUG $OPT"
4049fi
4050
Guido van Rossum563e7081996-09-10 18:20:48 +00004051if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004052then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004053 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004054fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004055
Martin v. Löwis11437992002-04-12 09:54:03 +00004056echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4057echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
4058if test "${ac_cv_opt_olimit_ok+set}" = set; then
4059 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004060else
4061 ac_save_cc="$CC"
4062CC="$CC -OPT:Olimit=0"
4063if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004064 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004065else
Martin v. Löwis11437992002-04-12 09:54:03 +00004066 cat >conftest.$ac_ext <<_ACEOF
4067#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004068/* confdefs.h. */
4069_ACEOF
4070cat confdefs.h >>conftest.$ac_ext
4071cat >>conftest.$ac_ext <<_ACEOF
4072/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004073int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004074_ACEOF
4075rm -f conftest$ac_exeext
4076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4077 (eval $ac_link) 2>&5
4078 ac_status=$?
4079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4082 (eval $ac_try) 2>&5
4083 ac_status=$?
4084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004086 ac_cv_opt_olimit_ok=yes
4087else
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 echo "$as_me: program exited with status $ac_status" >&5
4089echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004090sed 's/^/| /' conftest.$ac_ext >&5
4091
Martin v. Löwis11437992002-04-12 09:54:03 +00004092( exit $ac_status )
4093ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004094fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004095rm -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 +00004096fi
Guido van Rossum91922671997-10-09 20:24:13 +00004097CC="$ac_save_cc"
4098fi
4099
Martin v. Löwis11437992002-04-12 09:54:03 +00004100echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4101echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004102if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004103 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004104 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4105 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4106 # environment?
4107 Darwin*)
4108 ;;
4109 *)
4110 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4111 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004112 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004113else
Martin v. Löwis11437992002-04-12 09:54:03 +00004114 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4115echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
4116 if test "${ac_cv_olimit_ok+set}" = set; then
4117 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004118else
4119 ac_save_cc="$CC"
4120 CC="$CC -Olimit 1500"
4121 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004122 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004123else
Martin v. Löwis11437992002-04-12 09:54:03 +00004124 cat >conftest.$ac_ext <<_ACEOF
4125#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004126/* confdefs.h. */
4127_ACEOF
4128cat confdefs.h >>conftest.$ac_ext
4129cat >>conftest.$ac_ext <<_ACEOF
4130/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004131int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004132_ACEOF
4133rm -f conftest$ac_exeext
4134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4135 (eval $ac_link) 2>&5
4136 ac_status=$?
4137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4138 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4140 (eval $ac_try) 2>&5
4141 ac_status=$?
4142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4143 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004144 ac_cv_olimit_ok=yes
4145else
Martin v. Löwis11437992002-04-12 09:54:03 +00004146 echo "$as_me: program exited with status $ac_status" >&5
4147echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004148sed 's/^/| /' conftest.$ac_ext >&5
4149
Martin v. Löwis11437992002-04-12 09:54:03 +00004150( exit $ac_status )
4151ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004152fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004153rm -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 +00004154fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004155 CC="$ac_save_cc"
4156fi
4157
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4159echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004160 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004161 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004162 fi
4163fi
4164
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004165# On some compilers, pthreads are available without further options
4166# (e.g. MacOS X). On some of these systems, the compiler will not
4167# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4168# So we have to see first whether pthreads are available without
4169# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00004170echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4171echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
4172if test "${ac_cv_pthread_is_default+set}" = set; then
4173 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004174else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004175 if test "$cross_compiling" = yes; then
4176 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004177else
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 cat >conftest.$ac_ext <<_ACEOF
4179#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004180/* confdefs.h. */
4181_ACEOF
4182cat confdefs.h >>conftest.$ac_ext
4183cat >>conftest.$ac_ext <<_ACEOF
4184/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004185
Martin v. Löwis130fb172001-07-19 11:00:41 +00004186#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004187
4188void* routine(void* p){return NULL;}
4189
4190int main(){
4191 pthread_t p;
4192 if(pthread_create(&p,NULL,routine,NULL)!=0)
4193 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004194 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004195 return 0;
4196}
4197
Martin v. Löwis11437992002-04-12 09:54:03 +00004198_ACEOF
4199rm -f conftest$ac_exeext
4200if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4201 (eval $ac_link) 2>&5
4202 ac_status=$?
4203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4204 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4206 (eval $ac_try) 2>&5
4207 ac_status=$?
4208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004210
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004211 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004212 ac_cv_kthread=no
4213 ac_cv_pthread=no
4214
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004215else
Martin v. Löwis11437992002-04-12 09:54:03 +00004216 echo "$as_me: program exited with status $ac_status" >&5
4217echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004218sed 's/^/| /' conftest.$ac_ext >&5
4219
Martin v. Löwis11437992002-04-12 09:54:03 +00004220( exit $ac_status )
4221ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004222fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004223rm -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 +00004224fi
4225
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004226fi
4227
Martin v. Löwis11437992002-04-12 09:54:03 +00004228echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4229echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004230
Michael W. Hudson54241132001-12-07 15:38:26 +00004231
Martin v. Löwis11437992002-04-12 09:54:03 +00004232if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004233then
4234 ac_cv_kpthread=no
4235else
4236# -Kpthread, if available, provides the right #defines
4237# and linker options to make pthread_create available
4238# Some compilers won't report that they do not support -Kpthread,
4239# so we need to run a program to see whether it really made the
4240# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004241echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4242echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4243if test "${ac_cv_kpthread+set}" = set; then
4244 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004245else
4246 ac_save_cc="$CC"
4247CC="$CC -Kpthread"
4248if test "$cross_compiling" = yes; then
4249 ac_cv_kpthread=no
4250else
Martin v. Löwis11437992002-04-12 09:54:03 +00004251 cat >conftest.$ac_ext <<_ACEOF
4252#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004253/* confdefs.h. */
4254_ACEOF
4255cat confdefs.h >>conftest.$ac_ext
4256cat >>conftest.$ac_ext <<_ACEOF
4257/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004258
4259#include <pthread.h>
4260
4261void* routine(void* p){return NULL;}
4262
4263int main(){
4264 pthread_t p;
4265 if(pthread_create(&p,NULL,routine,NULL)!=0)
4266 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004267 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004268 return 0;
4269}
4270
Martin v. Löwis11437992002-04-12 09:54:03 +00004271_ACEOF
4272rm -f conftest$ac_exeext
4273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4274 (eval $ac_link) 2>&5
4275 ac_status=$?
4276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4277 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4279 (eval $ac_try) 2>&5
4280 ac_status=$?
4281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4282 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004283 ac_cv_kpthread=yes
4284else
Martin v. Löwis11437992002-04-12 09:54:03 +00004285 echo "$as_me: program exited with status $ac_status" >&5
4286echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004287sed 's/^/| /' conftest.$ac_ext >&5
4288
Martin v. Löwis11437992002-04-12 09:54:03 +00004289( exit $ac_status )
4290ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004291fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004292rm -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 +00004293fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004294CC="$ac_save_cc"
4295fi
4296
Martin v. Löwis11437992002-04-12 09:54:03 +00004297echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4298echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004299fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004300
Skip Montanarod8d39a02003-07-10 20:44:10 +00004301if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004302then
4303# -Kthread, if available, provides the right #defines
4304# and linker options to make pthread_create available
4305# Some compilers won't report that they do not support -Kthread,
4306# so we need to run a program to see whether it really made the
4307# function available.
4308echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4309echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4310if test "${ac_cv_kthread+set}" = set; then
4311 echo $ECHO_N "(cached) $ECHO_C" >&6
4312else
4313 ac_save_cc="$CC"
4314CC="$CC -Kthread"
4315if test "$cross_compiling" = yes; then
4316 ac_cv_kthread=no
4317else
4318 cat >conftest.$ac_ext <<_ACEOF
4319#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004320/* confdefs.h. */
4321_ACEOF
4322cat confdefs.h >>conftest.$ac_ext
4323cat >>conftest.$ac_ext <<_ACEOF
4324/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004325
4326#include <pthread.h>
4327
4328void* routine(void* p){return NULL;}
4329
4330int main(){
4331 pthread_t p;
4332 if(pthread_create(&p,NULL,routine,NULL)!=0)
4333 return 1;
4334 (void)pthread_detach(p);
4335 return 0;
4336}
4337
4338_ACEOF
4339rm -f conftest$ac_exeext
4340if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4341 (eval $ac_link) 2>&5
4342 ac_status=$?
4343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4344 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4346 (eval $ac_try) 2>&5
4347 ac_status=$?
4348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4349 (exit $ac_status); }; }; then
4350 ac_cv_kthread=yes
4351else
4352 echo "$as_me: program exited with status $ac_status" >&5
4353echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004354sed 's/^/| /' conftest.$ac_ext >&5
4355
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004356( exit $ac_status )
4357ac_cv_kthread=no
4358fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004359rm -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 +00004360fi
4361CC="$ac_save_cc"
4362fi
4363
4364echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4365echo "${ECHO_T}$ac_cv_kthread" >&6
4366fi
4367
Skip Montanarod8d39a02003-07-10 20:44:10 +00004368if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004369then
4370# -pthread, if available, provides the right #defines
4371# and linker options to make pthread_create available
4372# Some compilers won't report that they do not support -pthread,
4373# so we need to run a program to see whether it really made the
4374# function available.
4375echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4376echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4377if test "${ac_cv_thread+set}" = set; then
4378 echo $ECHO_N "(cached) $ECHO_C" >&6
4379else
4380 ac_save_cc="$CC"
4381CC="$CC -pthread"
4382if test "$cross_compiling" = yes; then
4383 ac_cv_pthread=no
4384else
4385 cat >conftest.$ac_ext <<_ACEOF
4386#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004387/* confdefs.h. */
4388_ACEOF
4389cat confdefs.h >>conftest.$ac_ext
4390cat >>conftest.$ac_ext <<_ACEOF
4391/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004392
4393#include <pthread.h>
4394
4395void* routine(void* p){return NULL;}
4396
4397int main(){
4398 pthread_t p;
4399 if(pthread_create(&p,NULL,routine,NULL)!=0)
4400 return 1;
4401 (void)pthread_detach(p);
4402 return 0;
4403}
4404
4405_ACEOF
4406rm -f conftest$ac_exeext
4407if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4408 (eval $ac_link) 2>&5
4409 ac_status=$?
4410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4411 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4413 (eval $ac_try) 2>&5
4414 ac_status=$?
4415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4416 (exit $ac_status); }; }; then
4417 ac_cv_pthread=yes
4418else
4419 echo "$as_me: program exited with status $ac_status" >&5
4420echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004421sed 's/^/| /' conftest.$ac_ext >&5
4422
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004423( exit $ac_status )
4424ac_cv_pthread=no
4425fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004426rm -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 +00004427fi
4428CC="$ac_save_cc"
4429fi
4430
4431echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4432echo "${ECHO_T}$ac_cv_pthread" >&6
4433fi
4434
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004435# If we have set a CC compiler flag for thread support then
4436# check if it works for CXX, too.
4437ac_cv_cxx_thread=no
4438if test ! -z "$CXX"
4439then
4440echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4441echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4442ac_save_cxx="$CXX"
4443
4444if test "$ac_cv_kpthread" = "yes"
4445then
4446 CXX="$CXX -Kpthread"
4447 ac_cv_cxx_thread=yes
4448elif test "$ac_cv_kthread" = "yes"
4449then
4450 CXX="$CXX -Kthread"
4451 ac_cv_cxx_thread=yes
4452elif test "$ac_cv_pthread" = "yes"
4453then
4454 CXX="$CXX -pthread"
4455 ac_cv_cxx_thread=yes
4456fi
4457
4458if test $ac_cv_cxx_thread = yes
4459then
4460 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4461 $CXX -c conftest.$ac_ext 2>&5
4462 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4463 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4464 then
4465 ac_cv_cxx_thread=yes
4466 else
4467 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004468 fi
4469 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004470fi
4471fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004472CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004473echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4474echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4475
Michael W. Hudson54241132001-12-07 15:38:26 +00004476
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004477# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004478echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4479echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4480if test "${ac_cv_header_stdc+set}" = set; then
4481 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004482else
Martin v. Löwis11437992002-04-12 09:54:03 +00004483 cat >conftest.$ac_ext <<_ACEOF
4484#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004485/* confdefs.h. */
4486_ACEOF
4487cat confdefs.h >>conftest.$ac_ext
4488cat >>conftest.$ac_ext <<_ACEOF
4489/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004490#include <stdlib.h>
4491#include <stdarg.h>
4492#include <string.h>
4493#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004494
Skip Montanaro6dead952003-09-25 14:50:04 +00004495int
4496main ()
4497{
4498
4499 ;
4500 return 0;
4501}
Martin v. Löwis11437992002-04-12 09:54:03 +00004502_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004503rm -f conftest.$ac_objext
4504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4505 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004506 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004508 (exit $ac_status); } &&
4509 { ac_try='test -s conftest.$ac_objext'
4510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4511 (eval $ac_try) 2>&5
4512 ac_status=$?
4513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004515 ac_cv_header_stdc=yes
4516else
Martin v. Löwis11437992002-04-12 09:54:03 +00004517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004518sed 's/^/| /' conftest.$ac_ext >&5
4519
4520ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004521fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004522rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004523
4524if test $ac_cv_header_stdc = yes; then
4525 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004526 cat >conftest.$ac_ext <<_ACEOF
4527#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004528/* confdefs.h. */
4529_ACEOF
4530cat confdefs.h >>conftest.$ac_ext
4531cat >>conftest.$ac_ext <<_ACEOF
4532/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004533#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004534
4535_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004537 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004538 :
4539else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004540 ac_cv_header_stdc=no
4541fi
4542rm -f conftest*
4543
4544fi
4545
4546if test $ac_cv_header_stdc = yes; then
4547 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004548 cat >conftest.$ac_ext <<_ACEOF
4549#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004550/* confdefs.h. */
4551_ACEOF
4552cat confdefs.h >>conftest.$ac_ext
4553cat >>conftest.$ac_ext <<_ACEOF
4554/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004555#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004556
4557_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004559 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004560 :
4561else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004562 ac_cv_header_stdc=no
4563fi
4564rm -f conftest*
4565
4566fi
4567
4568if test $ac_cv_header_stdc = yes; then
4569 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004570 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004571 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004572else
Martin v. Löwis11437992002-04-12 09:54:03 +00004573 cat >conftest.$ac_ext <<_ACEOF
4574#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004575/* confdefs.h. */
4576_ACEOF
4577cat confdefs.h >>conftest.$ac_ext
4578cat >>conftest.$ac_ext <<_ACEOF
4579/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004580#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004581#if ((' ' & 0x0FF) == 0x020)
4582# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4583# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4584#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004585# define ISLOWER(c) \
4586 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004587 || ('j' <= (c) && (c) <= 'r') \
4588 || ('s' <= (c) && (c) <= 'z'))
4589# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4590#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004591
Martin v. Löwis11437992002-04-12 09:54:03 +00004592#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4593int
4594main ()
4595{
4596 int i;
4597 for (i = 0; i < 256; i++)
4598 if (XOR (islower (i), ISLOWER (i))
4599 || toupper (i) != TOUPPER (i))
4600 exit(2);
4601 exit (0);
4602}
4603_ACEOF
4604rm -f conftest$ac_exeext
4605if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4606 (eval $ac_link) 2>&5
4607 ac_status=$?
4608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4609 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4611 (eval $ac_try) 2>&5
4612 ac_status=$?
4613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4614 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004615 :
4616else
Martin v. Löwis11437992002-04-12 09:54:03 +00004617 echo "$as_me: program exited with status $ac_status" >&5
4618echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004619sed 's/^/| /' conftest.$ac_ext >&5
4620
Martin v. Löwis11437992002-04-12 09:54:03 +00004621( exit $ac_status )
4622ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004623fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004624rm -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 +00004625fi
4626fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004627fi
4628echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4629echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004630if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004631
4632cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004634_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004635
4636fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004637
Martin v. Löwis11437992002-04-12 09:54:03 +00004638
4639
4640
4641
4642
4643
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
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004675
Barry Warsawfe33b792003-01-07 22:42:49 +00004676
Neal Norwitz82251032003-05-23 14:35:24 +00004677
Martin v. Löwis11437992002-04-12 09:54:03 +00004678for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004679libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004680signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4681unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004682sys/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 +00004683sys/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 +00004684sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004685sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004686do
Martin v. Löwis11437992002-04-12 09:54:03 +00004687as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4688if eval "test \"\${$as_ac_Header+set}\" = set"; then
4689 echo "$as_me:$LINENO: checking for $ac_header" >&5
4690echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4691if eval "test \"\${$as_ac_Header+set}\" = set"; then
4692 echo $ECHO_N "(cached) $ECHO_C" >&6
4693fi
4694echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4695echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004696else
Martin v. Löwis11437992002-04-12 09:54:03 +00004697 # Is the header compilable?
4698echo "$as_me:$LINENO: checking $ac_header usability" >&5
4699echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4700cat >conftest.$ac_ext <<_ACEOF
4701#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004702/* confdefs.h. */
4703_ACEOF
4704cat confdefs.h >>conftest.$ac_ext
4705cat >>conftest.$ac_ext <<_ACEOF
4706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004707$ac_includes_default
4708#include <$ac_header>
4709_ACEOF
4710rm -f conftest.$ac_objext
4711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4712 (eval $ac_compile) 2>&5
4713 ac_status=$?
4714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4715 (exit $ac_status); } &&
4716 { ac_try='test -s conftest.$ac_objext'
4717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4718 (eval $ac_try) 2>&5
4719 ac_status=$?
4720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4721 (exit $ac_status); }; }; then
4722 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004723else
Martin v. Löwis11437992002-04-12 09:54:03 +00004724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004725sed 's/^/| /' conftest.$ac_ext >&5
4726
Martin v. Löwis11437992002-04-12 09:54:03 +00004727ac_header_compiler=no
4728fi
4729rm -f conftest.$ac_objext conftest.$ac_ext
4730echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4731echo "${ECHO_T}$ac_header_compiler" >&6
4732
4733# Is the header present?
4734echo "$as_me:$LINENO: checking $ac_header presence" >&5
4735echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4736cat >conftest.$ac_ext <<_ACEOF
4737#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004738/* confdefs.h. */
4739_ACEOF
4740cat confdefs.h >>conftest.$ac_ext
4741cat >>conftest.$ac_ext <<_ACEOF
4742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004743#include <$ac_header>
4744_ACEOF
4745if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4746 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4747 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004748 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004749 rm -f conftest.er1
4750 cat conftest.err >&5
4751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4752 (exit $ac_status); } >/dev/null; then
4753 if test -s conftest.err; then
4754 ac_cpp_err=$ac_c_preproc_warn_flag
4755 else
4756 ac_cpp_err=
4757 fi
4758else
4759 ac_cpp_err=yes
4760fi
4761if test -z "$ac_cpp_err"; then
4762 ac_header_preproc=yes
4763else
4764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004765sed 's/^/| /' conftest.$ac_ext >&5
4766
Martin v. Löwis11437992002-04-12 09:54:03 +00004767 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004768fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004769rm -f conftest.err conftest.$ac_ext
4770echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4771echo "${ECHO_T}$ac_header_preproc" >&6
4772
4773# So? What about this header?
4774case $ac_header_compiler:$ac_header_preproc in
4775 yes:no )
4776 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4777echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4778 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004779echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4780 (
4781 cat <<\_ASBOX
4782## ------------------------------------ ##
4783## Report this to bug-autoconf@gnu.org. ##
4784## ------------------------------------ ##
4785_ASBOX
4786 ) |
4787 sed "s/^/$as_me: WARNING: /" >&2
4788 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004789 no:yes )
4790 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4791echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4792 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4793echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4794 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004795echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4796 (
4797 cat <<\_ASBOX
4798## ------------------------------------ ##
4799## Report this to bug-autoconf@gnu.org. ##
4800## ------------------------------------ ##
4801_ASBOX
4802 ) |
4803 sed "s/^/$as_me: WARNING: /" >&2
4804 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004805esac
4806echo "$as_me:$LINENO: checking for $ac_header" >&5
4807echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4808if eval "test \"\${$as_ac_Header+set}\" = set"; then
4809 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004810else
Martin v. Löwis11437992002-04-12 09:54:03 +00004811 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004812fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004813echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4814echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4815
4816fi
4817if test `eval echo '${'$as_ac_Header'}'` = yes; then
4818 cat >>confdefs.h <<_ACEOF
4819#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4820_ACEOF
4821
4822fi
4823
Guido van Rossum627b2d71993-12-24 10:39:16 +00004824done
4825
Martin v. Löwis11437992002-04-12 09:54:03 +00004826
4827
4828
4829
4830
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004831ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004832for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4833 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4834echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4835echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4836if eval "test \"\${$as_ac_Header+set}\" = set"; then
4837 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004838else
Martin v. Löwis11437992002-04-12 09:54:03 +00004839 cat >conftest.$ac_ext <<_ACEOF
4840#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004841/* confdefs.h. */
4842_ACEOF
4843cat confdefs.h >>conftest.$ac_ext
4844cat >>conftest.$ac_ext <<_ACEOF
4845/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004846#include <sys/types.h>
4847#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004848
Martin v. Löwis11437992002-04-12 09:54:03 +00004849int
4850main ()
4851{
4852if ((DIR *) 0)
4853return 0;
4854 ;
4855 return 0;
4856}
4857_ACEOF
4858rm -f conftest.$ac_objext
4859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4860 (eval $ac_compile) 2>&5
4861 ac_status=$?
4862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4863 (exit $ac_status); } &&
4864 { ac_try='test -s conftest.$ac_objext'
4865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4866 (eval $ac_try) 2>&5
4867 ac_status=$?
4868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4869 (exit $ac_status); }; }; then
4870 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004871else
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004873sed 's/^/| /' conftest.$ac_ext >&5
4874
Martin v. Löwis11437992002-04-12 09:54:03 +00004875eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004876fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004877rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004878fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004879echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4880echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4881if test `eval echo '${'$as_ac_Header'}'` = yes; then
4882 cat >>confdefs.h <<_ACEOF
4883#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4884_ACEOF
4885
4886ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004887fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004888
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004889done
4890# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4891if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4893echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4894if test "${ac_cv_search_opendir+set}" = set; then
4895 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004896else
Martin v. Löwis11437992002-04-12 09:54:03 +00004897 ac_func_search_save_LIBS=$LIBS
4898ac_cv_search_opendir=no
4899cat >conftest.$ac_ext <<_ACEOF
4900#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004901/* confdefs.h. */
4902_ACEOF
4903cat confdefs.h >>conftest.$ac_ext
4904cat >>conftest.$ac_ext <<_ACEOF
4905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004906
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004907/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004908#ifdef __cplusplus
4909extern "C"
4910#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004911/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004912 builtin and then its argument prototype would still apply. */
4913char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004914int
4915main ()
4916{
4917opendir ();
4918 ;
4919 return 0;
4920}
4921_ACEOF
4922rm -f conftest.$ac_objext conftest$ac_exeext
4923if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4924 (eval $ac_link) 2>&5
4925 ac_status=$?
4926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4927 (exit $ac_status); } &&
4928 { ac_try='test -s conftest$ac_exeext'
4929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4930 (eval $ac_try) 2>&5
4931 ac_status=$?
4932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933 (exit $ac_status); }; }; then
4934 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004935else
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004937sed 's/^/| /' conftest.$ac_ext >&5
4938
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004940rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4941if test "$ac_cv_search_opendir" = no; then
4942 for ac_lib in dir; do
4943 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4944 cat >conftest.$ac_ext <<_ACEOF
4945#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004946/* confdefs.h. */
4947_ACEOF
4948cat confdefs.h >>conftest.$ac_ext
4949cat >>conftest.$ac_ext <<_ACEOF
4950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004951
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004952/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004953#ifdef __cplusplus
4954extern "C"
4955#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004956/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004957 builtin and then its argument prototype would still apply. */
4958char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004959int
4960main ()
4961{
4962opendir ();
4963 ;
4964 return 0;
4965}
4966_ACEOF
4967rm -f conftest.$ac_objext conftest$ac_exeext
4968if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4969 (eval $ac_link) 2>&5
4970 ac_status=$?
4971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4972 (exit $ac_status); } &&
4973 { ac_try='test -s conftest$ac_exeext'
4974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4975 (eval $ac_try) 2>&5
4976 ac_status=$?
4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978 (exit $ac_status); }; }; then
4979 ac_cv_search_opendir="-l$ac_lib"
4980break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004981else
Martin v. Löwis11437992002-04-12 09:54:03 +00004982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004983sed 's/^/| /' conftest.$ac_ext >&5
4984
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004985fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004986rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4987 done
4988fi
4989LIBS=$ac_func_search_save_LIBS
4990fi
4991echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4992echo "${ECHO_T}$ac_cv_search_opendir" >&6
4993if test "$ac_cv_search_opendir" != no; then
4994 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004995
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004996fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004997
Michael W. Hudson54241132001-12-07 15:38:26 +00004998else
Martin v. Löwis11437992002-04-12 09:54:03 +00004999 echo "$as_me:$LINENO: checking for library containing opendir" >&5
5000echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
5001if test "${ac_cv_search_opendir+set}" = set; then
5002 echo $ECHO_N "(cached) $ECHO_C" >&6
5003else
5004 ac_func_search_save_LIBS=$LIBS
5005ac_cv_search_opendir=no
5006cat >conftest.$ac_ext <<_ACEOF
5007#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005008/* confdefs.h. */
5009_ACEOF
5010cat confdefs.h >>conftest.$ac_ext
5011cat >>conftest.$ac_ext <<_ACEOF
5012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005013
5014/* Override any gcc2 internal prototype to avoid an error. */
5015#ifdef __cplusplus
5016extern "C"
5017#endif
5018/* We use char because int might match the return type of a gcc2
5019 builtin and then its argument prototype would still apply. */
5020char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005021int
5022main ()
5023{
5024opendir ();
5025 ;
5026 return 0;
5027}
5028_ACEOF
5029rm -f conftest.$ac_objext conftest$ac_exeext
5030if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5031 (eval $ac_link) 2>&5
5032 ac_status=$?
5033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5034 (exit $ac_status); } &&
5035 { ac_try='test -s conftest$ac_exeext'
5036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5037 (eval $ac_try) 2>&5
5038 ac_status=$?
5039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5040 (exit $ac_status); }; }; then
5041 ac_cv_search_opendir="none required"
5042else
5043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005044sed 's/^/| /' conftest.$ac_ext >&5
5045
Martin v. Löwis11437992002-04-12 09:54:03 +00005046fi
5047rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5048if test "$ac_cv_search_opendir" = no; then
5049 for ac_lib in x; do
5050 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5051 cat >conftest.$ac_ext <<_ACEOF
5052#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005053/* confdefs.h. */
5054_ACEOF
5055cat confdefs.h >>conftest.$ac_ext
5056cat >>conftest.$ac_ext <<_ACEOF
5057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005058
5059/* Override any gcc2 internal prototype to avoid an error. */
5060#ifdef __cplusplus
5061extern "C"
5062#endif
5063/* We use char because int might match the return type of a gcc2
5064 builtin and then its argument prototype would still apply. */
5065char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005066int
5067main ()
5068{
5069opendir ();
5070 ;
5071 return 0;
5072}
5073_ACEOF
5074rm -f conftest.$ac_objext conftest$ac_exeext
5075if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5076 (eval $ac_link) 2>&5
5077 ac_status=$?
5078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5079 (exit $ac_status); } &&
5080 { ac_try='test -s conftest$ac_exeext'
5081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5082 (eval $ac_try) 2>&5
5083 ac_status=$?
5084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5085 (exit $ac_status); }; }; then
5086 ac_cv_search_opendir="-l$ac_lib"
5087break
5088else
5089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005090sed 's/^/| /' conftest.$ac_ext >&5
5091
Martin v. Löwis11437992002-04-12 09:54:03 +00005092fi
5093rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5094 done
5095fi
5096LIBS=$ac_func_search_save_LIBS
5097fi
5098echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5099echo "${ECHO_T}$ac_cv_search_opendir" >&6
5100if test "$ac_cv_search_opendir" != no; then
5101 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5102
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005103fi
5104
5105fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005106
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005107echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5108echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5109if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5110 echo $ECHO_N "(cached) $ECHO_C" >&6
5111else
5112 cat >conftest.$ac_ext <<_ACEOF
5113#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005114/* confdefs.h. */
5115_ACEOF
5116cat confdefs.h >>conftest.$ac_ext
5117cat >>conftest.$ac_ext <<_ACEOF
5118/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005119#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005120int
5121main ()
5122{
5123return makedev(0, 0);
5124 ;
5125 return 0;
5126}
5127_ACEOF
5128rm -f conftest.$ac_objext conftest$ac_exeext
5129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5130 (eval $ac_link) 2>&5
5131 ac_status=$?
5132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5133 (exit $ac_status); } &&
5134 { ac_try='test -s conftest$ac_exeext'
5135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5136 (eval $ac_try) 2>&5
5137 ac_status=$?
5138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5139 (exit $ac_status); }; }; then
5140 ac_cv_header_sys_types_h_makedev=yes
5141else
5142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005143sed 's/^/| /' conftest.$ac_ext >&5
5144
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005145ac_cv_header_sys_types_h_makedev=no
5146fi
5147rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5148
5149fi
5150echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5151echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5152
5153if test $ac_cv_header_sys_types_h_makedev = no; then
5154if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5155 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5156echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5157if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5158 echo $ECHO_N "(cached) $ECHO_C" >&6
5159fi
5160echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5161echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5162else
5163 # Is the header compilable?
5164echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5165echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5166cat >conftest.$ac_ext <<_ACEOF
5167#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005168/* confdefs.h. */
5169_ACEOF
5170cat confdefs.h >>conftest.$ac_ext
5171cat >>conftest.$ac_ext <<_ACEOF
5172/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005173$ac_includes_default
5174#include <sys/mkdev.h>
5175_ACEOF
5176rm -f conftest.$ac_objext
5177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5178 (eval $ac_compile) 2>&5
5179 ac_status=$?
5180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5181 (exit $ac_status); } &&
5182 { ac_try='test -s conftest.$ac_objext'
5183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5184 (eval $ac_try) 2>&5
5185 ac_status=$?
5186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5187 (exit $ac_status); }; }; then
5188 ac_header_compiler=yes
5189else
5190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005191sed 's/^/| /' conftest.$ac_ext >&5
5192
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005193ac_header_compiler=no
5194fi
5195rm -f conftest.$ac_objext conftest.$ac_ext
5196echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5197echo "${ECHO_T}$ac_header_compiler" >&6
5198
5199# Is the header present?
5200echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5201echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5202cat >conftest.$ac_ext <<_ACEOF
5203#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005204/* confdefs.h. */
5205_ACEOF
5206cat confdefs.h >>conftest.$ac_ext
5207cat >>conftest.$ac_ext <<_ACEOF
5208/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005209#include <sys/mkdev.h>
5210_ACEOF
5211if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5212 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5213 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005214 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005215 rm -f conftest.er1
5216 cat conftest.err >&5
5217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5218 (exit $ac_status); } >/dev/null; then
5219 if test -s conftest.err; then
5220 ac_cpp_err=$ac_c_preproc_warn_flag
5221 else
5222 ac_cpp_err=
5223 fi
5224else
5225 ac_cpp_err=yes
5226fi
5227if test -z "$ac_cpp_err"; then
5228 ac_header_preproc=yes
5229else
5230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005231sed 's/^/| /' conftest.$ac_ext >&5
5232
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005233 ac_header_preproc=no
5234fi
5235rm -f conftest.err conftest.$ac_ext
5236echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5237echo "${ECHO_T}$ac_header_preproc" >&6
5238
5239# So? What about this header?
5240case $ac_header_compiler:$ac_header_preproc in
5241 yes:no )
5242 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5243echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5244 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005245echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
5246 (
5247 cat <<\_ASBOX
5248## ------------------------------------ ##
5249## Report this to bug-autoconf@gnu.org. ##
5250## ------------------------------------ ##
5251_ASBOX
5252 ) |
5253 sed "s/^/$as_me: WARNING: /" >&2
5254 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005255 no:yes )
5256 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5257echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
5258 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5259echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5260 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005261echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
5262 (
5263 cat <<\_ASBOX
5264## ------------------------------------ ##
5265## Report this to bug-autoconf@gnu.org. ##
5266## ------------------------------------ ##
5267_ASBOX
5268 ) |
5269 sed "s/^/$as_me: WARNING: /" >&2
5270 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005271esac
5272echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5273echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5274if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5275 echo $ECHO_N "(cached) $ECHO_C" >&6
5276else
5277 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5278fi
5279echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5280echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5281
5282fi
5283if test $ac_cv_header_sys_mkdev_h = yes; then
5284
5285cat >>confdefs.h <<\_ACEOF
5286#define MAJOR_IN_MKDEV 1
5287_ACEOF
5288
5289fi
5290
5291
5292
5293 if test $ac_cv_header_sys_mkdev_h = no; then
5294 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5295 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5296echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5297if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5298 echo $ECHO_N "(cached) $ECHO_C" >&6
5299fi
5300echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5301echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5302else
5303 # Is the header compilable?
5304echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5305echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5306cat >conftest.$ac_ext <<_ACEOF
5307#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005308/* confdefs.h. */
5309_ACEOF
5310cat confdefs.h >>conftest.$ac_ext
5311cat >>conftest.$ac_ext <<_ACEOF
5312/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005313$ac_includes_default
5314#include <sys/sysmacros.h>
5315_ACEOF
5316rm -f conftest.$ac_objext
5317if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5318 (eval $ac_compile) 2>&5
5319 ac_status=$?
5320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5321 (exit $ac_status); } &&
5322 { ac_try='test -s conftest.$ac_objext'
5323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5324 (eval $ac_try) 2>&5
5325 ac_status=$?
5326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5327 (exit $ac_status); }; }; then
5328 ac_header_compiler=yes
5329else
5330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005331sed 's/^/| /' conftest.$ac_ext >&5
5332
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005333ac_header_compiler=no
5334fi
5335rm -f conftest.$ac_objext conftest.$ac_ext
5336echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5337echo "${ECHO_T}$ac_header_compiler" >&6
5338
5339# Is the header present?
5340echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5341echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5342cat >conftest.$ac_ext <<_ACEOF
5343#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005344/* confdefs.h. */
5345_ACEOF
5346cat confdefs.h >>conftest.$ac_ext
5347cat >>conftest.$ac_ext <<_ACEOF
5348/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005349#include <sys/sysmacros.h>
5350_ACEOF
5351if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5352 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5353 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005354 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005355 rm -f conftest.er1
5356 cat conftest.err >&5
5357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5358 (exit $ac_status); } >/dev/null; then
5359 if test -s conftest.err; then
5360 ac_cpp_err=$ac_c_preproc_warn_flag
5361 else
5362 ac_cpp_err=
5363 fi
5364else
5365 ac_cpp_err=yes
5366fi
5367if test -z "$ac_cpp_err"; then
5368 ac_header_preproc=yes
5369else
5370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005371sed 's/^/| /' conftest.$ac_ext >&5
5372
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005373 ac_header_preproc=no
5374fi
5375rm -f conftest.err conftest.$ac_ext
5376echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5377echo "${ECHO_T}$ac_header_preproc" >&6
5378
5379# So? What about this header?
5380case $ac_header_compiler:$ac_header_preproc in
5381 yes:no )
5382 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5383echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5384 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005385echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5386 (
5387 cat <<\_ASBOX
5388## ------------------------------------ ##
5389## Report this to bug-autoconf@gnu.org. ##
5390## ------------------------------------ ##
5391_ASBOX
5392 ) |
5393 sed "s/^/$as_me: WARNING: /" >&2
5394 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005395 no:yes )
5396 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5397echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5398 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5399echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5400 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005401echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5402 (
5403 cat <<\_ASBOX
5404## ------------------------------------ ##
5405## Report this to bug-autoconf@gnu.org. ##
5406## ------------------------------------ ##
5407_ASBOX
5408 ) |
5409 sed "s/^/$as_me: WARNING: /" >&2
5410 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005411esac
5412echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5413echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5414if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5415 echo $ECHO_N "(cached) $ECHO_C" >&6
5416else
5417 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5418fi
5419echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5420echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5421
5422fi
5423if test $ac_cv_header_sys_sysmacros_h = yes; then
5424
5425cat >>confdefs.h <<\_ACEOF
5426#define MAJOR_IN_SYSMACROS 1
5427_ACEOF
5428
5429fi
5430
5431
5432 fi
5433fi
5434
Michael W. Hudson54241132001-12-07 15:38:26 +00005435
Guido van Rossum627b2d71993-12-24 10:39:16 +00005436# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005437was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005438echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5439echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5440cat >conftest.$ac_ext <<_ACEOF
5441#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005442/* confdefs.h. */
5443_ACEOF
5444cat confdefs.h >>conftest.$ac_ext
5445cat >>conftest.$ac_ext <<_ACEOF
5446/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005447#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005448
5449_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005451 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005452 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005453else
Martin v. Löwis11437992002-04-12 09:54:03 +00005454
5455
5456cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005457#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005458_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005459
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005460
Guido van Rossum627b2d71993-12-24 10:39:16 +00005461fi
5462rm -f conftest*
5463
Martin v. Löwis11437992002-04-12 09:54:03 +00005464echo "$as_me:$LINENO: result: $was_it_defined" >&5
5465echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005466
Neal Norwitz11690112002-07-30 01:08:28 +00005467# Check whether using makedev requires defining _OSF_SOURCE
5468echo "$as_me:$LINENO: checking for makedev" >&5
5469echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5470cat >conftest.$ac_ext <<_ACEOF
5471#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005472/* confdefs.h. */
5473_ACEOF
5474cat confdefs.h >>conftest.$ac_ext
5475cat >>conftest.$ac_ext <<_ACEOF
5476/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005477#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005478int
5479main ()
5480{
5481 makedev(0, 0)
5482 ;
5483 return 0;
5484}
5485_ACEOF
5486rm -f conftest.$ac_objext conftest$ac_exeext
5487if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5488 (eval $ac_link) 2>&5
5489 ac_status=$?
5490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491 (exit $ac_status); } &&
5492 { ac_try='test -s conftest$ac_exeext'
5493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5494 (eval $ac_try) 2>&5
5495 ac_status=$?
5496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5497 (exit $ac_status); }; }; then
5498 ac_cv_has_makedev=yes
5499else
5500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005501sed 's/^/| /' conftest.$ac_ext >&5
5502
Neal Norwitz11690112002-07-30 01:08:28 +00005503ac_cv_has_makedev=no
5504fi
5505rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5506if test "$ac_cv_has_makedev" = "no"; then
5507 # we didn't link, try if _OSF_SOURCE will allow us to link
5508 cat >conftest.$ac_ext <<_ACEOF
5509#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005510/* confdefs.h. */
5511_ACEOF
5512cat confdefs.h >>conftest.$ac_ext
5513cat >>conftest.$ac_ext <<_ACEOF
5514/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005515
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005516#define _OSF_SOURCE 1
5517#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005518
Neal Norwitz11690112002-07-30 01:08:28 +00005519int
5520main ()
5521{
5522 makedev(0, 0)
5523 ;
5524 return 0;
5525}
5526_ACEOF
5527rm -f conftest.$ac_objext conftest$ac_exeext
5528if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5529 (eval $ac_link) 2>&5
5530 ac_status=$?
5531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5532 (exit $ac_status); } &&
5533 { ac_try='test -s conftest$ac_exeext'
5534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5535 (eval $ac_try) 2>&5
5536 ac_status=$?
5537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5538 (exit $ac_status); }; }; then
5539 ac_cv_has_makedev=yes
5540else
5541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005542sed 's/^/| /' conftest.$ac_ext >&5
5543
Neal Norwitz11690112002-07-30 01:08:28 +00005544ac_cv_has_makedev=no
5545fi
5546rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5547 if test "$ac_cv_has_makedev" = "yes"; then
5548
5549cat >>confdefs.h <<\_ACEOF
5550#define _OSF_SOURCE 1
5551_ACEOF
5552
5553 fi
5554fi
5555echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5556echo "${ECHO_T}$ac_cv_has_makedev" >&6
5557if test "$ac_cv_has_makedev" = "yes"; then
5558
5559cat >>confdefs.h <<\_ACEOF
5560#define HAVE_MAKEDEV 1
5561_ACEOF
5562
5563fi
5564
Martin v. Löwis399a6892002-10-04 10:22:02 +00005565# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5566# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5567# defined, but the compiler does not support pragma redefine_extname,
5568# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5569# structures (such as rlimit64) without declaring them. As a
5570# work-around, disable LFS on such configurations
5571
5572use_lfs=yes
5573echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5574echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5575cat >conftest.$ac_ext <<_ACEOF
5576#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005577/* confdefs.h. */
5578_ACEOF
5579cat confdefs.h >>conftest.$ac_ext
5580cat >>conftest.$ac_ext <<_ACEOF
5581/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005582
5583#define _LARGEFILE_SOURCE 1
5584#define _FILE_OFFSET_BITS 64
5585#include <sys/resource.h>
5586
Martin v. Löwis399a6892002-10-04 10:22:02 +00005587int
5588main ()
5589{
5590struct rlimit foo;
5591 ;
5592 return 0;
5593}
5594_ACEOF
5595rm -f conftest.$ac_objext
5596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5597 (eval $ac_compile) 2>&5
5598 ac_status=$?
5599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5600 (exit $ac_status); } &&
5601 { ac_try='test -s conftest.$ac_objext'
5602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5603 (eval $ac_try) 2>&5
5604 ac_status=$?
5605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5606 (exit $ac_status); }; }; then
5607 sol_lfs_bug=no
5608else
5609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005610sed 's/^/| /' conftest.$ac_ext >&5
5611
Martin v. Löwis399a6892002-10-04 10:22:02 +00005612sol_lfs_bug=yes
5613fi
5614rm -f conftest.$ac_objext conftest.$ac_ext
5615echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5616echo "${ECHO_T}$sol_lfs_bug" >&6
5617if test "$sol_lfs_bug" = "yes"; then
5618 use_lfs=no
5619fi
5620
5621if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005622# Two defines needed to enable largefile support on various platforms
5623# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005624
Martin v. Löwis11437992002-04-12 09:54:03 +00005625cat >>confdefs.h <<\_ACEOF
5626#define _LARGEFILE_SOURCE 1
5627_ACEOF
5628
5629
5630cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005631#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005632_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005633
Martin v. Löwis399a6892002-10-04 10:22:02 +00005634fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005635
Guido van Rossum84e7b241996-08-19 21:59:00 +00005636# Add some code to confdefs.h so that the test for off_t works on SCO
5637cat >> confdefs.h <<\EOF
5638#if defined(SCO_DS)
5639#undef _OFF_T
5640#endif
5641EOF
5642
Guido van Rossumef2255b2000-03-10 22:30:29 +00005643# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005644echo "$as_me:$LINENO: checking for mode_t" >&5
5645echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5646if test "${ac_cv_type_mode_t+set}" = set; then
5647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005648else
Martin v. Löwis11437992002-04-12 09:54:03 +00005649 cat >conftest.$ac_ext <<_ACEOF
5650#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005651/* confdefs.h. */
5652_ACEOF
5653cat confdefs.h >>conftest.$ac_ext
5654cat >>conftest.$ac_ext <<_ACEOF
5655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005656$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005657int
5658main ()
5659{
5660if ((mode_t *) 0)
5661 return 0;
5662if (sizeof (mode_t))
5663 return 0;
5664 ;
5665 return 0;
5666}
5667_ACEOF
5668rm -f conftest.$ac_objext
5669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5670 (eval $ac_compile) 2>&5
5671 ac_status=$?
5672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5673 (exit $ac_status); } &&
5674 { ac_try='test -s conftest.$ac_objext'
5675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5676 (eval $ac_try) 2>&5
5677 ac_status=$?
5678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5679 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005680 ac_cv_type_mode_t=yes
5681else
Martin v. Löwis11437992002-04-12 09:54:03 +00005682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005683sed 's/^/| /' conftest.$ac_ext >&5
5684
Martin v. Löwis11437992002-04-12 09:54:03 +00005685ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005686fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005687rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005688fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005689echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5690echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5691if test $ac_cv_type_mode_t = yes; then
5692 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005693else
Martin v. Löwis11437992002-04-12 09:54:03 +00005694
5695cat >>confdefs.h <<_ACEOF
5696#define mode_t int
5697_ACEOF
5698
5699fi
5700
5701echo "$as_me:$LINENO: checking for off_t" >&5
5702echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5703if test "${ac_cv_type_off_t+set}" = set; then
5704 echo $ECHO_N "(cached) $ECHO_C" >&6
5705else
5706 cat >conftest.$ac_ext <<_ACEOF
5707#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005708/* confdefs.h. */
5709_ACEOF
5710cat confdefs.h >>conftest.$ac_ext
5711cat >>conftest.$ac_ext <<_ACEOF
5712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005713$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005714int
5715main ()
5716{
5717if ((off_t *) 0)
5718 return 0;
5719if (sizeof (off_t))
5720 return 0;
5721 ;
5722 return 0;
5723}
5724_ACEOF
5725rm -f conftest.$ac_objext
5726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5727 (eval $ac_compile) 2>&5
5728 ac_status=$?
5729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5730 (exit $ac_status); } &&
5731 { ac_try='test -s conftest.$ac_objext'
5732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5733 (eval $ac_try) 2>&5
5734 ac_status=$?
5735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5736 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005737 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005738else
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005740sed 's/^/| /' conftest.$ac_ext >&5
5741
Martin v. Löwis11437992002-04-12 09:54:03 +00005742ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005743fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005744rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005745fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005746echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5747echo "${ECHO_T}$ac_cv_type_off_t" >&6
5748if test $ac_cv_type_off_t = yes; then
5749 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005750else
Martin v. Löwis11437992002-04-12 09:54:03 +00005751
5752cat >>confdefs.h <<_ACEOF
5753#define off_t long
5754_ACEOF
5755
5756fi
5757
5758echo "$as_me:$LINENO: checking for pid_t" >&5
5759echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5760if test "${ac_cv_type_pid_t+set}" = set; then
5761 echo $ECHO_N "(cached) $ECHO_C" >&6
5762else
5763 cat >conftest.$ac_ext <<_ACEOF
5764#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005765/* confdefs.h. */
5766_ACEOF
5767cat confdefs.h >>conftest.$ac_ext
5768cat >>conftest.$ac_ext <<_ACEOF
5769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005770$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005771int
5772main ()
5773{
5774if ((pid_t *) 0)
5775 return 0;
5776if (sizeof (pid_t))
5777 return 0;
5778 ;
5779 return 0;
5780}
5781_ACEOF
5782rm -f conftest.$ac_objext
5783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5784 (eval $ac_compile) 2>&5
5785 ac_status=$?
5786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5787 (exit $ac_status); } &&
5788 { ac_try='test -s conftest.$ac_objext'
5789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5790 (eval $ac_try) 2>&5
5791 ac_status=$?
5792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5793 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005794 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005795else
Martin v. Löwis11437992002-04-12 09:54:03 +00005796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005797sed 's/^/| /' conftest.$ac_ext >&5
5798
Martin v. Löwis11437992002-04-12 09:54:03 +00005799ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005800fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005801rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005802fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005803echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5804echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5805if test $ac_cv_type_pid_t = yes; then
5806 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005807else
Martin v. Löwis11437992002-04-12 09:54:03 +00005808
5809cat >>confdefs.h <<_ACEOF
5810#define pid_t int
5811_ACEOF
5812
5813fi
5814
5815echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5816echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5817if test "${ac_cv_type_signal+set}" = set; then
5818 echo $ECHO_N "(cached) $ECHO_C" >&6
5819else
5820 cat >conftest.$ac_ext <<_ACEOF
5821#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005822/* confdefs.h. */
5823_ACEOF
5824cat confdefs.h >>conftest.$ac_ext
5825cat >>conftest.$ac_ext <<_ACEOF
5826/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005827#include <sys/types.h>
5828#include <signal.h>
5829#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005830# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005831#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005832#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005833extern "C" void (*signal (int, void (*)(int)))(int);
5834#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005835void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005836#endif
5837
Martin v. Löwis11437992002-04-12 09:54:03 +00005838int
5839main ()
5840{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005841int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005842 ;
5843 return 0;
5844}
5845_ACEOF
5846rm -f conftest.$ac_objext
5847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5848 (eval $ac_compile) 2>&5
5849 ac_status=$?
5850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5851 (exit $ac_status); } &&
5852 { ac_try='test -s conftest.$ac_objext'
5853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5854 (eval $ac_try) 2>&5
5855 ac_status=$?
5856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5857 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005858 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005859else
Martin v. Löwis11437992002-04-12 09:54:03 +00005860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005861sed 's/^/| /' conftest.$ac_ext >&5
5862
Martin v. Löwis11437992002-04-12 09:54:03 +00005863ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005864fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005865rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005866fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005867echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5868echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005869
Martin v. Löwis11437992002-04-12 09:54:03 +00005870cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005871#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005872_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005873
Michael W. Hudson54241132001-12-07 15:38:26 +00005874
Martin v. Löwis11437992002-04-12 09:54:03 +00005875echo "$as_me:$LINENO: checking for size_t" >&5
5876echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5877if test "${ac_cv_type_size_t+set}" = set; then
5878 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005879else
Martin v. Löwis11437992002-04-12 09:54:03 +00005880 cat >conftest.$ac_ext <<_ACEOF
5881#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005882/* confdefs.h. */
5883_ACEOF
5884cat confdefs.h >>conftest.$ac_ext
5885cat >>conftest.$ac_ext <<_ACEOF
5886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005887$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005888int
5889main ()
5890{
5891if ((size_t *) 0)
5892 return 0;
5893if (sizeof (size_t))
5894 return 0;
5895 ;
5896 return 0;
5897}
5898_ACEOF
5899rm -f conftest.$ac_objext
5900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5901 (eval $ac_compile) 2>&5
5902 ac_status=$?
5903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5904 (exit $ac_status); } &&
5905 { ac_try='test -s conftest.$ac_objext'
5906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5907 (eval $ac_try) 2>&5
5908 ac_status=$?
5909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5910 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005911 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005912else
Martin v. Löwis11437992002-04-12 09:54:03 +00005913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005914sed 's/^/| /' conftest.$ac_ext >&5
5915
Martin v. Löwis11437992002-04-12 09:54:03 +00005916ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005917fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005918rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005919fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005920echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5921echo "${ECHO_T}$ac_cv_type_size_t" >&6
5922if test $ac_cv_type_size_t = yes; then
5923 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005924else
Martin v. Löwis11437992002-04-12 09:54:03 +00005925
5926cat >>confdefs.h <<_ACEOF
5927#define size_t unsigned
5928_ACEOF
5929
5930fi
5931
5932echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5933echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5934if test "${ac_cv_type_uid_t+set}" = set; then
5935 echo $ECHO_N "(cached) $ECHO_C" >&6
5936else
5937 cat >conftest.$ac_ext <<_ACEOF
5938#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005939/* confdefs.h. */
5940_ACEOF
5941cat confdefs.h >>conftest.$ac_ext
5942cat >>conftest.$ac_ext <<_ACEOF
5943/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005944#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005945
5946_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005948 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005949 ac_cv_type_uid_t=yes
5950else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005951 ac_cv_type_uid_t=no
5952fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005953rm -f conftest*
5954
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005955fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005956echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5957echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005958if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005959
Martin v. Löwis11437992002-04-12 09:54:03 +00005960cat >>confdefs.h <<\_ACEOF
5961#define uid_t int
5962_ACEOF
5963
5964
5965cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005966#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005967_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005968
5969fi
5970
Jack Jansendd19cf82001-12-06 22:36:17 +00005971
Michael W. Hudson54241132001-12-07 15:38:26 +00005972# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005973echo "$as_me:$LINENO: checking for int" >&5
5974echo $ECHO_N "checking for int... $ECHO_C" >&6
5975if test "${ac_cv_type_int+set}" = set; then
5976 echo $ECHO_N "(cached) $ECHO_C" >&6
5977else
5978 cat >conftest.$ac_ext <<_ACEOF
5979#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005980/* confdefs.h. */
5981_ACEOF
5982cat confdefs.h >>conftest.$ac_ext
5983cat >>conftest.$ac_ext <<_ACEOF
5984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005985$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005986int
5987main ()
5988{
5989if ((int *) 0)
5990 return 0;
5991if (sizeof (int))
5992 return 0;
5993 ;
5994 return 0;
5995}
5996_ACEOF
5997rm -f conftest.$ac_objext
5998if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5999 (eval $ac_compile) 2>&5
6000 ac_status=$?
6001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6002 (exit $ac_status); } &&
6003 { ac_try='test -s conftest.$ac_objext'
6004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6005 (eval $ac_try) 2>&5
6006 ac_status=$?
6007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6008 (exit $ac_status); }; }; then
6009 ac_cv_type_int=yes
6010else
6011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006012sed 's/^/| /' conftest.$ac_ext >&5
6013
Martin v. Löwis11437992002-04-12 09:54:03 +00006014ac_cv_type_int=no
6015fi
6016rm -f conftest.$ac_objext conftest.$ac_ext
6017fi
6018echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6019echo "${ECHO_T}$ac_cv_type_int" >&6
6020
6021echo "$as_me:$LINENO: checking size of int" >&5
6022echo $ECHO_N "checking size of int... $ECHO_C" >&6
6023if test "${ac_cv_sizeof_int+set}" = set; then
6024 echo $ECHO_N "(cached) $ECHO_C" >&6
6025else
6026 if test "$ac_cv_type_int" = yes; then
6027 # The cast to unsigned long works around a bug in the HP C Compiler
6028 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6029 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6030 # This bug is HP SR number 8606223364.
6031 if test "$cross_compiling" = yes; then
6032 # Depending upon the size, compute the lo and hi bounds.
6033cat >conftest.$ac_ext <<_ACEOF
6034#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006035/* confdefs.h. */
6036_ACEOF
6037cat confdefs.h >>conftest.$ac_ext
6038cat >>conftest.$ac_ext <<_ACEOF
6039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006040$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006041int
6042main ()
6043{
6044static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6045test_array [0] = 0
6046
6047 ;
6048 return 0;
6049}
6050_ACEOF
6051rm -f conftest.$ac_objext
6052if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6053 (eval $ac_compile) 2>&5
6054 ac_status=$?
6055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6056 (exit $ac_status); } &&
6057 { ac_try='test -s conftest.$ac_objext'
6058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6059 (eval $ac_try) 2>&5
6060 ac_status=$?
6061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6062 (exit $ac_status); }; }; then
6063 ac_lo=0 ac_mid=0
6064 while :; do
6065 cat >conftest.$ac_ext <<_ACEOF
6066#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006067/* confdefs.h. */
6068_ACEOF
6069cat confdefs.h >>conftest.$ac_ext
6070cat >>conftest.$ac_ext <<_ACEOF
6071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006072$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006073int
6074main ()
6075{
6076static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6077test_array [0] = 0
6078
6079 ;
6080 return 0;
6081}
6082_ACEOF
6083rm -f conftest.$ac_objext
6084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6085 (eval $ac_compile) 2>&5
6086 ac_status=$?
6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6088 (exit $ac_status); } &&
6089 { ac_try='test -s conftest.$ac_objext'
6090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6091 (eval $ac_try) 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); }; }; then
6095 ac_hi=$ac_mid; break
6096else
6097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006098sed 's/^/| /' conftest.$ac_ext >&5
6099
Martin v. Löwis11437992002-04-12 09:54:03 +00006100ac_lo=`expr $ac_mid + 1`
6101 if test $ac_lo -le $ac_mid; then
6102 ac_lo= ac_hi=
6103 break
6104 fi
6105 ac_mid=`expr 2 '*' $ac_mid + 1`
6106fi
6107rm -f conftest.$ac_objext conftest.$ac_ext
6108 done
6109else
6110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006111sed 's/^/| /' conftest.$ac_ext >&5
6112
Martin v. Löwis11437992002-04-12 09:54:03 +00006113cat >conftest.$ac_ext <<_ACEOF
6114#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006115/* confdefs.h. */
6116_ACEOF
6117cat confdefs.h >>conftest.$ac_ext
6118cat >>conftest.$ac_ext <<_ACEOF
6119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006120$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006121int
6122main ()
6123{
6124static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6125test_array [0] = 0
6126
6127 ;
6128 return 0;
6129}
6130_ACEOF
6131rm -f conftest.$ac_objext
6132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6133 (eval $ac_compile) 2>&5
6134 ac_status=$?
6135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6136 (exit $ac_status); } &&
6137 { ac_try='test -s conftest.$ac_objext'
6138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6139 (eval $ac_try) 2>&5
6140 ac_status=$?
6141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6142 (exit $ac_status); }; }; then
6143 ac_hi=-1 ac_mid=-1
6144 while :; do
6145 cat >conftest.$ac_ext <<_ACEOF
6146#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006147/* confdefs.h. */
6148_ACEOF
6149cat confdefs.h >>conftest.$ac_ext
6150cat >>conftest.$ac_ext <<_ACEOF
6151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006152$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006153int
6154main ()
6155{
6156static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6157test_array [0] = 0
6158
6159 ;
6160 return 0;
6161}
6162_ACEOF
6163rm -f conftest.$ac_objext
6164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6165 (eval $ac_compile) 2>&5
6166 ac_status=$?
6167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6168 (exit $ac_status); } &&
6169 { ac_try='test -s conftest.$ac_objext'
6170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6171 (eval $ac_try) 2>&5
6172 ac_status=$?
6173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6174 (exit $ac_status); }; }; then
6175 ac_lo=$ac_mid; break
6176else
6177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006178sed 's/^/| /' conftest.$ac_ext >&5
6179
Martin v. Löwis11437992002-04-12 09:54:03 +00006180ac_hi=`expr '(' $ac_mid ')' - 1`
6181 if test $ac_mid -le $ac_hi; then
6182 ac_lo= ac_hi=
6183 break
6184 fi
6185 ac_mid=`expr 2 '*' $ac_mid`
6186fi
6187rm -f conftest.$ac_objext conftest.$ac_ext
6188 done
6189else
6190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006191sed 's/^/| /' conftest.$ac_ext >&5
6192
Martin v. Löwis11437992002-04-12 09:54:03 +00006193ac_lo= ac_hi=
6194fi
6195rm -f conftest.$ac_objext conftest.$ac_ext
6196fi
6197rm -f conftest.$ac_objext conftest.$ac_ext
6198# Binary search between lo and hi bounds.
6199while test "x$ac_lo" != "x$ac_hi"; do
6200 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6201 cat >conftest.$ac_ext <<_ACEOF
6202#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006203/* confdefs.h. */
6204_ACEOF
6205cat confdefs.h >>conftest.$ac_ext
6206cat >>conftest.$ac_ext <<_ACEOF
6207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006208$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006209int
6210main ()
6211{
6212static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6213test_array [0] = 0
6214
6215 ;
6216 return 0;
6217}
6218_ACEOF
6219rm -f conftest.$ac_objext
6220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6221 (eval $ac_compile) 2>&5
6222 ac_status=$?
6223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6224 (exit $ac_status); } &&
6225 { ac_try='test -s conftest.$ac_objext'
6226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6227 (eval $ac_try) 2>&5
6228 ac_status=$?
6229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6230 (exit $ac_status); }; }; then
6231 ac_hi=$ac_mid
6232else
6233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006234sed 's/^/| /' conftest.$ac_ext >&5
6235
Martin v. Löwis11437992002-04-12 09:54:03 +00006236ac_lo=`expr '(' $ac_mid ')' + 1`
6237fi
6238rm -f conftest.$ac_objext conftest.$ac_ext
6239done
6240case $ac_lo in
6241?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006242'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6243See \`config.log' for more details." >&5
6244echo "$as_me: error: cannot compute sizeof (int), 77
6245See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006246 { (exit 1); exit 1; }; } ;;
6247esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006248else
6249 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006250 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6251See \`config.log' for more details." >&5
6252echo "$as_me: error: cannot run test program while cross compiling
6253See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006254 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006255else
Martin v. Löwis11437992002-04-12 09:54:03 +00006256 cat >conftest.$ac_ext <<_ACEOF
6257#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006258/* confdefs.h. */
6259_ACEOF
6260cat confdefs.h >>conftest.$ac_ext
6261cat >>conftest.$ac_ext <<_ACEOF
6262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006263$ac_includes_default
6264long longval () { return (long) (sizeof (int)); }
6265unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006266#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006267#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006268int
6269main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006270{
Martin v. Löwis11437992002-04-12 09:54:03 +00006271
6272 FILE *f = fopen ("conftest.val", "w");
6273 if (! f)
6274 exit (1);
6275 if (((long) (sizeof (int))) < 0)
6276 {
6277 long i = longval ();
6278 if (i != ((long) (sizeof (int))))
6279 exit (1);
6280 fprintf (f, "%ld\n", i);
6281 }
6282 else
6283 {
6284 unsigned long i = ulongval ();
6285 if (i != ((long) (sizeof (int))))
6286 exit (1);
6287 fprintf (f, "%lu\n", i);
6288 }
6289 exit (ferror (f) || fclose (f) != 0);
6290
6291 ;
6292 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006293}
Martin v. Löwis11437992002-04-12 09:54:03 +00006294_ACEOF
6295rm -f conftest$ac_exeext
6296if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6297 (eval $ac_link) 2>&5
6298 ac_status=$?
6299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6300 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6302 (eval $ac_try) 2>&5
6303 ac_status=$?
6304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6305 (exit $ac_status); }; }; then
6306 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006307else
Martin v. Löwis11437992002-04-12 09:54:03 +00006308 echo "$as_me: program exited with status $ac_status" >&5
6309echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006310sed 's/^/| /' conftest.$ac_ext >&5
6311
Martin v. Löwis11437992002-04-12 09:54:03 +00006312( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006313{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6314See \`config.log' for more details." >&5
6315echo "$as_me: error: cannot compute sizeof (int), 77
6316See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006317 { (exit 1); exit 1; }; }
6318fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006319rm -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 +00006320fi
6321fi
6322rm -f conftest.val
6323else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006324 ac_cv_sizeof_int=0
6325fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006326fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006327echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6328echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6329cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006330#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006331_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006332
6333
Martin v. Löwis11437992002-04-12 09:54:03 +00006334echo "$as_me:$LINENO: checking for long" >&5
6335echo $ECHO_N "checking for long... $ECHO_C" >&6
6336if test "${ac_cv_type_long+set}" = set; then
6337 echo $ECHO_N "(cached) $ECHO_C" >&6
6338else
6339 cat >conftest.$ac_ext <<_ACEOF
6340#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006341/* confdefs.h. */
6342_ACEOF
6343cat confdefs.h >>conftest.$ac_ext
6344cat >>conftest.$ac_ext <<_ACEOF
6345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006346$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006347int
6348main ()
6349{
6350if ((long *) 0)
6351 return 0;
6352if (sizeof (long))
6353 return 0;
6354 ;
6355 return 0;
6356}
6357_ACEOF
6358rm -f conftest.$ac_objext
6359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6360 (eval $ac_compile) 2>&5
6361 ac_status=$?
6362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6363 (exit $ac_status); } &&
6364 { ac_try='test -s conftest.$ac_objext'
6365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6366 (eval $ac_try) 2>&5
6367 ac_status=$?
6368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6369 (exit $ac_status); }; }; then
6370 ac_cv_type_long=yes
6371else
6372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006373sed 's/^/| /' conftest.$ac_ext >&5
6374
Martin v. Löwis11437992002-04-12 09:54:03 +00006375ac_cv_type_long=no
6376fi
6377rm -f conftest.$ac_objext conftest.$ac_ext
6378fi
6379echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6380echo "${ECHO_T}$ac_cv_type_long" >&6
6381
6382echo "$as_me:$LINENO: checking size of long" >&5
6383echo $ECHO_N "checking size of long... $ECHO_C" >&6
6384if test "${ac_cv_sizeof_long+set}" = set; then
6385 echo $ECHO_N "(cached) $ECHO_C" >&6
6386else
6387 if test "$ac_cv_type_long" = yes; then
6388 # The cast to unsigned long works around a bug in the HP C Compiler
6389 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6390 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6391 # This bug is HP SR number 8606223364.
6392 if test "$cross_compiling" = yes; then
6393 # Depending upon the size, compute the lo and hi bounds.
6394cat >conftest.$ac_ext <<_ACEOF
6395#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006396/* confdefs.h. */
6397_ACEOF
6398cat confdefs.h >>conftest.$ac_ext
6399cat >>conftest.$ac_ext <<_ACEOF
6400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006401$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006402int
6403main ()
6404{
6405static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6406test_array [0] = 0
6407
6408 ;
6409 return 0;
6410}
6411_ACEOF
6412rm -f conftest.$ac_objext
6413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6414 (eval $ac_compile) 2>&5
6415 ac_status=$?
6416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6417 (exit $ac_status); } &&
6418 { ac_try='test -s conftest.$ac_objext'
6419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6420 (eval $ac_try) 2>&5
6421 ac_status=$?
6422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6423 (exit $ac_status); }; }; then
6424 ac_lo=0 ac_mid=0
6425 while :; do
6426 cat >conftest.$ac_ext <<_ACEOF
6427#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006428/* confdefs.h. */
6429_ACEOF
6430cat confdefs.h >>conftest.$ac_ext
6431cat >>conftest.$ac_ext <<_ACEOF
6432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006433$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006434int
6435main ()
6436{
6437static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6438test_array [0] = 0
6439
6440 ;
6441 return 0;
6442}
6443_ACEOF
6444rm -f conftest.$ac_objext
6445if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6446 (eval $ac_compile) 2>&5
6447 ac_status=$?
6448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6449 (exit $ac_status); } &&
6450 { ac_try='test -s conftest.$ac_objext'
6451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6452 (eval $ac_try) 2>&5
6453 ac_status=$?
6454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6455 (exit $ac_status); }; }; then
6456 ac_hi=$ac_mid; break
6457else
6458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006459sed 's/^/| /' conftest.$ac_ext >&5
6460
Martin v. Löwis11437992002-04-12 09:54:03 +00006461ac_lo=`expr $ac_mid + 1`
6462 if test $ac_lo -le $ac_mid; then
6463 ac_lo= ac_hi=
6464 break
6465 fi
6466 ac_mid=`expr 2 '*' $ac_mid + 1`
6467fi
6468rm -f conftest.$ac_objext conftest.$ac_ext
6469 done
6470else
6471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006472sed 's/^/| /' conftest.$ac_ext >&5
6473
Martin v. Löwis11437992002-04-12 09:54:03 +00006474cat >conftest.$ac_ext <<_ACEOF
6475#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006476/* confdefs.h. */
6477_ACEOF
6478cat confdefs.h >>conftest.$ac_ext
6479cat >>conftest.$ac_ext <<_ACEOF
6480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006481$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006482int
6483main ()
6484{
6485static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6486test_array [0] = 0
6487
6488 ;
6489 return 0;
6490}
6491_ACEOF
6492rm -f conftest.$ac_objext
6493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6494 (eval $ac_compile) 2>&5
6495 ac_status=$?
6496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6497 (exit $ac_status); } &&
6498 { ac_try='test -s conftest.$ac_objext'
6499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6500 (eval $ac_try) 2>&5
6501 ac_status=$?
6502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6503 (exit $ac_status); }; }; then
6504 ac_hi=-1 ac_mid=-1
6505 while :; do
6506 cat >conftest.$ac_ext <<_ACEOF
6507#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006508/* confdefs.h. */
6509_ACEOF
6510cat confdefs.h >>conftest.$ac_ext
6511cat >>conftest.$ac_ext <<_ACEOF
6512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006513$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006514int
6515main ()
6516{
6517static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6518test_array [0] = 0
6519
6520 ;
6521 return 0;
6522}
6523_ACEOF
6524rm -f conftest.$ac_objext
6525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6526 (eval $ac_compile) 2>&5
6527 ac_status=$?
6528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6529 (exit $ac_status); } &&
6530 { ac_try='test -s conftest.$ac_objext'
6531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6532 (eval $ac_try) 2>&5
6533 ac_status=$?
6534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6535 (exit $ac_status); }; }; then
6536 ac_lo=$ac_mid; break
6537else
6538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006539sed 's/^/| /' conftest.$ac_ext >&5
6540
Martin v. Löwis11437992002-04-12 09:54:03 +00006541ac_hi=`expr '(' $ac_mid ')' - 1`
6542 if test $ac_mid -le $ac_hi; then
6543 ac_lo= ac_hi=
6544 break
6545 fi
6546 ac_mid=`expr 2 '*' $ac_mid`
6547fi
6548rm -f conftest.$ac_objext conftest.$ac_ext
6549 done
6550else
6551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006552sed 's/^/| /' conftest.$ac_ext >&5
6553
Martin v. Löwis11437992002-04-12 09:54:03 +00006554ac_lo= ac_hi=
6555fi
6556rm -f conftest.$ac_objext conftest.$ac_ext
6557fi
6558rm -f conftest.$ac_objext conftest.$ac_ext
6559# Binary search between lo and hi bounds.
6560while test "x$ac_lo" != "x$ac_hi"; do
6561 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6562 cat >conftest.$ac_ext <<_ACEOF
6563#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006564/* confdefs.h. */
6565_ACEOF
6566cat confdefs.h >>conftest.$ac_ext
6567cat >>conftest.$ac_ext <<_ACEOF
6568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006569$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006570int
6571main ()
6572{
6573static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6574test_array [0] = 0
6575
6576 ;
6577 return 0;
6578}
6579_ACEOF
6580rm -f conftest.$ac_objext
6581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6582 (eval $ac_compile) 2>&5
6583 ac_status=$?
6584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6585 (exit $ac_status); } &&
6586 { ac_try='test -s conftest.$ac_objext'
6587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6588 (eval $ac_try) 2>&5
6589 ac_status=$?
6590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6591 (exit $ac_status); }; }; then
6592 ac_hi=$ac_mid
6593else
6594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006595sed 's/^/| /' conftest.$ac_ext >&5
6596
Martin v. Löwis11437992002-04-12 09:54:03 +00006597ac_lo=`expr '(' $ac_mid ')' + 1`
6598fi
6599rm -f conftest.$ac_objext conftest.$ac_ext
6600done
6601case $ac_lo in
6602?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006603'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6604See \`config.log' for more details." >&5
6605echo "$as_me: error: cannot compute sizeof (long), 77
6606See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006607 { (exit 1); exit 1; }; } ;;
6608esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006609else
6610 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006611 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6612See \`config.log' for more details." >&5
6613echo "$as_me: error: cannot run test program while cross compiling
6614See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006615 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006616else
Martin v. Löwis11437992002-04-12 09:54:03 +00006617 cat >conftest.$ac_ext <<_ACEOF
6618#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006619/* confdefs.h. */
6620_ACEOF
6621cat confdefs.h >>conftest.$ac_ext
6622cat >>conftest.$ac_ext <<_ACEOF
6623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006624$ac_includes_default
6625long longval () { return (long) (sizeof (long)); }
6626unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006627#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006628#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006629int
6630main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006631{
Martin v. Löwis11437992002-04-12 09:54:03 +00006632
6633 FILE *f = fopen ("conftest.val", "w");
6634 if (! f)
6635 exit (1);
6636 if (((long) (sizeof (long))) < 0)
6637 {
6638 long i = longval ();
6639 if (i != ((long) (sizeof (long))))
6640 exit (1);
6641 fprintf (f, "%ld\n", i);
6642 }
6643 else
6644 {
6645 unsigned long i = ulongval ();
6646 if (i != ((long) (sizeof (long))))
6647 exit (1);
6648 fprintf (f, "%lu\n", i);
6649 }
6650 exit (ferror (f) || fclose (f) != 0);
6651
6652 ;
6653 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006654}
Martin v. Löwis11437992002-04-12 09:54:03 +00006655_ACEOF
6656rm -f conftest$ac_exeext
6657if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6658 (eval $ac_link) 2>&5
6659 ac_status=$?
6660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6663 (eval $ac_try) 2>&5
6664 ac_status=$?
6665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6666 (exit $ac_status); }; }; then
6667 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006668else
Martin v. Löwis11437992002-04-12 09:54:03 +00006669 echo "$as_me: program exited with status $ac_status" >&5
6670echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006671sed 's/^/| /' conftest.$ac_ext >&5
6672
Martin v. Löwis11437992002-04-12 09:54:03 +00006673( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006674{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6675See \`config.log' for more details." >&5
6676echo "$as_me: error: cannot compute sizeof (long), 77
6677See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006678 { (exit 1); exit 1; }; }
6679fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006680rm -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 +00006681fi
6682fi
6683rm -f conftest.val
6684else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006685 ac_cv_sizeof_long=0
6686fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006687fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006688echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6689echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6690cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006691#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006692_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006693
6694
Martin v. Löwis11437992002-04-12 09:54:03 +00006695echo "$as_me:$LINENO: checking for void *" >&5
6696echo $ECHO_N "checking for void *... $ECHO_C" >&6
6697if test "${ac_cv_type_void_p+set}" = set; then
6698 echo $ECHO_N "(cached) $ECHO_C" >&6
6699else
6700 cat >conftest.$ac_ext <<_ACEOF
6701#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006702/* confdefs.h. */
6703_ACEOF
6704cat confdefs.h >>conftest.$ac_ext
6705cat >>conftest.$ac_ext <<_ACEOF
6706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006707$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006708int
6709main ()
6710{
6711if ((void * *) 0)
6712 return 0;
6713if (sizeof (void *))
6714 return 0;
6715 ;
6716 return 0;
6717}
6718_ACEOF
6719rm -f conftest.$ac_objext
6720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6721 (eval $ac_compile) 2>&5
6722 ac_status=$?
6723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6724 (exit $ac_status); } &&
6725 { ac_try='test -s conftest.$ac_objext'
6726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6727 (eval $ac_try) 2>&5
6728 ac_status=$?
6729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6730 (exit $ac_status); }; }; then
6731 ac_cv_type_void_p=yes
6732else
6733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006734sed 's/^/| /' conftest.$ac_ext >&5
6735
Martin v. Löwis11437992002-04-12 09:54:03 +00006736ac_cv_type_void_p=no
6737fi
6738rm -f conftest.$ac_objext conftest.$ac_ext
6739fi
6740echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6741echo "${ECHO_T}$ac_cv_type_void_p" >&6
6742
6743echo "$as_me:$LINENO: checking size of void *" >&5
6744echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6745if test "${ac_cv_sizeof_void_p+set}" = set; then
6746 echo $ECHO_N "(cached) $ECHO_C" >&6
6747else
6748 if test "$ac_cv_type_void_p" = yes; then
6749 # The cast to unsigned long works around a bug in the HP C Compiler
6750 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6751 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6752 # This bug is HP SR number 8606223364.
6753 if test "$cross_compiling" = yes; then
6754 # Depending upon the size, compute the lo and hi bounds.
6755cat >conftest.$ac_ext <<_ACEOF
6756#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006757/* confdefs.h. */
6758_ACEOF
6759cat confdefs.h >>conftest.$ac_ext
6760cat >>conftest.$ac_ext <<_ACEOF
6761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006762$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006763int
6764main ()
6765{
6766static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6767test_array [0] = 0
6768
6769 ;
6770 return 0;
6771}
6772_ACEOF
6773rm -f conftest.$ac_objext
6774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6775 (eval $ac_compile) 2>&5
6776 ac_status=$?
6777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6778 (exit $ac_status); } &&
6779 { ac_try='test -s conftest.$ac_objext'
6780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6781 (eval $ac_try) 2>&5
6782 ac_status=$?
6783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6784 (exit $ac_status); }; }; then
6785 ac_lo=0 ac_mid=0
6786 while :; do
6787 cat >conftest.$ac_ext <<_ACEOF
6788#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006789/* confdefs.h. */
6790_ACEOF
6791cat confdefs.h >>conftest.$ac_ext
6792cat >>conftest.$ac_ext <<_ACEOF
6793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006794$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006795int
6796main ()
6797{
6798static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6799test_array [0] = 0
6800
6801 ;
6802 return 0;
6803}
6804_ACEOF
6805rm -f conftest.$ac_objext
6806if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6807 (eval $ac_compile) 2>&5
6808 ac_status=$?
6809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6810 (exit $ac_status); } &&
6811 { ac_try='test -s conftest.$ac_objext'
6812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6813 (eval $ac_try) 2>&5
6814 ac_status=$?
6815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6816 (exit $ac_status); }; }; then
6817 ac_hi=$ac_mid; break
6818else
6819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006820sed 's/^/| /' conftest.$ac_ext >&5
6821
Martin v. Löwis11437992002-04-12 09:54:03 +00006822ac_lo=`expr $ac_mid + 1`
6823 if test $ac_lo -le $ac_mid; then
6824 ac_lo= ac_hi=
6825 break
6826 fi
6827 ac_mid=`expr 2 '*' $ac_mid + 1`
6828fi
6829rm -f conftest.$ac_objext conftest.$ac_ext
6830 done
6831else
6832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006833sed 's/^/| /' conftest.$ac_ext >&5
6834
Martin v. Löwis11437992002-04-12 09:54:03 +00006835cat >conftest.$ac_ext <<_ACEOF
6836#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006837/* confdefs.h. */
6838_ACEOF
6839cat confdefs.h >>conftest.$ac_ext
6840cat >>conftest.$ac_ext <<_ACEOF
6841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006842$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006843int
6844main ()
6845{
6846static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6847test_array [0] = 0
6848
6849 ;
6850 return 0;
6851}
6852_ACEOF
6853rm -f conftest.$ac_objext
6854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6855 (eval $ac_compile) 2>&5
6856 ac_status=$?
6857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6858 (exit $ac_status); } &&
6859 { ac_try='test -s conftest.$ac_objext'
6860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6861 (eval $ac_try) 2>&5
6862 ac_status=$?
6863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6864 (exit $ac_status); }; }; then
6865 ac_hi=-1 ac_mid=-1
6866 while :; do
6867 cat >conftest.$ac_ext <<_ACEOF
6868#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006869/* confdefs.h. */
6870_ACEOF
6871cat confdefs.h >>conftest.$ac_ext
6872cat >>conftest.$ac_ext <<_ACEOF
6873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006874$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006875int
6876main ()
6877{
6878static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6879test_array [0] = 0
6880
6881 ;
6882 return 0;
6883}
6884_ACEOF
6885rm -f conftest.$ac_objext
6886if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6887 (eval $ac_compile) 2>&5
6888 ac_status=$?
6889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6890 (exit $ac_status); } &&
6891 { ac_try='test -s conftest.$ac_objext'
6892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6893 (eval $ac_try) 2>&5
6894 ac_status=$?
6895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6896 (exit $ac_status); }; }; then
6897 ac_lo=$ac_mid; break
6898else
6899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006900sed 's/^/| /' conftest.$ac_ext >&5
6901
Martin v. Löwis11437992002-04-12 09:54:03 +00006902ac_hi=`expr '(' $ac_mid ')' - 1`
6903 if test $ac_mid -le $ac_hi; then
6904 ac_lo= ac_hi=
6905 break
6906 fi
6907 ac_mid=`expr 2 '*' $ac_mid`
6908fi
6909rm -f conftest.$ac_objext conftest.$ac_ext
6910 done
6911else
6912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006913sed 's/^/| /' conftest.$ac_ext >&5
6914
Martin v. Löwis11437992002-04-12 09:54:03 +00006915ac_lo= ac_hi=
6916fi
6917rm -f conftest.$ac_objext conftest.$ac_ext
6918fi
6919rm -f conftest.$ac_objext conftest.$ac_ext
6920# Binary search between lo and hi bounds.
6921while test "x$ac_lo" != "x$ac_hi"; do
6922 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6923 cat >conftest.$ac_ext <<_ACEOF
6924#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006925/* confdefs.h. */
6926_ACEOF
6927cat confdefs.h >>conftest.$ac_ext
6928cat >>conftest.$ac_ext <<_ACEOF
6929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006930$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006931int
6932main ()
6933{
6934static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6935test_array [0] = 0
6936
6937 ;
6938 return 0;
6939}
6940_ACEOF
6941rm -f conftest.$ac_objext
6942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6943 (eval $ac_compile) 2>&5
6944 ac_status=$?
6945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6946 (exit $ac_status); } &&
6947 { ac_try='test -s conftest.$ac_objext'
6948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6949 (eval $ac_try) 2>&5
6950 ac_status=$?
6951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6952 (exit $ac_status); }; }; then
6953 ac_hi=$ac_mid
6954else
6955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006956sed 's/^/| /' conftest.$ac_ext >&5
6957
Martin v. Löwis11437992002-04-12 09:54:03 +00006958ac_lo=`expr '(' $ac_mid ')' + 1`
6959fi
6960rm -f conftest.$ac_objext conftest.$ac_ext
6961done
6962case $ac_lo in
6963?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006964'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6965See \`config.log' for more details." >&5
6966echo "$as_me: error: cannot compute sizeof (void *), 77
6967See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006968 { (exit 1); exit 1; }; } ;;
6969esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006970else
6971 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006972 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6973See \`config.log' for more details." >&5
6974echo "$as_me: error: cannot run test program while cross compiling
6975See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006976 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006977else
Martin v. Löwis11437992002-04-12 09:54:03 +00006978 cat >conftest.$ac_ext <<_ACEOF
6979#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006980/* confdefs.h. */
6981_ACEOF
6982cat confdefs.h >>conftest.$ac_ext
6983cat >>conftest.$ac_ext <<_ACEOF
6984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006985$ac_includes_default
6986long longval () { return (long) (sizeof (void *)); }
6987unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006988#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006989#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006990int
6991main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006992{
Martin v. Löwis11437992002-04-12 09:54:03 +00006993
6994 FILE *f = fopen ("conftest.val", "w");
6995 if (! f)
6996 exit (1);
6997 if (((long) (sizeof (void *))) < 0)
6998 {
6999 long i = longval ();
7000 if (i != ((long) (sizeof (void *))))
7001 exit (1);
7002 fprintf (f, "%ld\n", i);
7003 }
7004 else
7005 {
7006 unsigned long i = ulongval ();
7007 if (i != ((long) (sizeof (void *))))
7008 exit (1);
7009 fprintf (f, "%lu\n", i);
7010 }
7011 exit (ferror (f) || fclose (f) != 0);
7012
7013 ;
7014 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007015}
Martin v. Löwis11437992002-04-12 09:54:03 +00007016_ACEOF
7017rm -f conftest$ac_exeext
7018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7019 (eval $ac_link) 2>&5
7020 ac_status=$?
7021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7024 (eval $ac_try) 2>&5
7025 ac_status=$?
7026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7027 (exit $ac_status); }; }; then
7028 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007029else
Martin v. Löwis11437992002-04-12 09:54:03 +00007030 echo "$as_me: program exited with status $ac_status" >&5
7031echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007032sed 's/^/| /' conftest.$ac_ext >&5
7033
Martin v. Löwis11437992002-04-12 09:54:03 +00007034( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007035{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7036See \`config.log' for more details." >&5
7037echo "$as_me: error: cannot compute sizeof (void *), 77
7038See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007039 { (exit 1); exit 1; }; }
7040fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007041rm -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 +00007042fi
7043fi
7044rm -f conftest.val
7045else
Guido van Rossumad678af1998-10-02 14:42:15 +00007046 ac_cv_sizeof_void_p=0
7047fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007048fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007049echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7050echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7051cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007052#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007053_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007054
7055
Martin v. Löwis11437992002-04-12 09:54:03 +00007056echo "$as_me:$LINENO: checking for char" >&5
7057echo $ECHO_N "checking for char... $ECHO_C" >&6
7058if test "${ac_cv_type_char+set}" = set; then
7059 echo $ECHO_N "(cached) $ECHO_C" >&6
7060else
7061 cat >conftest.$ac_ext <<_ACEOF
7062#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007063/* confdefs.h. */
7064_ACEOF
7065cat confdefs.h >>conftest.$ac_ext
7066cat >>conftest.$ac_ext <<_ACEOF
7067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007068$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007069int
7070main ()
7071{
7072if ((char *) 0)
7073 return 0;
7074if (sizeof (char))
7075 return 0;
7076 ;
7077 return 0;
7078}
7079_ACEOF
7080rm -f conftest.$ac_objext
7081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7082 (eval $ac_compile) 2>&5
7083 ac_status=$?
7084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7085 (exit $ac_status); } &&
7086 { ac_try='test -s conftest.$ac_objext'
7087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7088 (eval $ac_try) 2>&5
7089 ac_status=$?
7090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7091 (exit $ac_status); }; }; then
7092 ac_cv_type_char=yes
7093else
7094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007095sed 's/^/| /' conftest.$ac_ext >&5
7096
Martin v. Löwis11437992002-04-12 09:54:03 +00007097ac_cv_type_char=no
7098fi
7099rm -f conftest.$ac_objext conftest.$ac_ext
7100fi
7101echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
7102echo "${ECHO_T}$ac_cv_type_char" >&6
7103
7104echo "$as_me:$LINENO: checking size of char" >&5
7105echo $ECHO_N "checking size of char... $ECHO_C" >&6
7106if test "${ac_cv_sizeof_char+set}" = set; then
7107 echo $ECHO_N "(cached) $ECHO_C" >&6
7108else
7109 if test "$ac_cv_type_char" = yes; then
7110 # The cast to unsigned long works around a bug in the HP C Compiler
7111 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7112 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7113 # This bug is HP SR number 8606223364.
7114 if test "$cross_compiling" = yes; then
7115 # Depending upon the size, compute the lo and hi bounds.
7116cat >conftest.$ac_ext <<_ACEOF
7117#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007118/* confdefs.h. */
7119_ACEOF
7120cat confdefs.h >>conftest.$ac_ext
7121cat >>conftest.$ac_ext <<_ACEOF
7122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007123$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007124int
7125main ()
7126{
7127static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
7128test_array [0] = 0
7129
7130 ;
7131 return 0;
7132}
7133_ACEOF
7134rm -f conftest.$ac_objext
7135if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7136 (eval $ac_compile) 2>&5
7137 ac_status=$?
7138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7139 (exit $ac_status); } &&
7140 { ac_try='test -s conftest.$ac_objext'
7141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7142 (eval $ac_try) 2>&5
7143 ac_status=$?
7144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7145 (exit $ac_status); }; }; then
7146 ac_lo=0 ac_mid=0
7147 while :; do
7148 cat >conftest.$ac_ext <<_ACEOF
7149#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007150/* confdefs.h. */
7151_ACEOF
7152cat confdefs.h >>conftest.$ac_ext
7153cat >>conftest.$ac_ext <<_ACEOF
7154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007155$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007156int
7157main ()
7158{
7159static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
7160test_array [0] = 0
7161
7162 ;
7163 return 0;
7164}
7165_ACEOF
7166rm -f conftest.$ac_objext
7167if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7168 (eval $ac_compile) 2>&5
7169 ac_status=$?
7170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7171 (exit $ac_status); } &&
7172 { ac_try='test -s conftest.$ac_objext'
7173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7174 (eval $ac_try) 2>&5
7175 ac_status=$?
7176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7177 (exit $ac_status); }; }; then
7178 ac_hi=$ac_mid; break
7179else
7180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007181sed 's/^/| /' conftest.$ac_ext >&5
7182
Martin v. Löwis11437992002-04-12 09:54:03 +00007183ac_lo=`expr $ac_mid + 1`
7184 if test $ac_lo -le $ac_mid; then
7185 ac_lo= ac_hi=
7186 break
7187 fi
7188 ac_mid=`expr 2 '*' $ac_mid + 1`
7189fi
7190rm -f conftest.$ac_objext conftest.$ac_ext
7191 done
7192else
7193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007194sed 's/^/| /' conftest.$ac_ext >&5
7195
Martin v. Löwis11437992002-04-12 09:54:03 +00007196cat >conftest.$ac_ext <<_ACEOF
7197#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007198/* confdefs.h. */
7199_ACEOF
7200cat confdefs.h >>conftest.$ac_ext
7201cat >>conftest.$ac_ext <<_ACEOF
7202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007203$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007204int
7205main ()
7206{
7207static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
7208test_array [0] = 0
7209
7210 ;
7211 return 0;
7212}
7213_ACEOF
7214rm -f conftest.$ac_objext
7215if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7216 (eval $ac_compile) 2>&5
7217 ac_status=$?
7218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7219 (exit $ac_status); } &&
7220 { ac_try='test -s conftest.$ac_objext'
7221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7222 (eval $ac_try) 2>&5
7223 ac_status=$?
7224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7225 (exit $ac_status); }; }; then
7226 ac_hi=-1 ac_mid=-1
7227 while :; do
7228 cat >conftest.$ac_ext <<_ACEOF
7229#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007230/* confdefs.h. */
7231_ACEOF
7232cat confdefs.h >>conftest.$ac_ext
7233cat >>conftest.$ac_ext <<_ACEOF
7234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007235$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007236int
7237main ()
7238{
7239static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
7240test_array [0] = 0
7241
7242 ;
7243 return 0;
7244}
7245_ACEOF
7246rm -f conftest.$ac_objext
7247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7248 (eval $ac_compile) 2>&5
7249 ac_status=$?
7250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7251 (exit $ac_status); } &&
7252 { ac_try='test -s conftest.$ac_objext'
7253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7254 (eval $ac_try) 2>&5
7255 ac_status=$?
7256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7257 (exit $ac_status); }; }; then
7258 ac_lo=$ac_mid; break
7259else
7260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007261sed 's/^/| /' conftest.$ac_ext >&5
7262
Martin v. Löwis11437992002-04-12 09:54:03 +00007263ac_hi=`expr '(' $ac_mid ')' - 1`
7264 if test $ac_mid -le $ac_hi; then
7265 ac_lo= ac_hi=
7266 break
7267 fi
7268 ac_mid=`expr 2 '*' $ac_mid`
7269fi
7270rm -f conftest.$ac_objext conftest.$ac_ext
7271 done
7272else
7273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007274sed 's/^/| /' conftest.$ac_ext >&5
7275
Martin v. Löwis11437992002-04-12 09:54:03 +00007276ac_lo= ac_hi=
7277fi
7278rm -f conftest.$ac_objext conftest.$ac_ext
7279fi
7280rm -f conftest.$ac_objext conftest.$ac_ext
7281# Binary search between lo and hi bounds.
7282while test "x$ac_lo" != "x$ac_hi"; do
7283 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7284 cat >conftest.$ac_ext <<_ACEOF
7285#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007286/* confdefs.h. */
7287_ACEOF
7288cat confdefs.h >>conftest.$ac_ext
7289cat >>conftest.$ac_ext <<_ACEOF
7290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007291$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007292int
7293main ()
7294{
7295static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
7296test_array [0] = 0
7297
7298 ;
7299 return 0;
7300}
7301_ACEOF
7302rm -f conftest.$ac_objext
7303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7304 (eval $ac_compile) 2>&5
7305 ac_status=$?
7306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7307 (exit $ac_status); } &&
7308 { ac_try='test -s conftest.$ac_objext'
7309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7310 (eval $ac_try) 2>&5
7311 ac_status=$?
7312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7313 (exit $ac_status); }; }; then
7314 ac_hi=$ac_mid
7315else
7316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007317sed 's/^/| /' conftest.$ac_ext >&5
7318
Martin v. Löwis11437992002-04-12 09:54:03 +00007319ac_lo=`expr '(' $ac_mid ')' + 1`
7320fi
7321rm -f conftest.$ac_objext conftest.$ac_ext
7322done
7323case $ac_lo in
7324?*) ac_cv_sizeof_char=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007325'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
7326See \`config.log' for more details." >&5
7327echo "$as_me: error: cannot compute sizeof (char), 77
7328See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007329 { (exit 1); exit 1; }; } ;;
7330esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007331else
7332 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007333 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7334See \`config.log' for more details." >&5
7335echo "$as_me: error: cannot run test program while cross compiling
7336See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007337 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007338else
Martin v. Löwis11437992002-04-12 09:54:03 +00007339 cat >conftest.$ac_ext <<_ACEOF
7340#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007341/* confdefs.h. */
7342_ACEOF
7343cat confdefs.h >>conftest.$ac_ext
7344cat >>conftest.$ac_ext <<_ACEOF
7345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007346$ac_includes_default
7347long longval () { return (long) (sizeof (char)); }
7348unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007349#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007350#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007351int
7352main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007353{
Martin v. Löwis11437992002-04-12 09:54:03 +00007354
7355 FILE *f = fopen ("conftest.val", "w");
7356 if (! f)
7357 exit (1);
7358 if (((long) (sizeof (char))) < 0)
7359 {
7360 long i = longval ();
7361 if (i != ((long) (sizeof (char))))
7362 exit (1);
7363 fprintf (f, "%ld\n", i);
7364 }
7365 else
7366 {
7367 unsigned long i = ulongval ();
7368 if (i != ((long) (sizeof (char))))
7369 exit (1);
7370 fprintf (f, "%lu\n", i);
7371 }
7372 exit (ferror (f) || fclose (f) != 0);
7373
7374 ;
7375 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007376}
Martin v. Löwis11437992002-04-12 09:54:03 +00007377_ACEOF
7378rm -f conftest$ac_exeext
7379if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7380 (eval $ac_link) 2>&5
7381 ac_status=$?
7382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7383 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7385 (eval $ac_try) 2>&5
7386 ac_status=$?
7387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7388 (exit $ac_status); }; }; then
7389 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007390else
Martin v. Löwis11437992002-04-12 09:54:03 +00007391 echo "$as_me: program exited with status $ac_status" >&5
7392echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007393sed 's/^/| /' conftest.$ac_ext >&5
7394
Martin v. Löwis11437992002-04-12 09:54:03 +00007395( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007396{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
7397See \`config.log' for more details." >&5
7398echo "$as_me: error: cannot compute sizeof (char), 77
7399See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007400 { (exit 1); exit 1; }; }
7401fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007402rm -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 +00007403fi
7404fi
7405rm -f conftest.val
7406else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007407 ac_cv_sizeof_char=0
7408fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007409fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007410echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
7411echo "${ECHO_T}$ac_cv_sizeof_char" >&6
7412cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007413#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00007414_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007415
7416
Martin v. Löwis11437992002-04-12 09:54:03 +00007417echo "$as_me:$LINENO: checking for short" >&5
7418echo $ECHO_N "checking for short... $ECHO_C" >&6
7419if test "${ac_cv_type_short+set}" = set; then
7420 echo $ECHO_N "(cached) $ECHO_C" >&6
7421else
7422 cat >conftest.$ac_ext <<_ACEOF
7423#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007424/* confdefs.h. */
7425_ACEOF
7426cat confdefs.h >>conftest.$ac_ext
7427cat >>conftest.$ac_ext <<_ACEOF
7428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007429$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007430int
7431main ()
7432{
7433if ((short *) 0)
7434 return 0;
7435if (sizeof (short))
7436 return 0;
7437 ;
7438 return 0;
7439}
7440_ACEOF
7441rm -f conftest.$ac_objext
7442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7443 (eval $ac_compile) 2>&5
7444 ac_status=$?
7445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7446 (exit $ac_status); } &&
7447 { ac_try='test -s conftest.$ac_objext'
7448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7449 (eval $ac_try) 2>&5
7450 ac_status=$?
7451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7452 (exit $ac_status); }; }; then
7453 ac_cv_type_short=yes
7454else
7455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007456sed 's/^/| /' conftest.$ac_ext >&5
7457
Martin v. Löwis11437992002-04-12 09:54:03 +00007458ac_cv_type_short=no
7459fi
7460rm -f conftest.$ac_objext conftest.$ac_ext
7461fi
7462echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7463echo "${ECHO_T}$ac_cv_type_short" >&6
7464
7465echo "$as_me:$LINENO: checking size of short" >&5
7466echo $ECHO_N "checking size of short... $ECHO_C" >&6
7467if test "${ac_cv_sizeof_short+set}" = set; then
7468 echo $ECHO_N "(cached) $ECHO_C" >&6
7469else
7470 if test "$ac_cv_type_short" = yes; then
7471 # The cast to unsigned long works around a bug in the HP C Compiler
7472 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7473 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7474 # This bug is HP SR number 8606223364.
7475 if test "$cross_compiling" = yes; then
7476 # Depending upon the size, compute the lo and hi bounds.
7477cat >conftest.$ac_ext <<_ACEOF
7478#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007479/* confdefs.h. */
7480_ACEOF
7481cat confdefs.h >>conftest.$ac_ext
7482cat >>conftest.$ac_ext <<_ACEOF
7483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007484$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007485int
7486main ()
7487{
7488static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7489test_array [0] = 0
7490
7491 ;
7492 return 0;
7493}
7494_ACEOF
7495rm -f conftest.$ac_objext
7496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7497 (eval $ac_compile) 2>&5
7498 ac_status=$?
7499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7500 (exit $ac_status); } &&
7501 { ac_try='test -s conftest.$ac_objext'
7502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7503 (eval $ac_try) 2>&5
7504 ac_status=$?
7505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7506 (exit $ac_status); }; }; then
7507 ac_lo=0 ac_mid=0
7508 while :; do
7509 cat >conftest.$ac_ext <<_ACEOF
7510#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007511/* confdefs.h. */
7512_ACEOF
7513cat confdefs.h >>conftest.$ac_ext
7514cat >>conftest.$ac_ext <<_ACEOF
7515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007516$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007517int
7518main ()
7519{
7520static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7521test_array [0] = 0
7522
7523 ;
7524 return 0;
7525}
7526_ACEOF
7527rm -f conftest.$ac_objext
7528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7529 (eval $ac_compile) 2>&5
7530 ac_status=$?
7531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7532 (exit $ac_status); } &&
7533 { ac_try='test -s conftest.$ac_objext'
7534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7535 (eval $ac_try) 2>&5
7536 ac_status=$?
7537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7538 (exit $ac_status); }; }; then
7539 ac_hi=$ac_mid; break
7540else
7541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007542sed 's/^/| /' conftest.$ac_ext >&5
7543
Martin v. Löwis11437992002-04-12 09:54:03 +00007544ac_lo=`expr $ac_mid + 1`
7545 if test $ac_lo -le $ac_mid; then
7546 ac_lo= ac_hi=
7547 break
7548 fi
7549 ac_mid=`expr 2 '*' $ac_mid + 1`
7550fi
7551rm -f conftest.$ac_objext conftest.$ac_ext
7552 done
7553else
7554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007555sed 's/^/| /' conftest.$ac_ext >&5
7556
Martin v. Löwis11437992002-04-12 09:54:03 +00007557cat >conftest.$ac_ext <<_ACEOF
7558#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007559/* confdefs.h. */
7560_ACEOF
7561cat confdefs.h >>conftest.$ac_ext
7562cat >>conftest.$ac_ext <<_ACEOF
7563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007564$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007565int
7566main ()
7567{
7568static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7569test_array [0] = 0
7570
7571 ;
7572 return 0;
7573}
7574_ACEOF
7575rm -f conftest.$ac_objext
7576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7577 (eval $ac_compile) 2>&5
7578 ac_status=$?
7579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7580 (exit $ac_status); } &&
7581 { ac_try='test -s conftest.$ac_objext'
7582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7583 (eval $ac_try) 2>&5
7584 ac_status=$?
7585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7586 (exit $ac_status); }; }; then
7587 ac_hi=-1 ac_mid=-1
7588 while :; do
7589 cat >conftest.$ac_ext <<_ACEOF
7590#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007591/* confdefs.h. */
7592_ACEOF
7593cat confdefs.h >>conftest.$ac_ext
7594cat >>conftest.$ac_ext <<_ACEOF
7595/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007596$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007597int
7598main ()
7599{
7600static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7601test_array [0] = 0
7602
7603 ;
7604 return 0;
7605}
7606_ACEOF
7607rm -f conftest.$ac_objext
7608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7609 (eval $ac_compile) 2>&5
7610 ac_status=$?
7611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7612 (exit $ac_status); } &&
7613 { ac_try='test -s conftest.$ac_objext'
7614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7615 (eval $ac_try) 2>&5
7616 ac_status=$?
7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7618 (exit $ac_status); }; }; then
7619 ac_lo=$ac_mid; break
7620else
7621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007622sed 's/^/| /' conftest.$ac_ext >&5
7623
Martin v. Löwis11437992002-04-12 09:54:03 +00007624ac_hi=`expr '(' $ac_mid ')' - 1`
7625 if test $ac_mid -le $ac_hi; then
7626 ac_lo= ac_hi=
7627 break
7628 fi
7629 ac_mid=`expr 2 '*' $ac_mid`
7630fi
7631rm -f conftest.$ac_objext conftest.$ac_ext
7632 done
7633else
7634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007635sed 's/^/| /' conftest.$ac_ext >&5
7636
Martin v. Löwis11437992002-04-12 09:54:03 +00007637ac_lo= ac_hi=
7638fi
7639rm -f conftest.$ac_objext conftest.$ac_ext
7640fi
7641rm -f conftest.$ac_objext conftest.$ac_ext
7642# Binary search between lo and hi bounds.
7643while test "x$ac_lo" != "x$ac_hi"; do
7644 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7645 cat >conftest.$ac_ext <<_ACEOF
7646#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007647/* confdefs.h. */
7648_ACEOF
7649cat confdefs.h >>conftest.$ac_ext
7650cat >>conftest.$ac_ext <<_ACEOF
7651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007652$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007653int
7654main ()
7655{
7656static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7657test_array [0] = 0
7658
7659 ;
7660 return 0;
7661}
7662_ACEOF
7663rm -f conftest.$ac_objext
7664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7665 (eval $ac_compile) 2>&5
7666 ac_status=$?
7667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7668 (exit $ac_status); } &&
7669 { ac_try='test -s conftest.$ac_objext'
7670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7671 (eval $ac_try) 2>&5
7672 ac_status=$?
7673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7674 (exit $ac_status); }; }; then
7675 ac_hi=$ac_mid
7676else
7677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007678sed 's/^/| /' conftest.$ac_ext >&5
7679
Martin v. Löwis11437992002-04-12 09:54:03 +00007680ac_lo=`expr '(' $ac_mid ')' + 1`
7681fi
7682rm -f conftest.$ac_objext conftest.$ac_ext
7683done
7684case $ac_lo in
7685?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007686'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7687See \`config.log' for more details." >&5
7688echo "$as_me: error: cannot compute sizeof (short), 77
7689See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007690 { (exit 1); exit 1; }; } ;;
7691esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007692else
7693 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007694 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7695See \`config.log' for more details." >&5
7696echo "$as_me: error: cannot run test program while cross compiling
7697See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007698 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007699else
Martin v. Löwis11437992002-04-12 09:54:03 +00007700 cat >conftest.$ac_ext <<_ACEOF
7701#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007702/* confdefs.h. */
7703_ACEOF
7704cat confdefs.h >>conftest.$ac_ext
7705cat >>conftest.$ac_ext <<_ACEOF
7706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007707$ac_includes_default
7708long longval () { return (long) (sizeof (short)); }
7709unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007710#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007711#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007712int
7713main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007714{
Martin v. Löwis11437992002-04-12 09:54:03 +00007715
7716 FILE *f = fopen ("conftest.val", "w");
7717 if (! f)
7718 exit (1);
7719 if (((long) (sizeof (short))) < 0)
7720 {
7721 long i = longval ();
7722 if (i != ((long) (sizeof (short))))
7723 exit (1);
7724 fprintf (f, "%ld\n", i);
7725 }
7726 else
7727 {
7728 unsigned long i = ulongval ();
7729 if (i != ((long) (sizeof (short))))
7730 exit (1);
7731 fprintf (f, "%lu\n", i);
7732 }
7733 exit (ferror (f) || fclose (f) != 0);
7734
7735 ;
7736 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007737}
Martin v. Löwis11437992002-04-12 09:54:03 +00007738_ACEOF
7739rm -f conftest$ac_exeext
7740if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7741 (eval $ac_link) 2>&5
7742 ac_status=$?
7743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7744 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7746 (eval $ac_try) 2>&5
7747 ac_status=$?
7748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7749 (exit $ac_status); }; }; then
7750 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007751else
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 echo "$as_me: program exited with status $ac_status" >&5
7753echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007754sed 's/^/| /' conftest.$ac_ext >&5
7755
Martin v. Löwis11437992002-04-12 09:54:03 +00007756( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007757{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7758See \`config.log' for more details." >&5
7759echo "$as_me: error: cannot compute sizeof (short), 77
7760See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 { (exit 1); exit 1; }; }
7762fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007763rm -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 +00007764fi
7765fi
7766rm -f conftest.val
7767else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007768 ac_cv_sizeof_short=0
7769fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007770fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007771echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7772echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7773cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007774#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007775_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007776
7777
Martin v. Löwis11437992002-04-12 09:54:03 +00007778echo "$as_me:$LINENO: checking for float" >&5
7779echo $ECHO_N "checking for float... $ECHO_C" >&6
7780if test "${ac_cv_type_float+set}" = set; then
7781 echo $ECHO_N "(cached) $ECHO_C" >&6
7782else
7783 cat >conftest.$ac_ext <<_ACEOF
7784#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007785/* confdefs.h. */
7786_ACEOF
7787cat confdefs.h >>conftest.$ac_ext
7788cat >>conftest.$ac_ext <<_ACEOF
7789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007791int
7792main ()
7793{
7794if ((float *) 0)
7795 return 0;
7796if (sizeof (float))
7797 return 0;
7798 ;
7799 return 0;
7800}
7801_ACEOF
7802rm -f conftest.$ac_objext
7803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7804 (eval $ac_compile) 2>&5
7805 ac_status=$?
7806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7807 (exit $ac_status); } &&
7808 { ac_try='test -s conftest.$ac_objext'
7809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7810 (eval $ac_try) 2>&5
7811 ac_status=$?
7812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7813 (exit $ac_status); }; }; then
7814 ac_cv_type_float=yes
7815else
7816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007817sed 's/^/| /' conftest.$ac_ext >&5
7818
Martin v. Löwis11437992002-04-12 09:54:03 +00007819ac_cv_type_float=no
7820fi
7821rm -f conftest.$ac_objext conftest.$ac_ext
7822fi
7823echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7824echo "${ECHO_T}$ac_cv_type_float" >&6
7825
7826echo "$as_me:$LINENO: checking size of float" >&5
7827echo $ECHO_N "checking size of float... $ECHO_C" >&6
7828if test "${ac_cv_sizeof_float+set}" = set; then
7829 echo $ECHO_N "(cached) $ECHO_C" >&6
7830else
7831 if test "$ac_cv_type_float" = yes; then
7832 # The cast to unsigned long works around a bug in the HP C Compiler
7833 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7834 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7835 # This bug is HP SR number 8606223364.
7836 if test "$cross_compiling" = yes; then
7837 # Depending upon the size, compute the lo and hi bounds.
7838cat >conftest.$ac_ext <<_ACEOF
7839#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007840/* confdefs.h. */
7841_ACEOF
7842cat confdefs.h >>conftest.$ac_ext
7843cat >>conftest.$ac_ext <<_ACEOF
7844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007845$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007846int
7847main ()
7848{
7849static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7850test_array [0] = 0
7851
7852 ;
7853 return 0;
7854}
7855_ACEOF
7856rm -f conftest.$ac_objext
7857if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7858 (eval $ac_compile) 2>&5
7859 ac_status=$?
7860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7861 (exit $ac_status); } &&
7862 { ac_try='test -s conftest.$ac_objext'
7863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7864 (eval $ac_try) 2>&5
7865 ac_status=$?
7866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7867 (exit $ac_status); }; }; then
7868 ac_lo=0 ac_mid=0
7869 while :; do
7870 cat >conftest.$ac_ext <<_ACEOF
7871#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007872/* confdefs.h. */
7873_ACEOF
7874cat confdefs.h >>conftest.$ac_ext
7875cat >>conftest.$ac_ext <<_ACEOF
7876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007877$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007878int
7879main ()
7880{
7881static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7882test_array [0] = 0
7883
7884 ;
7885 return 0;
7886}
7887_ACEOF
7888rm -f conftest.$ac_objext
7889if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7890 (eval $ac_compile) 2>&5
7891 ac_status=$?
7892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7893 (exit $ac_status); } &&
7894 { ac_try='test -s conftest.$ac_objext'
7895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7896 (eval $ac_try) 2>&5
7897 ac_status=$?
7898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7899 (exit $ac_status); }; }; then
7900 ac_hi=$ac_mid; break
7901else
7902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007903sed 's/^/| /' conftest.$ac_ext >&5
7904
Martin v. Löwis11437992002-04-12 09:54:03 +00007905ac_lo=`expr $ac_mid + 1`
7906 if test $ac_lo -le $ac_mid; then
7907 ac_lo= ac_hi=
7908 break
7909 fi
7910 ac_mid=`expr 2 '*' $ac_mid + 1`
7911fi
7912rm -f conftest.$ac_objext conftest.$ac_ext
7913 done
7914else
7915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007916sed 's/^/| /' conftest.$ac_ext >&5
7917
Martin v. Löwis11437992002-04-12 09:54:03 +00007918cat >conftest.$ac_ext <<_ACEOF
7919#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007920/* confdefs.h. */
7921_ACEOF
7922cat confdefs.h >>conftest.$ac_ext
7923cat >>conftest.$ac_ext <<_ACEOF
7924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007925$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007926int
7927main ()
7928{
7929static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7930test_array [0] = 0
7931
7932 ;
7933 return 0;
7934}
7935_ACEOF
7936rm -f conftest.$ac_objext
7937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7938 (eval $ac_compile) 2>&5
7939 ac_status=$?
7940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7941 (exit $ac_status); } &&
7942 { ac_try='test -s conftest.$ac_objext'
7943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7944 (eval $ac_try) 2>&5
7945 ac_status=$?
7946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7947 (exit $ac_status); }; }; then
7948 ac_hi=-1 ac_mid=-1
7949 while :; do
7950 cat >conftest.$ac_ext <<_ACEOF
7951#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007952/* confdefs.h. */
7953_ACEOF
7954cat confdefs.h >>conftest.$ac_ext
7955cat >>conftest.$ac_ext <<_ACEOF
7956/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007957$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007958int
7959main ()
7960{
7961static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7962test_array [0] = 0
7963
7964 ;
7965 return 0;
7966}
7967_ACEOF
7968rm -f conftest.$ac_objext
7969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7970 (eval $ac_compile) 2>&5
7971 ac_status=$?
7972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7973 (exit $ac_status); } &&
7974 { ac_try='test -s conftest.$ac_objext'
7975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7976 (eval $ac_try) 2>&5
7977 ac_status=$?
7978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7979 (exit $ac_status); }; }; then
7980 ac_lo=$ac_mid; break
7981else
7982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007983sed 's/^/| /' conftest.$ac_ext >&5
7984
Martin v. Löwis11437992002-04-12 09:54:03 +00007985ac_hi=`expr '(' $ac_mid ')' - 1`
7986 if test $ac_mid -le $ac_hi; then
7987 ac_lo= ac_hi=
7988 break
7989 fi
7990 ac_mid=`expr 2 '*' $ac_mid`
7991fi
7992rm -f conftest.$ac_objext conftest.$ac_ext
7993 done
7994else
7995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007996sed 's/^/| /' conftest.$ac_ext >&5
7997
Martin v. Löwis11437992002-04-12 09:54:03 +00007998ac_lo= ac_hi=
7999fi
8000rm -f conftest.$ac_objext conftest.$ac_ext
8001fi
8002rm -f conftest.$ac_objext conftest.$ac_ext
8003# Binary search between lo and hi bounds.
8004while test "x$ac_lo" != "x$ac_hi"; do
8005 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8006 cat >conftest.$ac_ext <<_ACEOF
8007#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008008/* confdefs.h. */
8009_ACEOF
8010cat confdefs.h >>conftest.$ac_ext
8011cat >>conftest.$ac_ext <<_ACEOF
8012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008013$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008014int
8015main ()
8016{
8017static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8018test_array [0] = 0
8019
8020 ;
8021 return 0;
8022}
8023_ACEOF
8024rm -f conftest.$ac_objext
8025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8026 (eval $ac_compile) 2>&5
8027 ac_status=$?
8028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8029 (exit $ac_status); } &&
8030 { ac_try='test -s conftest.$ac_objext'
8031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8032 (eval $ac_try) 2>&5
8033 ac_status=$?
8034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8035 (exit $ac_status); }; }; then
8036 ac_hi=$ac_mid
8037else
8038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008039sed 's/^/| /' conftest.$ac_ext >&5
8040
Martin v. Löwis11437992002-04-12 09:54:03 +00008041ac_lo=`expr '(' $ac_mid ')' + 1`
8042fi
8043rm -f conftest.$ac_objext conftest.$ac_ext
8044done
8045case $ac_lo in
8046?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008047'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8048See \`config.log' for more details." >&5
8049echo "$as_me: error: cannot compute sizeof (float), 77
8050See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 { (exit 1); exit 1; }; } ;;
8052esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008053else
8054 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008055 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8056See \`config.log' for more details." >&5
8057echo "$as_me: error: cannot run test program while cross compiling
8058See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008059 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008060else
Martin v. Löwis11437992002-04-12 09:54:03 +00008061 cat >conftest.$ac_ext <<_ACEOF
8062#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008063/* confdefs.h. */
8064_ACEOF
8065cat confdefs.h >>conftest.$ac_ext
8066cat >>conftest.$ac_ext <<_ACEOF
8067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008068$ac_includes_default
8069long longval () { return (long) (sizeof (float)); }
8070unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008071#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008072#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008073int
8074main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008075{
Martin v. Löwis11437992002-04-12 09:54:03 +00008076
8077 FILE *f = fopen ("conftest.val", "w");
8078 if (! f)
8079 exit (1);
8080 if (((long) (sizeof (float))) < 0)
8081 {
8082 long i = longval ();
8083 if (i != ((long) (sizeof (float))))
8084 exit (1);
8085 fprintf (f, "%ld\n", i);
8086 }
8087 else
8088 {
8089 unsigned long i = ulongval ();
8090 if (i != ((long) (sizeof (float))))
8091 exit (1);
8092 fprintf (f, "%lu\n", i);
8093 }
8094 exit (ferror (f) || fclose (f) != 0);
8095
8096 ;
8097 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008098}
Martin v. Löwis11437992002-04-12 09:54:03 +00008099_ACEOF
8100rm -f conftest$ac_exeext
8101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8102 (eval $ac_link) 2>&5
8103 ac_status=$?
8104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8107 (eval $ac_try) 2>&5
8108 ac_status=$?
8109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8110 (exit $ac_status); }; }; then
8111 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008112else
Martin v. Löwis11437992002-04-12 09:54:03 +00008113 echo "$as_me: program exited with status $ac_status" >&5
8114echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008115sed 's/^/| /' conftest.$ac_ext >&5
8116
Martin v. Löwis11437992002-04-12 09:54:03 +00008117( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008118{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8119See \`config.log' for more details." >&5
8120echo "$as_me: error: cannot compute sizeof (float), 77
8121See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008122 { (exit 1); exit 1; }; }
8123fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008124rm -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 +00008125fi
8126fi
8127rm -f conftest.val
8128else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008129 ac_cv_sizeof_float=0
8130fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008131fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008132echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8133echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8134cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008135#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008136_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008137
8138
Martin v. Löwis11437992002-04-12 09:54:03 +00008139echo "$as_me:$LINENO: checking for double" >&5
8140echo $ECHO_N "checking for double... $ECHO_C" >&6
8141if test "${ac_cv_type_double+set}" = set; then
8142 echo $ECHO_N "(cached) $ECHO_C" >&6
8143else
8144 cat >conftest.$ac_ext <<_ACEOF
8145#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008146/* confdefs.h. */
8147_ACEOF
8148cat confdefs.h >>conftest.$ac_ext
8149cat >>conftest.$ac_ext <<_ACEOF
8150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008151$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008152int
8153main ()
8154{
8155if ((double *) 0)
8156 return 0;
8157if (sizeof (double))
8158 return 0;
8159 ;
8160 return 0;
8161}
8162_ACEOF
8163rm -f conftest.$ac_objext
8164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8165 (eval $ac_compile) 2>&5
8166 ac_status=$?
8167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8168 (exit $ac_status); } &&
8169 { ac_try='test -s conftest.$ac_objext'
8170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8171 (eval $ac_try) 2>&5
8172 ac_status=$?
8173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8174 (exit $ac_status); }; }; then
8175 ac_cv_type_double=yes
8176else
8177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008178sed 's/^/| /' conftest.$ac_ext >&5
8179
Martin v. Löwis11437992002-04-12 09:54:03 +00008180ac_cv_type_double=no
8181fi
8182rm -f conftest.$ac_objext conftest.$ac_ext
8183fi
8184echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8185echo "${ECHO_T}$ac_cv_type_double" >&6
8186
8187echo "$as_me:$LINENO: checking size of double" >&5
8188echo $ECHO_N "checking size of double... $ECHO_C" >&6
8189if test "${ac_cv_sizeof_double+set}" = set; then
8190 echo $ECHO_N "(cached) $ECHO_C" >&6
8191else
8192 if test "$ac_cv_type_double" = yes; then
8193 # The cast to unsigned long works around a bug in the HP C Compiler
8194 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8195 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8196 # This bug is HP SR number 8606223364.
8197 if test "$cross_compiling" = yes; then
8198 # Depending upon the size, compute the lo and hi bounds.
8199cat >conftest.$ac_ext <<_ACEOF
8200#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008201/* confdefs.h. */
8202_ACEOF
8203cat confdefs.h >>conftest.$ac_ext
8204cat >>conftest.$ac_ext <<_ACEOF
8205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008206$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008207int
8208main ()
8209{
8210static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8211test_array [0] = 0
8212
8213 ;
8214 return 0;
8215}
8216_ACEOF
8217rm -f conftest.$ac_objext
8218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8219 (eval $ac_compile) 2>&5
8220 ac_status=$?
8221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8222 (exit $ac_status); } &&
8223 { ac_try='test -s conftest.$ac_objext'
8224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8225 (eval $ac_try) 2>&5
8226 ac_status=$?
8227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8228 (exit $ac_status); }; }; then
8229 ac_lo=0 ac_mid=0
8230 while :; do
8231 cat >conftest.$ac_ext <<_ACEOF
8232#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008233/* confdefs.h. */
8234_ACEOF
8235cat confdefs.h >>conftest.$ac_ext
8236cat >>conftest.$ac_ext <<_ACEOF
8237/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008238$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008239int
8240main ()
8241{
8242static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8243test_array [0] = 0
8244
8245 ;
8246 return 0;
8247}
8248_ACEOF
8249rm -f conftest.$ac_objext
8250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8251 (eval $ac_compile) 2>&5
8252 ac_status=$?
8253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8254 (exit $ac_status); } &&
8255 { ac_try='test -s conftest.$ac_objext'
8256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8257 (eval $ac_try) 2>&5
8258 ac_status=$?
8259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8260 (exit $ac_status); }; }; then
8261 ac_hi=$ac_mid; break
8262else
8263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008264sed 's/^/| /' conftest.$ac_ext >&5
8265
Martin v. Löwis11437992002-04-12 09:54:03 +00008266ac_lo=`expr $ac_mid + 1`
8267 if test $ac_lo -le $ac_mid; then
8268 ac_lo= ac_hi=
8269 break
8270 fi
8271 ac_mid=`expr 2 '*' $ac_mid + 1`
8272fi
8273rm -f conftest.$ac_objext conftest.$ac_ext
8274 done
8275else
8276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008277sed 's/^/| /' conftest.$ac_ext >&5
8278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279cat >conftest.$ac_ext <<_ACEOF
8280#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008281/* confdefs.h. */
8282_ACEOF
8283cat confdefs.h >>conftest.$ac_ext
8284cat >>conftest.$ac_ext <<_ACEOF
8285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008286$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008287int
8288main ()
8289{
8290static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8291test_array [0] = 0
8292
8293 ;
8294 return 0;
8295}
8296_ACEOF
8297rm -f conftest.$ac_objext
8298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8299 (eval $ac_compile) 2>&5
8300 ac_status=$?
8301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8302 (exit $ac_status); } &&
8303 { ac_try='test -s conftest.$ac_objext'
8304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8305 (eval $ac_try) 2>&5
8306 ac_status=$?
8307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8308 (exit $ac_status); }; }; then
8309 ac_hi=-1 ac_mid=-1
8310 while :; do
8311 cat >conftest.$ac_ext <<_ACEOF
8312#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008313/* confdefs.h. */
8314_ACEOF
8315cat confdefs.h >>conftest.$ac_ext
8316cat >>conftest.$ac_ext <<_ACEOF
8317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008318$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008319int
8320main ()
8321{
8322static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8323test_array [0] = 0
8324
8325 ;
8326 return 0;
8327}
8328_ACEOF
8329rm -f conftest.$ac_objext
8330if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8331 (eval $ac_compile) 2>&5
8332 ac_status=$?
8333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8334 (exit $ac_status); } &&
8335 { ac_try='test -s conftest.$ac_objext'
8336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8337 (eval $ac_try) 2>&5
8338 ac_status=$?
8339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8340 (exit $ac_status); }; }; then
8341 ac_lo=$ac_mid; break
8342else
8343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008344sed 's/^/| /' conftest.$ac_ext >&5
8345
Martin v. Löwis11437992002-04-12 09:54:03 +00008346ac_hi=`expr '(' $ac_mid ')' - 1`
8347 if test $ac_mid -le $ac_hi; then
8348 ac_lo= ac_hi=
8349 break
8350 fi
8351 ac_mid=`expr 2 '*' $ac_mid`
8352fi
8353rm -f conftest.$ac_objext conftest.$ac_ext
8354 done
8355else
8356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008357sed 's/^/| /' conftest.$ac_ext >&5
8358
Martin v. Löwis11437992002-04-12 09:54:03 +00008359ac_lo= ac_hi=
8360fi
8361rm -f conftest.$ac_objext conftest.$ac_ext
8362fi
8363rm -f conftest.$ac_objext conftest.$ac_ext
8364# Binary search between lo and hi bounds.
8365while test "x$ac_lo" != "x$ac_hi"; do
8366 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8367 cat >conftest.$ac_ext <<_ACEOF
8368#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008369/* confdefs.h. */
8370_ACEOF
8371cat confdefs.h >>conftest.$ac_ext
8372cat >>conftest.$ac_ext <<_ACEOF
8373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008374$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008375int
8376main ()
8377{
8378static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8379test_array [0] = 0
8380
8381 ;
8382 return 0;
8383}
8384_ACEOF
8385rm -f conftest.$ac_objext
8386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8387 (eval $ac_compile) 2>&5
8388 ac_status=$?
8389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8390 (exit $ac_status); } &&
8391 { ac_try='test -s conftest.$ac_objext'
8392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8393 (eval $ac_try) 2>&5
8394 ac_status=$?
8395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8396 (exit $ac_status); }; }; then
8397 ac_hi=$ac_mid
8398else
8399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008400sed 's/^/| /' conftest.$ac_ext >&5
8401
Martin v. Löwis11437992002-04-12 09:54:03 +00008402ac_lo=`expr '(' $ac_mid ')' + 1`
8403fi
8404rm -f conftest.$ac_objext conftest.$ac_ext
8405done
8406case $ac_lo in
8407?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008408'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8409See \`config.log' for more details." >&5
8410echo "$as_me: error: cannot compute sizeof (double), 77
8411See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008412 { (exit 1); exit 1; }; } ;;
8413esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008414else
8415 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008416 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8417See \`config.log' for more details." >&5
8418echo "$as_me: error: cannot run test program while cross compiling
8419See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008420 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008421else
Martin v. Löwis11437992002-04-12 09:54:03 +00008422 cat >conftest.$ac_ext <<_ACEOF
8423#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008424/* confdefs.h. */
8425_ACEOF
8426cat confdefs.h >>conftest.$ac_ext
8427cat >>conftest.$ac_ext <<_ACEOF
8428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008429$ac_includes_default
8430long longval () { return (long) (sizeof (double)); }
8431unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008432#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008433#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008434int
8435main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008436{
Martin v. Löwis11437992002-04-12 09:54:03 +00008437
8438 FILE *f = fopen ("conftest.val", "w");
8439 if (! f)
8440 exit (1);
8441 if (((long) (sizeof (double))) < 0)
8442 {
8443 long i = longval ();
8444 if (i != ((long) (sizeof (double))))
8445 exit (1);
8446 fprintf (f, "%ld\n", i);
8447 }
8448 else
8449 {
8450 unsigned long i = ulongval ();
8451 if (i != ((long) (sizeof (double))))
8452 exit (1);
8453 fprintf (f, "%lu\n", i);
8454 }
8455 exit (ferror (f) || fclose (f) != 0);
8456
8457 ;
8458 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008459}
Martin v. Löwis11437992002-04-12 09:54:03 +00008460_ACEOF
8461rm -f conftest$ac_exeext
8462if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8463 (eval $ac_link) 2>&5
8464 ac_status=$?
8465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8466 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8468 (eval $ac_try) 2>&5
8469 ac_status=$?
8470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8471 (exit $ac_status); }; }; then
8472 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008473else
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 echo "$as_me: program exited with status $ac_status" >&5
8475echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008476sed 's/^/| /' conftest.$ac_ext >&5
8477
Martin v. Löwis11437992002-04-12 09:54:03 +00008478( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008479{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8480See \`config.log' for more details." >&5
8481echo "$as_me: error: cannot compute sizeof (double), 77
8482See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 { (exit 1); exit 1; }; }
8484fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008485rm -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 +00008486fi
8487fi
8488rm -f conftest.val
8489else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008490 ac_cv_sizeof_double=0
8491fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008492fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008493echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8494echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8495cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008496#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008497_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008498
8499
Martin v. Löwis11437992002-04-12 09:54:03 +00008500echo "$as_me:$LINENO: checking for fpos_t" >&5
8501echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8502if test "${ac_cv_type_fpos_t+set}" = set; then
8503 echo $ECHO_N "(cached) $ECHO_C" >&6
8504else
8505 cat >conftest.$ac_ext <<_ACEOF
8506#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008507/* confdefs.h. */
8508_ACEOF
8509cat confdefs.h >>conftest.$ac_ext
8510cat >>conftest.$ac_ext <<_ACEOF
8511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008512$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008513int
8514main ()
8515{
8516if ((fpos_t *) 0)
8517 return 0;
8518if (sizeof (fpos_t))
8519 return 0;
8520 ;
8521 return 0;
8522}
8523_ACEOF
8524rm -f conftest.$ac_objext
8525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8526 (eval $ac_compile) 2>&5
8527 ac_status=$?
8528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8529 (exit $ac_status); } &&
8530 { ac_try='test -s conftest.$ac_objext'
8531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8532 (eval $ac_try) 2>&5
8533 ac_status=$?
8534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8535 (exit $ac_status); }; }; then
8536 ac_cv_type_fpos_t=yes
8537else
8538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008539sed 's/^/| /' conftest.$ac_ext >&5
8540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541ac_cv_type_fpos_t=no
8542fi
8543rm -f conftest.$ac_objext conftest.$ac_ext
8544fi
8545echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8546echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8547
8548echo "$as_me:$LINENO: checking size of fpos_t" >&5
8549echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8550if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8551 echo $ECHO_N "(cached) $ECHO_C" >&6
8552else
8553 if test "$ac_cv_type_fpos_t" = yes; then
8554 # The cast to unsigned long works around a bug in the HP C Compiler
8555 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8556 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8557 # This bug is HP SR number 8606223364.
8558 if test "$cross_compiling" = yes; then
8559 # Depending upon the size, compute the lo and hi bounds.
8560cat >conftest.$ac_ext <<_ACEOF
8561#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008562/* confdefs.h. */
8563_ACEOF
8564cat confdefs.h >>conftest.$ac_ext
8565cat >>conftest.$ac_ext <<_ACEOF
8566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008567$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008568int
8569main ()
8570{
8571static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8572test_array [0] = 0
8573
8574 ;
8575 return 0;
8576}
8577_ACEOF
8578rm -f conftest.$ac_objext
8579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8580 (eval $ac_compile) 2>&5
8581 ac_status=$?
8582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8583 (exit $ac_status); } &&
8584 { ac_try='test -s conftest.$ac_objext'
8585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8586 (eval $ac_try) 2>&5
8587 ac_status=$?
8588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8589 (exit $ac_status); }; }; then
8590 ac_lo=0 ac_mid=0
8591 while :; do
8592 cat >conftest.$ac_ext <<_ACEOF
8593#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008594/* confdefs.h. */
8595_ACEOF
8596cat confdefs.h >>conftest.$ac_ext
8597cat >>conftest.$ac_ext <<_ACEOF
8598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008599$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008600int
8601main ()
8602{
8603static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8604test_array [0] = 0
8605
8606 ;
8607 return 0;
8608}
8609_ACEOF
8610rm -f conftest.$ac_objext
8611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8612 (eval $ac_compile) 2>&5
8613 ac_status=$?
8614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8615 (exit $ac_status); } &&
8616 { ac_try='test -s conftest.$ac_objext'
8617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8618 (eval $ac_try) 2>&5
8619 ac_status=$?
8620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8621 (exit $ac_status); }; }; then
8622 ac_hi=$ac_mid; break
8623else
8624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008625sed 's/^/| /' conftest.$ac_ext >&5
8626
Martin v. Löwis11437992002-04-12 09:54:03 +00008627ac_lo=`expr $ac_mid + 1`
8628 if test $ac_lo -le $ac_mid; then
8629 ac_lo= ac_hi=
8630 break
8631 fi
8632 ac_mid=`expr 2 '*' $ac_mid + 1`
8633fi
8634rm -f conftest.$ac_objext conftest.$ac_ext
8635 done
8636else
8637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008638sed 's/^/| /' conftest.$ac_ext >&5
8639
Martin v. Löwis11437992002-04-12 09:54:03 +00008640cat >conftest.$ac_ext <<_ACEOF
8641#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008642/* confdefs.h. */
8643_ACEOF
8644cat confdefs.h >>conftest.$ac_ext
8645cat >>conftest.$ac_ext <<_ACEOF
8646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008647$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008648int
8649main ()
8650{
8651static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8652test_array [0] = 0
8653
8654 ;
8655 return 0;
8656}
8657_ACEOF
8658rm -f conftest.$ac_objext
8659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8660 (eval $ac_compile) 2>&5
8661 ac_status=$?
8662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8663 (exit $ac_status); } &&
8664 { ac_try='test -s conftest.$ac_objext'
8665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8666 (eval $ac_try) 2>&5
8667 ac_status=$?
8668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8669 (exit $ac_status); }; }; then
8670 ac_hi=-1 ac_mid=-1
8671 while :; do
8672 cat >conftest.$ac_ext <<_ACEOF
8673#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008674/* confdefs.h. */
8675_ACEOF
8676cat confdefs.h >>conftest.$ac_ext
8677cat >>conftest.$ac_ext <<_ACEOF
8678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008679$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008680int
8681main ()
8682{
8683static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8684test_array [0] = 0
8685
8686 ;
8687 return 0;
8688}
8689_ACEOF
8690rm -f conftest.$ac_objext
8691if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8692 (eval $ac_compile) 2>&5
8693 ac_status=$?
8694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8695 (exit $ac_status); } &&
8696 { ac_try='test -s conftest.$ac_objext'
8697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8698 (eval $ac_try) 2>&5
8699 ac_status=$?
8700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8701 (exit $ac_status); }; }; then
8702 ac_lo=$ac_mid; break
8703else
8704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008705sed 's/^/| /' conftest.$ac_ext >&5
8706
Martin v. Löwis11437992002-04-12 09:54:03 +00008707ac_hi=`expr '(' $ac_mid ')' - 1`
8708 if test $ac_mid -le $ac_hi; then
8709 ac_lo= ac_hi=
8710 break
8711 fi
8712 ac_mid=`expr 2 '*' $ac_mid`
8713fi
8714rm -f conftest.$ac_objext conftest.$ac_ext
8715 done
8716else
8717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008718sed 's/^/| /' conftest.$ac_ext >&5
8719
Martin v. Löwis11437992002-04-12 09:54:03 +00008720ac_lo= ac_hi=
8721fi
8722rm -f conftest.$ac_objext conftest.$ac_ext
8723fi
8724rm -f conftest.$ac_objext conftest.$ac_ext
8725# Binary search between lo and hi bounds.
8726while test "x$ac_lo" != "x$ac_hi"; do
8727 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8728 cat >conftest.$ac_ext <<_ACEOF
8729#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008730/* confdefs.h. */
8731_ACEOF
8732cat confdefs.h >>conftest.$ac_ext
8733cat >>conftest.$ac_ext <<_ACEOF
8734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008735$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008736int
8737main ()
8738{
8739static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8740test_array [0] = 0
8741
8742 ;
8743 return 0;
8744}
8745_ACEOF
8746rm -f conftest.$ac_objext
8747if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8748 (eval $ac_compile) 2>&5
8749 ac_status=$?
8750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8751 (exit $ac_status); } &&
8752 { ac_try='test -s conftest.$ac_objext'
8753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8754 (eval $ac_try) 2>&5
8755 ac_status=$?
8756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757 (exit $ac_status); }; }; then
8758 ac_hi=$ac_mid
8759else
8760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008761sed 's/^/| /' conftest.$ac_ext >&5
8762
Martin v. Löwis11437992002-04-12 09:54:03 +00008763ac_lo=`expr '(' $ac_mid ')' + 1`
8764fi
8765rm -f conftest.$ac_objext conftest.$ac_ext
8766done
8767case $ac_lo in
8768?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008769'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8770See \`config.log' for more details." >&5
8771echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8772See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 { (exit 1); exit 1; }; } ;;
8774esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008775else
8776 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008777 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8778See \`config.log' for more details." >&5
8779echo "$as_me: error: cannot run test program while cross compiling
8780See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008781 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008782else
Martin v. Löwis11437992002-04-12 09:54:03 +00008783 cat >conftest.$ac_ext <<_ACEOF
8784#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008785/* confdefs.h. */
8786_ACEOF
8787cat confdefs.h >>conftest.$ac_ext
8788cat >>conftest.$ac_ext <<_ACEOF
8789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008790$ac_includes_default
8791long longval () { return (long) (sizeof (fpos_t)); }
8792unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008793#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008794#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008795int
8796main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008797{
Martin v. Löwis11437992002-04-12 09:54:03 +00008798
8799 FILE *f = fopen ("conftest.val", "w");
8800 if (! f)
8801 exit (1);
8802 if (((long) (sizeof (fpos_t))) < 0)
8803 {
8804 long i = longval ();
8805 if (i != ((long) (sizeof (fpos_t))))
8806 exit (1);
8807 fprintf (f, "%ld\n", i);
8808 }
8809 else
8810 {
8811 unsigned long i = ulongval ();
8812 if (i != ((long) (sizeof (fpos_t))))
8813 exit (1);
8814 fprintf (f, "%lu\n", i);
8815 }
8816 exit (ferror (f) || fclose (f) != 0);
8817
8818 ;
8819 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008820}
Martin v. Löwis11437992002-04-12 09:54:03 +00008821_ACEOF
8822rm -f conftest$ac_exeext
8823if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8824 (eval $ac_link) 2>&5
8825 ac_status=$?
8826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8827 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8829 (eval $ac_try) 2>&5
8830 ac_status=$?
8831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8832 (exit $ac_status); }; }; then
8833 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008834else
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 echo "$as_me: program exited with status $ac_status" >&5
8836echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008837sed 's/^/| /' conftest.$ac_ext >&5
8838
Martin v. Löwis11437992002-04-12 09:54:03 +00008839( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008840{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8841See \`config.log' for more details." >&5
8842echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8843See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 { (exit 1); exit 1; }; }
8845fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008846rm -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 +00008847fi
8848fi
8849rm -f conftest.val
8850else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008851 ac_cv_sizeof_fpos_t=0
8852fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008853fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008854echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8855echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8856cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008857#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008858_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008859
Michael W. Hudson54241132001-12-07 15:38:26 +00008860
8861
Martin v. Löwis11437992002-04-12 09:54:03 +00008862echo "$as_me:$LINENO: checking for long long support" >&5
8863echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008864have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008865cat >conftest.$ac_ext <<_ACEOF
8866#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008867/* confdefs.h. */
8868_ACEOF
8869cat confdefs.h >>conftest.$ac_ext
8870cat >>conftest.$ac_ext <<_ACEOF
8871/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008872
Martin v. Löwis11437992002-04-12 09:54:03 +00008873int
8874main ()
8875{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008876long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008877 ;
8878 return 0;
8879}
8880_ACEOF
8881rm -f conftest.$ac_objext
8882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8883 (eval $ac_compile) 2>&5
8884 ac_status=$?
8885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8886 (exit $ac_status); } &&
8887 { ac_try='test -s conftest.$ac_objext'
8888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8889 (eval $ac_try) 2>&5
8890 ac_status=$?
8891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8892 (exit $ac_status); }; }; then
8893
8894
8895cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008896#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008897_ACEOF
8898
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008899 have_long_long=yes
8900
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008901else
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008903sed 's/^/| /' conftest.$ac_ext >&5
8904
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008905fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008906rm -f conftest.$ac_objext conftest.$ac_ext
8907echo "$as_me:$LINENO: result: $have_long_long" >&5
8908echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008909if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008910echo "$as_me:$LINENO: checking for long long" >&5
8911echo $ECHO_N "checking for long long... $ECHO_C" >&6
8912if test "${ac_cv_type_long_long+set}" = set; then
8913 echo $ECHO_N "(cached) $ECHO_C" >&6
8914else
8915 cat >conftest.$ac_ext <<_ACEOF
8916#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008917/* confdefs.h. */
8918_ACEOF
8919cat confdefs.h >>conftest.$ac_ext
8920cat >>conftest.$ac_ext <<_ACEOF
8921/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008922$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008923int
8924main ()
8925{
8926if ((long long *) 0)
8927 return 0;
8928if (sizeof (long long))
8929 return 0;
8930 ;
8931 return 0;
8932}
8933_ACEOF
8934rm -f conftest.$ac_objext
8935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8936 (eval $ac_compile) 2>&5
8937 ac_status=$?
8938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8939 (exit $ac_status); } &&
8940 { ac_try='test -s conftest.$ac_objext'
8941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8942 (eval $ac_try) 2>&5
8943 ac_status=$?
8944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8945 (exit $ac_status); }; }; then
8946 ac_cv_type_long_long=yes
8947else
8948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008949sed 's/^/| /' conftest.$ac_ext >&5
8950
Martin v. Löwis11437992002-04-12 09:54:03 +00008951ac_cv_type_long_long=no
8952fi
8953rm -f conftest.$ac_objext conftest.$ac_ext
8954fi
8955echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8956echo "${ECHO_T}$ac_cv_type_long_long" >&6
8957
8958echo "$as_me:$LINENO: checking size of long long" >&5
8959echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8960if test "${ac_cv_sizeof_long_long+set}" = set; then
8961 echo $ECHO_N "(cached) $ECHO_C" >&6
8962else
8963 if test "$ac_cv_type_long_long" = yes; then
8964 # The cast to unsigned long works around a bug in the HP C Compiler
8965 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8966 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8967 # This bug is HP SR number 8606223364.
8968 if test "$cross_compiling" = yes; then
8969 # Depending upon the size, compute the lo and hi bounds.
8970cat >conftest.$ac_ext <<_ACEOF
8971#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008972/* confdefs.h. */
8973_ACEOF
8974cat confdefs.h >>conftest.$ac_ext
8975cat >>conftest.$ac_ext <<_ACEOF
8976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008977$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008978int
8979main ()
8980{
8981static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8982test_array [0] = 0
8983
8984 ;
8985 return 0;
8986}
8987_ACEOF
8988rm -f conftest.$ac_objext
8989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8990 (eval $ac_compile) 2>&5
8991 ac_status=$?
8992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8993 (exit $ac_status); } &&
8994 { ac_try='test -s conftest.$ac_objext'
8995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8996 (eval $ac_try) 2>&5
8997 ac_status=$?
8998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8999 (exit $ac_status); }; }; then
9000 ac_lo=0 ac_mid=0
9001 while :; do
9002 cat >conftest.$ac_ext <<_ACEOF
9003#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009004/* confdefs.h. */
9005_ACEOF
9006cat confdefs.h >>conftest.$ac_ext
9007cat >>conftest.$ac_ext <<_ACEOF
9008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009009$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009010int
9011main ()
9012{
9013static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9014test_array [0] = 0
9015
9016 ;
9017 return 0;
9018}
9019_ACEOF
9020rm -f conftest.$ac_objext
9021if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9022 (eval $ac_compile) 2>&5
9023 ac_status=$?
9024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9025 (exit $ac_status); } &&
9026 { ac_try='test -s conftest.$ac_objext'
9027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9028 (eval $ac_try) 2>&5
9029 ac_status=$?
9030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9031 (exit $ac_status); }; }; then
9032 ac_hi=$ac_mid; break
9033else
9034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009035sed 's/^/| /' conftest.$ac_ext >&5
9036
Martin v. Löwis11437992002-04-12 09:54:03 +00009037ac_lo=`expr $ac_mid + 1`
9038 if test $ac_lo -le $ac_mid; then
9039 ac_lo= ac_hi=
9040 break
9041 fi
9042 ac_mid=`expr 2 '*' $ac_mid + 1`
9043fi
9044rm -f conftest.$ac_objext conftest.$ac_ext
9045 done
9046else
9047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009048sed 's/^/| /' conftest.$ac_ext >&5
9049
Martin v. Löwis11437992002-04-12 09:54:03 +00009050cat >conftest.$ac_ext <<_ACEOF
9051#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009052/* confdefs.h. */
9053_ACEOF
9054cat confdefs.h >>conftest.$ac_ext
9055cat >>conftest.$ac_ext <<_ACEOF
9056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009057$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009058int
9059main ()
9060{
9061static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9062test_array [0] = 0
9063
9064 ;
9065 return 0;
9066}
9067_ACEOF
9068rm -f conftest.$ac_objext
9069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9070 (eval $ac_compile) 2>&5
9071 ac_status=$?
9072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9073 (exit $ac_status); } &&
9074 { ac_try='test -s conftest.$ac_objext'
9075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9076 (eval $ac_try) 2>&5
9077 ac_status=$?
9078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9079 (exit $ac_status); }; }; then
9080 ac_hi=-1 ac_mid=-1
9081 while :; do
9082 cat >conftest.$ac_ext <<_ACEOF
9083#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009084/* confdefs.h. */
9085_ACEOF
9086cat confdefs.h >>conftest.$ac_ext
9087cat >>conftest.$ac_ext <<_ACEOF
9088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009089$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009090int
9091main ()
9092{
9093static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9094test_array [0] = 0
9095
9096 ;
9097 return 0;
9098}
9099_ACEOF
9100rm -f conftest.$ac_objext
9101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9102 (eval $ac_compile) 2>&5
9103 ac_status=$?
9104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9105 (exit $ac_status); } &&
9106 { ac_try='test -s conftest.$ac_objext'
9107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9108 (eval $ac_try) 2>&5
9109 ac_status=$?
9110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9111 (exit $ac_status); }; }; then
9112 ac_lo=$ac_mid; break
9113else
9114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009115sed 's/^/| /' conftest.$ac_ext >&5
9116
Martin v. Löwis11437992002-04-12 09:54:03 +00009117ac_hi=`expr '(' $ac_mid ')' - 1`
9118 if test $ac_mid -le $ac_hi; then
9119 ac_lo= ac_hi=
9120 break
9121 fi
9122 ac_mid=`expr 2 '*' $ac_mid`
9123fi
9124rm -f conftest.$ac_objext conftest.$ac_ext
9125 done
9126else
9127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009128sed 's/^/| /' conftest.$ac_ext >&5
9129
Martin v. Löwis11437992002-04-12 09:54:03 +00009130ac_lo= ac_hi=
9131fi
9132rm -f conftest.$ac_objext conftest.$ac_ext
9133fi
9134rm -f conftest.$ac_objext conftest.$ac_ext
9135# Binary search between lo and hi bounds.
9136while test "x$ac_lo" != "x$ac_hi"; do
9137 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9138 cat >conftest.$ac_ext <<_ACEOF
9139#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009140/* confdefs.h. */
9141_ACEOF
9142cat confdefs.h >>conftest.$ac_ext
9143cat >>conftest.$ac_ext <<_ACEOF
9144/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009145$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009146int
9147main ()
9148{
9149static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9150test_array [0] = 0
9151
9152 ;
9153 return 0;
9154}
9155_ACEOF
9156rm -f conftest.$ac_objext
9157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9158 (eval $ac_compile) 2>&5
9159 ac_status=$?
9160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9161 (exit $ac_status); } &&
9162 { ac_try='test -s conftest.$ac_objext'
9163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9164 (eval $ac_try) 2>&5
9165 ac_status=$?
9166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9167 (exit $ac_status); }; }; then
9168 ac_hi=$ac_mid
9169else
9170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009171sed 's/^/| /' conftest.$ac_ext >&5
9172
Martin v. Löwis11437992002-04-12 09:54:03 +00009173ac_lo=`expr '(' $ac_mid ')' + 1`
9174fi
9175rm -f conftest.$ac_objext conftest.$ac_ext
9176done
9177case $ac_lo in
9178?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009179'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9180See \`config.log' for more details." >&5
9181echo "$as_me: error: cannot compute sizeof (long long), 77
9182See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009183 { (exit 1); exit 1; }; } ;;
9184esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009185else
9186 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00009187 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9188See \`config.log' for more details." >&5
9189echo "$as_me: error: cannot run test program while cross compiling
9190See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009192else
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 cat >conftest.$ac_ext <<_ACEOF
9194#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009195/* confdefs.h. */
9196_ACEOF
9197cat confdefs.h >>conftest.$ac_ext
9198cat >>conftest.$ac_ext <<_ACEOF
9199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009200$ac_includes_default
9201long longval () { return (long) (sizeof (long long)); }
9202unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009203#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009204#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009205int
9206main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009207{
Martin v. Löwis11437992002-04-12 09:54:03 +00009208
9209 FILE *f = fopen ("conftest.val", "w");
9210 if (! f)
9211 exit (1);
9212 if (((long) (sizeof (long long))) < 0)
9213 {
9214 long i = longval ();
9215 if (i != ((long) (sizeof (long long))))
9216 exit (1);
9217 fprintf (f, "%ld\n", i);
9218 }
9219 else
9220 {
9221 unsigned long i = ulongval ();
9222 if (i != ((long) (sizeof (long long))))
9223 exit (1);
9224 fprintf (f, "%lu\n", i);
9225 }
9226 exit (ferror (f) || fclose (f) != 0);
9227
9228 ;
9229 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009230}
Martin v. Löwis11437992002-04-12 09:54:03 +00009231_ACEOF
9232rm -f conftest$ac_exeext
9233if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9234 (eval $ac_link) 2>&5
9235 ac_status=$?
9236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9237 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9239 (eval $ac_try) 2>&5
9240 ac_status=$?
9241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9242 (exit $ac_status); }; }; then
9243 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009244else
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 echo "$as_me: program exited with status $ac_status" >&5
9246echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009247sed 's/^/| /' conftest.$ac_ext >&5
9248
Martin v. Löwis11437992002-04-12 09:54:03 +00009249( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009250{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9251See \`config.log' for more details." >&5
9252echo "$as_me: error: cannot compute sizeof (long long), 77
9253See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009254 { (exit 1); exit 1; }; }
9255fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009256rm -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 +00009257fi
9258fi
9259rm -f conftest.val
9260else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009261 ac_cv_sizeof_long_long=0
9262fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009263fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009264echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9265echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9266cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009267#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009268_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009269
Michael W. Hudson54241132001-12-07 15:38:26 +00009270
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009271fi
9272
Martin v. Löwis11437992002-04-12 09:54:03 +00009273echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9274echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009275have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009276cat >conftest.$ac_ext <<_ACEOF
9277#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009278/* confdefs.h. */
9279_ACEOF
9280cat confdefs.h >>conftest.$ac_ext
9281cat >>conftest.$ac_ext <<_ACEOF
9282/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009283
Martin v. Löwis11437992002-04-12 09:54:03 +00009284int
9285main ()
9286{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009287uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 ;
9289 return 0;
9290}
9291_ACEOF
9292rm -f conftest.$ac_objext
9293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9294 (eval $ac_compile) 2>&5
9295 ac_status=$?
9296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9297 (exit $ac_status); } &&
9298 { ac_try='test -s conftest.$ac_objext'
9299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9300 (eval $ac_try) 2>&5
9301 ac_status=$?
9302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9303 (exit $ac_status); }; }; then
9304
9305
9306cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009307#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009308_ACEOF
9309
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009310 have_uintptr_t=yes
9311
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009312else
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009314sed 's/^/| /' conftest.$ac_ext >&5
9315
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009316fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009317rm -f conftest.$ac_objext conftest.$ac_ext
9318echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9319echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009320if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009321echo "$as_me:$LINENO: checking for uintptr_t" >&5
9322echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9323if test "${ac_cv_type_uintptr_t+set}" = set; then
9324 echo $ECHO_N "(cached) $ECHO_C" >&6
9325else
9326 cat >conftest.$ac_ext <<_ACEOF
9327#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009328/* confdefs.h. */
9329_ACEOF
9330cat confdefs.h >>conftest.$ac_ext
9331cat >>conftest.$ac_ext <<_ACEOF
9332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009333$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009334int
9335main ()
9336{
9337if ((uintptr_t *) 0)
9338 return 0;
9339if (sizeof (uintptr_t))
9340 return 0;
9341 ;
9342 return 0;
9343}
9344_ACEOF
9345rm -f conftest.$ac_objext
9346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9347 (eval $ac_compile) 2>&5
9348 ac_status=$?
9349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9350 (exit $ac_status); } &&
9351 { ac_try='test -s conftest.$ac_objext'
9352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9353 (eval $ac_try) 2>&5
9354 ac_status=$?
9355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9356 (exit $ac_status); }; }; then
9357 ac_cv_type_uintptr_t=yes
9358else
9359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009360sed 's/^/| /' conftest.$ac_ext >&5
9361
Martin v. Löwis11437992002-04-12 09:54:03 +00009362ac_cv_type_uintptr_t=no
9363fi
9364rm -f conftest.$ac_objext conftest.$ac_ext
9365fi
9366echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9367echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9368
9369echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9370echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9371if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9372 echo $ECHO_N "(cached) $ECHO_C" >&6
9373else
9374 if test "$ac_cv_type_uintptr_t" = yes; then
9375 # The cast to unsigned long works around a bug in the HP C Compiler
9376 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9377 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9378 # This bug is HP SR number 8606223364.
9379 if test "$cross_compiling" = yes; then
9380 # Depending upon the size, compute the lo and hi bounds.
9381cat >conftest.$ac_ext <<_ACEOF
9382#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009383/* confdefs.h. */
9384_ACEOF
9385cat confdefs.h >>conftest.$ac_ext
9386cat >>conftest.$ac_ext <<_ACEOF
9387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009388$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009389int
9390main ()
9391{
9392static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9393test_array [0] = 0
9394
9395 ;
9396 return 0;
9397}
9398_ACEOF
9399rm -f conftest.$ac_objext
9400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9401 (eval $ac_compile) 2>&5
9402 ac_status=$?
9403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9404 (exit $ac_status); } &&
9405 { ac_try='test -s conftest.$ac_objext'
9406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9407 (eval $ac_try) 2>&5
9408 ac_status=$?
9409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9410 (exit $ac_status); }; }; then
9411 ac_lo=0 ac_mid=0
9412 while :; do
9413 cat >conftest.$ac_ext <<_ACEOF
9414#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009415/* confdefs.h. */
9416_ACEOF
9417cat confdefs.h >>conftest.$ac_ext
9418cat >>conftest.$ac_ext <<_ACEOF
9419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009420$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009421int
9422main ()
9423{
9424static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9425test_array [0] = 0
9426
9427 ;
9428 return 0;
9429}
9430_ACEOF
9431rm -f conftest.$ac_objext
9432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9433 (eval $ac_compile) 2>&5
9434 ac_status=$?
9435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9436 (exit $ac_status); } &&
9437 { ac_try='test -s conftest.$ac_objext'
9438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9439 (eval $ac_try) 2>&5
9440 ac_status=$?
9441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9442 (exit $ac_status); }; }; then
9443 ac_hi=$ac_mid; break
9444else
9445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009446sed 's/^/| /' conftest.$ac_ext >&5
9447
Martin v. Löwis11437992002-04-12 09:54:03 +00009448ac_lo=`expr $ac_mid + 1`
9449 if test $ac_lo -le $ac_mid; then
9450 ac_lo= ac_hi=
9451 break
9452 fi
9453 ac_mid=`expr 2 '*' $ac_mid + 1`
9454fi
9455rm -f conftest.$ac_objext conftest.$ac_ext
9456 done
9457else
9458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009459sed 's/^/| /' conftest.$ac_ext >&5
9460
Martin v. Löwis11437992002-04-12 09:54:03 +00009461cat >conftest.$ac_ext <<_ACEOF
9462#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009463/* confdefs.h. */
9464_ACEOF
9465cat confdefs.h >>conftest.$ac_ext
9466cat >>conftest.$ac_ext <<_ACEOF
9467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009468$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009469int
9470main ()
9471{
9472static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9473test_array [0] = 0
9474
9475 ;
9476 return 0;
9477}
9478_ACEOF
9479rm -f conftest.$ac_objext
9480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9481 (eval $ac_compile) 2>&5
9482 ac_status=$?
9483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9484 (exit $ac_status); } &&
9485 { ac_try='test -s conftest.$ac_objext'
9486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9487 (eval $ac_try) 2>&5
9488 ac_status=$?
9489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9490 (exit $ac_status); }; }; then
9491 ac_hi=-1 ac_mid=-1
9492 while :; do
9493 cat >conftest.$ac_ext <<_ACEOF
9494#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009495/* confdefs.h. */
9496_ACEOF
9497cat confdefs.h >>conftest.$ac_ext
9498cat >>conftest.$ac_ext <<_ACEOF
9499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009500$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009501int
9502main ()
9503{
9504static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9505test_array [0] = 0
9506
9507 ;
9508 return 0;
9509}
9510_ACEOF
9511rm -f conftest.$ac_objext
9512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9513 (eval $ac_compile) 2>&5
9514 ac_status=$?
9515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9516 (exit $ac_status); } &&
9517 { ac_try='test -s conftest.$ac_objext'
9518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9519 (eval $ac_try) 2>&5
9520 ac_status=$?
9521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9522 (exit $ac_status); }; }; then
9523 ac_lo=$ac_mid; break
9524else
9525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009526sed 's/^/| /' conftest.$ac_ext >&5
9527
Martin v. Löwis11437992002-04-12 09:54:03 +00009528ac_hi=`expr '(' $ac_mid ')' - 1`
9529 if test $ac_mid -le $ac_hi; then
9530 ac_lo= ac_hi=
9531 break
9532 fi
9533 ac_mid=`expr 2 '*' $ac_mid`
9534fi
9535rm -f conftest.$ac_objext conftest.$ac_ext
9536 done
9537else
9538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009539sed 's/^/| /' conftest.$ac_ext >&5
9540
Martin v. Löwis11437992002-04-12 09:54:03 +00009541ac_lo= ac_hi=
9542fi
9543rm -f conftest.$ac_objext conftest.$ac_ext
9544fi
9545rm -f conftest.$ac_objext conftest.$ac_ext
9546# Binary search between lo and hi bounds.
9547while test "x$ac_lo" != "x$ac_hi"; do
9548 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9549 cat >conftest.$ac_ext <<_ACEOF
9550#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009551/* confdefs.h. */
9552_ACEOF
9553cat confdefs.h >>conftest.$ac_ext
9554cat >>conftest.$ac_ext <<_ACEOF
9555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009556$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009557int
9558main ()
9559{
9560static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9561test_array [0] = 0
9562
9563 ;
9564 return 0;
9565}
9566_ACEOF
9567rm -f conftest.$ac_objext
9568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9569 (eval $ac_compile) 2>&5
9570 ac_status=$?
9571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9572 (exit $ac_status); } &&
9573 { ac_try='test -s conftest.$ac_objext'
9574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9575 (eval $ac_try) 2>&5
9576 ac_status=$?
9577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9578 (exit $ac_status); }; }; then
9579 ac_hi=$ac_mid
9580else
9581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009582sed 's/^/| /' conftest.$ac_ext >&5
9583
Martin v. Löwis11437992002-04-12 09:54:03 +00009584ac_lo=`expr '(' $ac_mid ')' + 1`
9585fi
9586rm -f conftest.$ac_objext conftest.$ac_ext
9587done
9588case $ac_lo in
9589?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009590'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9591See \`config.log' for more details." >&5
9592echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9593See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 { (exit 1); exit 1; }; } ;;
9595esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009596else
9597 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00009598 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9599See \`config.log' for more details." >&5
9600echo "$as_me: error: cannot run test program while cross compiling
9601See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009602 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009603else
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 cat >conftest.$ac_ext <<_ACEOF
9605#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009606/* confdefs.h. */
9607_ACEOF
9608cat confdefs.h >>conftest.$ac_ext
9609cat >>conftest.$ac_ext <<_ACEOF
9610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009611$ac_includes_default
9612long longval () { return (long) (sizeof (uintptr_t)); }
9613unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009614#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009615#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009616int
9617main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009618{
Martin v. Löwis11437992002-04-12 09:54:03 +00009619
9620 FILE *f = fopen ("conftest.val", "w");
9621 if (! f)
9622 exit (1);
9623 if (((long) (sizeof (uintptr_t))) < 0)
9624 {
9625 long i = longval ();
9626 if (i != ((long) (sizeof (uintptr_t))))
9627 exit (1);
9628 fprintf (f, "%ld\n", i);
9629 }
9630 else
9631 {
9632 unsigned long i = ulongval ();
9633 if (i != ((long) (sizeof (uintptr_t))))
9634 exit (1);
9635 fprintf (f, "%lu\n", i);
9636 }
9637 exit (ferror (f) || fclose (f) != 0);
9638
9639 ;
9640 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009641}
Martin v. Löwis11437992002-04-12 09:54:03 +00009642_ACEOF
9643rm -f conftest$ac_exeext
9644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9645 (eval $ac_link) 2>&5
9646 ac_status=$?
9647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9648 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9650 (eval $ac_try) 2>&5
9651 ac_status=$?
9652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9653 (exit $ac_status); }; }; then
9654 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009655else
Martin v. Löwis11437992002-04-12 09:54:03 +00009656 echo "$as_me: program exited with status $ac_status" >&5
9657echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009658sed 's/^/| /' conftest.$ac_ext >&5
9659
Martin v. Löwis11437992002-04-12 09:54:03 +00009660( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009661{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9662See \`config.log' for more details." >&5
9663echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9664See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009665 { (exit 1); exit 1; }; }
9666fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009667rm -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 +00009668fi
9669fi
9670rm -f conftest.val
9671else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009672 ac_cv_sizeof_uintptr_t=0
9673fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009674fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009675echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9676echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9677cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009678#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009679_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009680
Michael W. Hudson54241132001-12-07 15:38:26 +00009681
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009682fi
9683
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009684# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009685echo "$as_me:$LINENO: checking size of off_t" >&5
9686echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9687if test "${ac_cv_sizeof_off_t+set}" = set; then
9688 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009689else
9690 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009691 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009692else
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 cat >conftest.$ac_ext <<_ACEOF
9694#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009695/* confdefs.h. */
9696_ACEOF
9697cat confdefs.h >>conftest.$ac_ext
9698cat >>conftest.$ac_ext <<_ACEOF
9699/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009700#include <stdio.h>
9701#include <sys/types.h>
9702main()
9703{
9704 FILE *f=fopen("conftestval", "w");
9705 if (!f) exit(1);
9706 fprintf(f, "%d\n", sizeof(off_t));
9707 exit(0);
9708}
Martin v. Löwis11437992002-04-12 09:54:03 +00009709_ACEOF
9710rm -f conftest$ac_exeext
9711if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9712 (eval $ac_link) 2>&5
9713 ac_status=$?
9714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9715 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9717 (eval $ac_try) 2>&5
9718 ac_status=$?
9719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9720 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009721 ac_cv_sizeof_off_t=`cat conftestval`
9722else
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 echo "$as_me: program exited with status $ac_status" >&5
9724echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009725sed 's/^/| /' conftest.$ac_ext >&5
9726
Martin v. Löwis11437992002-04-12 09:54:03 +00009727( exit $ac_status )
9728ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009729fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009730rm -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 +00009731fi
9732
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009733fi
9734
Martin v. Löwis11437992002-04-12 09:54:03 +00009735echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9736echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9737
9738cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009739#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009740_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009741
Michael W. Hudson54241132001-12-07 15:38:26 +00009742
Martin v. Löwis11437992002-04-12 09:54:03 +00009743echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9744echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009745if test "$have_long_long" = yes -a \
9746 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9747 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009748
Martin v. Löwis11437992002-04-12 09:54:03 +00009749cat >>confdefs.h <<\_ACEOF
9750#define HAVE_LARGEFILE_SUPPORT 1
9751_ACEOF
9752
9753 echo "$as_me:$LINENO: result: yes" >&5
9754echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009755else
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 echo "$as_me:$LINENO: result: no" >&5
9757echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009758fi
9759
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009760# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009761echo "$as_me:$LINENO: checking size of time_t" >&5
9762echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9763if test "${ac_cv_sizeof_time_t+set}" = set; then
9764 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009765else
9766 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009767 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009768else
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 cat >conftest.$ac_ext <<_ACEOF
9770#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009771/* confdefs.h. */
9772_ACEOF
9773cat confdefs.h >>conftest.$ac_ext
9774cat >>conftest.$ac_ext <<_ACEOF
9775/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009776#include <stdio.h>
9777#include <time.h>
9778main()
9779{
9780 FILE *f=fopen("conftestval", "w");
9781 if (!f) exit(1);
9782 fprintf(f, "%d\n", sizeof(time_t));
9783 exit(0);
9784}
Martin v. Löwis11437992002-04-12 09:54:03 +00009785_ACEOF
9786rm -f conftest$ac_exeext
9787if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9788 (eval $ac_link) 2>&5
9789 ac_status=$?
9790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9791 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9793 (eval $ac_try) 2>&5
9794 ac_status=$?
9795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9796 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009797 ac_cv_sizeof_time_t=`cat conftestval`
9798else
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 echo "$as_me: program exited with status $ac_status" >&5
9800echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009801sed 's/^/| /' conftest.$ac_ext >&5
9802
Martin v. Löwis11437992002-04-12 09:54:03 +00009803( exit $ac_status )
9804ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009805fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009806rm -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 +00009807fi
9808
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009809fi
9810
Martin v. Löwis11437992002-04-12 09:54:03 +00009811echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9812echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9813
9814cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009815#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009816_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009817
Michael W. Hudson54241132001-12-07 15:38:26 +00009818
9819
Trent Mick635f6fb2000-08-23 21:33:05 +00009820# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009821ac_save_cc="$CC"
9822if test "$ac_cv_kpthread" = "yes"
9823then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009824elif test "$ac_cv_kthread" = "yes"
9825then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009826elif test "$ac_cv_pthread" = "yes"
9827then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009828fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009829echo "$as_me:$LINENO: checking for pthread_t" >&5
9830echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009831have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009832cat >conftest.$ac_ext <<_ACEOF
9833#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009834/* confdefs.h. */
9835_ACEOF
9836cat confdefs.h >>conftest.$ac_ext
9837cat >>conftest.$ac_ext <<_ACEOF
9838/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009839#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009840int
9841main ()
9842{
Guido van Rossum12580492000-09-24 16:47:19 +00009843pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ;
9845 return 0;
9846}
9847_ACEOF
9848rm -f conftest.$ac_objext
9849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9850 (eval $ac_compile) 2>&5
9851 ac_status=$?
9852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9853 (exit $ac_status); } &&
9854 { ac_try='test -s conftest.$ac_objext'
9855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9856 (eval $ac_try) 2>&5
9857 ac_status=$?
9858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9859 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009860 have_pthread_t=yes
9861else
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009863sed 's/^/| /' conftest.$ac_ext >&5
9864
Trent Mick635f6fb2000-08-23 21:33:05 +00009865fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009866rm -f conftest.$ac_objext conftest.$ac_ext
9867echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9868echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009869if test "$have_pthread_t" = yes ; then
9870 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9872echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9873 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9874 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009875else
9876 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009877 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009878else
Martin v. Löwis11437992002-04-12 09:54:03 +00009879 cat >conftest.$ac_ext <<_ACEOF
9880#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009881/* confdefs.h. */
9882_ACEOF
9883cat confdefs.h >>conftest.$ac_ext
9884cat >>conftest.$ac_ext <<_ACEOF
9885/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009886#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009887#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009888 main()
9889 {
9890 FILE *f=fopen("conftestval", "w");
9891 if (!f) exit(1);
9892 fprintf(f, "%d\n", sizeof(pthread_t));
9893 exit(0);
9894 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009895_ACEOF
9896rm -f conftest$ac_exeext
9897if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9898 (eval $ac_link) 2>&5
9899 ac_status=$?
9900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9903 (eval $ac_try) 2>&5
9904 ac_status=$?
9905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9906 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009907 ac_cv_sizeof_pthread_t=`cat conftestval`
9908else
Martin v. Löwis11437992002-04-12 09:54:03 +00009909 echo "$as_me: program exited with status $ac_status" >&5
9910echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009911sed 's/^/| /' conftest.$ac_ext >&5
9912
Martin v. Löwis11437992002-04-12 09:54:03 +00009913( exit $ac_status )
9914ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009915fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009916rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009917fi
9918
Trent Mick635f6fb2000-08-23 21:33:05 +00009919fi
9920
Martin v. Löwis11437992002-04-12 09:54:03 +00009921 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9922echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9923
9924cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009925#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009926_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009927
9928fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009929CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009930
Martin v. Löwis11437992002-04-12 09:54:03 +00009931echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9932echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009933# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9934if test "${enable_toolbox_glue+set}" = set; then
9935 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009936
Martin v. Löwis11437992002-04-12 09:54:03 +00009937fi;
Jack Jansene578a632001-08-15 01:27:14 +00009938
9939if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009940then
Jack Jansene578a632001-08-15 01:27:14 +00009941 case $ac_sys_system/$ac_sys_release in
9942 Darwin/*)
9943 enable_toolbox_glue="yes";;
9944 *)
9945 enable_toolbox_glue="no";;
9946 esac
9947fi
9948case "$enable_toolbox_glue" in
9949yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009950 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009951 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009952 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009953
9954cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009955#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009956_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009957
9958 ;;
9959*)
9960 extra_frameworks=""
9961 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009962 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009963 ;;
9964esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009965echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9966echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009967
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009968
9969case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009970 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009971 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009972 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009973 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009974 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009975 Darwin/*)
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 Jansene578a632001-08-15 01:27:14 +00009979 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009980esac
9981
Martin v. Löwis11437992002-04-12 09:54:03 +00009982echo "$as_me:$LINENO: checking for --enable-framework" >&5
9983echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009984if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009985then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009986 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009987 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009988 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009989 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009990
Martin v. Löwis11437992002-04-12 09:54:03 +00009991cat >>confdefs.h <<\_ACEOF
9992#define WITH_NEXT_FRAMEWORK 1
9993_ACEOF
9994
9995 echo "$as_me:$LINENO: result: yes" >&5
9996echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009997else
Martin v. Löwis11437992002-04-12 09:54:03 +00009998 echo "$as_me:$LINENO: result: no" >&5
9999echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010000fi
10001
Martin v. Löwis11437992002-04-12 09:54:03 +000010002echo "$as_me:$LINENO: checking for dyld" >&5
10003echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010004case $ac_sys_system/$ac_sys_release in
10005 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010006
Martin v. Löwis11437992002-04-12 09:54:03 +000010007cat >>confdefs.h <<\_ACEOF
10008#define WITH_DYLD 1
10009_ACEOF
10010
10011 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10012echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010013 ;;
10014 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 echo "$as_me:$LINENO: result: no" >&5
10016echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010017 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010018esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010019
Guido van Rossum0a516c91994-09-12 10:58:40 +000010020# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010021
Michael W. Hudson54241132001-12-07 15:38:26 +000010022
10023
10024
10025
Guido van Rossum0a516c91994-09-12 10:58:40 +000010026# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010027# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010028echo "$as_me:$LINENO: checking SO" >&5
10029echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010030if test -z "$SO"
10031then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010032 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010033 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010034 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010035 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010036 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010037else
10038 # this might also be a termcap variable, see #610332
10039 echo
10040 echo '====================================================================='
10041 echo '+ +'
10042 echo '+ WARNING: You have set SO in your environment. +'
10043 echo '+ Do you really mean to change the extension for shared libraries? +'
10044 echo '+ Continuing in 10 seconds to let you to ponder. +'
10045 echo '+ +'
10046 echo '====================================================================='
10047 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010048fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010049echo "$as_me:$LINENO: result: $SO" >&5
10050echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010051# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +000010052# -- "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 +000010053# (Shared libraries in this instance are shared modules to be loaded into
10054# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010055echo "$as_me:$LINENO: checking LDSHARED" >&5
10056echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010057if test -z "$LDSHARED"
10058then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010059 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010060 AIX*)
10061 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010062 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010063 ;;
10064 BeOS*)
10065 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010066 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010067 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010068 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010069 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010070 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000010072 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010073 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010074 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000010075 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010076 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010077 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
10078 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010079 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010080 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10081 if test "$enable_framework" ; then
10082 # Link against the framework. All externals should be defined.
10083 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
10084 else
10085 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010086 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010087 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +000010088 Darwin/*)
10089 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10090 if test "$enable_framework" ; then
10091 # Link against the framework. All externals should be defined.
10092 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
10093 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010094 # No framework, use the Python app as bundle-loader
10095 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010096 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010097 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010098 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +000010099 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010100 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010101 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010102 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010103 then
10104 LDSHARED="cc -shared ${LDFLAGS}"
10105 else
10106 LDSHARED="ld -Bshareable ${LDFLAGS}"
10107 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010108 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010109 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010110 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010111 then LDSHARED='$(CC) -shared'
10112 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010113 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010114 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010115 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010116 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010117 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010118 *) LDSHARED="ld";;
10119 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010121echo "$as_me:$LINENO: result: $LDSHARED" >&5
10122echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010123BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010124# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010125# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010126echo "$as_me:$LINENO: checking CCSHARED" >&5
10127echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010128if test -z "$CCSHARED"
10129then
Guido van Rossum07397971997-04-29 21:49:50 +000010130 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010131 SunOS*) if test "$GCC" = yes;
10132 then CCSHARED="-fPIC";
10133 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010134 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010135 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010136 else CCSHARED="+z";
10137 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010138 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010139 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010140 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010141 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010142 if test "$GCC" = "yes"
10143 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010144 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010145 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010146 SCO_SV*)
10147 if test "$GCC" = "yes"
10148 then CCSHARED="-fPIC"
10149 else CCSHARED="-Kpic -belf"
10150 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010151 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010152 IRIX*/6*) case $CC in
10153 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010154 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010155 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010156 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010157 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010158fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010159echo "$as_me:$LINENO: result: $CCSHARED" >&5
10160echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010161# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010162# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010163echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10164echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010165if test -z "$LINKFORSHARED"
10166then
Guido van Rossum07397971997-04-29 21:49:50 +000010167 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010168 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010169 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010170 LINKFORSHARED="-Wl,-E -Wl,+s";;
10171# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010172 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010173 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010174 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +000010176 # -u __dummy makes the linker aware of the objc runtime
10177 # in System.framework; otherwise, __objcInit (referenced in
10178 # crt1.o) gets erroneously defined as common, which breaks dynamic
10179 # loading of any modules which reference it in System.framework.
10180 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
10181 # not used by the core itself but which needs to be in the core so
10182 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010183 # -prebind is no longer used, because it actually seems to give a
10184 # slowdown in stead of a speedup, maybe due to the large number of
10185 # dynamic loads Python does.
10186 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +000010187 if test "$enable_framework"
10188 then
10189 LINKFORSHARED="$LINKFORSHARED -framework Python"
10190 fi
10191 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010192 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010193 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010194 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010196 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10197 then
10198 LINKFORSHARED="-Wl,--export-dynamic"
10199 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010200 SunOS/5*) case $CC in
10201 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010202 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010203 then
10204 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010205 fi;;
10206 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010207 CYGWIN*)
10208 if test $enable_shared = "no"
10209 then
10210 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10211 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010212 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010213fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010214echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10215echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010216
Michael W. Hudson54241132001-12-07 15:38:26 +000010217
Martin v. Löwis11437992002-04-12 09:54:03 +000010218echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10219echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010220if test ! "$LIBRARY" = "$LDLIBRARY"
10221then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010222 case $ac_sys_system in
10223 CYGWIN*)
10224 # Cygwin needs CCSHARED when building extension DLLs
10225 # but not when building the interpreter DLL.
10226 CFLAGSFORSHARED='';;
10227 *)
10228 CFLAGSFORSHARED='$(CCSHARED)'
10229 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010231echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10232echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010233
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010234# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10235# library (with --enable-shared).
10236# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010237# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10238# if it is not required, since it creates a dependency of the shared library
10239# to LIBS. This, in turn, means that applications linking the shared libpython
10240# don't need to link LIBS explicitly. The default should be only changed
10241# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010242
10243echo "$as_me:$LINENO: checking SHLIBS" >&5
10244echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10245case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010246 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010247 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010248esac
10249echo "$as_me:$LINENO: result: $SHLIBS" >&5
10250echo "${ECHO_T}$SHLIBS" >&6
10251
10252
Guido van Rossum627b2d71993-12-24 10:39:16 +000010253# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010254
10255echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10256echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10257if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010259else
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010261LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010262cat >conftest.$ac_ext <<_ACEOF
10263#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010264/* confdefs.h. */
10265_ACEOF
10266cat confdefs.h >>conftest.$ac_ext
10267cat >>conftest.$ac_ext <<_ACEOF
10268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010269
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010270/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010271#ifdef __cplusplus
10272extern "C"
10273#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010274/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 builtin and then its argument prototype would still apply. */
10276char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010277int
10278main ()
10279{
10280dlopen ();
10281 ;
10282 return 0;
10283}
10284_ACEOF
10285rm -f conftest.$ac_objext conftest$ac_exeext
10286if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10287 (eval $ac_link) 2>&5
10288 ac_status=$?
10289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10290 (exit $ac_status); } &&
10291 { ac_try='test -s conftest$ac_exeext'
10292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10293 (eval $ac_try) 2>&5
10294 ac_status=$?
10295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10296 (exit $ac_status); }; }; then
10297 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010298else
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010300sed 's/^/| /' conftest.$ac_ext >&5
10301
Martin v. Löwis11437992002-04-12 09:54:03 +000010302ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010303fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010304rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10305LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010306fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010307echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10308echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10309if test $ac_cv_lib_dl_dlopen = yes; then
10310 cat >>confdefs.h <<_ACEOF
10311#define HAVE_LIBDL 1
10312_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010313
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010314 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010315
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010316fi
10317 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010318
10319echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10320echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10321if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010323else
Martin v. Löwis11437992002-04-12 09:54:03 +000010324 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010325LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010326cat >conftest.$ac_ext <<_ACEOF
10327#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010328/* confdefs.h. */
10329_ACEOF
10330cat confdefs.h >>conftest.$ac_ext
10331cat >>conftest.$ac_ext <<_ACEOF
10332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010333
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010334/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010335#ifdef __cplusplus
10336extern "C"
10337#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010338/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010339 builtin and then its argument prototype would still apply. */
10340char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010341int
10342main ()
10343{
10344shl_load ();
10345 ;
10346 return 0;
10347}
10348_ACEOF
10349rm -f conftest.$ac_objext conftest$ac_exeext
10350if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10351 (eval $ac_link) 2>&5
10352 ac_status=$?
10353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10354 (exit $ac_status); } &&
10355 { ac_try='test -s conftest$ac_exeext'
10356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10357 (eval $ac_try) 2>&5
10358 ac_status=$?
10359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10360 (exit $ac_status); }; }; then
10361 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010362else
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010364sed 's/^/| /' conftest.$ac_ext >&5
10365
Martin v. Löwis11437992002-04-12 09:54:03 +000010366ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010368rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10369LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010370fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010371echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10372echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10373if test $ac_cv_lib_dld_shl_load = yes; then
10374 cat >>confdefs.h <<_ACEOF
10375#define HAVE_LIBDLD 1
10376_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010377
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010378 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010379
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010380fi
10381 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010382
10383# only check for sem_ini if thread support is requested
10384if test "$with_threads" = "yes" -o -z "$with_threads"; then
10385 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010386echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10387if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010389else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010390 ac_func_search_save_LIBS=$LIBS
10391ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010392cat >conftest.$ac_ext <<_ACEOF
10393#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010394/* confdefs.h. */
10395_ACEOF
10396cat confdefs.h >>conftest.$ac_ext
10397cat >>conftest.$ac_ext <<_ACEOF
10398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010399
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010400/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010401#ifdef __cplusplus
10402extern "C"
10403#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010404/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010405 builtin and then its argument prototype would still apply. */
10406char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010407int
10408main ()
10409{
10410sem_init ();
10411 ;
10412 return 0;
10413}
10414_ACEOF
10415rm -f conftest.$ac_objext conftest$ac_exeext
10416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10417 (eval $ac_link) 2>&5
10418 ac_status=$?
10419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10420 (exit $ac_status); } &&
10421 { ac_try='test -s conftest$ac_exeext'
10422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10423 (eval $ac_try) 2>&5
10424 ac_status=$?
10425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10426 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010427 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010428else
Martin v. Löwis11437992002-04-12 09:54:03 +000010429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010430sed 's/^/| /' conftest.$ac_ext >&5
10431
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010433rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010434if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010435 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010436 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10437 cat >conftest.$ac_ext <<_ACEOF
10438#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010439/* confdefs.h. */
10440_ACEOF
10441cat confdefs.h >>conftest.$ac_ext
10442cat >>conftest.$ac_ext <<_ACEOF
10443/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010444
10445/* Override any gcc2 internal prototype to avoid an error. */
10446#ifdef __cplusplus
10447extern "C"
10448#endif
10449/* We use char because int might match the return type of a gcc2
10450 builtin and then its argument prototype would still apply. */
10451char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010452int
10453main ()
10454{
10455sem_init ();
10456 ;
10457 return 0;
10458}
Martin v. Löwis11437992002-04-12 09:54:03 +000010459_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010460rm -f conftest.$ac_objext conftest$ac_exeext
10461if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10462 (eval $ac_link) 2>&5
10463 ac_status=$?
10464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10465 (exit $ac_status); } &&
10466 { ac_try='test -s conftest$ac_exeext'
10467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10468 (eval $ac_try) 2>&5
10469 ac_status=$?
10470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10471 (exit $ac_status); }; }; then
10472 ac_cv_search_sem_init="-l$ac_lib"
10473break
10474else
10475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010476sed 's/^/| /' conftest.$ac_ext >&5
10477
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010478fi
10479rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10480 done
10481fi
10482LIBS=$ac_func_search_save_LIBS
10483fi
10484echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10485echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10486if test "$ac_cv_search_sem_init" != no; then
10487 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010488
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010489fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010490 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010491 # posix4 on Solaris 2.6
10492 # pthread (first!) on Linux
10493fi
10494
Martin v. Löwis19d17342003-06-14 21:03:05 +000010495# check if we need libintl for locale functions
10496echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10497echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10498if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10499 echo $ECHO_N "(cached) $ECHO_C" >&6
10500else
10501 ac_check_lib_save_LIBS=$LIBS
10502LIBS="-lintl $LIBS"
10503cat >conftest.$ac_ext <<_ACEOF
10504#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010505/* confdefs.h. */
10506_ACEOF
10507cat confdefs.h >>conftest.$ac_ext
10508cat >>conftest.$ac_ext <<_ACEOF
10509/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010510
10511/* Override any gcc2 internal prototype to avoid an error. */
10512#ifdef __cplusplus
10513extern "C"
10514#endif
10515/* We use char because int might match the return type of a gcc2
10516 builtin and then its argument prototype would still apply. */
10517char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010518int
10519main ()
10520{
10521textdomain ();
10522 ;
10523 return 0;
10524}
10525_ACEOF
10526rm -f conftest.$ac_objext conftest$ac_exeext
10527if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10528 (eval $ac_link) 2>&5
10529 ac_status=$?
10530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10531 (exit $ac_status); } &&
10532 { ac_try='test -s conftest$ac_exeext'
10533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10534 (eval $ac_try) 2>&5
10535 ac_status=$?
10536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10537 (exit $ac_status); }; }; then
10538 ac_cv_lib_intl_textdomain=yes
10539else
10540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010541sed 's/^/| /' conftest.$ac_ext >&5
10542
Martin v. Löwis19d17342003-06-14 21:03:05 +000010543ac_cv_lib_intl_textdomain=no
10544fi
10545rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10546LIBS=$ac_check_lib_save_LIBS
10547fi
10548echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10549echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10550if test $ac_cv_lib_intl_textdomain = yes; then
10551
10552cat >>confdefs.h <<\_ACEOF
10553#define WITH_LIBINTL 1
10554_ACEOF
10555
10556fi
10557
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010558
10559# checks for system dependent C++ extensions support
10560case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010561 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10562echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10563 cat >conftest.$ac_ext <<_ACEOF
10564#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010565/* confdefs.h. */
10566_ACEOF
10567cat confdefs.h >>conftest.$ac_ext
10568cat >>conftest.$ac_ext <<_ACEOF
10569/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010570#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010571int
10572main ()
10573{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010574loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 ;
10576 return 0;
10577}
10578_ACEOF
10579rm -f conftest.$ac_objext conftest$ac_exeext
10580if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10581 (eval $ac_link) 2>&5
10582 ac_status=$?
10583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10584 (exit $ac_status); } &&
10585 { ac_try='test -s conftest$ac_exeext'
10586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10587 (eval $ac_try) 2>&5
10588 ac_status=$?
10589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10590 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010591
Martin v. Löwis11437992002-04-12 09:54:03 +000010592cat >>confdefs.h <<\_ACEOF
10593#define AIX_GENUINE_CPLUSPLUS 1
10594_ACEOF
10595
10596 echo "$as_me:$LINENO: result: yes" >&5
10597echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010598else
Martin v. Löwis11437992002-04-12 09:54:03 +000010599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010600sed 's/^/| /' conftest.$ac_ext >&5
10601
Martin v. Löwis11437992002-04-12 09:54:03 +000010602echo "$as_me:$LINENO: result: no" >&5
10603echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010604fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010605rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010606 *) ;;
10607esac
10608
Guido van Rossum70c7f481998-03-26 18:44:10 +000010609# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +000010610# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010611# BeOS' sockets are stashed in libnet.
10612case "$ac_sys_system" in
10613IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +000010614*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010615echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10616echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10617if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10618 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010619else
Martin v. Löwis11437992002-04-12 09:54:03 +000010620 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010621LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010622cat >conftest.$ac_ext <<_ACEOF
10623#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010624/* confdefs.h. */
10625_ACEOF
10626cat confdefs.h >>conftest.$ac_ext
10627cat >>conftest.$ac_ext <<_ACEOF
10628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010629
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010630/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010631#ifdef __cplusplus
10632extern "C"
10633#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010634/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010635 builtin and then its argument prototype would still apply. */
10636char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010637int
10638main ()
10639{
10640t_open ();
10641 ;
10642 return 0;
10643}
10644_ACEOF
10645rm -f conftest.$ac_objext conftest$ac_exeext
10646if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10647 (eval $ac_link) 2>&5
10648 ac_status=$?
10649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10650 (exit $ac_status); } &&
10651 { ac_try='test -s conftest$ac_exeext'
10652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10653 (eval $ac_try) 2>&5
10654 ac_status=$?
10655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10656 (exit $ac_status); }; }; then
10657 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010658else
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010660sed 's/^/| /' conftest.$ac_ext >&5
10661
Martin v. Löwis11437992002-04-12 09:54:03 +000010662ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010663fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010664rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10665LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010666fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010667echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10668echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10669if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010670 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010671fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010672 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010673echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10674echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10675if test "${ac_cv_lib_socket_socket+set}" = set; then
10676 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010677else
Martin v. Löwis11437992002-04-12 09:54:03 +000010678 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010679LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010680cat >conftest.$ac_ext <<_ACEOF
10681#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010682/* confdefs.h. */
10683_ACEOF
10684cat confdefs.h >>conftest.$ac_ext
10685cat >>conftest.$ac_ext <<_ACEOF
10686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010687
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010688/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010689#ifdef __cplusplus
10690extern "C"
10691#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010692/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 builtin and then its argument prototype would still apply. */
10694char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010695int
10696main ()
10697{
10698socket ();
10699 ;
10700 return 0;
10701}
10702_ACEOF
10703rm -f conftest.$ac_objext conftest$ac_exeext
10704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10705 (eval $ac_link) 2>&5
10706 ac_status=$?
10707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10708 (exit $ac_status); } &&
10709 { ac_try='test -s conftest$ac_exeext'
10710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10711 (eval $ac_try) 2>&5
10712 ac_status=$?
10713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10714 (exit $ac_status); }; }; then
10715 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010716else
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010718sed 's/^/| /' conftest.$ac_ext >&5
10719
Martin v. Löwis11437992002-04-12 09:54:03 +000010720ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010721fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010722rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10723LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010724fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010725echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10726echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10727if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010728 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010729fi
10730 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010731;;
10732esac
10733case "$ac_sys_system" in
10734BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010735echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10736echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10737if test "${ac_cv_lib_net_socket+set}" = set; then
10738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010739else
Martin v. Löwis11437992002-04-12 09:54:03 +000010740 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010741LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010742cat >conftest.$ac_ext <<_ACEOF
10743#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010744/* confdefs.h. */
10745_ACEOF
10746cat confdefs.h >>conftest.$ac_ext
10747cat >>conftest.$ac_ext <<_ACEOF
10748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010749
Guido van Rossumad678af1998-10-02 14:42:15 +000010750/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010751#ifdef __cplusplus
10752extern "C"
10753#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010754/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 builtin and then its argument prototype would still apply. */
10756char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010757int
10758main ()
10759{
10760socket ();
10761 ;
10762 return 0;
10763}
10764_ACEOF
10765rm -f conftest.$ac_objext conftest$ac_exeext
10766if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10767 (eval $ac_link) 2>&5
10768 ac_status=$?
10769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10770 (exit $ac_status); } &&
10771 { ac_try='test -s conftest$ac_exeext'
10772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10773 (eval $ac_try) 2>&5
10774 ac_status=$?
10775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10776 (exit $ac_status); }; }; then
10777 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010778else
Martin v. Löwis11437992002-04-12 09:54:03 +000010779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010780sed 's/^/| /' conftest.$ac_ext >&5
10781
Martin v. Löwis11437992002-04-12 09:54:03 +000010782ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010783fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010784rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10785LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010786fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010787echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10788echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10789if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010790 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010791fi
10792 # BeOS
10793;;
10794esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010795
Martin v. Löwis11437992002-04-12 09:54:03 +000010796echo "$as_me:$LINENO: checking for --with-libs" >&5
10797echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10798
Guido van Rossuma68acba1996-07-31 17:36:39 +000010799# Check whether --with-libs or --without-libs was given.
10800if test "${with_libs+set}" = set; then
10801 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010802
10803echo "$as_me:$LINENO: result: $withval" >&5
10804echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010805LIBS="$withval $LIBS"
10806
10807else
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 echo "$as_me:$LINENO: result: no" >&5
10809echo "${ECHO_T}no" >&6
10810fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010811
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010812# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010813
10814
Martin v. Löwis11437992002-04-12 09:54:03 +000010815echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10816echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10817
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010818# Check whether --with-signal-module or --without-signal-module was given.
10819if test "${with_signal_module+set}" = set; then
10820 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010821
Martin v. Löwis11437992002-04-12 09:54:03 +000010822fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010823
10824if test -z "$with_signal_module"
10825then with_signal_module="yes"
10826fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010827echo "$as_me:$LINENO: result: $with_signal_module" >&5
10828echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010829
10830if test "${with_signal_module}" = "yes"; then
10831 USE_SIGNAL_MODULE=""
10832 SIGNAL_OBJS=""
10833else
10834 USE_SIGNAL_MODULE="#"
10835 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10836fi
10837
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010838# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010839
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010840USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010841
Martin v. Löwis11437992002-04-12 09:54:03 +000010842echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10843echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10844
Guido van Rossumec2f0731997-01-22 20:54:01 +000010845
10846# Check whether --with-dec-threads or --without-dec-threads was given.
10847if test "${with_dec_threads+set}" = set; then
10848 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010849
10850echo "$as_me:$LINENO: result: $withval" >&5
10851echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010852LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010853if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010854 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010855fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010856else
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 echo "$as_me:$LINENO: result: no" >&5
10858echo "${ECHO_T}no" >&6
10859fi;
10860
10861# Templates for things AC_DEFINEd more than once.
10862# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010863
10864
Martin v. Löwis11437992002-04-12 09:54:03 +000010865
10866
10867
10868
10869
10870echo "$as_me:$LINENO: checking for --with-threads" >&5
10871echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10872
Guido van Rossumec2f0731997-01-22 20:54:01 +000010873# Check whether --with-threads or --without-threads was given.
10874if test "${with_threads+set}" = set; then
10875 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010876
Martin v. Löwis11437992002-04-12 09:54:03 +000010877fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010878
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010879# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010880
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010881# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010882if test "${with_thread+set}" = set; then
10883 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010884 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010885fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010886
10887if test -z "$with_threads"
10888then with_threads="yes"
10889fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010890echo "$as_me:$LINENO: result: $with_threads" >&5
10891echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010892
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010893
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010894if test "$with_threads" = "no"
10895then
10896 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010897elif test "$ac_cv_pthread_is_default" = yes
10898then
Martin v. Löwis11437992002-04-12 09:54:03 +000010899 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010900#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010901_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010902
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010903 # Defining _REENTRANT on system with POSIX threads should not hurt.
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 _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010906_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010907
10908 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010910elif test "$ac_cv_kpthread" = "yes"
10911then
10912 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010913 if test "$ac_cv_cxx_thread" = "yes"; then
10914 CXX="$CXX -Kpthread"
10915 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010916 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010917#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010918_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010919
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010920 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010921 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010922elif test "$ac_cv_kthread" = "yes"
10923then
10924 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010925 if test "$ac_cv_cxx_thread" = "yes"; then
10926 CXX="$CXX -Kthread"
10927 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010928 cat >>confdefs.h <<\_ACEOF
10929#define WITH_THREAD 1
10930_ACEOF
10931
10932 posix_threads=yes
10933 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010934elif test "$ac_cv_pthread" = "yes"
10935then
10936 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010937 if test "$ac_cv_cxx_thread" = "yes"; then
10938 CXX="$CXX -pthread"
10939 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010940 cat >>confdefs.h <<\_ACEOF
10941#define WITH_THREAD 1
10942_ACEOF
10943
10944 posix_threads=yes
10945 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010946else
10947 if test ! -z "$with_threads" -a -d "$with_threads"
10948 then LDFLAGS="$LDFLAGS -L$with_threads"
10949 fi
10950 if test ! -z "$withval" -a -d "$withval"
10951 then LDFLAGS="$LDFLAGS -L$withval"
10952 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010953
10954 # According to the POSIX spec, a pthreads implementation must
10955 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010956 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10957echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10958 cat >conftest.$ac_ext <<_ACEOF
10959#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010960/* confdefs.h. */
10961_ACEOF
10962cat confdefs.h >>conftest.$ac_ext
10963cat >>conftest.$ac_ext <<_ACEOF
10964/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010965
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010966#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010967#ifdef _POSIX_THREADS
10968yes
10969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010970
10971_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010973 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010974 unistd_defines_pthreads=yes
10975else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010976 unistd_defines_pthreads=no
10977fi
10978rm -f conftest*
10979
Martin v. Löwis11437992002-04-12 09:54:03 +000010980 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10981echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010982
Martin v. Löwis11437992002-04-12 09:54:03 +000010983 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010984#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010985_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010986
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 if test "${ac_cv_header_cthreads_h+set}" = set; then
10988 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10989echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10990if test "${ac_cv_header_cthreads_h+set}" = set; then
10991 echo $ECHO_N "(cached) $ECHO_C" >&6
10992fi
10993echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10994echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010995else
Martin v. Löwis11437992002-04-12 09:54:03 +000010996 # Is the header compilable?
10997echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10998echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10999cat >conftest.$ac_ext <<_ACEOF
11000#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011001/* confdefs.h. */
11002_ACEOF
11003cat confdefs.h >>conftest.$ac_ext
11004cat >>conftest.$ac_ext <<_ACEOF
11005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011006$ac_includes_default
11007#include <cthreads.h>
11008_ACEOF
11009rm -f conftest.$ac_objext
11010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11011 (eval $ac_compile) 2>&5
11012 ac_status=$?
11013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11014 (exit $ac_status); } &&
11015 { ac_try='test -s conftest.$ac_objext'
11016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11017 (eval $ac_try) 2>&5
11018 ac_status=$?
11019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11020 (exit $ac_status); }; }; then
11021 ac_header_compiler=yes
11022else
11023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011024sed 's/^/| /' conftest.$ac_ext >&5
11025
Martin v. Löwis11437992002-04-12 09:54:03 +000011026ac_header_compiler=no
11027fi
11028rm -f conftest.$ac_objext conftest.$ac_ext
11029echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11030echo "${ECHO_T}$ac_header_compiler" >&6
11031
11032# Is the header present?
11033echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11034echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11035cat >conftest.$ac_ext <<_ACEOF
11036#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011037/* confdefs.h. */
11038_ACEOF
11039cat confdefs.h >>conftest.$ac_ext
11040cat >>conftest.$ac_ext <<_ACEOF
11041/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011042#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011043_ACEOF
11044if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11045 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11046 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011047 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011048 rm -f conftest.er1
11049 cat conftest.err >&5
11050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11051 (exit $ac_status); } >/dev/null; then
11052 if test -s conftest.err; then
11053 ac_cpp_err=$ac_c_preproc_warn_flag
11054 else
11055 ac_cpp_err=
11056 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011057else
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 ac_cpp_err=yes
11059fi
11060if test -z "$ac_cpp_err"; then
11061 ac_header_preproc=yes
11062else
11063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011064sed 's/^/| /' conftest.$ac_ext >&5
11065
Martin v. Löwis11437992002-04-12 09:54:03 +000011066 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011068rm -f conftest.err conftest.$ac_ext
11069echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11070echo "${ECHO_T}$ac_header_preproc" >&6
11071
11072# So? What about this header?
11073case $ac_header_compiler:$ac_header_preproc in
11074 yes:no )
11075 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11076echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11077 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011078echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
11079 (
11080 cat <<\_ASBOX
11081## ------------------------------------ ##
11082## Report this to bug-autoconf@gnu.org. ##
11083## ------------------------------------ ##
11084_ASBOX
11085 ) |
11086 sed "s/^/$as_me: WARNING: /" >&2
11087 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011088 no:yes )
11089 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11090echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
11091 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11092echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11093 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011094echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
11095 (
11096 cat <<\_ASBOX
11097## ------------------------------------ ##
11098## Report this to bug-autoconf@gnu.org. ##
11099## ------------------------------------ ##
11100_ASBOX
11101 ) |
11102 sed "s/^/$as_me: WARNING: /" >&2
11103 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011104esac
11105echo "$as_me:$LINENO: checking for cthreads.h" >&5
11106echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11107if test "${ac_cv_header_cthreads_h+set}" = set; then
11108 echo $ECHO_N "(cached) $ECHO_C" >&6
11109else
11110 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011112echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11113echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11114
11115fi
11116if test $ac_cv_header_cthreads_h = yes; then
11117 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011118#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011119_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011120
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011122#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011123_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011124
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
11126cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011127#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011128_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011129
11130 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011131 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011132else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011133
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11135 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11136echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11137if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11138 echo $ECHO_N "(cached) $ECHO_C" >&6
11139fi
11140echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11141echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011142else
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 # Is the header compilable?
11144echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11145echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11146cat >conftest.$ac_ext <<_ACEOF
11147#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011148/* confdefs.h. */
11149_ACEOF
11150cat confdefs.h >>conftest.$ac_ext
11151cat >>conftest.$ac_ext <<_ACEOF
11152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011153$ac_includes_default
11154#include <mach/cthreads.h>
11155_ACEOF
11156rm -f conftest.$ac_objext
11157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11158 (eval $ac_compile) 2>&5
11159 ac_status=$?
11160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11161 (exit $ac_status); } &&
11162 { ac_try='test -s conftest.$ac_objext'
11163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11164 (eval $ac_try) 2>&5
11165 ac_status=$?
11166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11167 (exit $ac_status); }; }; then
11168 ac_header_compiler=yes
11169else
11170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011171sed 's/^/| /' conftest.$ac_ext >&5
11172
Martin v. Löwis11437992002-04-12 09:54:03 +000011173ac_header_compiler=no
11174fi
11175rm -f conftest.$ac_objext conftest.$ac_ext
11176echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11177echo "${ECHO_T}$ac_header_compiler" >&6
11178
11179# Is the header present?
11180echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11181echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11182cat >conftest.$ac_ext <<_ACEOF
11183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011184/* confdefs.h. */
11185_ACEOF
11186cat confdefs.h >>conftest.$ac_ext
11187cat >>conftest.$ac_ext <<_ACEOF
11188/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011189#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011190_ACEOF
11191if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11192 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11193 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011194 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 rm -f conftest.er1
11196 cat conftest.err >&5
11197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11198 (exit $ac_status); } >/dev/null; then
11199 if test -s conftest.err; then
11200 ac_cpp_err=$ac_c_preproc_warn_flag
11201 else
11202 ac_cpp_err=
11203 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011204else
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 ac_cpp_err=yes
11206fi
11207if test -z "$ac_cpp_err"; then
11208 ac_header_preproc=yes
11209else
11210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011211sed 's/^/| /' conftest.$ac_ext >&5
11212
Martin v. Löwis11437992002-04-12 09:54:03 +000011213 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011214fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011215rm -f conftest.err conftest.$ac_ext
11216echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11217echo "${ECHO_T}$ac_header_preproc" >&6
11218
11219# So? What about this header?
11220case $ac_header_compiler:$ac_header_preproc in
11221 yes:no )
11222 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11223echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11224 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011225echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
11226 (
11227 cat <<\_ASBOX
11228## ------------------------------------ ##
11229## Report this to bug-autoconf@gnu.org. ##
11230## ------------------------------------ ##
11231_ASBOX
11232 ) |
11233 sed "s/^/$as_me: WARNING: /" >&2
11234 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011235 no:yes )
11236 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11237echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
11238 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11239echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11240 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011241echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
11242 (
11243 cat <<\_ASBOX
11244## ------------------------------------ ##
11245## Report this to bug-autoconf@gnu.org. ##
11246## ------------------------------------ ##
11247_ASBOX
11248 ) |
11249 sed "s/^/$as_me: WARNING: /" >&2
11250 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011251esac
11252echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11253echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11254if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11255 echo $ECHO_N "(cached) $ECHO_C" >&6
11256else
11257 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011259echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11260echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11261
11262fi
11263if test $ac_cv_header_mach_cthreads_h = yes; then
11264 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011265#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011266_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011267
Martin v. Löwis11437992002-04-12 09:54:03 +000011268 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011269#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011270_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011271
Martin v. Löwis11437992002-04-12 09:54:03 +000011272
11273cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011274#define MACH_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öwis2d7e2642002-04-05 16:50:53 +000011277 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011278else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011279
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 echo "$as_me:$LINENO: checking for --with-pth" >&5
11281echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11282
11283# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011284if test "${with_pth+set}" = set; then
11285 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011286 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011287echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011288 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011289#define WITH_THREAD 1
11290_ACEOF
11291
11292
11293cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011294#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011295_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011296
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011297 LIBS="-lpth $LIBS"
11298 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011299else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011300 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011301echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011302
11303 # Just looking for pthread_create in libpthread is not enough:
11304 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11305 # So we really have to include pthread.h, and then link.
11306 _libs=$LIBS
11307 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011308 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11309echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11310 cat >conftest.$ac_ext <<_ACEOF
11311#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011312/* confdefs.h. */
11313_ACEOF
11314cat confdefs.h >>conftest.$ac_ext
11315cat >>conftest.$ac_ext <<_ACEOF
11316/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011317#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011318
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011319void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011320int
11321main ()
11322{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011323
11324pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 ;
11326 return 0;
11327}
11328_ACEOF
11329rm -f conftest.$ac_objext conftest$ac_exeext
11330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11331 (eval $ac_link) 2>&5
11332 ac_status=$?
11333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11334 (exit $ac_status); } &&
11335 { ac_try='test -s conftest$ac_exeext'
11336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11337 (eval $ac_try) 2>&5
11338 ac_status=$?
11339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11340 (exit $ac_status); }; }; then
11341
11342 echo "$as_me:$LINENO: result: yes" >&5
11343echo "${ECHO_T}yes" >&6
11344 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011345#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011346_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011347
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011348 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011349 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011350else
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011352sed 's/^/| /' conftest.$ac_ext >&5
11353
Martin v. Löwis11437992002-04-12 09:54:03 +000011354
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011355 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11357echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11358if test "${ac_cv_func_pthread_detach+set}" = set; then
11359 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011360else
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 cat >conftest.$ac_ext <<_ACEOF
11362#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011363/* confdefs.h. */
11364_ACEOF
11365cat confdefs.h >>conftest.$ac_ext
11366cat >>conftest.$ac_ext <<_ACEOF
11367/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011368/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011369 which can conflict with char pthread_detach (); below.
11370 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011371 <limits.h> exists even on freestanding compilers. Under hpux,
11372 including <limits.h> includes <sys/time.h> and causes problems
11373 checking for functions defined therein. */
11374#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011375# include <limits.h>
11376#else
11377# include <assert.h>
11378#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011379/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011380#ifdef __cplusplus
11381extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011382{
Martin v. Löwis11437992002-04-12 09:54:03 +000011383#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011384/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011385 builtin and then its argument prototype would still apply. */
11386char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011387/* The GNU C library defines this for functions which it implements
11388 to always fail with ENOSYS. Some functions are actually named
11389 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011390#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011391choke me
11392#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011393char (*f) () = pthread_detach;
11394#endif
11395#ifdef __cplusplus
11396}
Guido van Rossumad678af1998-10-02 14:42:15 +000011397#endif
11398
Skip Montanaro6dead952003-09-25 14:50:04 +000011399int
11400main ()
11401{
11402return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 ;
11404 return 0;
11405}
11406_ACEOF
11407rm -f conftest.$ac_objext conftest$ac_exeext
11408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11409 (eval $ac_link) 2>&5
11410 ac_status=$?
11411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11412 (exit $ac_status); } &&
11413 { ac_try='test -s conftest$ac_exeext'
11414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11415 (eval $ac_try) 2>&5
11416 ac_status=$?
11417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11418 (exit $ac_status); }; }; then
11419 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011420else
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011422sed 's/^/| /' conftest.$ac_ext >&5
11423
Martin v. Löwis11437992002-04-12 09:54:03 +000011424ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011426rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011428echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11429echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11430if test $ac_cv_func_pthread_detach = yes; then
11431 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011432#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011433_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011434
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011435 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011436 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011437else
Guido van Rossumad678af1998-10-02 14:42:15 +000011438
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011439 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11440 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11441echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11442if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11443 echo $ECHO_N "(cached) $ECHO_C" >&6
11444fi
11445echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11446echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11447else
11448 # Is the header compilable?
11449echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11450echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11451cat >conftest.$ac_ext <<_ACEOF
11452#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011453/* confdefs.h. */
11454_ACEOF
11455cat confdefs.h >>conftest.$ac_ext
11456cat >>conftest.$ac_ext <<_ACEOF
11457/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011458$ac_includes_default
11459#include <atheos/threads.h>
11460_ACEOF
11461rm -f conftest.$ac_objext
11462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11463 (eval $ac_compile) 2>&5
11464 ac_status=$?
11465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11466 (exit $ac_status); } &&
11467 { ac_try='test -s conftest.$ac_objext'
11468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11469 (eval $ac_try) 2>&5
11470 ac_status=$?
11471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11472 (exit $ac_status); }; }; then
11473 ac_header_compiler=yes
11474else
11475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011476sed 's/^/| /' conftest.$ac_ext >&5
11477
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011478ac_header_compiler=no
11479fi
11480rm -f conftest.$ac_objext conftest.$ac_ext
11481echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11482echo "${ECHO_T}$ac_header_compiler" >&6
11483
11484# Is the header present?
11485echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11486echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11487cat >conftest.$ac_ext <<_ACEOF
11488#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011489/* confdefs.h. */
11490_ACEOF
11491cat confdefs.h >>conftest.$ac_ext
11492cat >>conftest.$ac_ext <<_ACEOF
11493/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011494#include <atheos/threads.h>
11495_ACEOF
11496if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11497 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11498 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011499 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011500 rm -f conftest.er1
11501 cat conftest.err >&5
11502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11503 (exit $ac_status); } >/dev/null; then
11504 if test -s conftest.err; then
11505 ac_cpp_err=$ac_c_preproc_warn_flag
11506 else
11507 ac_cpp_err=
11508 fi
11509else
11510 ac_cpp_err=yes
11511fi
11512if test -z "$ac_cpp_err"; then
11513 ac_header_preproc=yes
11514else
11515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011516sed 's/^/| /' conftest.$ac_ext >&5
11517
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011518 ac_header_preproc=no
11519fi
11520rm -f conftest.err conftest.$ac_ext
11521echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11522echo "${ECHO_T}$ac_header_preproc" >&6
11523
11524# So? What about this header?
11525case $ac_header_compiler:$ac_header_preproc in
11526 yes:no )
11527 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11528echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11529 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011530echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
11531 (
11532 cat <<\_ASBOX
11533## ------------------------------------ ##
11534## Report this to bug-autoconf@gnu.org. ##
11535## ------------------------------------ ##
11536_ASBOX
11537 ) |
11538 sed "s/^/$as_me: WARNING: /" >&2
11539 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011540 no:yes )
11541 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11542echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
11543 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11544echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11545 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011546echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
11547 (
11548 cat <<\_ASBOX
11549## ------------------------------------ ##
11550## Report this to bug-autoconf@gnu.org. ##
11551## ------------------------------------ ##
11552_ASBOX
11553 ) |
11554 sed "s/^/$as_me: WARNING: /" >&2
11555 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011556esac
11557echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11558echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11559if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11560 echo $ECHO_N "(cached) $ECHO_C" >&6
11561else
11562 ac_cv_header_atheos_threads_h=$ac_header_preproc
11563fi
11564echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11565echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11566
11567fi
11568if test $ac_cv_header_atheos_threads_h = yes; then
11569 cat >>confdefs.h <<\_ACEOF
11570#define WITH_THREAD 1
11571_ACEOF
11572
11573
11574cat >>confdefs.h <<\_ACEOF
11575#define ATHEOS_THREADS 1
11576_ACEOF
11577
11578 THREADOBJ="Python/thread.o"
11579else
11580
Martin v. Löwis11437992002-04-12 09:54:03 +000011581 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11582 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11583echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11584if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11585 echo $ECHO_N "(cached) $ECHO_C" >&6
11586fi
11587echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11588echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011589else
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 # Is the header compilable?
11591echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
11592echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
11593cat >conftest.$ac_ext <<_ACEOF
11594#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011595/* confdefs.h. */
11596_ACEOF
11597cat confdefs.h >>conftest.$ac_ext
11598cat >>conftest.$ac_ext <<_ACEOF
11599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011600$ac_includes_default
11601#include <kernel/OS.h>
11602_ACEOF
11603rm -f conftest.$ac_objext
11604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11605 (eval $ac_compile) 2>&5
11606 ac_status=$?
11607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11608 (exit $ac_status); } &&
11609 { ac_try='test -s conftest.$ac_objext'
11610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11611 (eval $ac_try) 2>&5
11612 ac_status=$?
11613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11614 (exit $ac_status); }; }; then
11615 ac_header_compiler=yes
11616else
11617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011618sed 's/^/| /' conftest.$ac_ext >&5
11619
Martin v. Löwis11437992002-04-12 09:54:03 +000011620ac_header_compiler=no
11621fi
11622rm -f conftest.$ac_objext conftest.$ac_ext
11623echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11624echo "${ECHO_T}$ac_header_compiler" >&6
11625
11626# Is the header present?
11627echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
11628echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
11629cat >conftest.$ac_ext <<_ACEOF
11630#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011631/* confdefs.h. */
11632_ACEOF
11633cat confdefs.h >>conftest.$ac_ext
11634cat >>conftest.$ac_ext <<_ACEOF
11635/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011636#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011637_ACEOF
11638if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11639 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11640 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011641 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011642 rm -f conftest.er1
11643 cat conftest.err >&5
11644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11645 (exit $ac_status); } >/dev/null; then
11646 if test -s conftest.err; then
11647 ac_cpp_err=$ac_c_preproc_warn_flag
11648 else
11649 ac_cpp_err=
11650 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011651else
Martin v. Löwis11437992002-04-12 09:54:03 +000011652 ac_cpp_err=yes
11653fi
11654if test -z "$ac_cpp_err"; then
11655 ac_header_preproc=yes
11656else
11657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011658sed 's/^/| /' conftest.$ac_ext >&5
11659
Martin v. Löwis11437992002-04-12 09:54:03 +000011660 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011661fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011662rm -f conftest.err conftest.$ac_ext
11663echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11664echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011665
Martin v. Löwis11437992002-04-12 09:54:03 +000011666# So? What about this header?
11667case $ac_header_compiler:$ac_header_preproc in
11668 yes:no )
11669 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
11670echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11671 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011672echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11673 (
11674 cat <<\_ASBOX
11675## ------------------------------------ ##
11676## Report this to bug-autoconf@gnu.org. ##
11677## ------------------------------------ ##
11678_ASBOX
11679 ) |
11680 sed "s/^/$as_me: WARNING: /" >&2
11681 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011682 no:yes )
11683 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11684echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11685 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11686echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11687 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011688echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11689 (
11690 cat <<\_ASBOX
11691## ------------------------------------ ##
11692## Report this to bug-autoconf@gnu.org. ##
11693## ------------------------------------ ##
11694_ASBOX
11695 ) |
11696 sed "s/^/$as_me: WARNING: /" >&2
11697 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011698esac
11699echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11700echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11701if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11702 echo $ECHO_N "(cached) $ECHO_C" >&6
11703else
11704 ac_cv_header_kernel_OS_h=$ac_header_preproc
11705fi
11706echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11707echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11708
11709fi
11710if test $ac_cv_header_kernel_OS_h = yes; then
11711 cat >>confdefs.h <<\_ACEOF
11712#define WITH_THREAD 1
11713_ACEOF
11714
11715
11716cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011717#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011718_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011719
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011720 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011721else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011722
Martin v. Löwis11437992002-04-12 09:54:03 +000011723 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11724echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11725if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11726 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011727else
Martin v. Löwis11437992002-04-12 09:54:03 +000011728 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011729LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011730cat >conftest.$ac_ext <<_ACEOF
11731#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011732/* confdefs.h. */
11733_ACEOF
11734cat confdefs.h >>conftest.$ac_ext
11735cat >>conftest.$ac_ext <<_ACEOF
11736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011737
Greg Steinadf63d62000-07-05 10:38:09 +000011738/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011739#ifdef __cplusplus
11740extern "C"
11741#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011742/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011743 builtin and then its argument prototype would still apply. */
11744char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011745int
11746main ()
11747{
11748pthread_create ();
11749 ;
11750 return 0;
11751}
11752_ACEOF
11753rm -f conftest.$ac_objext conftest$ac_exeext
11754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11755 (eval $ac_link) 2>&5
11756 ac_status=$?
11757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11758 (exit $ac_status); } &&
11759 { ac_try='test -s conftest$ac_exeext'
11760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11761 (eval $ac_try) 2>&5
11762 ac_status=$?
11763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11764 (exit $ac_status); }; }; then
11765 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011766else
Martin v. Löwis11437992002-04-12 09:54:03 +000011767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011768sed 's/^/| /' conftest.$ac_ext >&5
11769
Martin v. Löwis11437992002-04-12 09:54:03 +000011770ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011771fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011772rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11773LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011774fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011775echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11776echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11777if test $ac_cv_lib_pthreads_pthread_create = yes; then
11778 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011779#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011780_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011781
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011782 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011783 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011784 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011785else
Greg Steinadf63d62000-07-05 10:38:09 +000011786
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11788echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11789if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11790 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011791else
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011793LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011794cat >conftest.$ac_ext <<_ACEOF
11795#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011796/* confdefs.h. */
11797_ACEOF
11798cat confdefs.h >>conftest.$ac_ext
11799cat >>conftest.$ac_ext <<_ACEOF
11800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011801
Guido van Rossum49545951997-12-02 19:28:29 +000011802/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011803#ifdef __cplusplus
11804extern "C"
11805#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011806/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011807 builtin and then its argument prototype would still apply. */
11808char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011809int
11810main ()
11811{
11812pthread_create ();
11813 ;
11814 return 0;
11815}
11816_ACEOF
11817rm -f conftest.$ac_objext conftest$ac_exeext
11818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11819 (eval $ac_link) 2>&5
11820 ac_status=$?
11821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11822 (exit $ac_status); } &&
11823 { ac_try='test -s conftest$ac_exeext'
11824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11825 (eval $ac_try) 2>&5
11826 ac_status=$?
11827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11828 (exit $ac_status); }; }; then
11829 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011830else
Martin v. Löwis11437992002-04-12 09:54:03 +000011831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011832sed 's/^/| /' conftest.$ac_ext >&5
11833
Martin v. Löwis11437992002-04-12 09:54:03 +000011834ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011836rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11837LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011839echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11840echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11841if test $ac_cv_lib_c_r_pthread_create = yes; then
11842 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011843#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011844_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011845
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011846 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011847 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011848 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011849else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011850
Martin v. Löwis11437992002-04-12 09:54:03 +000011851 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11852echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11853if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11854 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011855else
Martin v. Löwis11437992002-04-12 09:54:03 +000011856 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011857LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011858cat >conftest.$ac_ext <<_ACEOF
11859#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011860/* confdefs.h. */
11861_ACEOF
11862cat confdefs.h >>conftest.$ac_ext
11863cat >>conftest.$ac_ext <<_ACEOF
11864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011865
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011866/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011867#ifdef __cplusplus
11868extern "C"
11869#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011870/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011871 builtin and then its argument prototype would still apply. */
11872char __d6_pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011873int
11874main ()
11875{
11876__d6_pthread_create ();
11877 ;
11878 return 0;
11879}
11880_ACEOF
11881rm -f conftest.$ac_objext conftest$ac_exeext
11882if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11883 (eval $ac_link) 2>&5
11884 ac_status=$?
11885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11886 (exit $ac_status); } &&
11887 { ac_try='test -s conftest$ac_exeext'
11888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11889 (eval $ac_try) 2>&5
11890 ac_status=$?
11891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11892 (exit $ac_status); }; }; then
11893 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011894else
Martin v. Löwis11437992002-04-12 09:54:03 +000011895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011896sed 's/^/| /' conftest.$ac_ext >&5
11897
Martin v. Löwis11437992002-04-12 09:54:03 +000011898ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011899fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011900rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11901LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011902fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011903echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11904echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11905if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11906 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011907#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011908_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011909
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011910 echo Systems with __d6_pthread_create are not supported anymore.
11911 echo See README
11912 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011913 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011914 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011915 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011916else
Guido van Rossum49545951997-12-02 19:28:29 +000011917
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11919echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11920if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011922else
Martin v. Löwis11437992002-04-12 09:54:03 +000011923 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011924LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011925cat >conftest.$ac_ext <<_ACEOF
11926#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011927/* confdefs.h. */
11928_ACEOF
11929cat confdefs.h >>conftest.$ac_ext
11930cat >>conftest.$ac_ext <<_ACEOF
11931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011932
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011933/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011934#ifdef __cplusplus
11935extern "C"
11936#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011937/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011938 builtin and then its argument prototype would still apply. */
11939char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011940int
11941main ()
11942{
11943__pthread_create_system ();
11944 ;
11945 return 0;
11946}
11947_ACEOF
11948rm -f conftest.$ac_objext conftest$ac_exeext
11949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11950 (eval $ac_link) 2>&5
11951 ac_status=$?
11952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11953 (exit $ac_status); } &&
11954 { ac_try='test -s conftest$ac_exeext'
11955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11956 (eval $ac_try) 2>&5
11957 ac_status=$?
11958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11959 (exit $ac_status); }; }; then
11960 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011961else
Martin v. Löwis11437992002-04-12 09:54:03 +000011962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011963sed 's/^/| /' conftest.$ac_ext >&5
11964
Martin v. Löwis11437992002-04-12 09:54:03 +000011965ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011967rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11968LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011969fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011970echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11971echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11972if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11973 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011974#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011975_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011976
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011977 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011978 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011979 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011980else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011981
Martin v. Löwis11437992002-04-12 09:54:03 +000011982 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11983echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11984if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11985 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011986else
Martin v. Löwis11437992002-04-12 09:54:03 +000011987 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011988LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011989cat >conftest.$ac_ext <<_ACEOF
11990#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011991/* confdefs.h. */
11992_ACEOF
11993cat confdefs.h >>conftest.$ac_ext
11994cat >>conftest.$ac_ext <<_ACEOF
11995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011996
Guido van Rossumb93a8621998-05-07 13:27:32 +000011997/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011998#ifdef __cplusplus
11999extern "C"
12000#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012001/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012002 builtin and then its argument prototype would still apply. */
12003char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012004int
12005main ()
12006{
12007pthread_create ();
12008 ;
12009 return 0;
12010}
12011_ACEOF
12012rm -f conftest.$ac_objext conftest$ac_exeext
12013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12014 (eval $ac_link) 2>&5
12015 ac_status=$?
12016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12017 (exit $ac_status); } &&
12018 { ac_try='test -s conftest$ac_exeext'
12019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12020 (eval $ac_try) 2>&5
12021 ac_status=$?
12022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12023 (exit $ac_status); }; }; then
12024 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012025else
Martin v. Löwis11437992002-04-12 09:54:03 +000012026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012027sed 's/^/| /' conftest.$ac_ext >&5
12028
Martin v. Löwis11437992002-04-12 09:54:03 +000012029ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012030fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012031rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12032LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012034echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12035echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12036if test $ac_cv_lib_cma_pthread_create = yes; then
12037 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012038#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012039_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012040
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012041 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012042 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012043 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012044else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012045
Martin v. Löwis130fb172001-07-19 11:00:41 +000012046 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012047fi
12048
Guido van Rossum627b2d71993-12-24 10:39:16 +000012049
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012050fi
12051
Guido van Rossum0be3e491997-05-22 20:33:33 +000012052fi
12053
Guido van Rossum49545951997-12-02 19:28:29 +000012054fi
12055
Guido van Rossumb93a8621998-05-07 13:27:32 +000012056fi
12057
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012058fi
12059
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012060
Michael W. Hudson54241132001-12-07 15:38:26 +000012061fi
12062
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012063
12064fi
12065
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012066fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012067rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12068fi;
12069fi
12070
12071
12072fi
12073
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012074
Michael W. Hudson54241132001-12-07 15:38:26 +000012075
Martin v. Löwis11437992002-04-12 09:54:03 +000012076 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12077echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12078if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012080else
Martin v. Löwis11437992002-04-12 09:54:03 +000012081 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012082LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012083cat >conftest.$ac_ext <<_ACEOF
12084#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012085/* confdefs.h. */
12086_ACEOF
12087cat confdefs.h >>conftest.$ac_ext
12088cat >>conftest.$ac_ext <<_ACEOF
12089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012091/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012092#ifdef __cplusplus
12093extern "C"
12094#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012095/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012096 builtin and then its argument prototype would still apply. */
12097char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012098int
12099main ()
12100{
12101usconfig ();
12102 ;
12103 return 0;
12104}
12105_ACEOF
12106rm -f conftest.$ac_objext conftest$ac_exeext
12107if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12108 (eval $ac_link) 2>&5
12109 ac_status=$?
12110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12111 (exit $ac_status); } &&
12112 { ac_try='test -s conftest$ac_exeext'
12113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12114 (eval $ac_try) 2>&5
12115 ac_status=$?
12116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12117 (exit $ac_status); }; }; then
12118 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012119else
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012121sed 's/^/| /' conftest.$ac_ext >&5
12122
Martin v. Löwis11437992002-04-12 09:54:03 +000012123ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012125rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12126LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012127fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012128echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12129echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12130if test $ac_cv_lib_mpc_usconfig = yes; then
12131 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012132#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012133_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012134
Martin v. Löwis130fb172001-07-19 11:00:41 +000012135 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012136 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012137 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012138fi
12139
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012140
Neal Norwitza978ab02002-11-02 16:58:05 +000012141 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012142 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12143echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12144if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12145 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012146else
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012148LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012149cat >conftest.$ac_ext <<_ACEOF
12150#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012151/* confdefs.h. */
12152_ACEOF
12153cat confdefs.h >>conftest.$ac_ext
12154cat >>conftest.$ac_ext <<_ACEOF
12155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012156
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012157/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012158#ifdef __cplusplus
12159extern "C"
12160#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012161/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012162 builtin and then its argument prototype would still apply. */
12163char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012164int
12165main ()
12166{
12167thr_create ();
12168 ;
12169 return 0;
12170}
12171_ACEOF
12172rm -f conftest.$ac_objext conftest$ac_exeext
12173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12174 (eval $ac_link) 2>&5
12175 ac_status=$?
12176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12177 (exit $ac_status); } &&
12178 { ac_try='test -s conftest$ac_exeext'
12179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12180 (eval $ac_try) 2>&5
12181 ac_status=$?
12182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12183 (exit $ac_status); }; }; then
12184 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012185else
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012187sed 's/^/| /' conftest.$ac_ext >&5
12188
Martin v. Löwis11437992002-04-12 09:54:03 +000012189ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012191rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12192LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012194echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12195echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12196if test $ac_cv_lib_thread_thr_create = yes; then
12197 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012198#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012199_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012200
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012201 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012202 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012203 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012204fi
12205
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012206 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012207
Martin v. Löwis130fb172001-07-19 11:00:41 +000012208 if test "$USE_THREAD_MODULE" != "#"
12209 then
12210 # If the above checks didn't disable threads, (at least) OSF1
12211 # needs this '-threads' argument during linking.
12212 case $ac_sys_system in
12213 OSF1) LDLAST=-threads;;
12214 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012215 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012216fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012217
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012218if test "$posix_threads" = "yes"; then
12219 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012220
12221cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012222#define _POSIX_THREADS 1
12223_ACEOF
12224
12225 fi
12226
12227 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12228 case $ac_sys_system/$ac_sys_release in
12229 SunOS/5.6)
12230cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012231#define HAVE_PTHREAD_DESTRUCTOR 1
12232_ACEOF
12233
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012234 ;;
12235 SunOS/5.8)
12236cat >>confdefs.h <<\_ACEOF
12237#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12238_ACEOF
12239
12240 ;;
12241 esac
12242
12243 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12244echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12245 if test "${ac_cv_pthread_system_supported+set}" = set; then
12246 echo $ECHO_N "(cached) $ECHO_C" >&6
12247else
12248 if test "$cross_compiling" = yes; then
12249 ac_cv_pthread_system_supported=no
12250else
12251 cat >conftest.$ac_ext <<_ACEOF
12252#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012253/* confdefs.h. */
12254_ACEOF
12255cat confdefs.h >>conftest.$ac_ext
12256cat >>conftest.$ac_ext <<_ACEOF
12257/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012258#include <pthread.h>
12259 void *foo(void *parm) {
12260 return NULL;
12261 }
12262 main() {
12263 pthread_attr_t attr;
12264 pthread_t id;
12265 if (pthread_attr_init(&attr)) exit(-1);
12266 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12267 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12268 exit(0);
12269 }
12270_ACEOF
12271rm -f conftest$ac_exeext
12272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12273 (eval $ac_link) 2>&5
12274 ac_status=$?
12275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12276 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12278 (eval $ac_try) 2>&5
12279 ac_status=$?
12280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12281 (exit $ac_status); }; }; then
12282 ac_cv_pthread_system_supported=yes
12283else
12284 echo "$as_me: program exited with status $ac_status" >&5
12285echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012286sed 's/^/| /' conftest.$ac_ext >&5
12287
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012288( exit $ac_status )
12289ac_cv_pthread_system_supported=no
12290fi
Skip Montanaro6dead952003-09-25 14:50:04 +000012291rm -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 +000012292fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012293
Guido van Rossum627b2d71993-12-24 10:39:16 +000012294fi
12295
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012296 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12297echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12298 if test "$ac_cv_pthread_system_supported" = "yes"; then
12299
12300cat >>confdefs.h <<\_ACEOF
12301#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12302_ACEOF
12303
12304 fi
12305
12306for ac_func in pthread_sigmask
12307do
12308as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12309echo "$as_me:$LINENO: checking for $ac_func" >&5
12310echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12311if eval "test \"\${$as_ac_var+set}\" = set"; then
12312 echo $ECHO_N "(cached) $ECHO_C" >&6
12313else
12314 cat >conftest.$ac_ext <<_ACEOF
12315#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012316/* confdefs.h. */
12317_ACEOF
12318cat confdefs.h >>conftest.$ac_ext
12319cat >>conftest.$ac_ext <<_ACEOF
12320/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012321/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012322 which can conflict with char $ac_func (); below.
12323 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012324 <limits.h> exists even on freestanding compilers. Under hpux,
12325 including <limits.h> includes <sys/time.h> and causes problems
12326 checking for functions defined therein. */
12327#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012328# include <limits.h>
12329#else
12330# include <assert.h>
12331#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012332/* Override any gcc2 internal prototype to avoid an error. */
12333#ifdef __cplusplus
12334extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012335{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012336#endif
12337/* We use char because int might match the return type of a gcc2
12338 builtin and then its argument prototype would still apply. */
12339char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012340/* The GNU C library defines this for functions which it implements
12341 to always fail with ENOSYS. Some functions are actually named
12342 something starting with __ and the normal name is an alias. */
12343#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12344choke me
12345#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012346char (*f) () = $ac_func;
12347#endif
12348#ifdef __cplusplus
12349}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012350#endif
12351
Skip Montanaro6dead952003-09-25 14:50:04 +000012352int
12353main ()
12354{
12355return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012356 ;
12357 return 0;
12358}
12359_ACEOF
12360rm -f conftest.$ac_objext conftest$ac_exeext
12361if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12362 (eval $ac_link) 2>&5
12363 ac_status=$?
12364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12365 (exit $ac_status); } &&
12366 { ac_try='test -s conftest$ac_exeext'
12367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12368 (eval $ac_try) 2>&5
12369 ac_status=$?
12370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12371 (exit $ac_status); }; }; then
12372 eval "$as_ac_var=yes"
12373else
12374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012375sed 's/^/| /' conftest.$ac_ext >&5
12376
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012377eval "$as_ac_var=no"
12378fi
12379rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12380fi
12381echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12382echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12383if test `eval echo '${'$as_ac_var'}'` = yes; then
12384 cat >>confdefs.h <<_ACEOF
12385#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12386_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012387 case $ac_sys_system in
12388 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012389
Jason Tishlerfac083d2003-07-22 15:20:49 +000012390cat >>confdefs.h <<\_ACEOF
12391#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12392_ACEOF
12393
12394 ;;
12395 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012396fi
12397done
12398
12399fi
12400
12401
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012402# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012403
12404
12405echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12406echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012407# Check whether --enable-ipv6 or --disable-ipv6 was given.
12408if test "${enable_ipv6+set}" = set; then
12409 enableval="$enable_ipv6"
12410 case "$enableval" in
12411 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 echo "$as_me:$LINENO: result: no" >&5
12413echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012414 ipv6=no
12415 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012416 *) echo "$as_me:$LINENO: result: yes" >&5
12417echo "${ECHO_T}yes" >&6
12418 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012419#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012420_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012421
12422 ipv6=yes
12423 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012424 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012425else
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012427 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 echo "$as_me:$LINENO: result: no" >&5
12429echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012430 ipv6=no
12431
12432else
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 cat >conftest.$ac_ext <<_ACEOF
12434#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012435/* confdefs.h. */
12436_ACEOF
12437cat confdefs.h >>conftest.$ac_ext
12438cat >>conftest.$ac_ext <<_ACEOF
12439/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012440 /* AF_INET6 available check */
12441#include <sys/types.h>
12442#include <sys/socket.h>
12443main()
12444{
12445 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12446 exit(1);
12447 else
12448 exit(0);
12449}
12450
Martin v. Löwis11437992002-04-12 09:54:03 +000012451_ACEOF
12452rm -f conftest$ac_exeext
12453if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12454 (eval $ac_link) 2>&5
12455 ac_status=$?
12456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12457 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12459 (eval $ac_try) 2>&5
12460 ac_status=$?
12461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12462 (exit $ac_status); }; }; then
12463 echo "$as_me:$LINENO: result: yes" >&5
12464echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012465 ipv6=yes
12466else
Martin v. Löwis11437992002-04-12 09:54:03 +000012467 echo "$as_me: program exited with status $ac_status" >&5
12468echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012469sed 's/^/| /' conftest.$ac_ext >&5
12470
Martin v. Löwis11437992002-04-12 09:54:03 +000012471( exit $ac_status )
12472echo "$as_me:$LINENO: result: no" >&5
12473echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012474 ipv6=no
12475fi
Skip Montanaro6dead952003-09-25 14:50:04 +000012476rm -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 +000012477fi
12478
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012479if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012480 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12481echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12482 cat >conftest.$ac_ext <<_ACEOF
12483#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012484/* confdefs.h. */
12485_ACEOF
12486cat confdefs.h >>conftest.$ac_ext
12487cat >>conftest.$ac_ext <<_ACEOF
12488/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012489#include <sys/types.h>
12490#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012491int
12492main ()
12493{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012494struct sockaddr_in6 x;
12495x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012496 ;
12497 return 0;
12498}
12499_ACEOF
12500rm -f conftest.$ac_objext
12501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12502 (eval $ac_compile) 2>&5
12503 ac_status=$?
12504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12505 (exit $ac_status); } &&
12506 { ac_try='test -s conftest.$ac_objext'
12507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12508 (eval $ac_try) 2>&5
12509 ac_status=$?
12510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12511 (exit $ac_status); }; }; then
12512 echo "$as_me:$LINENO: result: yes" >&5
12513echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012514 ipv6=yes
12515else
Martin v. Löwis11437992002-04-12 09:54:03 +000012516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012517sed 's/^/| /' conftest.$ac_ext >&5
12518
Martin v. Löwis11437992002-04-12 09:54:03 +000012519echo "$as_me:$LINENO: result: no" >&5
12520echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012521 ipv6=no
12522fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012523rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012524fi
12525
12526if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012528#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012529_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012530
12531fi
12532
Martin v. Löwis11437992002-04-12 09:54:03 +000012533fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012534
12535ipv6type=unknown
12536ipv6lib=none
12537ipv6trylibc=no
12538
12539if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
12541echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000012542 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12543 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012544 case $i in
12545 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000012546 cat >conftest.$ac_ext <<_ACEOF
12547#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012548/* confdefs.h. */
12549_ACEOF
12550cat confdefs.h >>conftest.$ac_ext
12551cat >>conftest.$ac_ext <<_ACEOF
12552/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012553
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012554#include <netinet/in.h>
12555#ifdef IPV6_INRIA_VERSION
12556yes
12557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012558_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012560 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012561 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012562fi
12563rm -f conftest*
12564
12565 ;;
12566 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000012567 cat >conftest.$ac_ext <<_ACEOF
12568#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012569/* confdefs.h. */
12570_ACEOF
12571cat confdefs.h >>conftest.$ac_ext
12572cat >>conftest.$ac_ext <<_ACEOF
12573/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012574
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012575#include <netinet/in.h>
12576#ifdef __KAME__
12577yes
12578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012579_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012580if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012581 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012582 ipv6type=$i;
12583 ipv6lib=inet6
12584 ipv6libdir=/usr/local/v6/lib
12585 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012586fi
12587rm -f conftest*
12588
12589 ;;
12590 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000012591 cat >conftest.$ac_ext <<_ACEOF
12592#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012593/* confdefs.h. */
12594_ACEOF
12595cat confdefs.h >>conftest.$ac_ext
12596cat >>conftest.$ac_ext <<_ACEOF
12597/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012598
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012599#include <features.h>
12600#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12601yes
12602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012603_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012605 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012606 ipv6type=$i;
12607 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012608fi
12609rm -f conftest*
12610
12611 ;;
12612 linux-inet6)
12613 if test -d /usr/inet6; then
12614 ipv6type=$i
12615 ipv6lib=inet6
12616 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000012617 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012618 fi
12619 ;;
12620 solaris)
12621 if test -f /etc/netconfig; then
12622 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
12623 ipv6type=$i
12624 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012625 fi
12626 fi
12627 ;;
12628 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000012629 cat >conftest.$ac_ext <<_ACEOF
12630#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012631/* confdefs.h. */
12632_ACEOF
12633cat confdefs.h >>conftest.$ac_ext
12634cat >>conftest.$ac_ext <<_ACEOF
12635/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012636
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012637#include <sys/param.h>
12638#ifdef _TOSHIBA_INET6
12639yes
12640#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012641_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012642if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012643 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012644 ipv6type=$i;
12645 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012646 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012647fi
12648rm -f conftest*
12649
12650 ;;
12651 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000012652 cat >conftest.$ac_ext <<_ACEOF
12653#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012654/* confdefs.h. */
12655_ACEOF
12656cat confdefs.h >>conftest.$ac_ext
12657cat >>conftest.$ac_ext <<_ACEOF
12658/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012659
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012660#include </usr/local/v6/include/sys/v6config.h>
12661#ifdef __V6D__
12662yes
12663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012664_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012666 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012667 ipv6type=$i;
12668 ipv6lib=v6;
12669 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012670 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012671fi
12672rm -f conftest*
12673
12674 ;;
12675 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000012676 cat >conftest.$ac_ext <<_ACEOF
12677#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012678/* confdefs.h. */
12679_ACEOF
12680cat confdefs.h >>conftest.$ac_ext
12681cat >>conftest.$ac_ext <<_ACEOF
12682/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012683
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012684#include <sys/param.h>
12685#ifdef _ZETA_MINAMI_INET6
12686yes
12687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012688_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012690 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012691 ipv6type=$i;
12692 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012693 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012694fi
12695rm -f conftest*
12696
12697 ;;
12698 esac
12699 if test "$ipv6type" != "unknown"; then
12700 break
12701 fi
12702 done
Martin v. Löwis11437992002-04-12 09:54:03 +000012703 echo "$as_me:$LINENO: result: $ipv6type" >&5
12704echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012705fi
12706
12707if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12708 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12709 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12710 echo "using lib$ipv6lib"
12711 else
12712 if test $ipv6trylibc = "yes"; then
12713 echo "using libc"
12714 else
12715 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12716 echo "You need to fetch lib$ipv6lib.a from appropriate"
12717 echo 'ipv6 kit and compile beforehand.'
12718 exit 1
12719 fi
12720 fi
12721fi
12722
Jack Jansen7b8c7542002-04-14 20:12:41 +000012723# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000012724echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
12725echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000012726
12727# Check whether --with-universal-newlines or --without-universal-newlines was given.
12728if test "${with_universal_newlines+set}" = set; then
12729 withval="$with_universal_newlines"
12730
12731fi;
12732
12733if test -z "$with_universal_newlines"
12734then with_universal_newlines="yes"
12735fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012736if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012737then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012738 echo --without-universal-newlines is unsupported, see README
12739 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012740else
Martin v. Löwise8aea582002-04-16 05:51:02 +000012741
12742cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000012743#define WITH_UNIVERSAL_NEWLINES 1
12744_ACEOF
12745
12746fi
12747echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
12748echo "${ECHO_T}$with_universal_newlines" >&6
12749
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012750# Check for --with-doc-strings
12751echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12752echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12753
12754# Check whether --with-doc-strings or --without-doc-strings was given.
12755if test "${with_doc_strings+set}" = set; then
12756 withval="$with_doc_strings"
12757
12758fi;
12759
12760if test -z "$with_doc_strings"
12761then with_doc_strings="yes"
12762fi
12763if test "$with_doc_strings" != "no"
12764then
12765
12766cat >>confdefs.h <<\_ACEOF
12767#define WITH_DOC_STRINGS 1
12768_ACEOF
12769
12770fi
12771echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12772echo "${ECHO_T}$with_doc_strings" >&6
12773
Neil Schemenauera35c6882001-02-27 04:45:05 +000012774# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012775echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12776echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12777
Neil Schemenauera35c6882001-02-27 04:45:05 +000012778# Check whether --with-pymalloc or --without-pymalloc was given.
12779if test "${with_pymalloc+set}" = set; then
12780 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012781
Martin v. Löwis11437992002-04-12 09:54:03 +000012782fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012783
Neil Schemenauer16c22972002-03-22 15:34:49 +000012784if test -z "$with_pymalloc"
12785then with_pymalloc="yes"
12786fi
12787if test "$with_pymalloc" != "no"
12788then
Martin v. Löwis11437992002-04-12 09:54:03 +000012789
12790cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012791#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012792_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012793
12794fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012795echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12796echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012797
Barry Warsawef82cd72000-06-30 16:21:01 +000012798# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012799echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12800echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12801
Barry Warsawef82cd72000-06-30 16:21:01 +000012802# Check whether --with-wctype-functions or --without-wctype-functions was given.
12803if test "${with_wctype_functions+set}" = set; then
12804 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012805
Barry Warsawef82cd72000-06-30 16:21:01 +000012806if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012807then
12808
12809cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012810#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012811_ACEOF
12812
12813 echo "$as_me:$LINENO: result: yes" >&5
12814echo "${ECHO_T}yes" >&6
12815else echo "$as_me:$LINENO: result: no" >&5
12816echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012817fi
12818else
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 echo "$as_me:$LINENO: result: no" >&5
12820echo "${ECHO_T}no" >&6
12821fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012822
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012823# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012824
Guido van Rossum98935bf2001-09-05 19:13:16 +000012825DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012826
Martin v. Löwis11437992002-04-12 09:54:03 +000012827echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12828echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12829
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012830# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012831if test "${with_sgi_dl+set}" = set; then
12832 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012833
12834echo "$as_me:$LINENO: result: $withval" >&5
12835echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012836echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012837exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012838
12839cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012840#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012841_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012842
Guido van Rossume97ee181999-12-20 21:27:22 +000012843DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012844dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012845if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012846then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012847else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12848echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12849 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012850fi
12851DLINCLDIR=${dldir}
12852LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012853else
Martin v. Löwis11437992002-04-12 09:54:03 +000012854 echo "$as_me:$LINENO: result: no" >&5
12855echo "${ECHO_T}no" >&6
12856fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012857
Martin v. Löwis11437992002-04-12 09:54:03 +000012858echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12859echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012860
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012861# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012862if test "${with_dl_dld+set}" = set; then
12863 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012864
12865echo "$as_me:$LINENO: result: $withval" >&5
12866echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012867echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012868exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012869
12870cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012871#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012872_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012873
Guido van Rossume97ee181999-12-20 21:27:22 +000012874DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012875dldir=`echo "$withval" | sed 's/,.*//'`
12876dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012877if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012878then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012879else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12880echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12881 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012882fi
12883DLINCLDIR=${dldir}
12884LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012885else
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 echo "$as_me:$LINENO: result: no" >&5
12887echo "${ECHO_T}no" >&6
12888fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012889
Guido van Rossume97ee181999-12-20 21:27:22 +000012890# the dlopen() function means we might want to use dynload_shlib.o. some
12891# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
Thomas Wouters3a584202000-08-05 23:28:51 +000012893for ac_func in dlopen
12894do
Martin v. Löwis11437992002-04-12 09:54:03 +000012895as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12896echo "$as_me:$LINENO: checking for $ac_func" >&5
12897echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12898if eval "test \"\${$as_ac_var+set}\" = set"; then
12899 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012900else
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 cat >conftest.$ac_ext <<_ACEOF
12902#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012903/* confdefs.h. */
12904_ACEOF
12905cat confdefs.h >>conftest.$ac_ext
12906cat >>conftest.$ac_ext <<_ACEOF
12907/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012908/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012909 which can conflict with char $ac_func (); below.
12910 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012911 <limits.h> exists even on freestanding compilers. Under hpux,
12912 including <limits.h> includes <sys/time.h> and causes problems
12913 checking for functions defined therein. */
12914#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012915# include <limits.h>
12916#else
12917# include <assert.h>
12918#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012919/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012920#ifdef __cplusplus
12921extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012922{
Martin v. Löwis11437992002-04-12 09:54:03 +000012923#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012924/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012925 builtin and then its argument prototype would still apply. */
12926char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012927/* The GNU C library defines this for functions which it implements
12928 to always fail with ENOSYS. Some functions are actually named
12929 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012930#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012931choke me
12932#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012933char (*f) () = $ac_func;
12934#endif
12935#ifdef __cplusplus
12936}
Guido van Rossume97ee181999-12-20 21:27:22 +000012937#endif
12938
Skip Montanaro6dead952003-09-25 14:50:04 +000012939int
12940main ()
12941{
12942return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 ;
12944 return 0;
12945}
12946_ACEOF
12947rm -f conftest.$ac_objext conftest$ac_exeext
12948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12949 (eval $ac_link) 2>&5
12950 ac_status=$?
12951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12952 (exit $ac_status); } &&
12953 { ac_try='test -s conftest$ac_exeext'
12954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12955 (eval $ac_try) 2>&5
12956 ac_status=$?
12957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12958 (exit $ac_status); }; }; then
12959 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012960else
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012962sed 's/^/| /' conftest.$ac_ext >&5
12963
Martin v. Löwis11437992002-04-12 09:54:03 +000012964eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012965fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012966rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012967fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012968echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12969echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12970if test `eval echo '${'$as_ac_var'}'` = yes; then
12971 cat >>confdefs.h <<_ACEOF
12972#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12973_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012974
Guido van Rossume97ee181999-12-20 21:27:22 +000012975fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012976done
Guido van Rossume97ee181999-12-20 21:27:22 +000012977
Michael W. Hudson54241132001-12-07 15:38:26 +000012978
Guido van Rossume97ee181999-12-20 21:27:22 +000012979# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12980# loading of modules.
12981
Martin v. Löwis11437992002-04-12 09:54:03 +000012982echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12983echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012984if test -z "$DYNLOADFILE"
12985then
12986 case $ac_sys_system/$ac_sys_release in
12987 AIX*) DYNLOADFILE="dynload_aix.o";;
12988 BeOS*) DYNLOADFILE="dynload_beos.o";;
12989 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012990 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012991 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012992 *)
12993 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12994 # out any dynamic loading
12995 if test "$ac_cv_func_dlopen" = yes
12996 then DYNLOADFILE="dynload_shlib.o"
12997 else DYNLOADFILE="dynload_stub.o"
12998 fi
12999 ;;
13000 esac
13001fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013002echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13003echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013004if test "$DYNLOADFILE" != "dynload_stub.o"
13005then
Martin v. Löwis11437992002-04-12 09:54:03 +000013006
13007cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013008#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013009_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013010
13011fi
13012
Neil Schemenauer4e425612001-06-19 15:44:15 +000013013# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13014
Michael W. Hudson54241132001-12-07 15:38:26 +000013015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13017echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013018if test -z "$MACHDEP_OBJS"
13019then
Jack Jansene578a632001-08-15 01:27:14 +000013020 MACHDEP_OBJS=$extra_machdep_objs
13021else
13022 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013023fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013024echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13025echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013026
Guido van Rossum627b2d71993-12-24 10:39:16 +000013027# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
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
Martin v. Löwisd5843682002-11-21 20:41:28 +000013099for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013100 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013101 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
13102 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013103 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013104 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013105 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013106 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013107 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013108 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013109 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013110 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013111do
Martin v. Löwis11437992002-04-12 09:54:03 +000013112as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13113echo "$as_me:$LINENO: checking for $ac_func" >&5
13114echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13115if eval "test \"\${$as_ac_var+set}\" = set"; then
13116 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013117else
Martin v. Löwis11437992002-04-12 09:54:03 +000013118 cat >conftest.$ac_ext <<_ACEOF
13119#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013120/* confdefs.h. */
13121_ACEOF
13122cat confdefs.h >>conftest.$ac_ext
13123cat >>conftest.$ac_ext <<_ACEOF
13124/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013125/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013126 which can conflict with char $ac_func (); below.
13127 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013128 <limits.h> exists even on freestanding compilers. Under hpux,
13129 including <limits.h> includes <sys/time.h> and causes problems
13130 checking for functions defined therein. */
13131#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013132# include <limits.h>
13133#else
13134# include <assert.h>
13135#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013136/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013137#ifdef __cplusplus
13138extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013139{
Martin v. Löwis11437992002-04-12 09:54:03 +000013140#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013141/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 builtin and then its argument prototype would still apply. */
13143char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013144/* The GNU C library defines this for functions which it implements
13145 to always fail with ENOSYS. Some functions are actually named
13146 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013147#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013148choke me
13149#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013150char (*f) () = $ac_func;
13151#endif
13152#ifdef __cplusplus
13153}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013154#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013155
Skip Montanaro6dead952003-09-25 14:50:04 +000013156int
13157main ()
13158{
13159return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013160 ;
13161 return 0;
13162}
13163_ACEOF
13164rm -f conftest.$ac_objext conftest$ac_exeext
13165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13166 (eval $ac_link) 2>&5
13167 ac_status=$?
13168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13169 (exit $ac_status); } &&
13170 { ac_try='test -s conftest$ac_exeext'
13171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13172 (eval $ac_try) 2>&5
13173 ac_status=$?
13174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13175 (exit $ac_status); }; }; then
13176 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013177else
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013179sed 's/^/| /' conftest.$ac_ext >&5
13180
Martin v. Löwis11437992002-04-12 09:54:03 +000013181eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013183rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013184fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013185echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13186echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13187if test `eval echo '${'$as_ac_var'}'` = yes; then
13188 cat >>confdefs.h <<_ACEOF
13189#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13190_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013191
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013192fi
13193done
13194
Michael W. Hudson54241132001-12-07 15:38:26 +000013195
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013196# For some functions, having a definition is not sufficient, since
13197# we want to take their address.
13198echo "$as_me:$LINENO: checking for chroot" >&5
13199echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13200cat >conftest.$ac_ext <<_ACEOF
13201#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013202/* confdefs.h. */
13203_ACEOF
13204cat confdefs.h >>conftest.$ac_ext
13205cat >>conftest.$ac_ext <<_ACEOF
13206/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013207#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013208int
13209main ()
13210{
13211void *x=chroot
13212 ;
13213 return 0;
13214}
13215_ACEOF
13216rm -f conftest.$ac_objext
13217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13218 (eval $ac_compile) 2>&5
13219 ac_status=$?
13220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13221 (exit $ac_status); } &&
13222 { ac_try='test -s conftest.$ac_objext'
13223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13224 (eval $ac_try) 2>&5
13225 ac_status=$?
13226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13227 (exit $ac_status); }; }; then
13228
13229cat >>confdefs.h <<\_ACEOF
13230#define HAVE_CHROOT 1
13231_ACEOF
13232
13233 echo "$as_me:$LINENO: result: yes" >&5
13234echo "${ECHO_T}yes" >&6
13235else
13236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013237sed 's/^/| /' conftest.$ac_ext >&5
13238
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013239echo "$as_me:$LINENO: result: no" >&5
13240echo "${ECHO_T}no" >&6
13241
13242fi
13243rm -f conftest.$ac_objext conftest.$ac_ext
13244echo "$as_me:$LINENO: checking for link" >&5
13245echo $ECHO_N "checking for link... $ECHO_C" >&6
13246cat >conftest.$ac_ext <<_ACEOF
13247#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013248/* confdefs.h. */
13249_ACEOF
13250cat confdefs.h >>conftest.$ac_ext
13251cat >>conftest.$ac_ext <<_ACEOF
13252/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013253#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013254int
13255main ()
13256{
13257void *x=link
13258 ;
13259 return 0;
13260}
13261_ACEOF
13262rm -f conftest.$ac_objext
13263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13264 (eval $ac_compile) 2>&5
13265 ac_status=$?
13266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13267 (exit $ac_status); } &&
13268 { ac_try='test -s conftest.$ac_objext'
13269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13270 (eval $ac_try) 2>&5
13271 ac_status=$?
13272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13273 (exit $ac_status); }; }; then
13274
13275cat >>confdefs.h <<\_ACEOF
13276#define HAVE_LINK 1
13277_ACEOF
13278
13279 echo "$as_me:$LINENO: result: yes" >&5
13280echo "${ECHO_T}yes" >&6
13281else
13282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013283sed 's/^/| /' conftest.$ac_ext >&5
13284
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013285echo "$as_me:$LINENO: result: no" >&5
13286echo "${ECHO_T}no" >&6
13287
13288fi
13289rm -f conftest.$ac_objext conftest.$ac_ext
13290echo "$as_me:$LINENO: checking for symlink" >&5
13291echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13292cat >conftest.$ac_ext <<_ACEOF
13293#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013294/* confdefs.h. */
13295_ACEOF
13296cat confdefs.h >>conftest.$ac_ext
13297cat >>conftest.$ac_ext <<_ACEOF
13298/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013299#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013300int
13301main ()
13302{
13303void *x=symlink
13304 ;
13305 return 0;
13306}
13307_ACEOF
13308rm -f conftest.$ac_objext
13309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13310 (eval $ac_compile) 2>&5
13311 ac_status=$?
13312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13313 (exit $ac_status); } &&
13314 { ac_try='test -s conftest.$ac_objext'
13315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13316 (eval $ac_try) 2>&5
13317 ac_status=$?
13318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13319 (exit $ac_status); }; }; then
13320
13321cat >>confdefs.h <<\_ACEOF
13322#define HAVE_SYMLINK 1
13323_ACEOF
13324
13325 echo "$as_me:$LINENO: result: yes" >&5
13326echo "${ECHO_T}yes" >&6
13327else
13328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013329sed 's/^/| /' conftest.$ac_ext >&5
13330
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013331echo "$as_me:$LINENO: result: no" >&5
13332echo "${ECHO_T}no" >&6
13333
13334fi
13335rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013336echo "$as_me:$LINENO: checking for fchdir" >&5
13337echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13338cat >conftest.$ac_ext <<_ACEOF
13339#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013340/* confdefs.h. */
13341_ACEOF
13342cat confdefs.h >>conftest.$ac_ext
13343cat >>conftest.$ac_ext <<_ACEOF
13344/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013345#include <unistd.h>
13346int
13347main ()
13348{
13349void *x=fchdir
13350 ;
13351 return 0;
13352}
13353_ACEOF
13354rm -f conftest.$ac_objext
13355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13356 (eval $ac_compile) 2>&5
13357 ac_status=$?
13358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13359 (exit $ac_status); } &&
13360 { ac_try='test -s conftest.$ac_objext'
13361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13362 (eval $ac_try) 2>&5
13363 ac_status=$?
13364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13365 (exit $ac_status); }; }; then
13366
13367cat >>confdefs.h <<\_ACEOF
13368#define HAVE_FCHDIR 1
13369_ACEOF
13370
13371 echo "$as_me:$LINENO: result: yes" >&5
13372echo "${ECHO_T}yes" >&6
13373else
13374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013375sed 's/^/| /' conftest.$ac_ext >&5
13376
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013377echo "$as_me:$LINENO: result: no" >&5
13378echo "${ECHO_T}no" >&6
13379
13380fi
13381rm -f conftest.$ac_objext conftest.$ac_ext
13382echo "$as_me:$LINENO: checking for fsync" >&5
13383echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13384cat >conftest.$ac_ext <<_ACEOF
13385#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013386/* confdefs.h. */
13387_ACEOF
13388cat confdefs.h >>conftest.$ac_ext
13389cat >>conftest.$ac_ext <<_ACEOF
13390/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013391#include <unistd.h>
13392int
13393main ()
13394{
13395void *x=fsync
13396 ;
13397 return 0;
13398}
13399_ACEOF
13400rm -f conftest.$ac_objext
13401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13402 (eval $ac_compile) 2>&5
13403 ac_status=$?
13404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13405 (exit $ac_status); } &&
13406 { ac_try='test -s conftest.$ac_objext'
13407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13408 (eval $ac_try) 2>&5
13409 ac_status=$?
13410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13411 (exit $ac_status); }; }; then
13412
13413cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013414#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013415_ACEOF
13416
13417 echo "$as_me:$LINENO: result: yes" >&5
13418echo "${ECHO_T}yes" >&6
13419else
13420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013421sed 's/^/| /' conftest.$ac_ext >&5
13422
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013423echo "$as_me:$LINENO: result: no" >&5
13424echo "${ECHO_T}no" >&6
13425
13426fi
13427rm -f conftest.$ac_objext conftest.$ac_ext
13428echo "$as_me:$LINENO: checking for fdatasync" >&5
13429echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13430cat >conftest.$ac_ext <<_ACEOF
13431#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013432/* confdefs.h. */
13433_ACEOF
13434cat confdefs.h >>conftest.$ac_ext
13435cat >>conftest.$ac_ext <<_ACEOF
13436/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013437#include <unistd.h>
13438int
13439main ()
13440{
13441void *x=fdatasync
13442 ;
13443 return 0;
13444}
13445_ACEOF
13446rm -f conftest.$ac_objext
13447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13448 (eval $ac_compile) 2>&5
13449 ac_status=$?
13450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13451 (exit $ac_status); } &&
13452 { ac_try='test -s conftest.$ac_objext'
13453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13454 (eval $ac_try) 2>&5
13455 ac_status=$?
13456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13457 (exit $ac_status); }; }; then
13458
13459cat >>confdefs.h <<\_ACEOF
13460#define HAVE_FDATASYNC 1
13461_ACEOF
13462
13463 echo "$as_me:$LINENO: result: yes" >&5
13464echo "${ECHO_T}yes" >&6
13465else
13466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013467sed 's/^/| /' conftest.$ac_ext >&5
13468
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013469echo "$as_me:$LINENO: result: no" >&5
13470echo "${ECHO_T}no" >&6
13471
13472fi
13473rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013474
Martin v. Löwisd5843682002-11-21 20:41:28 +000013475# On some systems (eg. FreeBSD 5), we would find a definition of the
13476# functions ctermid_r, setgroups in the library, but no prototype
13477# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13478# address to avoid compiler warnings and potential miscompilations
13479# because of the missing prototypes.
13480
13481echo "$as_me:$LINENO: checking for ctermid_r" >&5
13482echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13483cat >conftest.$ac_ext <<_ACEOF
13484#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013485/* confdefs.h. */
13486_ACEOF
13487cat confdefs.h >>conftest.$ac_ext
13488cat >>conftest.$ac_ext <<_ACEOF
13489/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013490
13491#include "confdefs.h"
13492#include <stdio.h>
13493
Martin v. Löwisd5843682002-11-21 20:41:28 +000013494int
13495main ()
13496{
13497void* p = ctermid_r
13498 ;
13499 return 0;
13500}
13501_ACEOF
13502rm -f conftest.$ac_objext
13503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13504 (eval $ac_compile) 2>&5
13505 ac_status=$?
13506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13507 (exit $ac_status); } &&
13508 { ac_try='test -s conftest.$ac_objext'
13509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13510 (eval $ac_try) 2>&5
13511 ac_status=$?
13512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13513 (exit $ac_status); }; }; then
13514
13515cat >>confdefs.h <<\_ACEOF
13516#define HAVE_CTERMID_R 1
13517_ACEOF
13518
13519 echo "$as_me:$LINENO: result: yes" >&5
13520echo "${ECHO_T}yes" >&6
13521else
13522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013523sed 's/^/| /' conftest.$ac_ext >&5
13524
Martin v. Löwisd5843682002-11-21 20:41:28 +000013525echo "$as_me:$LINENO: result: no" >&5
13526echo "${ECHO_T}no" >&6
13527
13528fi
13529rm -f conftest.$ac_objext conftest.$ac_ext
13530
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013531echo "$as_me:$LINENO: checking for flock" >&5
13532echo $ECHO_N "checking for flock... $ECHO_C" >&6
13533cat >conftest.$ac_ext <<_ACEOF
13534#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013535/* confdefs.h. */
13536_ACEOF
13537cat confdefs.h >>conftest.$ac_ext
13538cat >>conftest.$ac_ext <<_ACEOF
13539/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013540
13541#include "confdefs.h"
13542#include <sys/file.h>
13543
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013544int
13545main ()
13546{
13547void* p = flock
13548 ;
13549 return 0;
13550}
13551_ACEOF
13552rm -f conftest.$ac_objext
13553if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13554 (eval $ac_compile) 2>&5
13555 ac_status=$?
13556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13557 (exit $ac_status); } &&
13558 { ac_try='test -s conftest.$ac_objext'
13559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13560 (eval $ac_try) 2>&5
13561 ac_status=$?
13562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13563 (exit $ac_status); }; }; then
13564
13565cat >>confdefs.h <<\_ACEOF
13566#define HAVE_FLOCK 1
13567_ACEOF
13568
13569 echo "$as_me:$LINENO: result: yes" >&5
13570echo "${ECHO_T}yes" >&6
13571else
13572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013573sed 's/^/| /' conftest.$ac_ext >&5
13574
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013575echo "$as_me:$LINENO: result: no" >&5
13576echo "${ECHO_T}no" >&6
13577
13578fi
13579rm -f conftest.$ac_objext conftest.$ac_ext
13580
13581echo "$as_me:$LINENO: checking for getpagesize" >&5
13582echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
13583cat >conftest.$ac_ext <<_ACEOF
13584#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013585/* confdefs.h. */
13586_ACEOF
13587cat confdefs.h >>conftest.$ac_ext
13588cat >>conftest.$ac_ext <<_ACEOF
13589/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013590
13591#include "confdefs.h"
13592#include <unistd.h>
13593
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013594int
13595main ()
13596{
13597void* p = getpagesize
13598 ;
13599 return 0;
13600}
13601_ACEOF
13602rm -f conftest.$ac_objext
13603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13604 (eval $ac_compile) 2>&5
13605 ac_status=$?
13606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13607 (exit $ac_status); } &&
13608 { ac_try='test -s conftest.$ac_objext'
13609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13610 (eval $ac_try) 2>&5
13611 ac_status=$?
13612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13613 (exit $ac_status); }; }; then
13614
13615cat >>confdefs.h <<\_ACEOF
13616#define HAVE_GETPAGESIZE 1
13617_ACEOF
13618
13619 echo "$as_me:$LINENO: result: yes" >&5
13620echo "${ECHO_T}yes" >&6
13621else
13622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013623sed 's/^/| /' conftest.$ac_ext >&5
13624
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013625echo "$as_me:$LINENO: result: no" >&5
13626echo "${ECHO_T}no" >&6
13627
13628fi
13629rm -f conftest.$ac_objext conftest.$ac_ext
13630
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013631for ac_prog in true
13632do
13633 # Extract the first word of "$ac_prog", so it can be a program name with args.
13634set dummy $ac_prog; ac_word=$2
13635echo "$as_me:$LINENO: checking for $ac_word" >&5
13636echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13637if test "${ac_cv_prog_TRUE+set}" = set; then
13638 echo $ECHO_N "(cached) $ECHO_C" >&6
13639else
13640 if test -n "$TRUE"; then
13641 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
13642else
13643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13644for as_dir in $PATH
13645do
13646 IFS=$as_save_IFS
13647 test -z "$as_dir" && as_dir=.
13648 for ac_exec_ext in '' $ac_executable_extensions; do
13649 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13650 ac_cv_prog_TRUE="$ac_prog"
13651 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13652 break 2
13653 fi
13654done
13655done
13656
13657fi
13658fi
13659TRUE=$ac_cv_prog_TRUE
13660if test -n "$TRUE"; then
13661 echo "$as_me:$LINENO: result: $TRUE" >&5
13662echo "${ECHO_T}$TRUE" >&6
13663else
13664 echo "$as_me:$LINENO: result: no" >&5
13665echo "${ECHO_T}no" >&6
13666fi
13667
13668 test -n "$TRUE" && break
13669done
13670test -n "$TRUE" || TRUE="/bin/true"
13671
13672
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013673echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
13674echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
13675if test "${ac_cv_lib_c_inet_aton+set}" = set; then
13676 echo $ECHO_N "(cached) $ECHO_C" >&6
13677else
13678 ac_check_lib_save_LIBS=$LIBS
13679LIBS="-lc $LIBS"
13680cat >conftest.$ac_ext <<_ACEOF
13681#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013682/* confdefs.h. */
13683_ACEOF
13684cat confdefs.h >>conftest.$ac_ext
13685cat >>conftest.$ac_ext <<_ACEOF
13686/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013687
13688/* Override any gcc2 internal prototype to avoid an error. */
13689#ifdef __cplusplus
13690extern "C"
13691#endif
13692/* We use char because int might match the return type of a gcc2
13693 builtin and then its argument prototype would still apply. */
13694char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013695int
13696main ()
13697{
13698inet_aton ();
13699 ;
13700 return 0;
13701}
13702_ACEOF
13703rm -f conftest.$ac_objext conftest$ac_exeext
13704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13705 (eval $ac_link) 2>&5
13706 ac_status=$?
13707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13708 (exit $ac_status); } &&
13709 { ac_try='test -s conftest$ac_exeext'
13710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13711 (eval $ac_try) 2>&5
13712 ac_status=$?
13713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13714 (exit $ac_status); }; }; then
13715 ac_cv_lib_c_inet_aton=yes
13716else
13717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013718sed 's/^/| /' conftest.$ac_ext >&5
13719
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013720ac_cv_lib_c_inet_aton=no
13721fi
13722rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13723LIBS=$ac_check_lib_save_LIBS
13724fi
13725echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
13726echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
13727if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013728 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013729else
13730
13731echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
13732echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
13733if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
13734 echo $ECHO_N "(cached) $ECHO_C" >&6
13735else
13736 ac_check_lib_save_LIBS=$LIBS
13737LIBS="-lresolv $LIBS"
13738cat >conftest.$ac_ext <<_ACEOF
13739#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013740/* confdefs.h. */
13741_ACEOF
13742cat confdefs.h >>conftest.$ac_ext
13743cat >>conftest.$ac_ext <<_ACEOF
13744/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013745
13746/* Override any gcc2 internal prototype to avoid an error. */
13747#ifdef __cplusplus
13748extern "C"
13749#endif
13750/* We use char because int might match the return type of a gcc2
13751 builtin and then its argument prototype would still apply. */
13752char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013753int
13754main ()
13755{
13756inet_aton ();
13757 ;
13758 return 0;
13759}
13760_ACEOF
13761rm -f conftest.$ac_objext conftest$ac_exeext
13762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13763 (eval $ac_link) 2>&5
13764 ac_status=$?
13765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13766 (exit $ac_status); } &&
13767 { ac_try='test -s conftest$ac_exeext'
13768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13769 (eval $ac_try) 2>&5
13770 ac_status=$?
13771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13772 (exit $ac_status); }; }; then
13773 ac_cv_lib_resolv_inet_aton=yes
13774else
13775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013776sed 's/^/| /' conftest.$ac_ext >&5
13777
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013778ac_cv_lib_resolv_inet_aton=no
13779fi
13780rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13781LIBS=$ac_check_lib_save_LIBS
13782fi
13783echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13784echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13785if test $ac_cv_lib_resolv_inet_aton = yes; then
13786 cat >>confdefs.h <<_ACEOF
13787#define HAVE_LIBRESOLV 1
13788_ACEOF
13789
13790 LIBS="-lresolv $LIBS"
13791
13792fi
13793
13794
13795fi
13796
13797
Martin v. Löwise9416172003-05-03 10:12:45 +000013798echo "$as_me:$LINENO: checking for hstrerror" >&5
13799echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13800cat >conftest.$ac_ext <<_ACEOF
13801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013802/* confdefs.h. */
13803_ACEOF
13804cat confdefs.h >>conftest.$ac_ext
13805cat >>conftest.$ac_ext <<_ACEOF
13806/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013807
13808#include "confdefs.h"
13809#include <netdb.h>
13810
Martin v. Löwise9416172003-05-03 10:12:45 +000013811int
13812main ()
13813{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013814void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013815 ;
13816 return 0;
13817}
13818_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013819rm -f conftest.$ac_objext conftest$ac_exeext
13820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13821 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013822 ac_status=$?
13823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13824 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013825 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13827 (eval $ac_try) 2>&5
13828 ac_status=$?
13829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13830 (exit $ac_status); }; }; then
13831
13832cat >>confdefs.h <<\_ACEOF
13833#define HAVE_HSTRERROR 1
13834_ACEOF
13835
13836 echo "$as_me:$LINENO: result: yes" >&5
13837echo "${ECHO_T}yes" >&6
13838else
13839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013840sed 's/^/| /' conftest.$ac_ext >&5
13841
Martin v. Löwise9416172003-05-03 10:12:45 +000013842echo "$as_me:$LINENO: result: no" >&5
13843echo "${ECHO_T}no" >&6
13844
13845fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013846rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013847
13848echo "$as_me:$LINENO: checking for inet_aton" >&5
13849echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13850cat >conftest.$ac_ext <<_ACEOF
13851#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013852/* confdefs.h. */
13853_ACEOF
13854cat confdefs.h >>conftest.$ac_ext
13855cat >>conftest.$ac_ext <<_ACEOF
13856/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013857
13858#include "confdefs.h"
13859#include <sys/socket.h>
13860#include <netinet/in.h>
13861#include <arpa/inet.h>
13862
Martin v. Löwise9416172003-05-03 10:12:45 +000013863int
13864main ()
13865{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013866void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013867 ;
13868 return 0;
13869}
13870_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013871rm -f conftest.$ac_objext conftest$ac_exeext
13872if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13873 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013874 ac_status=$?
13875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13876 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013877 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13879 (eval $ac_try) 2>&5
13880 ac_status=$?
13881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13882 (exit $ac_status); }; }; then
13883
13884cat >>confdefs.h <<\_ACEOF
13885#define HAVE_INET_ATON 1
13886_ACEOF
13887
13888 echo "$as_me:$LINENO: result: yes" >&5
13889echo "${ECHO_T}yes" >&6
13890else
13891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013892sed 's/^/| /' conftest.$ac_ext >&5
13893
Martin v. Löwise9416172003-05-03 10:12:45 +000013894echo "$as_me:$LINENO: result: no" >&5
13895echo "${ECHO_T}no" >&6
13896
13897fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013898rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013899
13900echo "$as_me:$LINENO: checking for inet_pton" >&5
13901echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13902cat >conftest.$ac_ext <<_ACEOF
13903#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013904/* confdefs.h. */
13905_ACEOF
13906cat confdefs.h >>conftest.$ac_ext
13907cat >>conftest.$ac_ext <<_ACEOF
13908/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013909
13910#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013911#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013912#include <sys/socket.h>
13913#include <netinet/in.h>
13914#include <arpa/inet.h>
13915
Martin v. Löwise9416172003-05-03 10:12:45 +000013916int
13917main ()
13918{
13919void* p = inet_pton
13920 ;
13921 return 0;
13922}
13923_ACEOF
13924rm -f conftest.$ac_objext
13925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13926 (eval $ac_compile) 2>&5
13927 ac_status=$?
13928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13929 (exit $ac_status); } &&
13930 { ac_try='test -s conftest.$ac_objext'
13931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13932 (eval $ac_try) 2>&5
13933 ac_status=$?
13934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13935 (exit $ac_status); }; }; then
13936
13937cat >>confdefs.h <<\_ACEOF
13938#define HAVE_INET_PTON 1
13939_ACEOF
13940
13941 echo "$as_me:$LINENO: result: yes" >&5
13942echo "${ECHO_T}yes" >&6
13943else
13944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013945sed 's/^/| /' conftest.$ac_ext >&5
13946
Martin v. Löwise9416172003-05-03 10:12:45 +000013947echo "$as_me:$LINENO: result: no" >&5
13948echo "${ECHO_T}no" >&6
13949
13950fi
13951rm -f conftest.$ac_objext conftest.$ac_ext
13952
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013953# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013954echo "$as_me:$LINENO: checking for setgroups" >&5
13955echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13956cat >conftest.$ac_ext <<_ACEOF
13957#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013958/* confdefs.h. */
13959_ACEOF
13960cat confdefs.h >>conftest.$ac_ext
13961cat >>conftest.$ac_ext <<_ACEOF
13962/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013963
13964#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013965#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013966#ifdef HAVE_GRP_H
13967#include <grp.h>
13968#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013969
Martin v. Löwisd5843682002-11-21 20:41:28 +000013970int
13971main ()
13972{
13973void* p = setgroups
13974 ;
13975 return 0;
13976}
13977_ACEOF
13978rm -f conftest.$ac_objext
13979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13980 (eval $ac_compile) 2>&5
13981 ac_status=$?
13982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13983 (exit $ac_status); } &&
13984 { ac_try='test -s conftest.$ac_objext'
13985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13986 (eval $ac_try) 2>&5
13987 ac_status=$?
13988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13989 (exit $ac_status); }; }; then
13990
13991cat >>confdefs.h <<\_ACEOF
13992#define HAVE_SETGROUPS 1
13993_ACEOF
13994
13995 echo "$as_me:$LINENO: result: yes" >&5
13996echo "${ECHO_T}yes" >&6
13997else
13998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013999sed 's/^/| /' conftest.$ac_ext >&5
14000
Martin v. Löwisd5843682002-11-21 20:41:28 +000014001echo "$as_me:$LINENO: result: no" >&5
14002echo "${ECHO_T}no" >&6
14003
14004fi
14005rm -f conftest.$ac_objext conftest.$ac_ext
14006
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014007# check for openpty and forkpty
14008
Martin v. Löwis11437992002-04-12 09:54:03 +000014009
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014010for ac_func in openpty
14011do
Martin v. Löwis11437992002-04-12 09:54:03 +000014012as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14013echo "$as_me:$LINENO: checking for $ac_func" >&5
14014echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14015if eval "test \"\${$as_ac_var+set}\" = set"; then
14016 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014017else
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 cat >conftest.$ac_ext <<_ACEOF
14019#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014020/* confdefs.h. */
14021_ACEOF
14022cat confdefs.h >>conftest.$ac_ext
14023cat >>conftest.$ac_ext <<_ACEOF
14024/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014025/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014026 which can conflict with char $ac_func (); below.
14027 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014028 <limits.h> exists even on freestanding compilers. Under hpux,
14029 including <limits.h> includes <sys/time.h> and causes problems
14030 checking for functions defined therein. */
14031#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014032# include <limits.h>
14033#else
14034# include <assert.h>
14035#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014036/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014037#ifdef __cplusplus
14038extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014039{
Martin v. Löwis11437992002-04-12 09:54:03 +000014040#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014041/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014042 builtin and then its argument prototype would still apply. */
14043char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014044/* The GNU C library defines this for functions which it implements
14045 to always fail with ENOSYS. Some functions are actually named
14046 something starting with __ and the normal name is an alias. */
14047#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14048choke me
14049#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014050char (*f) () = $ac_func;
14051#endif
14052#ifdef __cplusplus
14053}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014054#endif
14055
Skip Montanaro6dead952003-09-25 14:50:04 +000014056int
14057main ()
14058{
14059return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014060 ;
14061 return 0;
14062}
14063_ACEOF
14064rm -f conftest.$ac_objext conftest$ac_exeext
14065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14066 (eval $ac_link) 2>&5
14067 ac_status=$?
14068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14069 (exit $ac_status); } &&
14070 { ac_try='test -s conftest$ac_exeext'
14071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14072 (eval $ac_try) 2>&5
14073 ac_status=$?
14074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14075 (exit $ac_status); }; }; then
14076 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014077else
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014079sed 's/^/| /' conftest.$ac_ext >&5
14080
Martin v. Löwis11437992002-04-12 09:54:03 +000014081eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014083rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014085echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14086echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14087if test `eval echo '${'$as_ac_var'}'` = yes; then
14088 cat >>confdefs.h <<_ACEOF
14089#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14090_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014091
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014092else
Martin v. Löwis11437992002-04-12 09:54:03 +000014093 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14094echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14095if test "${ac_cv_lib_util_openpty+set}" = set; then
14096 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014097else
Martin v. Löwis11437992002-04-12 09:54:03 +000014098 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014099LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014100cat >conftest.$ac_ext <<_ACEOF
14101#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014102/* confdefs.h. */
14103_ACEOF
14104cat confdefs.h >>conftest.$ac_ext
14105cat >>conftest.$ac_ext <<_ACEOF
14106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014107
Fred Drake8cef4cf2000-06-28 16:40:38 +000014108/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014109#ifdef __cplusplus
14110extern "C"
14111#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014112/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 builtin and then its argument prototype would still apply. */
14114char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014115int
14116main ()
14117{
14118openpty ();
14119 ;
14120 return 0;
14121}
14122_ACEOF
14123rm -f conftest.$ac_objext conftest$ac_exeext
14124if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14125 (eval $ac_link) 2>&5
14126 ac_status=$?
14127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14128 (exit $ac_status); } &&
14129 { ac_try='test -s conftest$ac_exeext'
14130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14131 (eval $ac_try) 2>&5
14132 ac_status=$?
14133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14134 (exit $ac_status); }; }; then
14135 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014136else
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014138sed 's/^/| /' conftest.$ac_ext >&5
14139
Martin v. Löwis11437992002-04-12 09:54:03 +000014140ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014142rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14143LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014144fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014145echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14146echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14147if test $ac_cv_lib_util_openpty = yes; then
14148 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014149#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014150_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014151 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014152fi
14153
14154fi
14155done
14156
Martin v. Löwis11437992002-04-12 09:54:03 +000014157
Fred Drake8cef4cf2000-06-28 16:40:38 +000014158for ac_func in forkpty
14159do
Martin v. Löwis11437992002-04-12 09:54:03 +000014160as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14161echo "$as_me:$LINENO: checking for $ac_func" >&5
14162echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14163if eval "test \"\${$as_ac_var+set}\" = set"; then
14164 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014165else
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 cat >conftest.$ac_ext <<_ACEOF
14167#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014168/* confdefs.h. */
14169_ACEOF
14170cat confdefs.h >>conftest.$ac_ext
14171cat >>conftest.$ac_ext <<_ACEOF
14172/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014173/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014174 which can conflict with char $ac_func (); below.
14175 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014176 <limits.h> exists even on freestanding compilers. Under hpux,
14177 including <limits.h> includes <sys/time.h> and causes problems
14178 checking for functions defined therein. */
14179#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014180# include <limits.h>
14181#else
14182# include <assert.h>
14183#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014184/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014185#ifdef __cplusplus
14186extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014187{
Martin v. Löwis11437992002-04-12 09:54:03 +000014188#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014189/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014190 builtin and then its argument prototype would still apply. */
14191char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014192/* The GNU C library defines this for functions which it implements
14193 to always fail with ENOSYS. Some functions are actually named
14194 something starting with __ and the normal name is an alias. */
14195#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14196choke me
14197#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014198char (*f) () = $ac_func;
14199#endif
14200#ifdef __cplusplus
14201}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014202#endif
14203
Skip Montanaro6dead952003-09-25 14:50:04 +000014204int
14205main ()
14206{
14207return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 ;
14209 return 0;
14210}
14211_ACEOF
14212rm -f conftest.$ac_objext conftest$ac_exeext
14213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14214 (eval $ac_link) 2>&5
14215 ac_status=$?
14216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14217 (exit $ac_status); } &&
14218 { ac_try='test -s conftest$ac_exeext'
14219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14220 (eval $ac_try) 2>&5
14221 ac_status=$?
14222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14223 (exit $ac_status); }; }; then
14224 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014225else
Martin v. Löwis11437992002-04-12 09:54:03 +000014226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014227sed 's/^/| /' conftest.$ac_ext >&5
14228
Martin v. Löwis11437992002-04-12 09:54:03 +000014229eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014231rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014232fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014233echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14234echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14235if test `eval echo '${'$as_ac_var'}'` = yes; then
14236 cat >>confdefs.h <<_ACEOF
14237#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14238_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014239
Fred Drake8cef4cf2000-06-28 16:40:38 +000014240else
Martin v. Löwis11437992002-04-12 09:54:03 +000014241 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14242echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14243if test "${ac_cv_lib_util_forkpty+set}" = set; then
14244 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014245else
Martin v. Löwis11437992002-04-12 09:54:03 +000014246 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014247LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014248cat >conftest.$ac_ext <<_ACEOF
14249#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014250/* confdefs.h. */
14251_ACEOF
14252cat confdefs.h >>conftest.$ac_ext
14253cat >>conftest.$ac_ext <<_ACEOF
14254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014255
Fred Drake8cef4cf2000-06-28 16:40:38 +000014256/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014257#ifdef __cplusplus
14258extern "C"
14259#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014260/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014261 builtin and then its argument prototype would still apply. */
14262char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014263int
14264main ()
14265{
14266forkpty ();
14267 ;
14268 return 0;
14269}
14270_ACEOF
14271rm -f conftest.$ac_objext conftest$ac_exeext
14272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14273 (eval $ac_link) 2>&5
14274 ac_status=$?
14275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14276 (exit $ac_status); } &&
14277 { ac_try='test -s conftest$ac_exeext'
14278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14279 (eval $ac_try) 2>&5
14280 ac_status=$?
14281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14282 (exit $ac_status); }; }; then
14283 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014284else
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014286sed 's/^/| /' conftest.$ac_ext >&5
14287
Martin v. Löwis11437992002-04-12 09:54:03 +000014288ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14291LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014293echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14294echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14295if test $ac_cv_lib_util_forkpty = yes; then
14296 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014297#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014298_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014299 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014300fi
14301
14302fi
14303done
14304
Jack Jansendd19cf82001-12-06 22:36:17 +000014305
Michael W. Hudson54241132001-12-07 15:38:26 +000014306# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014307
14308
14309
14310
14311
14312
Fred Drake8cef4cf2000-06-28 16:40:38 +000014313for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14314do
Martin v. Löwis11437992002-04-12 09:54:03 +000014315as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14316echo "$as_me:$LINENO: checking for $ac_func" >&5
14317echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14318if eval "test \"\${$as_ac_var+set}\" = set"; then
14319 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014320else
Martin v. Löwis11437992002-04-12 09:54:03 +000014321 cat >conftest.$ac_ext <<_ACEOF
14322#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014323/* confdefs.h. */
14324_ACEOF
14325cat confdefs.h >>conftest.$ac_ext
14326cat >>conftest.$ac_ext <<_ACEOF
14327/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014328/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014329 which can conflict with char $ac_func (); below.
14330 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014331 <limits.h> exists even on freestanding compilers. Under hpux,
14332 including <limits.h> includes <sys/time.h> and causes problems
14333 checking for functions defined therein. */
14334#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014335# include <limits.h>
14336#else
14337# include <assert.h>
14338#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014339/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014340#ifdef __cplusplus
14341extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014342{
Martin v. Löwis11437992002-04-12 09:54:03 +000014343#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014344/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014345 builtin and then its argument prototype would still apply. */
14346char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014347/* The GNU C library defines this for functions which it implements
14348 to always fail with ENOSYS. Some functions are actually named
14349 something starting with __ and the normal name is an alias. */
14350#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14351choke me
14352#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014353char (*f) () = $ac_func;
14354#endif
14355#ifdef __cplusplus
14356}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014357#endif
14358
Skip Montanaro6dead952003-09-25 14:50:04 +000014359int
14360main ()
14361{
14362return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 ;
14364 return 0;
14365}
14366_ACEOF
14367rm -f conftest.$ac_objext conftest$ac_exeext
14368if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14369 (eval $ac_link) 2>&5
14370 ac_status=$?
14371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14372 (exit $ac_status); } &&
14373 { ac_try='test -s conftest$ac_exeext'
14374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14375 (eval $ac_try) 2>&5
14376 ac_status=$?
14377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14378 (exit $ac_status); }; }; then
14379 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014380else
Martin v. Löwis11437992002-04-12 09:54:03 +000014381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014382sed 's/^/| /' conftest.$ac_ext >&5
14383
Martin v. Löwis11437992002-04-12 09:54:03 +000014384eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014385fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014386rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014387fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014388echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14389echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14390if test `eval echo '${'$as_ac_var'}'` = yes; then
14391 cat >>confdefs.h <<_ACEOF
14392#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14393_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014394
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014395fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014396done
14397
Michael W. Hudson54241132001-12-07 15:38:26 +000014398
Martin v. Löwis11437992002-04-12 09:54:03 +000014399
14400
14401
14402
14403
Martin v. Löwis1142de32002-03-29 16:28:31 +000014404for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000014405do
Martin v. Löwis11437992002-04-12 09:54:03 +000014406as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14407echo "$as_me:$LINENO: checking for $ac_func" >&5
14408echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14409if eval "test \"\${$as_ac_var+set}\" = set"; then
14410 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014411else
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 cat >conftest.$ac_ext <<_ACEOF
14413#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014414/* confdefs.h. */
14415_ACEOF
14416cat confdefs.h >>conftest.$ac_ext
14417cat >>conftest.$ac_ext <<_ACEOF
14418/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014419/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014420 which can conflict with char $ac_func (); below.
14421 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014422 <limits.h> exists even on freestanding compilers. Under hpux,
14423 including <limits.h> includes <sys/time.h> and causes problems
14424 checking for functions defined therein. */
14425#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014426# include <limits.h>
14427#else
14428# include <assert.h>
14429#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014430/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014431#ifdef __cplusplus
14432extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014433{
Martin v. Löwis11437992002-04-12 09:54:03 +000014434#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014435/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 builtin and then its argument prototype would still apply. */
14437char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014438/* The GNU C library defines this for functions which it implements
14439 to always fail with ENOSYS. Some functions are actually named
14440 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014441#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014442choke me
14443#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014444char (*f) () = $ac_func;
14445#endif
14446#ifdef __cplusplus
14447}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014448#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014449
Skip Montanaro6dead952003-09-25 14:50:04 +000014450int
14451main ()
14452{
14453return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014454 ;
14455 return 0;
14456}
14457_ACEOF
14458rm -f conftest.$ac_objext conftest$ac_exeext
14459if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14460 (eval $ac_link) 2>&5
14461 ac_status=$?
14462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14463 (exit $ac_status); } &&
14464 { ac_try='test -s conftest$ac_exeext'
14465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14466 (eval $ac_try) 2>&5
14467 ac_status=$?
14468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14469 (exit $ac_status); }; }; then
14470 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014471else
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014473sed 's/^/| /' conftest.$ac_ext >&5
14474
Martin v. Löwis11437992002-04-12 09:54:03 +000014475eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014476fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014477rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000014478fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014479echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14480echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14481if test `eval echo '${'$as_ac_var'}'` = yes; then
14482 cat >>confdefs.h <<_ACEOF
14483#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14484_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000014485
Martin v. Löwis1142de32002-03-29 16:28:31 +000014486else
Martin v. Löwis11437992002-04-12 09:54:03 +000014487 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014488fi
14489done
14490
14491
Martin v. Löwis11437992002-04-12 09:54:03 +000014492
Martin v. Löwis1142de32002-03-29 16:28:31 +000014493for ac_func in getpgrp
14494do
Martin v. Löwis11437992002-04-12 09:54:03 +000014495as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14496echo "$as_me:$LINENO: checking for $ac_func" >&5
14497echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14498if eval "test \"\${$as_ac_var+set}\" = set"; then
14499 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000014500else
Martin v. Löwis11437992002-04-12 09:54:03 +000014501 cat >conftest.$ac_ext <<_ACEOF
14502#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014503/* confdefs.h. */
14504_ACEOF
14505cat confdefs.h >>conftest.$ac_ext
14506cat >>conftest.$ac_ext <<_ACEOF
14507/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000014508/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014509 which can conflict with char $ac_func (); below.
14510 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014511 <limits.h> exists even on freestanding compilers. Under hpux,
14512 including <limits.h> includes <sys/time.h> and causes problems
14513 checking for functions defined therein. */
14514#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014515# include <limits.h>
14516#else
14517# include <assert.h>
14518#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014519/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014520#ifdef __cplusplus
14521extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014522{
Martin v. Löwis11437992002-04-12 09:54:03 +000014523#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014524/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014525 builtin and then its argument prototype would still apply. */
14526char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000014527/* The GNU C library defines this for functions which it implements
14528 to always fail with ENOSYS. Some functions are actually named
14529 something starting with __ and the normal name is an alias. */
14530#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14531choke me
14532#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014533char (*f) () = $ac_func;
14534#endif
14535#ifdef __cplusplus
14536}
Martin v. Löwis1142de32002-03-29 16:28:31 +000014537#endif
14538
Skip Montanaro6dead952003-09-25 14:50:04 +000014539int
14540main ()
14541{
14542return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014543 ;
14544 return 0;
14545}
14546_ACEOF
14547rm -f conftest.$ac_objext conftest$ac_exeext
14548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14549 (eval $ac_link) 2>&5
14550 ac_status=$?
14551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14552 (exit $ac_status); } &&
14553 { ac_try='test -s conftest$ac_exeext'
14554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14555 (eval $ac_try) 2>&5
14556 ac_status=$?
14557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14558 (exit $ac_status); }; }; then
14559 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014560else
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014562sed 's/^/| /' conftest.$ac_ext >&5
14563
Martin v. Löwis11437992002-04-12 09:54:03 +000014564eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014566rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014568echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14569echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14570if test `eval echo '${'$as_ac_var'}'` = yes; then
14571 cat >>confdefs.h <<_ACEOF
14572#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14573_ACEOF
14574 cat >conftest.$ac_ext <<_ACEOF
14575#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014576/* confdefs.h. */
14577_ACEOF
14578cat confdefs.h >>conftest.$ac_ext
14579cat >>conftest.$ac_ext <<_ACEOF
14580/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014581#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014582int
14583main ()
14584{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014585getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014586 ;
14587 return 0;
14588}
14589_ACEOF
14590rm -f conftest.$ac_objext
14591if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14592 (eval $ac_compile) 2>&5
14593 ac_status=$?
14594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14595 (exit $ac_status); } &&
14596 { ac_try='test -s conftest.$ac_objext'
14597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14598 (eval $ac_try) 2>&5
14599 ac_status=$?
14600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14601 (exit $ac_status); }; }; then
14602
14603cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014604#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014605_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014606
Martin v. Löwis11437992002-04-12 09:54:03 +000014607
Guido van Rossumf78abae1997-01-21 22:02:36 +000014608else
Martin v. Löwis11437992002-04-12 09:54:03 +000014609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014610sed 's/^/| /' conftest.$ac_ext >&5
14611
Guido van Rossum627b2d71993-12-24 10:39:16 +000014612fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014613rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014614
Guido van Rossum627b2d71993-12-24 10:39:16 +000014615fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014616done
Guido van Rossum627b2d71993-12-24 10:39:16 +000014617
Jack Jansen150753c2003-03-29 22:07:47 +000014618
14619for ac_func in setpgrp
14620do
14621as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14622echo "$as_me:$LINENO: checking for $ac_func" >&5
14623echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14624if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014625 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014626else
Martin v. Löwis11437992002-04-12 09:54:03 +000014627 cat >conftest.$ac_ext <<_ACEOF
14628#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014629/* confdefs.h. */
14630_ACEOF
14631cat confdefs.h >>conftest.$ac_ext
14632cat >>conftest.$ac_ext <<_ACEOF
14633/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014634/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014635 which can conflict with char $ac_func (); below.
14636 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014637 <limits.h> exists even on freestanding compilers. Under hpux,
14638 including <limits.h> includes <sys/time.h> and causes problems
14639 checking for functions defined therein. */
14640#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014641# include <limits.h>
14642#else
14643# include <assert.h>
14644#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014645/* Override any gcc2 internal prototype to avoid an error. */
14646#ifdef __cplusplus
14647extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014648{
Martin v. Löwis11437992002-04-12 09:54:03 +000014649#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014650/* We use char because int might match the return type of a gcc2
14651 builtin and then its argument prototype would still apply. */
14652char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000014653/* The GNU C library defines this for functions which it implements
14654 to always fail with ENOSYS. Some functions are actually named
14655 something starting with __ and the normal name is an alias. */
14656#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14657choke me
14658#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014659char (*f) () = $ac_func;
14660#endif
14661#ifdef __cplusplus
14662}
Jack Jansen150753c2003-03-29 22:07:47 +000014663#endif
14664
Skip Montanaro6dead952003-09-25 14:50:04 +000014665int
14666main ()
14667{
14668return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 ;
14670 return 0;
14671}
14672_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014673rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000014674if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14675 (eval $ac_link) 2>&5
14676 ac_status=$?
14677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000014678 (exit $ac_status); } &&
14679 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14681 (eval $ac_try) 2>&5
14682 ac_status=$?
14683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14684 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000014685 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014686else
Jack Jansen150753c2003-03-29 22:07:47 +000014687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014688sed 's/^/| /' conftest.$ac_ext >&5
14689
Jack Jansen150753c2003-03-29 22:07:47 +000014690eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014691fi
Jack Jansen150753c2003-03-29 22:07:47 +000014692rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014693fi
Jack Jansen150753c2003-03-29 22:07:47 +000014694echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14695echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14696if test `eval echo '${'$as_ac_var'}'` = yes; then
14697 cat >>confdefs.h <<_ACEOF
14698#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14699_ACEOF
14700 cat >conftest.$ac_ext <<_ACEOF
14701#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014702/* confdefs.h. */
14703_ACEOF
14704cat confdefs.h >>conftest.$ac_ext
14705cat >>conftest.$ac_ext <<_ACEOF
14706/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014707#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000014708int
14709main ()
14710{
14711setpgrp(0,0);
14712 ;
14713 return 0;
14714}
14715_ACEOF
14716rm -f conftest.$ac_objext
14717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14718 (eval $ac_compile) 2>&5
14719 ac_status=$?
14720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14721 (exit $ac_status); } &&
14722 { ac_try='test -s conftest.$ac_objext'
14723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14724 (eval $ac_try) 2>&5
14725 ac_status=$?
14726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14727 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014728
14729cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014730#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014731_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014732
Jack Jansen150753c2003-03-29 22:07:47 +000014733
14734else
14735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014736sed 's/^/| /' conftest.$ac_ext >&5
14737
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014738fi
Jack Jansen150753c2003-03-29 22:07:47 +000014739rm -f conftest.$ac_objext conftest.$ac_ext
14740
14741fi
14742done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014743
Martin v. Löwis11437992002-04-12 09:54:03 +000014744
Thomas Wouters3a584202000-08-05 23:28:51 +000014745for ac_func in gettimeofday
14746do
Martin v. Löwis11437992002-04-12 09:54:03 +000014747as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14748echo "$as_me:$LINENO: checking for $ac_func" >&5
14749echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14750if eval "test \"\${$as_ac_var+set}\" = set"; then
14751 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014752else
Martin v. Löwis11437992002-04-12 09:54:03 +000014753 cat >conftest.$ac_ext <<_ACEOF
14754#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014755/* confdefs.h. */
14756_ACEOF
14757cat confdefs.h >>conftest.$ac_ext
14758cat >>conftest.$ac_ext <<_ACEOF
14759/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014760/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014761 which can conflict with char $ac_func (); below.
14762 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014763 <limits.h> exists even on freestanding compilers. Under hpux,
14764 including <limits.h> includes <sys/time.h> and causes problems
14765 checking for functions defined therein. */
14766#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014767# include <limits.h>
14768#else
14769# include <assert.h>
14770#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014771/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014772#ifdef __cplusplus
14773extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014774{
Martin v. Löwis11437992002-04-12 09:54:03 +000014775#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014776/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014777 builtin and then its argument prototype would still apply. */
14778char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014779/* The GNU C library defines this for functions which it implements
14780 to always fail with ENOSYS. Some functions are actually named
14781 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014782#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014783choke me
14784#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014785char (*f) () = $ac_func;
14786#endif
14787#ifdef __cplusplus
14788}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014789#endif
14790
Skip Montanaro6dead952003-09-25 14:50:04 +000014791int
14792main ()
14793{
14794return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014795 ;
14796 return 0;
14797}
14798_ACEOF
14799rm -f conftest.$ac_objext conftest$ac_exeext
14800if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14801 (eval $ac_link) 2>&5
14802 ac_status=$?
14803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14804 (exit $ac_status); } &&
14805 { ac_try='test -s conftest$ac_exeext'
14806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14807 (eval $ac_try) 2>&5
14808 ac_status=$?
14809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14810 (exit $ac_status); }; }; then
14811 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014812else
Martin v. Löwis11437992002-04-12 09:54:03 +000014813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014814sed 's/^/| /' conftest.$ac_ext >&5
14815
Martin v. Löwis11437992002-04-12 09:54:03 +000014816eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014817fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014818rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014819fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014820echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14821echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14822if test `eval echo '${'$as_ac_var'}'` = yes; then
14823 cat >>confdefs.h <<_ACEOF
14824#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14825_ACEOF
14826 cat >conftest.$ac_ext <<_ACEOF
14827#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014828/* confdefs.h. */
14829_ACEOF
14830cat confdefs.h >>conftest.$ac_ext
14831cat >>conftest.$ac_ext <<_ACEOF
14832/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014833#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014834int
14835main ()
14836{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014837gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014838 ;
14839 return 0;
14840}
14841_ACEOF
14842rm -f conftest.$ac_objext
14843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14844 (eval $ac_compile) 2>&5
14845 ac_status=$?
14846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14847 (exit $ac_status); } &&
14848 { ac_try='test -s conftest.$ac_objext'
14849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14850 (eval $ac_try) 2>&5
14851 ac_status=$?
14852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014854 :
14855else
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014857sed 's/^/| /' conftest.$ac_ext >&5
14858
Martin v. Löwis11437992002-04-12 09:54:03 +000014859
14860cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014861#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014862_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014863
Martin v. Löwis11437992002-04-12 09:54:03 +000014864
Guido van Rossum627b2d71993-12-24 10:39:16 +000014865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014866rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014867
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014868fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014869done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014870
Michael W. Hudson54241132001-12-07 15:38:26 +000014871
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014872echo "$as_me:$LINENO: checking for major" >&5
14873echo $ECHO_N "checking for major... $ECHO_C" >&6
14874cat >conftest.$ac_ext <<_ACEOF
14875#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014876/* confdefs.h. */
14877_ACEOF
14878cat confdefs.h >>conftest.$ac_ext
14879cat >>conftest.$ac_ext <<_ACEOF
14880/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014881
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014882#if defined(MAJOR_IN_MKDEV)
14883#include <sys/mkdev.h>
14884#elif defined(MAJOR_IN_SYSMACROS)
14885#include <sys/sysmacros.h>
14886#else
14887#include <sys/types.h>
14888#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014889
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014890int
14891main ()
14892{
14893
14894 makedev(major(0),minor(0));
14895
14896 ;
14897 return 0;
14898}
14899_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014900rm -f conftest.$ac_objext conftest$ac_exeext
14901if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14902 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014903 ac_status=$?
14904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14905 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014906 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14908 (eval $ac_try) 2>&5
14909 ac_status=$?
14910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14911 (exit $ac_status); }; }; then
14912
14913
14914cat >>confdefs.h <<\_ACEOF
14915#define HAVE_DEVICE_MACROS 1
14916_ACEOF
14917
14918 echo "$as_me:$LINENO: result: yes" >&5
14919echo "${ECHO_T}yes" >&6
14920
14921else
14922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014923sed 's/^/| /' conftest.$ac_ext >&5
14924
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014925
14926 echo "$as_me:$LINENO: result: no" >&5
14927echo "${ECHO_T}no" >&6
14928
14929fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014930rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014931
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014932# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014933# for [no]getaddrinfo in netdb.h.
14934echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14935echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14936cat >conftest.$ac_ext <<_ACEOF
14937#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014938/* confdefs.h. */
14939_ACEOF
14940cat confdefs.h >>conftest.$ac_ext
14941cat >>conftest.$ac_ext <<_ACEOF
14942/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014943
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014944#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014945#include <sys/socket.h>
14946#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014947#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014948
Martin v. Löwis11437992002-04-12 09:54:03 +000014949int
14950main ()
14951{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014952
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014953getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014954
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 ;
14956 return 0;
14957}
14958_ACEOF
14959rm -f conftest.$ac_objext conftest$ac_exeext
14960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14961 (eval $ac_link) 2>&5
14962 ac_status=$?
14963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14964 (exit $ac_status); } &&
14965 { ac_try='test -s conftest$ac_exeext'
14966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14967 (eval $ac_try) 2>&5
14968 ac_status=$?
14969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14970 (exit $ac_status); }; }; then
14971
14972echo "$as_me:$LINENO: result: yes" >&5
14973echo "${ECHO_T}yes" >&6
14974echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14975echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014976if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014977 echo "$as_me:$LINENO: result: buggy" >&5
14978echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014979buggygetaddrinfo=yes
14980else
Martin v. Löwis11437992002-04-12 09:54:03 +000014981 cat >conftest.$ac_ext <<_ACEOF
14982#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014983/* confdefs.h. */
14984_ACEOF
14985cat confdefs.h >>conftest.$ac_ext
14986cat >>conftest.$ac_ext <<_ACEOF
14987/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014988
14989#include <sys/types.h>
14990#include <netdb.h>
14991#include <string.h>
14992#include <sys/socket.h>
14993#include <netinet/in.h>
14994
14995main()
14996{
14997 int passive, gaierr, inet4 = 0, inet6 = 0;
14998 struct addrinfo hints, *ai, *aitop;
14999 char straddr[INET6_ADDRSTRLEN], strport[16];
15000
15001 for (passive = 0; passive <= 1; passive++) {
15002 memset(&hints, 0, sizeof(hints));
15003 hints.ai_family = AF_UNSPEC;
15004 hints.ai_flags = passive ? AI_PASSIVE : 0;
15005 hints.ai_socktype = SOCK_STREAM;
15006 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15007 (void)gai_strerror(gaierr);
15008 goto bad;
15009 }
15010 for (ai = aitop; ai; ai = ai->ai_next) {
15011 if (ai->ai_addr == NULL ||
15012 ai->ai_addrlen == 0 ||
15013 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15014 straddr, sizeof(straddr), strport, sizeof(strport),
15015 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15016 goto bad;
15017 }
15018 switch (ai->ai_family) {
15019 case AF_INET:
15020 if (strcmp(strport, "54321") != 0) {
15021 goto bad;
15022 }
15023 if (passive) {
15024 if (strcmp(straddr, "0.0.0.0") != 0) {
15025 goto bad;
15026 }
15027 } else {
15028 if (strcmp(straddr, "127.0.0.1") != 0) {
15029 goto bad;
15030 }
15031 }
15032 inet4++;
15033 break;
15034 case AF_INET6:
15035 if (strcmp(strport, "54321") != 0) {
15036 goto bad;
15037 }
15038 if (passive) {
15039 if (strcmp(straddr, "::") != 0) {
15040 goto bad;
15041 }
15042 } else {
15043 if (strcmp(straddr, "::1") != 0) {
15044 goto bad;
15045 }
15046 }
15047 inet6++;
15048 break;
15049 case AF_UNSPEC:
15050 goto bad;
15051 break;
15052 default:
15053 /* another family support? */
15054 break;
15055 }
15056 }
15057 }
15058
15059 if (!(inet4 == 0 || inet4 == 2))
15060 goto bad;
15061 if (!(inet6 == 0 || inet6 == 2))
15062 goto bad;
15063
15064 if (aitop)
15065 freeaddrinfo(aitop);
15066 exit(0);
15067
15068 bad:
15069 if (aitop)
15070 freeaddrinfo(aitop);
15071 exit(1);
15072}
15073
Martin v. Löwis11437992002-04-12 09:54:03 +000015074_ACEOF
15075rm -f conftest$ac_exeext
15076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15077 (eval $ac_link) 2>&5
15078 ac_status=$?
15079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15082 (eval $ac_try) 2>&5
15083 ac_status=$?
15084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15085 (exit $ac_status); }; }; then
15086 echo "$as_me:$LINENO: result: good" >&5
15087echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015088buggygetaddrinfo=no
15089else
Martin v. Löwis11437992002-04-12 09:54:03 +000015090 echo "$as_me: program exited with status $ac_status" >&5
15091echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015092sed 's/^/| /' conftest.$ac_ext >&5
15093
Martin v. Löwis11437992002-04-12 09:54:03 +000015094( exit $ac_status )
15095echo "$as_me:$LINENO: result: buggy" >&5
15096echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015097buggygetaddrinfo=yes
15098fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015099rm -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 +000015100fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015101else
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 echo "$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
15106echo "$as_me:$LINENO: result: no" >&5
15107echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015108buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015109
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015110fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015111rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015112
15113if test "$buggygetaddrinfo" = "yes"; then
15114 if test "$ipv6" = "yes"; then
15115 echo 'Fatal: You must get working getaddrinfo() function.'
15116 echo ' or you can specify "--disable-ipv6"'.
15117 exit 1
15118 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015119else
Martin v. Löwis11437992002-04-12 09:54:03 +000015120
15121cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015122#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015123_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015124
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015126
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015127for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015128do
Martin v. Löwis11437992002-04-12 09:54:03 +000015129as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15130echo "$as_me:$LINENO: checking for $ac_func" >&5
15131echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15132if eval "test \"\${$as_ac_var+set}\" = set"; then
15133 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015134else
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 cat >conftest.$ac_ext <<_ACEOF
15136#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015137/* confdefs.h. */
15138_ACEOF
15139cat confdefs.h >>conftest.$ac_ext
15140cat >>conftest.$ac_ext <<_ACEOF
15141/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015142/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015143 which can conflict with char $ac_func (); below.
15144 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015145 <limits.h> exists even on freestanding compilers. Under hpux,
15146 including <limits.h> includes <sys/time.h> and causes problems
15147 checking for functions defined therein. */
15148#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015149# include <limits.h>
15150#else
15151# include <assert.h>
15152#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015153/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015154#ifdef __cplusplus
15155extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015156{
Martin v. Löwis11437992002-04-12 09:54:03 +000015157#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015158/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 builtin and then its argument prototype would still apply. */
15160char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015161/* The GNU C library defines this for functions which it implements
15162 to always fail with ENOSYS. Some functions are actually named
15163 something starting with __ and the normal name is an alias. */
15164#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15165choke me
15166#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015167char (*f) () = $ac_func;
15168#endif
15169#ifdef __cplusplus
15170}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015171#endif
15172
Skip Montanaro6dead952003-09-25 14:50:04 +000015173int
15174main ()
15175{
15176return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 ;
15178 return 0;
15179}
15180_ACEOF
15181rm -f conftest.$ac_objext conftest$ac_exeext
15182if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15183 (eval $ac_link) 2>&5
15184 ac_status=$?
15185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15186 (exit $ac_status); } &&
15187 { ac_try='test -s conftest$ac_exeext'
15188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15189 (eval $ac_try) 2>&5
15190 ac_status=$?
15191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15192 (exit $ac_status); }; }; then
15193 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015194else
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015196sed 's/^/| /' conftest.$ac_ext >&5
15197
Martin v. Löwis11437992002-04-12 09:54:03 +000015198eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015200rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015201fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015202echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15203echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15204if test `eval echo '${'$as_ac_var'}'` = yes; then
15205 cat >>confdefs.h <<_ACEOF
15206#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15207_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015208
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015209fi
15210done
15211
Michael W. Hudson54241132001-12-07 15:38:26 +000015212
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015213# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015214echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15215echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15216if test "${ac_cv_header_time+set}" = set; then
15217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015218else
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 cat >conftest.$ac_ext <<_ACEOF
15220#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015221/* confdefs.h. */
15222_ACEOF
15223cat confdefs.h >>conftest.$ac_ext
15224cat >>conftest.$ac_ext <<_ACEOF
15225/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015226#include <sys/types.h>
15227#include <sys/time.h>
15228#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015229
Martin v. Löwis11437992002-04-12 09:54:03 +000015230int
15231main ()
15232{
15233if ((struct tm *) 0)
15234return 0;
15235 ;
15236 return 0;
15237}
15238_ACEOF
15239rm -f conftest.$ac_objext
15240if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15241 (eval $ac_compile) 2>&5
15242 ac_status=$?
15243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15244 (exit $ac_status); } &&
15245 { ac_try='test -s conftest.$ac_objext'
15246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15247 (eval $ac_try) 2>&5
15248 ac_status=$?
15249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15250 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015251 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015252else
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015254sed 's/^/| /' conftest.$ac_ext >&5
15255
Martin v. Löwis11437992002-04-12 09:54:03 +000015256ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015257fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015258rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015259fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015260echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15261echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015262if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015263
15264cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015265#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015266_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015267
15268fi
15269
Martin v. Löwis11437992002-04-12 09:54:03 +000015270echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15271echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
15272if test "${ac_cv_struct_tm+set}" = set; then
15273 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015274else
Martin v. Löwis11437992002-04-12 09:54:03 +000015275 cat >conftest.$ac_ext <<_ACEOF
15276#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015277/* confdefs.h. */
15278_ACEOF
15279cat confdefs.h >>conftest.$ac_ext
15280cat >>conftest.$ac_ext <<_ACEOF
15281/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015282#include <sys/types.h>
15283#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015284
Martin v. Löwis11437992002-04-12 09:54:03 +000015285int
15286main ()
15287{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015288struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 ;
15290 return 0;
15291}
15292_ACEOF
15293rm -f conftest.$ac_objext
15294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15295 (eval $ac_compile) 2>&5
15296 ac_status=$?
15297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15298 (exit $ac_status); } &&
15299 { ac_try='test -s conftest.$ac_objext'
15300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15301 (eval $ac_try) 2>&5
15302 ac_status=$?
15303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15304 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015305 ac_cv_struct_tm=time.h
15306else
Martin v. Löwis11437992002-04-12 09:54:03 +000015307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015308sed 's/^/| /' conftest.$ac_ext >&5
15309
Martin v. Löwis11437992002-04-12 09:54:03 +000015310ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015311fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015312rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015313fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015314echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15315echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015316if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015317
15318cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015319#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015320_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015321
15322fi
15323
Martin v. Löwis11437992002-04-12 09:54:03 +000015324echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
15325echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
15326if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
15327 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015328else
Martin v. Löwis11437992002-04-12 09:54:03 +000015329 cat >conftest.$ac_ext <<_ACEOF
15330#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015331/* confdefs.h. */
15332_ACEOF
15333cat confdefs.h >>conftest.$ac_ext
15334cat >>conftest.$ac_ext <<_ACEOF
15335/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015336#include <sys/types.h>
15337#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015338
15339
Martin v. Löwis11437992002-04-12 09:54:03 +000015340int
15341main ()
15342{
15343static struct tm ac_aggr;
15344if (ac_aggr.tm_zone)
15345return 0;
15346 ;
15347 return 0;
15348}
15349_ACEOF
15350rm -f conftest.$ac_objext
15351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15352 (eval $ac_compile) 2>&5
15353 ac_status=$?
15354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15355 (exit $ac_status); } &&
15356 { ac_try='test -s conftest.$ac_objext'
15357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15358 (eval $ac_try) 2>&5
15359 ac_status=$?
15360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15361 (exit $ac_status); }; }; then
15362 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015363else
Martin v. Löwis11437992002-04-12 09:54:03 +000015364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015365sed 's/^/| /' conftest.$ac_ext >&5
15366
15367cat >conftest.$ac_ext <<_ACEOF
15368#line $LINENO "configure"
15369/* confdefs.h. */
15370_ACEOF
15371cat confdefs.h >>conftest.$ac_ext
15372cat >>conftest.$ac_ext <<_ACEOF
15373/* end confdefs.h. */
15374#include <sys/types.h>
15375#include <$ac_cv_struct_tm>
15376
15377
15378int
15379main ()
15380{
15381static struct tm ac_aggr;
15382if (sizeof ac_aggr.tm_zone)
15383return 0;
15384 ;
15385 return 0;
15386}
15387_ACEOF
15388rm -f conftest.$ac_objext
15389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15390 (eval $ac_compile) 2>&5
15391 ac_status=$?
15392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15393 (exit $ac_status); } &&
15394 { ac_try='test -s conftest.$ac_objext'
15395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15396 (eval $ac_try) 2>&5
15397 ac_status=$?
15398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15399 (exit $ac_status); }; }; then
15400 ac_cv_member_struct_tm_tm_zone=yes
15401else
15402 echo "$as_me: failed program was:" >&5
15403sed 's/^/| /' conftest.$ac_ext >&5
15404
Martin v. Löwis11437992002-04-12 09:54:03 +000015405ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015406fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015407rm -f conftest.$ac_objext conftest.$ac_ext
15408fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015409rm -f conftest.$ac_objext conftest.$ac_ext
15410fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015411echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
15412echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
15413if test $ac_cv_member_struct_tm_tm_zone = yes; then
15414
15415cat >>confdefs.h <<_ACEOF
15416#define HAVE_STRUCT_TM_TM_ZONE 1
15417_ACEOF
15418
15419
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015420fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015421
Martin v. Löwis11437992002-04-12 09:54:03 +000015422if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15423
15424cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015425#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015426_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015427
15428else
Martin v. Löwis11437992002-04-12 09:54:03 +000015429 echo "$as_me:$LINENO: checking for tzname" >&5
15430echo $ECHO_N "checking for tzname... $ECHO_C" >&6
15431if test "${ac_cv_var_tzname+set}" = set; then
15432 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015433else
Martin v. Löwis11437992002-04-12 09:54:03 +000015434 cat >conftest.$ac_ext <<_ACEOF
15435#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015436/* confdefs.h. */
15437_ACEOF
15438cat confdefs.h >>conftest.$ac_ext
15439cat >>conftest.$ac_ext <<_ACEOF
15440/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015441#include <time.h>
15442#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015443extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015445
Martin v. Löwis11437992002-04-12 09:54:03 +000015446int
15447main ()
15448{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015449atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000015450 ;
15451 return 0;
15452}
15453_ACEOF
15454rm -f conftest.$ac_objext conftest$ac_exeext
15455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15456 (eval $ac_link) 2>&5
15457 ac_status=$?
15458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15459 (exit $ac_status); } &&
15460 { ac_try='test -s conftest$ac_exeext'
15461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15462 (eval $ac_try) 2>&5
15463 ac_status=$?
15464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15465 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015466 ac_cv_var_tzname=yes
15467else
Martin v. Löwis11437992002-04-12 09:54:03 +000015468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015469sed 's/^/| /' conftest.$ac_ext >&5
15470
Martin v. Löwis11437992002-04-12 09:54:03 +000015471ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015472fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015473rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000015474fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015475echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
15476echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015477 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015478
15479cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015480#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015481_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015482
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015483 fi
15484fi
15485
Martin v. Löwis11437992002-04-12 09:54:03 +000015486echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
15487echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
15488if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
15489 echo $ECHO_N "(cached) $ECHO_C" >&6
15490else
15491 cat >conftest.$ac_ext <<_ACEOF
15492#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015493/* confdefs.h. */
15494_ACEOF
15495cat confdefs.h >>conftest.$ac_ext
15496cat >>conftest.$ac_ext <<_ACEOF
15497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015498$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015499int
15500main ()
15501{
15502static struct stat ac_aggr;
15503if (ac_aggr.st_rdev)
15504return 0;
15505 ;
15506 return 0;
15507}
15508_ACEOF
15509rm -f conftest.$ac_objext
15510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15511 (eval $ac_compile) 2>&5
15512 ac_status=$?
15513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15514 (exit $ac_status); } &&
15515 { ac_try='test -s conftest.$ac_objext'
15516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15517 (eval $ac_try) 2>&5
15518 ac_status=$?
15519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15520 (exit $ac_status); }; }; then
15521 ac_cv_member_struct_stat_st_rdev=yes
15522else
15523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015524sed 's/^/| /' conftest.$ac_ext >&5
15525
15526cat >conftest.$ac_ext <<_ACEOF
15527#line $LINENO "configure"
15528/* confdefs.h. */
15529_ACEOF
15530cat confdefs.h >>conftest.$ac_ext
15531cat >>conftest.$ac_ext <<_ACEOF
15532/* end confdefs.h. */
15533$ac_includes_default
15534int
15535main ()
15536{
15537static struct stat ac_aggr;
15538if (sizeof ac_aggr.st_rdev)
15539return 0;
15540 ;
15541 return 0;
15542}
15543_ACEOF
15544rm -f conftest.$ac_objext
15545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15546 (eval $ac_compile) 2>&5
15547 ac_status=$?
15548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15549 (exit $ac_status); } &&
15550 { ac_try='test -s conftest.$ac_objext'
15551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15552 (eval $ac_try) 2>&5
15553 ac_status=$?
15554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15555 (exit $ac_status); }; }; then
15556 ac_cv_member_struct_stat_st_rdev=yes
15557else
15558 echo "$as_me: failed program was:" >&5
15559sed 's/^/| /' conftest.$ac_ext >&5
15560
Martin v. Löwis11437992002-04-12 09:54:03 +000015561ac_cv_member_struct_stat_st_rdev=no
15562fi
15563rm -f conftest.$ac_objext conftest.$ac_ext
15564fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015565rm -f conftest.$ac_objext conftest.$ac_ext
15566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015567echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
15568echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
15569if test $ac_cv_member_struct_stat_st_rdev = yes; then
15570
15571cat >>confdefs.h <<_ACEOF
15572#define HAVE_STRUCT_STAT_ST_RDEV 1
15573_ACEOF
15574
15575
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015576fi
15577
Martin v. Löwis11437992002-04-12 09:54:03 +000015578echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
15579echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
15580if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
15581 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015582else
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 cat >conftest.$ac_ext <<_ACEOF
15584#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015585/* confdefs.h. */
15586_ACEOF
15587cat confdefs.h >>conftest.$ac_ext
15588cat >>conftest.$ac_ext <<_ACEOF
15589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015590$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015591int
15592main ()
15593{
15594static struct stat ac_aggr;
15595if (ac_aggr.st_blksize)
15596return 0;
15597 ;
15598 return 0;
15599}
15600_ACEOF
15601rm -f conftest.$ac_objext
15602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15603 (eval $ac_compile) 2>&5
15604 ac_status=$?
15605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15606 (exit $ac_status); } &&
15607 { ac_try='test -s conftest.$ac_objext'
15608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15609 (eval $ac_try) 2>&5
15610 ac_status=$?
15611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15612 (exit $ac_status); }; }; then
15613 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015614else
Martin v. Löwis11437992002-04-12 09:54:03 +000015615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015616sed 's/^/| /' conftest.$ac_ext >&5
15617
15618cat >conftest.$ac_ext <<_ACEOF
15619#line $LINENO "configure"
15620/* confdefs.h. */
15621_ACEOF
15622cat confdefs.h >>conftest.$ac_ext
15623cat >>conftest.$ac_ext <<_ACEOF
15624/* end confdefs.h. */
15625$ac_includes_default
15626int
15627main ()
15628{
15629static struct stat ac_aggr;
15630if (sizeof ac_aggr.st_blksize)
15631return 0;
15632 ;
15633 return 0;
15634}
15635_ACEOF
15636rm -f conftest.$ac_objext
15637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15638 (eval $ac_compile) 2>&5
15639 ac_status=$?
15640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15641 (exit $ac_status); } &&
15642 { ac_try='test -s conftest.$ac_objext'
15643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15644 (eval $ac_try) 2>&5
15645 ac_status=$?
15646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15647 (exit $ac_status); }; }; then
15648 ac_cv_member_struct_stat_st_blksize=yes
15649else
15650 echo "$as_me: failed program was:" >&5
15651sed 's/^/| /' conftest.$ac_ext >&5
15652
Martin v. Löwis11437992002-04-12 09:54:03 +000015653ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015655rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015656fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015657rm -f conftest.$ac_objext conftest.$ac_ext
15658fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015659echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
15660echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
15661if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015662
Martin v. Löwis11437992002-04-12 09:54:03 +000015663cat >>confdefs.h <<_ACEOF
15664#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
15665_ACEOF
15666
15667
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015668fi
15669
Martin v. Löwis11437992002-04-12 09:54:03 +000015670echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
15671echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
15672if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
15673 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015674else
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 cat >conftest.$ac_ext <<_ACEOF
15676#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015677/* confdefs.h. */
15678_ACEOF
15679cat confdefs.h >>conftest.$ac_ext
15680cat >>conftest.$ac_ext <<_ACEOF
15681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015682$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015683int
15684main ()
15685{
15686static struct stat ac_aggr;
15687if (ac_aggr.st_blocks)
15688return 0;
15689 ;
15690 return 0;
15691}
15692_ACEOF
15693rm -f conftest.$ac_objext
15694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15695 (eval $ac_compile) 2>&5
15696 ac_status=$?
15697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15698 (exit $ac_status); } &&
15699 { ac_try='test -s conftest.$ac_objext'
15700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15701 (eval $ac_try) 2>&5
15702 ac_status=$?
15703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15704 (exit $ac_status); }; }; then
15705 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015706else
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015708sed 's/^/| /' conftest.$ac_ext >&5
15709
15710cat >conftest.$ac_ext <<_ACEOF
15711#line $LINENO "configure"
15712/* confdefs.h. */
15713_ACEOF
15714cat confdefs.h >>conftest.$ac_ext
15715cat >>conftest.$ac_ext <<_ACEOF
15716/* end confdefs.h. */
15717$ac_includes_default
15718int
15719main ()
15720{
15721static struct stat ac_aggr;
15722if (sizeof ac_aggr.st_blocks)
15723return 0;
15724 ;
15725 return 0;
15726}
15727_ACEOF
15728rm -f conftest.$ac_objext
15729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15730 (eval $ac_compile) 2>&5
15731 ac_status=$?
15732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15733 (exit $ac_status); } &&
15734 { ac_try='test -s conftest.$ac_objext'
15735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15736 (eval $ac_try) 2>&5
15737 ac_status=$?
15738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15739 (exit $ac_status); }; }; then
15740 ac_cv_member_struct_stat_st_blocks=yes
15741else
15742 echo "$as_me: failed program was:" >&5
15743sed 's/^/| /' conftest.$ac_ext >&5
15744
Martin v. Löwis11437992002-04-12 09:54:03 +000015745ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015746fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015747rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015748fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015749rm -f conftest.$ac_objext conftest.$ac_ext
15750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015751echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
15752echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
15753if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015754
Martin v. Löwis11437992002-04-12 09:54:03 +000015755cat >>confdefs.h <<_ACEOF
15756#define HAVE_STRUCT_STAT_ST_BLOCKS 1
15757_ACEOF
15758
15759
15760cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015761#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015762_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015763
15764else
Martin v. Löwis11437992002-04-12 09:54:03 +000015765 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015766fi
15767
Michael W. Hudson54241132001-12-07 15:38:26 +000015768
Martin v. Löwis11437992002-04-12 09:54:03 +000015769
15770echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
15771echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
15772if test "${ac_cv_header_time_altzone+set}" = set; then
15773 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015774else
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 cat >conftest.$ac_ext <<_ACEOF
15776#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015777/* confdefs.h. */
15778_ACEOF
15779cat confdefs.h >>conftest.$ac_ext
15780cat >>conftest.$ac_ext <<_ACEOF
15781/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015782#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015783int
15784main ()
15785{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015786return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 ;
15788 return 0;
15789}
15790_ACEOF
15791rm -f conftest.$ac_objext
15792if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15793 (eval $ac_compile) 2>&5
15794 ac_status=$?
15795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15796 (exit $ac_status); } &&
15797 { ac_try='test -s conftest.$ac_objext'
15798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15799 (eval $ac_try) 2>&5
15800 ac_status=$?
15801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15802 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015803 ac_cv_header_time_altzone=yes
15804else
Martin v. Löwis11437992002-04-12 09:54:03 +000015805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015806sed 's/^/| /' conftest.$ac_ext >&5
15807
Martin v. Löwis11437992002-04-12 09:54:03 +000015808ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015809fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015810rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015811fi
15812
Martin v. Löwis11437992002-04-12 09:54:03 +000015813echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
15814echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015815if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015816
15817cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015818#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015819_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015820
15821fi
15822
Guido van Rossumda88dad1995-01-26 00:46:29 +000015823was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015824echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15825echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15826cat >conftest.$ac_ext <<_ACEOF
15827#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015828/* confdefs.h. */
15829_ACEOF
15830cat confdefs.h >>conftest.$ac_ext
15831cat >>conftest.$ac_ext <<_ACEOF
15832/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015833
15834#include <sys/types.h>
15835#include <sys/select.h>
15836#include <sys/time.h>
15837
Martin v. Löwis11437992002-04-12 09:54:03 +000015838int
15839main ()
15840{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015841;
Martin v. Löwis11437992002-04-12 09:54:03 +000015842 ;
15843 return 0;
15844}
15845_ACEOF
15846rm -f conftest.$ac_objext
15847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15848 (eval $ac_compile) 2>&5
15849 ac_status=$?
15850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15851 (exit $ac_status); } &&
15852 { ac_try='test -s conftest.$ac_objext'
15853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15854 (eval $ac_try) 2>&5
15855 ac_status=$?
15856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15857 (exit $ac_status); }; }; then
15858
15859
15860cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015861#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015862_ACEOF
15863
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015864 was_it_defined=yes
15865
Guido van Rossumf78abae1997-01-21 22:02:36 +000015866else
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015868sed 's/^/| /' conftest.$ac_ext >&5
15869
Guido van Rossum7f43da71994-08-01 12:15:30 +000015870fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015871rm -f conftest.$ac_objext conftest.$ac_ext
15872echo "$as_me:$LINENO: result: $was_it_defined" >&5
15873echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015874
Martin v. Löwis11437992002-04-12 09:54:03 +000015875echo "$as_me:$LINENO: checking for addrinfo" >&5
15876echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15877if test "${ac_cv_struct_addrinfo+set}" = set; then
15878 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015879else
Martin v. Löwis11437992002-04-12 09:54:03 +000015880 cat >conftest.$ac_ext <<_ACEOF
15881#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015882/* confdefs.h. */
15883_ACEOF
15884cat confdefs.h >>conftest.$ac_ext
15885cat >>conftest.$ac_ext <<_ACEOF
15886/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015887
15888# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015889int
15890main ()
15891{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015892struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015893 ;
15894 return 0;
15895}
15896_ACEOF
15897rm -f conftest.$ac_objext
15898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15899 (eval $ac_compile) 2>&5
15900 ac_status=$?
15901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15902 (exit $ac_status); } &&
15903 { ac_try='test -s conftest.$ac_objext'
15904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15905 (eval $ac_try) 2>&5
15906 ac_status=$?
15907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15908 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015909 ac_cv_struct_addrinfo=yes
15910else
Martin v. Löwis11437992002-04-12 09:54:03 +000015911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015912sed 's/^/| /' conftest.$ac_ext >&5
15913
Martin v. Löwis11437992002-04-12 09:54:03 +000015914ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015915fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015916rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015917fi
15918
Martin v. Löwis11437992002-04-12 09:54:03 +000015919echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15920echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015921if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015922
15923cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015924#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015925_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015926
15927fi
15928
Martin v. Löwis11437992002-04-12 09:54:03 +000015929echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15930echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15931if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15932 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015933else
Martin v. Löwis11437992002-04-12 09:54:03 +000015934 cat >conftest.$ac_ext <<_ACEOF
15935#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015936/* confdefs.h. */
15937_ACEOF
15938cat confdefs.h >>conftest.$ac_ext
15939cat >>conftest.$ac_ext <<_ACEOF
15940/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015941
15942# include <sys/types.h>
15943# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015944int
15945main ()
15946{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015947struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015948 ;
15949 return 0;
15950}
15951_ACEOF
15952rm -f conftest.$ac_objext
15953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15954 (eval $ac_compile) 2>&5
15955 ac_status=$?
15956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15957 (exit $ac_status); } &&
15958 { ac_try='test -s conftest.$ac_objext'
15959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15960 (eval $ac_try) 2>&5
15961 ac_status=$?
15962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15963 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015964 ac_cv_struct_sockaddr_storage=yes
15965else
Martin v. Löwis11437992002-04-12 09:54:03 +000015966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015967sed 's/^/| /' conftest.$ac_ext >&5
15968
Martin v. Löwis11437992002-04-12 09:54:03 +000015969ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015970fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015971rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015972fi
15973
Martin v. Löwis11437992002-04-12 09:54:03 +000015974echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15975echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015976if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015977
15978cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015979#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015980_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015981
15982fi
15983
Guido van Rossum627b2d71993-12-24 10:39:16 +000015984# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015985
Michael W. Hudson54241132001-12-07 15:38:26 +000015986
Martin v. Löwis11437992002-04-12 09:54:03 +000015987echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15988echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15989if test "${ac_cv_c_char_unsigned+set}" = set; then
15990 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015991else
Martin v. Löwis11437992002-04-12 09:54:03 +000015992 cat >conftest.$ac_ext <<_ACEOF
15993#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015994/* confdefs.h. */
15995_ACEOF
15996cat confdefs.h >>conftest.$ac_ext
15997cat >>conftest.$ac_ext <<_ACEOF
15998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015999$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016000int
16001main ()
16002{
16003static int test_array [1 - 2 * !(((char) -1) < 0)];
16004test_array [0] = 0
16005
16006 ;
16007 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016008}
Martin v. Löwis11437992002-04-12 09:54:03 +000016009_ACEOF
16010rm -f conftest.$ac_objext
16011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16012 (eval $ac_compile) 2>&5
16013 ac_status=$?
16014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16015 (exit $ac_status); } &&
16016 { ac_try='test -s conftest.$ac_objext'
16017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16018 (eval $ac_try) 2>&5
16019 ac_status=$?
16020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16021 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016022 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016023else
16024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016025sed 's/^/| /' conftest.$ac_ext >&5
16026
Martin v. Löwis11437992002-04-12 09:54:03 +000016027ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016028fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016029rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016030fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016031echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16032echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016033if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016034 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016035#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016036_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016037
16038fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016039
Martin v. Löwis11437992002-04-12 09:54:03 +000016040echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
16041echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16042if test "${ac_cv_c_const+set}" = set; then
16043 echo $ECHO_N "(cached) $ECHO_C" >&6
16044else
16045 cat >conftest.$ac_ext <<_ACEOF
16046#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016047/* confdefs.h. */
16048_ACEOF
16049cat confdefs.h >>conftest.$ac_ext
16050cat >>conftest.$ac_ext <<_ACEOF
16051/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016052
Martin v. Löwis11437992002-04-12 09:54:03 +000016053int
16054main ()
16055{
16056/* FIXME: Include the comments suggested by Paul. */
16057#ifndef __cplusplus
16058 /* Ultrix mips cc rejects this. */
16059 typedef int charset[2];
16060 const charset x;
16061 /* SunOS 4.1.1 cc rejects this. */
16062 char const *const *ccp;
16063 char **p;
16064 /* NEC SVR4.0.2 mips cc rejects this. */
16065 struct point {int x, y;};
16066 static struct point const zero = {0,0};
16067 /* AIX XL C 1.02.0.0 rejects this.
16068 It does not let you subtract one const X* pointer from another in
16069 an arm of an if-expression whose if-part is not a constant
16070 expression */
16071 const char *g = "string";
16072 ccp = &g + (g ? g-g : 0);
16073 /* HPUX 7.0 cc rejects these. */
16074 ++ccp;
16075 p = (char**) ccp;
16076 ccp = (char const *const *) p;
16077 { /* SCO 3.2v4 cc rejects this. */
16078 char *t;
16079 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016080
Martin v. Löwis11437992002-04-12 09:54:03 +000016081 *t++ = 0;
16082 }
16083 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16084 int x[] = {25, 17};
16085 const int *foo = &x[0];
16086 ++foo;
16087 }
16088 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16089 typedef const int *iptr;
16090 iptr p = 0;
16091 ++p;
16092 }
16093 { /* AIX XL C 1.02.0.0 rejects this saying
16094 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16095 struct s { int j; const int *ap[3]; };
16096 struct s *b; b->j = 5;
16097 }
16098 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16099 const int foo = 10;
16100 }
16101#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016102
Martin v. Löwis11437992002-04-12 09:54:03 +000016103 ;
16104 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016105}
Martin v. Löwis11437992002-04-12 09:54:03 +000016106_ACEOF
16107rm -f conftest.$ac_objext
16108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16109 (eval $ac_compile) 2>&5
16110 ac_status=$?
16111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16112 (exit $ac_status); } &&
16113 { ac_try='test -s conftest.$ac_objext'
16114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16115 (eval $ac_try) 2>&5
16116 ac_status=$?
16117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16118 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016119 ac_cv_c_const=yes
16120else
Martin v. Löwis11437992002-04-12 09:54:03 +000016121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016122sed 's/^/| /' conftest.$ac_ext >&5
16123
Martin v. Löwis11437992002-04-12 09:54:03 +000016124ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016126rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016127fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016128echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
16129echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016130if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016131
16132cat >>confdefs.h <<\_ACEOF
16133#define const
16134_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016135
16136fi
16137
Michael W. Hudson54241132001-12-07 15:38:26 +000016138
Guido van Rossumda88dad1995-01-26 00:46:29 +000016139works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016140echo "$as_me:$LINENO: checking for working volatile" >&5
16141echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
16142cat >conftest.$ac_ext <<_ACEOF
16143#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016144/* confdefs.h. */
16145_ACEOF
16146cat confdefs.h >>conftest.$ac_ext
16147cat >>conftest.$ac_ext <<_ACEOF
16148/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016149
Martin v. Löwis11437992002-04-12 09:54:03 +000016150int
16151main ()
16152{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016153volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016154 ;
16155 return 0;
16156}
16157_ACEOF
16158rm -f conftest.$ac_objext
16159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16160 (eval $ac_compile) 2>&5
16161 ac_status=$?
16162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16163 (exit $ac_status); } &&
16164 { ac_try='test -s conftest.$ac_objext'
16165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16166 (eval $ac_try) 2>&5
16167 ac_status=$?
16168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16169 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016170 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016171else
Martin v. Löwis11437992002-04-12 09:54:03 +000016172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016173sed 's/^/| /' conftest.$ac_ext >&5
16174
Martin v. Löwis11437992002-04-12 09:54:03 +000016175
16176cat >>confdefs.h <<\_ACEOF
16177#define volatile
16178_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016179
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016180
Guido van Rossum627b2d71993-12-24 10:39:16 +000016181fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016182rm -f conftest.$ac_objext conftest.$ac_ext
16183echo "$as_me:$LINENO: result: $works" >&5
16184echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016185
Guido van Rossumda88dad1995-01-26 00:46:29 +000016186works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016187echo "$as_me:$LINENO: checking for working signed char" >&5
16188echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
16189cat >conftest.$ac_ext <<_ACEOF
16190#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016191/* confdefs.h. */
16192_ACEOF
16193cat confdefs.h >>conftest.$ac_ext
16194cat >>conftest.$ac_ext <<_ACEOF
16195/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016196
Martin v. Löwis11437992002-04-12 09:54:03 +000016197int
16198main ()
16199{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016200signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000016201 ;
16202 return 0;
16203}
16204_ACEOF
16205rm -f conftest.$ac_objext
16206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16207 (eval $ac_compile) 2>&5
16208 ac_status=$?
16209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210 (exit $ac_status); } &&
16211 { ac_try='test -s conftest.$ac_objext'
16212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16213 (eval $ac_try) 2>&5
16214 ac_status=$?
16215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16216 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016217 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016218else
Martin v. Löwis11437992002-04-12 09:54:03 +000016219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016220sed 's/^/| /' conftest.$ac_ext >&5
16221
Martin v. Löwis11437992002-04-12 09:54:03 +000016222
16223cat >>confdefs.h <<\_ACEOF
16224#define signed
16225_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016226
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016227
Guido van Rossum7f43da71994-08-01 12:15:30 +000016228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016229rm -f conftest.$ac_objext conftest.$ac_ext
16230echo "$as_me:$LINENO: result: $works" >&5
16231echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016232
Guido van Rossumda88dad1995-01-26 00:46:29 +000016233have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016234echo "$as_me:$LINENO: checking for prototypes" >&5
16235echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
16236cat >conftest.$ac_ext <<_ACEOF
16237#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016238/* confdefs.h. */
16239_ACEOF
16240cat confdefs.h >>conftest.$ac_ext
16241cat >>conftest.$ac_ext <<_ACEOF
16242/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016243int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016244int
16245main ()
16246{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016247return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000016248 ;
16249 return 0;
16250}
16251_ACEOF
16252rm -f conftest.$ac_objext
16253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16254 (eval $ac_compile) 2>&5
16255 ac_status=$?
16256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16257 (exit $ac_status); } &&
16258 { ac_try='test -s conftest.$ac_objext'
16259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16260 (eval $ac_try) 2>&5
16261 ac_status=$?
16262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16263 (exit $ac_status); }; }; then
16264
16265
16266cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016267#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016268_ACEOF
16269
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016270 have_prototypes=yes
16271
Guido van Rossumf78abae1997-01-21 22:02:36 +000016272else
Martin v. Löwis11437992002-04-12 09:54:03 +000016273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016274sed 's/^/| /' conftest.$ac_ext >&5
16275
Guido van Rossum7f43da71994-08-01 12:15:30 +000016276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016277rm -f conftest.$ac_objext conftest.$ac_ext
16278echo "$as_me:$LINENO: result: $have_prototypes" >&5
16279echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016280
Guido van Rossumda88dad1995-01-26 00:46:29 +000016281works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016282echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
16283echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
16284cat >conftest.$ac_ext <<_ACEOF
16285#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016286/* confdefs.h. */
16287_ACEOF
16288cat confdefs.h >>conftest.$ac_ext
16289cat >>conftest.$ac_ext <<_ACEOF
16290/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016291
16292#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000016293int foo(int x, ...) {
16294 va_list va;
16295 va_start(va, x);
16296 va_arg(va, int);
16297 va_arg(va, char *);
16298 va_arg(va, double);
16299 return 0;
16300}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016301
Martin v. Löwis11437992002-04-12 09:54:03 +000016302int
16303main ()
16304{
Guido van Rossum90eea071996-08-30 20:58:57 +000016305return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000016306 ;
16307 return 0;
16308}
16309_ACEOF
16310rm -f conftest.$ac_objext
16311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16312 (eval $ac_compile) 2>&5
16313 ac_status=$?
16314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16315 (exit $ac_status); } &&
16316 { ac_try='test -s conftest.$ac_objext'
16317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16318 (eval $ac_try) 2>&5
16319 ac_status=$?
16320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16321 (exit $ac_status); }; }; then
16322
16323
16324cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016325#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016326_ACEOF
16327
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016328 works=yes
16329
Guido van Rossumf78abae1997-01-21 22:02:36 +000016330else
Martin v. Löwis11437992002-04-12 09:54:03 +000016331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016332sed 's/^/| /' conftest.$ac_ext >&5
16333
Guido van Rossum627b2d71993-12-24 10:39:16 +000016334fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016335rm -f conftest.$ac_objext conftest.$ac_ext
16336echo "$as_me:$LINENO: result: $works" >&5
16337echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016338
Guido van Rossumda88dad1995-01-26 00:46:29 +000016339if test "$have_prototypes" = yes; then
16340bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016341echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
16342echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
16343cat >conftest.$ac_ext <<_ACEOF
16344#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016345/* confdefs.h. */
16346_ACEOF
16347cat confdefs.h >>conftest.$ac_ext
16348cat >>conftest.$ac_ext <<_ACEOF
16349/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016350#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016351int
16352main ()
16353{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016354char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000016355 ;
16356 return 0;
16357}
16358_ACEOF
16359rm -f conftest.$ac_objext
16360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16361 (eval $ac_compile) 2>&5
16362 ac_status=$?
16363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16364 (exit $ac_status); } &&
16365 { ac_try='test -s conftest.$ac_objext'
16366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16367 (eval $ac_try) 2>&5
16368 ac_status=$?
16369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16370 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000016371 :
16372else
Martin v. Löwis11437992002-04-12 09:54:03 +000016373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016374sed 's/^/| /' conftest.$ac_ext >&5
16375
Martin v. Löwis11437992002-04-12 09:54:03 +000016376
16377cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016378#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016379_ACEOF
16380
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016381 bad_prototypes=yes
16382
Guido van Rossum627b2d71993-12-24 10:39:16 +000016383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016384rm -f conftest.$ac_objext conftest.$ac_ext
16385echo "$as_me:$LINENO: result: $bad_prototypes" >&5
16386echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000016387fi
16388
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016389# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000016390echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
16391echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
16392cat >conftest.$ac_ext <<_ACEOF
16393#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016394/* confdefs.h. */
16395_ACEOF
16396cat confdefs.h >>conftest.$ac_ext
16397cat >>conftest.$ac_ext <<_ACEOF
16398/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016399#include <sys/types.h>
16400#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016401int
16402main ()
16403{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016404struct sockaddr x;
16405x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016406 ;
16407 return 0;
16408}
16409_ACEOF
16410rm -f conftest.$ac_objext
16411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16412 (eval $ac_compile) 2>&5
16413 ac_status=$?
16414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16415 (exit $ac_status); } &&
16416 { ac_try='test -s conftest.$ac_objext'
16417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16418 (eval $ac_try) 2>&5
16419 ac_status=$?
16420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16421 (exit $ac_status); }; }; then
16422 echo "$as_me:$LINENO: result: yes" >&5
16423echo "${ECHO_T}yes" >&6
16424
16425cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016426#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016427_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016428
16429else
Martin v. Löwis11437992002-04-12 09:54:03 +000016430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016431sed 's/^/| /' conftest.$ac_ext >&5
16432
Martin v. Löwis11437992002-04-12 09:54:03 +000016433echo "$as_me:$LINENO: result: no" >&5
16434echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016435fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016436rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016437
Guido van Rossumda88dad1995-01-26 00:46:29 +000016438va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016439echo "$as_me:$LINENO: checking whether va_list is an array" >&5
16440echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
16441cat >conftest.$ac_ext <<_ACEOF
16442#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016443/* confdefs.h. */
16444_ACEOF
16445cat confdefs.h >>conftest.$ac_ext
16446cat >>conftest.$ac_ext <<_ACEOF
16447/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016448
16449#ifdef HAVE_STDARG_PROTOTYPES
16450#include <stdarg.h>
16451#else
16452#include <varargs.h>
16453#endif
16454
Martin v. Löwis11437992002-04-12 09:54:03 +000016455int
16456main ()
16457{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016458va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000016459 ;
16460 return 0;
16461}
16462_ACEOF
16463rm -f conftest.$ac_objext
16464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16465 (eval $ac_compile) 2>&5
16466 ac_status=$?
16467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16468 (exit $ac_status); } &&
16469 { ac_try='test -s conftest.$ac_objext'
16470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16471 (eval $ac_try) 2>&5
16472 ac_status=$?
16473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16474 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016475 :
16476else
Martin v. Löwis11437992002-04-12 09:54:03 +000016477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016478sed 's/^/| /' conftest.$ac_ext >&5
16479
Martin v. Löwis11437992002-04-12 09:54:03 +000016480
16481
16482cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016483#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016484_ACEOF
16485
Guido van Rossumda88dad1995-01-26 00:46:29 +000016486 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016487
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016488fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016489rm -f conftest.$ac_objext conftest.$ac_ext
16490echo "$as_me:$LINENO: result: $va_list_is_array" >&5
16491echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016492
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016493# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000016494
16495
16496
16497echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
16498echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
16499if test "${ac_cv_func_gethostbyname_r+set}" = set; then
16500 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016501else
Martin v. Löwis11437992002-04-12 09:54:03 +000016502 cat >conftest.$ac_ext <<_ACEOF
16503#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016504/* confdefs.h. */
16505_ACEOF
16506cat confdefs.h >>conftest.$ac_ext
16507cat >>conftest.$ac_ext <<_ACEOF
16508/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016509/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016510 which can conflict with char gethostbyname_r (); below.
16511 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016512 <limits.h> exists even on freestanding compilers. Under hpux,
16513 including <limits.h> includes <sys/time.h> and causes problems
16514 checking for functions defined therein. */
16515#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016516# include <limits.h>
16517#else
16518# include <assert.h>
16519#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016520/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016521#ifdef __cplusplus
16522extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016523{
Martin v. Löwis11437992002-04-12 09:54:03 +000016524#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016525/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016526 builtin and then its argument prototype would still apply. */
16527char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016528/* The GNU C library defines this for functions which it implements
16529 to always fail with ENOSYS. Some functions are actually named
16530 something starting with __ and the normal name is an alias. */
16531#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
16532choke me
16533#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016534char (*f) () = gethostbyname_r;
16535#endif
16536#ifdef __cplusplus
16537}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016538#endif
16539
Skip Montanaro6dead952003-09-25 14:50:04 +000016540int
16541main ()
16542{
16543return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000016544 ;
16545 return 0;
16546}
16547_ACEOF
16548rm -f conftest.$ac_objext conftest$ac_exeext
16549if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16550 (eval $ac_link) 2>&5
16551 ac_status=$?
16552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16553 (exit $ac_status); } &&
16554 { ac_try='test -s conftest$ac_exeext'
16555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16556 (eval $ac_try) 2>&5
16557 ac_status=$?
16558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16559 (exit $ac_status); }; }; then
16560 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016561else
Martin v. Löwis11437992002-04-12 09:54:03 +000016562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016563sed 's/^/| /' conftest.$ac_ext >&5
16564
Martin v. Löwis11437992002-04-12 09:54:03 +000016565ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016567rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016569echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
16570echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
16571if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016572
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016574#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016575_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016576
Martin v. Löwis11437992002-04-12 09:54:03 +000016577 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
16578echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016579 OLD_CFLAGS=$CFLAGS
16580 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016581 cat >conftest.$ac_ext <<_ACEOF
16582#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016583/* confdefs.h. */
16584_ACEOF
16585cat confdefs.h >>conftest.$ac_ext
16586cat >>conftest.$ac_ext <<_ACEOF
16587/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016588
16589# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016590
Martin v. Löwis11437992002-04-12 09:54:03 +000016591int
16592main ()
16593{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016594
16595 char *name;
16596 struct hostent *he, *res;
16597 char buffer[2048];
16598 int buflen = 2048;
16599 int h_errnop;
16600
16601 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016602
16603 ;
16604 return 0;
16605}
16606_ACEOF
16607rm -f conftest.$ac_objext
16608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16609 (eval $ac_compile) 2>&5
16610 ac_status=$?
16611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16612 (exit $ac_status); } &&
16613 { ac_try='test -s conftest.$ac_objext'
16614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16615 (eval $ac_try) 2>&5
16616 ac_status=$?
16617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16618 (exit $ac_status); }; }; then
16619
16620 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016621#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016622_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016623
Martin v. Löwis11437992002-04-12 09:54:03 +000016624
16625cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016626#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016627_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016628
Martin v. Löwis11437992002-04-12 09:54:03 +000016629 echo "$as_me:$LINENO: result: yes" >&5
16630echo "${ECHO_T}yes" >&6
16631
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016632else
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016634sed 's/^/| /' conftest.$ac_ext >&5
16635
Martin v. Löwis11437992002-04-12 09:54:03 +000016636
16637 echo "$as_me:$LINENO: result: no" >&5
16638echo "${ECHO_T}no" >&6
16639 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
16640echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
16641 cat >conftest.$ac_ext <<_ACEOF
16642#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016643/* confdefs.h. */
16644_ACEOF
16645cat confdefs.h >>conftest.$ac_ext
16646cat >>conftest.$ac_ext <<_ACEOF
16647/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016648
16649# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016650
Martin v. Löwis11437992002-04-12 09:54:03 +000016651int
16652main ()
16653{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016654
16655 char *name;
16656 struct hostent *he;
16657 char buffer[2048];
16658 int buflen = 2048;
16659 int h_errnop;
16660
16661 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016662
16663 ;
16664 return 0;
16665}
16666_ACEOF
16667rm -f conftest.$ac_objext
16668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16669 (eval $ac_compile) 2>&5
16670 ac_status=$?
16671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16672 (exit $ac_status); } &&
16673 { ac_try='test -s conftest.$ac_objext'
16674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16675 (eval $ac_try) 2>&5
16676 ac_status=$?
16677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16678 (exit $ac_status); }; }; then
16679
16680 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016681#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016682_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016683
Martin v. Löwis11437992002-04-12 09:54:03 +000016684
16685cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016686#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016687_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016688
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 echo "$as_me:$LINENO: result: yes" >&5
16690echo "${ECHO_T}yes" >&6
16691
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016692else
Martin v. Löwis11437992002-04-12 09:54:03 +000016693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016694sed 's/^/| /' conftest.$ac_ext >&5
16695
Martin v. Löwis11437992002-04-12 09:54:03 +000016696
16697 echo "$as_me:$LINENO: result: no" >&5
16698echo "${ECHO_T}no" >&6
16699 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
16700echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
16701 cat >conftest.$ac_ext <<_ACEOF
16702#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016703/* confdefs.h. */
16704_ACEOF
16705cat confdefs.h >>conftest.$ac_ext
16706cat >>conftest.$ac_ext <<_ACEOF
16707/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016708
16709# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016710
Martin v. Löwis11437992002-04-12 09:54:03 +000016711int
16712main ()
16713{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016714
16715 char *name;
16716 struct hostent *he;
16717 struct hostent_data data;
16718
16719 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000016720
16721 ;
16722 return 0;
16723}
16724_ACEOF
16725rm -f conftest.$ac_objext
16726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16727 (eval $ac_compile) 2>&5
16728 ac_status=$?
16729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16730 (exit $ac_status); } &&
16731 { ac_try='test -s conftest.$ac_objext'
16732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16733 (eval $ac_try) 2>&5
16734 ac_status=$?
16735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16736 (exit $ac_status); }; }; then
16737
16738 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016739#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016740_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016741
Martin v. Löwis11437992002-04-12 09:54:03 +000016742
16743cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016744#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016745_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016746
Martin v. Löwis11437992002-04-12 09:54:03 +000016747 echo "$as_me:$LINENO: result: yes" >&5
16748echo "${ECHO_T}yes" >&6
16749
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016750else
Martin v. Löwis11437992002-04-12 09:54:03 +000016751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016752sed 's/^/| /' conftest.$ac_ext >&5
16753
Martin v. Löwis11437992002-04-12 09:54:03 +000016754
16755 echo "$as_me:$LINENO: result: no" >&5
16756echo "${ECHO_T}no" >&6
16757
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016758fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016759rm -f conftest.$ac_objext conftest.$ac_ext
16760
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016761fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016762rm -f conftest.$ac_objext conftest.$ac_ext
16763
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016764fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016765rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016766 CFLAGS=$OLD_CFLAGS
16767
16768else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016769
Martin v. Löwis11437992002-04-12 09:54:03 +000016770
16771for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000016772do
Martin v. Löwis11437992002-04-12 09:54:03 +000016773as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16774echo "$as_me:$LINENO: checking for $ac_func" >&5
16775echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16776if eval "test \"\${$as_ac_var+set}\" = set"; then
16777 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016778else
Martin v. Löwis11437992002-04-12 09:54:03 +000016779 cat >conftest.$ac_ext <<_ACEOF
16780#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016781/* confdefs.h. */
16782_ACEOF
16783cat confdefs.h >>conftest.$ac_ext
16784cat >>conftest.$ac_ext <<_ACEOF
16785/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016786/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016787 which can conflict with char $ac_func (); below.
16788 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016789 <limits.h> exists even on freestanding compilers. Under hpux,
16790 including <limits.h> includes <sys/time.h> and causes problems
16791 checking for functions defined therein. */
16792#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016793# include <limits.h>
16794#else
16795# include <assert.h>
16796#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016797/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016798#ifdef __cplusplus
16799extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016800{
Martin v. Löwis11437992002-04-12 09:54:03 +000016801#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016802/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016803 builtin and then its argument prototype would still apply. */
16804char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016805/* The GNU C library defines this for functions which it implements
16806 to always fail with ENOSYS. Some functions are actually named
16807 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016808#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016809choke me
16810#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016811char (*f) () = $ac_func;
16812#endif
16813#ifdef __cplusplus
16814}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016815#endif
16816
Skip Montanaro6dead952003-09-25 14:50:04 +000016817int
16818main ()
16819{
16820return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016821 ;
16822 return 0;
16823}
16824_ACEOF
16825rm -f conftest.$ac_objext conftest$ac_exeext
16826if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16827 (eval $ac_link) 2>&5
16828 ac_status=$?
16829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16830 (exit $ac_status); } &&
16831 { ac_try='test -s conftest$ac_exeext'
16832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16833 (eval $ac_try) 2>&5
16834 ac_status=$?
16835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16836 (exit $ac_status); }; }; then
16837 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016838else
Martin v. Löwis11437992002-04-12 09:54:03 +000016839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016840sed 's/^/| /' conftest.$ac_ext >&5
16841
Martin v. Löwis11437992002-04-12 09:54:03 +000016842eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016843fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016844rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016845fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016846echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16847echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16848if test `eval echo '${'$as_ac_var'}'` = yes; then
16849 cat >>confdefs.h <<_ACEOF
16850#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16851_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016852
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016853fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016854done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016855
Michael W. Hudson54241132001-12-07 15:38:26 +000016856
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016857fi
16858
Michael W. Hudson54241132001-12-07 15:38:26 +000016859
16860
16861
16862
16863
16864
Guido van Rossum627b2d71993-12-24 10:39:16 +000016865# checks for system services
16866# (none yet)
16867
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016868# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016869echo "$as_me:$LINENO: checking for __fpu_control" >&5
16870echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16871if test "${ac_cv_func___fpu_control+set}" = set; then
16872 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016873else
Martin v. Löwis11437992002-04-12 09:54:03 +000016874 cat >conftest.$ac_ext <<_ACEOF
16875#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016876/* confdefs.h. */
16877_ACEOF
16878cat confdefs.h >>conftest.$ac_ext
16879cat >>conftest.$ac_ext <<_ACEOF
16880/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016881/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016882 which can conflict with char __fpu_control (); below.
16883 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016884 <limits.h> exists even on freestanding compilers. Under hpux,
16885 including <limits.h> includes <sys/time.h> and causes problems
16886 checking for functions defined therein. */
16887#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016888# include <limits.h>
16889#else
16890# include <assert.h>
16891#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016892/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016893#ifdef __cplusplus
16894extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016895{
Martin v. Löwis11437992002-04-12 09:54:03 +000016896#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016897/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016898 builtin and then its argument prototype would still apply. */
16899char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016900/* The GNU C library defines this for functions which it implements
16901 to always fail with ENOSYS. Some functions are actually named
16902 something starting with __ and the normal name is an alias. */
16903#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16904choke me
16905#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016906char (*f) () = __fpu_control;
16907#endif
16908#ifdef __cplusplus
16909}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016910#endif
16911
Skip Montanaro6dead952003-09-25 14:50:04 +000016912int
16913main ()
16914{
16915return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 ;
16917 return 0;
16918}
16919_ACEOF
16920rm -f conftest.$ac_objext conftest$ac_exeext
16921if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16922 (eval $ac_link) 2>&5
16923 ac_status=$?
16924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16925 (exit $ac_status); } &&
16926 { ac_try='test -s conftest$ac_exeext'
16927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16928 (eval $ac_try) 2>&5
16929 ac_status=$?
16930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16931 (exit $ac_status); }; }; then
16932 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016933else
Martin v. Löwis11437992002-04-12 09:54:03 +000016934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016935sed 's/^/| /' conftest.$ac_ext >&5
16936
Martin v. Löwis11437992002-04-12 09:54:03 +000016937ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016938fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016939rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016940fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016941echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16942echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16943if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016944 :
16945else
Martin v. Löwis11437992002-04-12 09:54:03 +000016946
16947echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16948echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16949if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16950 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016951else
Martin v. Löwis11437992002-04-12 09:54:03 +000016952 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016953LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016954cat >conftest.$ac_ext <<_ACEOF
16955#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016956/* confdefs.h. */
16957_ACEOF
16958cat confdefs.h >>conftest.$ac_ext
16959cat >>conftest.$ac_ext <<_ACEOF
16960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016962/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016963#ifdef __cplusplus
16964extern "C"
16965#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016966/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016967 builtin and then its argument prototype would still apply. */
16968char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016969int
16970main ()
16971{
16972__fpu_control ();
16973 ;
16974 return 0;
16975}
16976_ACEOF
16977rm -f conftest.$ac_objext conftest$ac_exeext
16978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16979 (eval $ac_link) 2>&5
16980 ac_status=$?
16981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16982 (exit $ac_status); } &&
16983 { ac_try='test -s conftest$ac_exeext'
16984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16985 (eval $ac_try) 2>&5
16986 ac_status=$?
16987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16988 (exit $ac_status); }; }; then
16989 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016990else
Martin v. Löwis11437992002-04-12 09:54:03 +000016991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016992sed 's/^/| /' conftest.$ac_ext >&5
16993
Martin v. Löwis11437992002-04-12 09:54:03 +000016994ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16997LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016998fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016999echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
17000echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
17001if test $ac_cv_lib_ieee___fpu_control = yes; then
17002 cat >>confdefs.h <<_ACEOF
17003#define HAVE_LIBIEEE 1
17004_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017005
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017006 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017007
Guido van Rossum627b2d71993-12-24 10:39:16 +000017008fi
17009
Michael W. Hudson54241132001-12-07 15:38:26 +000017010
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017011fi
17012
Michael W. Hudson54241132001-12-07 15:38:26 +000017013
Guido van Rossum7f253911997-05-09 02:42:48 +000017014# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000017015echo "$as_me:$LINENO: checking for --with-fpectl" >&5
17016echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
17017
Guido van Rossum7f253911997-05-09 02:42:48 +000017018# Check whether --with-fpectl or --without-fpectl was given.
17019if test "${with_fpectl+set}" = set; then
17020 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000017021
Guido van Rossum7f253911997-05-09 02:42:48 +000017022if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017023then
17024
17025cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000017026#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017027_ACEOF
17028
17029 echo "$as_me:$LINENO: result: yes" >&5
17030echo "${ECHO_T}yes" >&6
17031else echo "$as_me:$LINENO: result: no" >&5
17032echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017033fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017034else
Martin v. Löwis11437992002-04-12 09:54:03 +000017035 echo "$as_me:$LINENO: result: no" >&5
17036echo "${ECHO_T}no" >&6
17037fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000017038
Guido van Rossum7f43da71994-08-01 12:15:30 +000017039# check for --with-libm=...
17040
Guido van Rossum563e7081996-09-10 18:20:48 +000017041case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000017042Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000017043BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000017044*) LIBM=-lm
17045esac
Martin v. Löwis11437992002-04-12 09:54:03 +000017046echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
17047echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
17048
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017049# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017050if test "${with_libm+set}" = set; then
17051 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000017052
Guido van Rossum7f253911997-05-09 02:42:48 +000017053if test "$withval" = no
17054then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000017055 echo "$as_me:$LINENO: result: force LIBM empty" >&5
17056echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017057elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017058then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017059 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
17060echo "${ECHO_T}set LIBM=\"$withval\"" >&6
17061else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
17062echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
17063 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017064fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017065else
Martin v. Löwis11437992002-04-12 09:54:03 +000017066 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
17067echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
17068fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017069
17070# check for --with-libc=...
17071
Martin v. Löwis11437992002-04-12 09:54:03 +000017072echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
17073echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
17074
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017075# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017076if test "${with_libc+set}" = set; then
17077 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000017078
Guido van Rossum7f253911997-05-09 02:42:48 +000017079if test "$withval" = no
17080then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000017081 echo "$as_me:$LINENO: result: force LIBC empty" >&5
17082echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017083elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017084then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017085 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
17086echo "${ECHO_T}set LIBC=\"$withval\"" >&6
17087else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
17088echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
17089 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017090fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017091else
Martin v. Löwis11437992002-04-12 09:54:03 +000017092 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
17093echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
17094fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017095
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017096# check for hypot() in math library
17097LIBS_SAVE=$LIBS
17098LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000017099
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017100for ac_func in hypot
17101do
Martin v. Löwis11437992002-04-12 09:54:03 +000017102as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17103echo "$as_me:$LINENO: checking for $ac_func" >&5
17104echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17105if eval "test \"\${$as_ac_var+set}\" = set"; then
17106 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017107else
Martin v. Löwis11437992002-04-12 09:54:03 +000017108 cat >conftest.$ac_ext <<_ACEOF
17109#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017110/* confdefs.h. */
17111_ACEOF
17112cat confdefs.h >>conftest.$ac_ext
17113cat >>conftest.$ac_ext <<_ACEOF
17114/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017115/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017116 which can conflict with char $ac_func (); below.
17117 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017118 <limits.h> exists even on freestanding compilers. Under hpux,
17119 including <limits.h> includes <sys/time.h> and causes problems
17120 checking for functions defined therein. */
17121#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017122# include <limits.h>
17123#else
17124# include <assert.h>
17125#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017126/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017127#ifdef __cplusplus
17128extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017129{
Martin v. Löwis11437992002-04-12 09:54:03 +000017130#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017131/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017132 builtin and then its argument prototype would still apply. */
17133char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017134/* The GNU C library defines this for functions which it implements
17135 to always fail with ENOSYS. Some functions are actually named
17136 something starting with __ and the normal name is an alias. */
17137#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17138choke me
17139#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017140char (*f) () = $ac_func;
17141#endif
17142#ifdef __cplusplus
17143}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017144#endif
17145
Skip Montanaro6dead952003-09-25 14:50:04 +000017146int
17147main ()
17148{
17149return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017150 ;
17151 return 0;
17152}
17153_ACEOF
17154rm -f conftest.$ac_objext conftest$ac_exeext
17155if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17156 (eval $ac_link) 2>&5
17157 ac_status=$?
17158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17159 (exit $ac_status); } &&
17160 { ac_try='test -s conftest$ac_exeext'
17161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17162 (eval $ac_try) 2>&5
17163 ac_status=$?
17164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17165 (exit $ac_status); }; }; then
17166 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017167else
Martin v. Löwis11437992002-04-12 09:54:03 +000017168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017169sed 's/^/| /' conftest.$ac_ext >&5
17170
Martin v. Löwis11437992002-04-12 09:54:03 +000017171eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017172fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017173rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017175echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17176echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17177if test `eval echo '${'$as_ac_var'}'` = yes; then
17178 cat >>confdefs.h <<_ACEOF
17179#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17180_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017181
Michael W. Hudson54241132001-12-07 15:38:26 +000017182else
Martin v. Löwis11437992002-04-12 09:54:03 +000017183 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017184fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017185done
17186
Michael W. Hudson54241132001-12-07 15:38:26 +000017187
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017188LIBS=$LIBS_SAVE
17189
Guido van Rossumef2255b2000-03-10 22:30:29 +000017190# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017191if test "${ac_cv_header_wchar_h+set}" = set; then
17192 echo "$as_me:$LINENO: checking for wchar.h" >&5
17193echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
17194if test "${ac_cv_header_wchar_h+set}" = set; then
17195 echo $ECHO_N "(cached) $ECHO_C" >&6
17196fi
17197echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
17198echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017199else
Martin v. Löwis11437992002-04-12 09:54:03 +000017200 # Is the header compilable?
17201echo "$as_me:$LINENO: checking wchar.h usability" >&5
17202echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
17203cat >conftest.$ac_ext <<_ACEOF
17204#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017205/* confdefs.h. */
17206_ACEOF
17207cat confdefs.h >>conftest.$ac_ext
17208cat >>conftest.$ac_ext <<_ACEOF
17209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017210$ac_includes_default
17211#include <wchar.h>
17212_ACEOF
17213rm -f conftest.$ac_objext
17214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17215 (eval $ac_compile) 2>&5
17216 ac_status=$?
17217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17218 (exit $ac_status); } &&
17219 { ac_try='test -s conftest.$ac_objext'
17220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17221 (eval $ac_try) 2>&5
17222 ac_status=$?
17223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17224 (exit $ac_status); }; }; then
17225 ac_header_compiler=yes
17226else
17227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017228sed 's/^/| /' conftest.$ac_ext >&5
17229
Martin v. Löwis11437992002-04-12 09:54:03 +000017230ac_header_compiler=no
17231fi
17232rm -f conftest.$ac_objext conftest.$ac_ext
17233echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17234echo "${ECHO_T}$ac_header_compiler" >&6
17235
17236# Is the header present?
17237echo "$as_me:$LINENO: checking wchar.h presence" >&5
17238echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
17239cat >conftest.$ac_ext <<_ACEOF
17240#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017241/* confdefs.h. */
17242_ACEOF
17243cat confdefs.h >>conftest.$ac_ext
17244cat >>conftest.$ac_ext <<_ACEOF
17245/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017246#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017247_ACEOF
17248if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17249 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17250 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017251 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000017252 rm -f conftest.er1
17253 cat conftest.err >&5
17254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17255 (exit $ac_status); } >/dev/null; then
17256 if test -s conftest.err; then
17257 ac_cpp_err=$ac_c_preproc_warn_flag
17258 else
17259 ac_cpp_err=
17260 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017261else
Martin v. Löwis11437992002-04-12 09:54:03 +000017262 ac_cpp_err=yes
17263fi
17264if test -z "$ac_cpp_err"; then
17265 ac_header_preproc=yes
17266else
17267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017268sed 's/^/| /' conftest.$ac_ext >&5
17269
Martin v. Löwis11437992002-04-12 09:54:03 +000017270 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017271fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017272rm -f conftest.err conftest.$ac_ext
17273echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17274echo "${ECHO_T}$ac_header_preproc" >&6
17275
17276# So? What about this header?
17277case $ac_header_compiler:$ac_header_preproc in
17278 yes:no )
17279 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
17280echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17281 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017282echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
17283 (
17284 cat <<\_ASBOX
17285## ------------------------------------ ##
17286## Report this to bug-autoconf@gnu.org. ##
17287## ------------------------------------ ##
17288_ASBOX
17289 ) |
17290 sed "s/^/$as_me: WARNING: /" >&2
17291 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017292 no:yes )
17293 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
17294echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
17295 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
17296echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
17297 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017298echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
17299 (
17300 cat <<\_ASBOX
17301## ------------------------------------ ##
17302## Report this to bug-autoconf@gnu.org. ##
17303## ------------------------------------ ##
17304_ASBOX
17305 ) |
17306 sed "s/^/$as_me: WARNING: /" >&2
17307 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017308esac
17309echo "$as_me:$LINENO: checking for wchar.h" >&5
17310echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
17311if test "${ac_cv_header_wchar_h+set}" = set; then
17312 echo $ECHO_N "(cached) $ECHO_C" >&6
17313else
17314 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000017315fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017316echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
17317echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
17318
17319fi
17320if test $ac_cv_header_wchar_h = yes; then
17321
17322
17323cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017324#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017325_ACEOF
17326
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017327 wchar_h="yes"
17328
Guido van Rossumef2255b2000-03-10 22:30:29 +000017329else
Martin v. Löwis11437992002-04-12 09:54:03 +000017330 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000017331
17332fi
17333
Michael W. Hudson54241132001-12-07 15:38:26 +000017334
Martin v. Löwis11437992002-04-12 09:54:03 +000017335
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017336# determine wchar_t size
17337if test "$wchar_h" = yes
17338then
Martin v. Löwis11437992002-04-12 09:54:03 +000017339 echo "$as_me:$LINENO: checking for wchar_t" >&5
17340echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
17341if test "${ac_cv_type_wchar_t+set}" = set; then
17342 echo $ECHO_N "(cached) $ECHO_C" >&6
17343else
17344 cat >conftest.$ac_ext <<_ACEOF
17345#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017346/* confdefs.h. */
17347_ACEOF
17348cat confdefs.h >>conftest.$ac_ext
17349cat >>conftest.$ac_ext <<_ACEOF
17350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017351#include <wchar.h>
17352
Martin v. Löwis11437992002-04-12 09:54:03 +000017353int
17354main ()
17355{
17356if ((wchar_t *) 0)
17357 return 0;
17358if (sizeof (wchar_t))
17359 return 0;
17360 ;
17361 return 0;
17362}
17363_ACEOF
17364rm -f conftest.$ac_objext
17365if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17366 (eval $ac_compile) 2>&5
17367 ac_status=$?
17368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17369 (exit $ac_status); } &&
17370 { ac_try='test -s conftest.$ac_objext'
17371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17372 (eval $ac_try) 2>&5
17373 ac_status=$?
17374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17375 (exit $ac_status); }; }; then
17376 ac_cv_type_wchar_t=yes
17377else
17378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017379sed 's/^/| /' conftest.$ac_ext >&5
17380
Martin v. Löwis11437992002-04-12 09:54:03 +000017381ac_cv_type_wchar_t=no
17382fi
17383rm -f conftest.$ac_objext conftest.$ac_ext
17384fi
17385echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
17386echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
17387
17388echo "$as_me:$LINENO: checking size of wchar_t" >&5
17389echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
17390if test "${ac_cv_sizeof_wchar_t+set}" = set; then
17391 echo $ECHO_N "(cached) $ECHO_C" >&6
17392else
17393 if test "$ac_cv_type_wchar_t" = yes; then
17394 # The cast to unsigned long works around a bug in the HP C Compiler
17395 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17396 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17397 # This bug is HP SR number 8606223364.
17398 if test "$cross_compiling" = yes; then
17399 # Depending upon the size, compute the lo and hi bounds.
17400cat >conftest.$ac_ext <<_ACEOF
17401#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017402/* confdefs.h. */
17403_ACEOF
17404cat confdefs.h >>conftest.$ac_ext
17405cat >>conftest.$ac_ext <<_ACEOF
17406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017407#include <wchar.h>
17408
Martin v. Löwis11437992002-04-12 09:54:03 +000017409int
17410main ()
17411{
17412static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
17413test_array [0] = 0
17414
17415 ;
17416 return 0;
17417}
17418_ACEOF
17419rm -f conftest.$ac_objext
17420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17421 (eval $ac_compile) 2>&5
17422 ac_status=$?
17423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17424 (exit $ac_status); } &&
17425 { ac_try='test -s conftest.$ac_objext'
17426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17427 (eval $ac_try) 2>&5
17428 ac_status=$?
17429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17430 (exit $ac_status); }; }; then
17431 ac_lo=0 ac_mid=0
17432 while :; do
17433 cat >conftest.$ac_ext <<_ACEOF
17434#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017435/* confdefs.h. */
17436_ACEOF
17437cat confdefs.h >>conftest.$ac_ext
17438cat >>conftest.$ac_ext <<_ACEOF
17439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017440#include <wchar.h>
17441
Martin v. Löwis11437992002-04-12 09:54:03 +000017442int
17443main ()
17444{
17445static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
17446test_array [0] = 0
17447
17448 ;
17449 return 0;
17450}
17451_ACEOF
17452rm -f conftest.$ac_objext
17453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17454 (eval $ac_compile) 2>&5
17455 ac_status=$?
17456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17457 (exit $ac_status); } &&
17458 { ac_try='test -s conftest.$ac_objext'
17459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17460 (eval $ac_try) 2>&5
17461 ac_status=$?
17462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17463 (exit $ac_status); }; }; then
17464 ac_hi=$ac_mid; break
17465else
17466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017467sed 's/^/| /' conftest.$ac_ext >&5
17468
Martin v. Löwis11437992002-04-12 09:54:03 +000017469ac_lo=`expr $ac_mid + 1`
17470 if test $ac_lo -le $ac_mid; then
17471 ac_lo= ac_hi=
17472 break
17473 fi
17474 ac_mid=`expr 2 '*' $ac_mid + 1`
17475fi
17476rm -f conftest.$ac_objext conftest.$ac_ext
17477 done
17478else
17479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017480sed 's/^/| /' conftest.$ac_ext >&5
17481
Martin v. Löwis11437992002-04-12 09:54:03 +000017482cat >conftest.$ac_ext <<_ACEOF
17483#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017484/* confdefs.h. */
17485_ACEOF
17486cat confdefs.h >>conftest.$ac_ext
17487cat >>conftest.$ac_ext <<_ACEOF
17488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017489#include <wchar.h>
17490
Martin v. Löwis11437992002-04-12 09:54:03 +000017491int
17492main ()
17493{
17494static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
17495test_array [0] = 0
17496
17497 ;
17498 return 0;
17499}
17500_ACEOF
17501rm -f conftest.$ac_objext
17502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17503 (eval $ac_compile) 2>&5
17504 ac_status=$?
17505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17506 (exit $ac_status); } &&
17507 { ac_try='test -s conftest.$ac_objext'
17508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17509 (eval $ac_try) 2>&5
17510 ac_status=$?
17511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17512 (exit $ac_status); }; }; then
17513 ac_hi=-1 ac_mid=-1
17514 while :; do
17515 cat >conftest.$ac_ext <<_ACEOF
17516#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017517/* confdefs.h. */
17518_ACEOF
17519cat confdefs.h >>conftest.$ac_ext
17520cat >>conftest.$ac_ext <<_ACEOF
17521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017522#include <wchar.h>
17523
Martin v. Löwis11437992002-04-12 09:54:03 +000017524int
17525main ()
17526{
17527static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
17528test_array [0] = 0
17529
17530 ;
17531 return 0;
17532}
17533_ACEOF
17534rm -f conftest.$ac_objext
17535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17536 (eval $ac_compile) 2>&5
17537 ac_status=$?
17538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17539 (exit $ac_status); } &&
17540 { ac_try='test -s conftest.$ac_objext'
17541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17542 (eval $ac_try) 2>&5
17543 ac_status=$?
17544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17545 (exit $ac_status); }; }; then
17546 ac_lo=$ac_mid; break
17547else
17548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017549sed 's/^/| /' conftest.$ac_ext >&5
17550
Martin v. Löwis11437992002-04-12 09:54:03 +000017551ac_hi=`expr '(' $ac_mid ')' - 1`
17552 if test $ac_mid -le $ac_hi; then
17553 ac_lo= ac_hi=
17554 break
17555 fi
17556 ac_mid=`expr 2 '*' $ac_mid`
17557fi
17558rm -f conftest.$ac_objext conftest.$ac_ext
17559 done
17560else
17561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017562sed 's/^/| /' conftest.$ac_ext >&5
17563
Martin v. Löwis11437992002-04-12 09:54:03 +000017564ac_lo= ac_hi=
17565fi
17566rm -f conftest.$ac_objext conftest.$ac_ext
17567fi
17568rm -f conftest.$ac_objext conftest.$ac_ext
17569# Binary search between lo and hi bounds.
17570while test "x$ac_lo" != "x$ac_hi"; do
17571 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17572 cat >conftest.$ac_ext <<_ACEOF
17573#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017574/* confdefs.h. */
17575_ACEOF
17576cat confdefs.h >>conftest.$ac_ext
17577cat >>conftest.$ac_ext <<_ACEOF
17578/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017579#include <wchar.h>
17580
Martin v. Löwis11437992002-04-12 09:54:03 +000017581int
17582main ()
17583{
17584static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
17585test_array [0] = 0
17586
17587 ;
17588 return 0;
17589}
17590_ACEOF
17591rm -f conftest.$ac_objext
17592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17593 (eval $ac_compile) 2>&5
17594 ac_status=$?
17595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17596 (exit $ac_status); } &&
17597 { ac_try='test -s conftest.$ac_objext'
17598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17599 (eval $ac_try) 2>&5
17600 ac_status=$?
17601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17602 (exit $ac_status); }; }; then
17603 ac_hi=$ac_mid
17604else
17605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017606sed 's/^/| /' conftest.$ac_ext >&5
17607
Martin v. Löwis11437992002-04-12 09:54:03 +000017608ac_lo=`expr '(' $ac_mid ')' + 1`
17609fi
17610rm -f conftest.$ac_objext conftest.$ac_ext
17611done
17612case $ac_lo in
17613?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017614'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17615See \`config.log' for more details." >&5
17616echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17617See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017618 { (exit 1); exit 1; }; } ;;
17619esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017620else
17621 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017622 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17623See \`config.log' for more details." >&5
17624echo "$as_me: error: cannot run test program while cross compiling
17625See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017626 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000017627else
Martin v. Löwis11437992002-04-12 09:54:03 +000017628 cat >conftest.$ac_ext <<_ACEOF
17629#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017630/* confdefs.h. */
17631_ACEOF
17632cat confdefs.h >>conftest.$ac_ext
17633cat >>conftest.$ac_ext <<_ACEOF
17634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017635#include <wchar.h>
17636
17637long longval () { return (long) (sizeof (wchar_t)); }
17638unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000017639#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017640#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017641int
17642main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017643{
Martin v. Löwis11437992002-04-12 09:54:03 +000017644
17645 FILE *f = fopen ("conftest.val", "w");
17646 if (! f)
17647 exit (1);
17648 if (((long) (sizeof (wchar_t))) < 0)
17649 {
17650 long i = longval ();
17651 if (i != ((long) (sizeof (wchar_t))))
17652 exit (1);
17653 fprintf (f, "%ld\n", i);
17654 }
17655 else
17656 {
17657 unsigned long i = ulongval ();
17658 if (i != ((long) (sizeof (wchar_t))))
17659 exit (1);
17660 fprintf (f, "%lu\n", i);
17661 }
17662 exit (ferror (f) || fclose (f) != 0);
17663
17664 ;
17665 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000017666}
Martin v. Löwis11437992002-04-12 09:54:03 +000017667_ACEOF
17668rm -f conftest$ac_exeext
17669if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17670 (eval $ac_link) 2>&5
17671 ac_status=$?
17672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17675 (eval $ac_try) 2>&5
17676 ac_status=$?
17677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17678 (exit $ac_status); }; }; then
17679 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000017680else
Martin v. Löwis11437992002-04-12 09:54:03 +000017681 echo "$as_me: program exited with status $ac_status" >&5
17682echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017683sed 's/^/| /' conftest.$ac_ext >&5
17684
Martin v. Löwis11437992002-04-12 09:54:03 +000017685( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000017686{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17687See \`config.log' for more details." >&5
17688echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17689See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017690 { (exit 1); exit 1; }; }
17691fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017692rm -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 +000017693fi
17694fi
17695rm -f conftest.val
17696else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017697 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000017698fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017699fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017700echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
17701echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
17702cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017703#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017704_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017705
Michael W. Hudson54241132001-12-07 15:38:26 +000017706
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017707fi
17708
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017709echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
17710echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
17711have_ucs4_tcl=no
17712cat >conftest.$ac_ext <<_ACEOF
17713#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017714/* confdefs.h. */
17715_ACEOF
17716cat confdefs.h >>conftest.$ac_ext
17717cat >>conftest.$ac_ext <<_ACEOF
17718/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017719
17720#include <tcl.h>
17721#if TCL_UTF_MAX != 6
17722# error "NOT UCS4_TCL"
17723#endif
17724int
17725main ()
17726{
17727
17728 ;
17729 return 0;
17730}
17731_ACEOF
17732rm -f conftest.$ac_objext
17733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17734 (eval $ac_compile) 2>&5
17735 ac_status=$?
17736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17737 (exit $ac_status); } &&
17738 { ac_try='test -s conftest.$ac_objext'
17739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17740 (eval $ac_try) 2>&5
17741 ac_status=$?
17742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17743 (exit $ac_status); }; }; then
17744
17745
17746cat >>confdefs.h <<\_ACEOF
17747#define HAVE_UCS4_TCL 1
17748_ACEOF
17749
17750 have_ucs4_tcl=yes
17751
17752else
17753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017754sed 's/^/| /' conftest.$ac_ext >&5
17755
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017756fi
17757rm -f conftest.$ac_objext conftest.$ac_ext
17758echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
17759echo "${ECHO_T}$have_ucs4_tcl" >&6
17760
Skip Montanaro6dead952003-09-25 14:50:04 +000017761# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017762if test "$wchar_h" = yes
17763then
17764 # check whether wchar_t is signed or not
17765 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
17766echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
17767 if test "${ac_cv_wchar_t_signed+set}" = set; then
17768 echo $ECHO_N "(cached) $ECHO_C" >&6
17769else
17770
17771 if test "$cross_compiling" = yes; then
17772 ac_cv_wchar_t_signed=yes
17773else
17774 cat >conftest.$ac_ext <<_ACEOF
17775#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017776/* confdefs.h. */
17777_ACEOF
17778cat confdefs.h >>conftest.$ac_ext
17779cat >>conftest.$ac_ext <<_ACEOF
17780/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017781
17782 #include <wchar.h>
17783 int main()
17784 {
17785 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
17786 }
17787
17788_ACEOF
17789rm -f conftest$ac_exeext
17790if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17791 (eval $ac_link) 2>&5
17792 ac_status=$?
17793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17794 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17796 (eval $ac_try) 2>&5
17797 ac_status=$?
17798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17799 (exit $ac_status); }; }; then
17800 ac_cv_wchar_t_signed=yes
17801else
17802 echo "$as_me: program exited with status $ac_status" >&5
17803echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017804sed 's/^/| /' conftest.$ac_ext >&5
17805
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017806( exit $ac_status )
17807ac_cv_wchar_t_signed=no
17808fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017809rm -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 +000017810fi
17811fi
17812
17813 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
17814echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
17815fi
17816
Martin v. Löwis11437992002-04-12 09:54:03 +000017817echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17818echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017819# Check whether --enable-unicode or --disable-unicode was given.
17820if test "${enable_unicode+set}" = set; then
17821 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017822
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017823else
17824 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017825fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017826
17827if test $enable_unicode = yes
17828then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017829 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017830 case "$have_ucs4_tcl" in
17831 yes) enable_unicode="ucs4"
17832 ;;
17833 *) enable_unicode="ucs2"
17834 ;;
17835 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017836fi
17837
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017838
17839
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017840case "$enable_unicode" in
17841ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017842 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017843#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017844_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017845
17846 ;;
17847ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017848 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017849#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017850_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017851
17852 ;;
17853esac
17854
Michael W. Hudson54241132001-12-07 15:38:26 +000017855
Martin v. Löwis11437992002-04-12 09:54:03 +000017856
17857
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017858
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017859if test "$enable_unicode" = "no"
17860then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017861 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017862 echo "$as_me:$LINENO: result: not used" >&5
17863echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017864else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017865 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017866
17867cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017868#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017869_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017870
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017871
17872 # wchar_t is only usable if it maps to an unsigned type
17873 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17874 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017875 then
17876 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017877
Martin v. Löwis11437992002-04-12 09:54:03 +000017878cat >>confdefs.h <<\_ACEOF
17879#define HAVE_USABLE_WCHAR_T 1
17880_ACEOF
17881
17882 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017883#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017884_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017885
17886 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17887 then
17888 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017889 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017890#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017891_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017892
17893 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17894 then
17895 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017896 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017897#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017898_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017899
17900 else
17901 PY_UNICODE_TYPE="no type found"
17902 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017903 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17904echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017905fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017906
17907# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017908echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17909echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17910if test "${ac_cv_c_bigendian+set}" = set; then
17911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017912else
Martin v. Löwis11437992002-04-12 09:54:03 +000017913 # See if sys/param.h defines the BYTE_ORDER macro.
17914cat >conftest.$ac_ext <<_ACEOF
17915#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017916/* confdefs.h. */
17917_ACEOF
17918cat confdefs.h >>conftest.$ac_ext
17919cat >>conftest.$ac_ext <<_ACEOF
17920/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017921#include <sys/types.h>
17922#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017923
Martin v. Löwis11437992002-04-12 09:54:03 +000017924int
17925main ()
17926{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017927#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17928 bogus endian macros
17929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017930
17931 ;
17932 return 0;
17933}
17934_ACEOF
17935rm -f conftest.$ac_objext
17936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17937 (eval $ac_compile) 2>&5
17938 ac_status=$?
17939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17940 (exit $ac_status); } &&
17941 { ac_try='test -s conftest.$ac_objext'
17942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17943 (eval $ac_try) 2>&5
17944 ac_status=$?
17945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17946 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017947 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017948cat >conftest.$ac_ext <<_ACEOF
17949#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017950/* confdefs.h. */
17951_ACEOF
17952cat confdefs.h >>conftest.$ac_ext
17953cat >>conftest.$ac_ext <<_ACEOF
17954/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017955#include <sys/types.h>
17956#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017957
Martin v. Löwis11437992002-04-12 09:54:03 +000017958int
17959main ()
17960{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017961#if BYTE_ORDER != BIG_ENDIAN
17962 not big endian
17963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017964
17965 ;
17966 return 0;
17967}
17968_ACEOF
17969rm -f conftest.$ac_objext
17970if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17971 (eval $ac_compile) 2>&5
17972 ac_status=$?
17973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17974 (exit $ac_status); } &&
17975 { ac_try='test -s conftest.$ac_objext'
17976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17977 (eval $ac_try) 2>&5
17978 ac_status=$?
17979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17980 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017981 ac_cv_c_bigendian=yes
17982else
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017984sed 's/^/| /' conftest.$ac_ext >&5
17985
Martin v. Löwis11437992002-04-12 09:54:03 +000017986ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017988rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017989else
Martin v. Löwis11437992002-04-12 09:54:03 +000017990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017991sed 's/^/| /' conftest.$ac_ext >&5
17992
Martin v. Löwis11437992002-04-12 09:54:03 +000017993# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017994if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017995 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017996 ac_cv_c_bigendian=unknown
17997 cat >conftest.$ac_ext <<_ACEOF
17998#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017999/* confdefs.h. */
18000_ACEOF
18001cat confdefs.h >>conftest.$ac_ext
18002cat >>conftest.$ac_ext <<_ACEOF
18003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018004short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
18005short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
18006void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
18007short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18008short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18009void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018010int
18011main ()
18012{
18013 _ascii (); _ebcdic ();
18014 ;
18015 return 0;
18016}
18017_ACEOF
18018rm -f conftest.$ac_objext
18019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18020 (eval $ac_compile) 2>&5
18021 ac_status=$?
18022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18023 (exit $ac_status); } &&
18024 { ac_try='test -s conftest.$ac_objext'
18025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18026 (eval $ac_try) 2>&5
18027 ac_status=$?
18028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18029 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018030 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018031 ac_cv_c_bigendian=yes
18032fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018033if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018034 if test "$ac_cv_c_bigendian" = unknown; then
18035 ac_cv_c_bigendian=no
18036 else
18037 # finding both strings is unlikely to happen, but who knows?
18038 ac_cv_c_bigendian=unknown
18039 fi
18040fi
18041else
18042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018043sed 's/^/| /' conftest.$ac_ext >&5
18044
Martin v. Löwis11437992002-04-12 09:54:03 +000018045fi
18046rm -f conftest.$ac_objext conftest.$ac_ext
18047else
18048 cat >conftest.$ac_ext <<_ACEOF
18049#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018050/* confdefs.h. */
18051_ACEOF
18052cat confdefs.h >>conftest.$ac_ext
18053cat >>conftest.$ac_ext <<_ACEOF
18054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018055int
18056main ()
18057{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018058 /* Are we little or big endian? From Harbison&Steele. */
18059 union
18060 {
18061 long l;
18062 char c[sizeof (long)];
18063 } u;
18064 u.l = 1;
18065 exit (u.c[sizeof (long) - 1] == 1);
18066}
Martin v. Löwis11437992002-04-12 09:54:03 +000018067_ACEOF
18068rm -f conftest$ac_exeext
18069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18070 (eval $ac_link) 2>&5
18071 ac_status=$?
18072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18073 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18075 (eval $ac_try) 2>&5
18076 ac_status=$?
18077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18078 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000018079 ac_cv_c_bigendian=no
18080else
Martin v. Löwis11437992002-04-12 09:54:03 +000018081 echo "$as_me: program exited with status $ac_status" >&5
18082echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018083sed 's/^/| /' conftest.$ac_ext >&5
18084
Martin v. Löwis11437992002-04-12 09:54:03 +000018085( exit $ac_status )
18086ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000018087fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018088rm -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 +000018089fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018090fi
18091rm -f conftest.$ac_objext conftest.$ac_ext
18092fi
18093echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
18094echo "${ECHO_T}$ac_cv_c_bigendian" >&6
18095case $ac_cv_c_bigendian in
18096 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000018097
Martin v. Löwis11437992002-04-12 09:54:03 +000018098cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018099#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018100_ACEOF
18101 ;;
18102 no)
18103 ;;
18104 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018105 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018106presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018107echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018108presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
18109 { (exit 1); exit 1; }; } ;;
18110esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000018111
Michael W. Hudson54241132001-12-07 15:38:26 +000018112
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018113# Check whether right shifting a negative integer extends the sign bit
18114# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000018115echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
18116echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
18117if test "${ac_cv_rshift_extends_sign+set}" = set; then
18118 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000018119else
Martin v. Löwis11437992002-04-12 09:54:03 +000018120
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018121if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000018122 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018123else
Martin v. Löwis11437992002-04-12 09:54:03 +000018124 cat >conftest.$ac_ext <<_ACEOF
18125#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018126/* confdefs.h. */
18127_ACEOF
18128cat confdefs.h >>conftest.$ac_ext
18129cat >>conftest.$ac_ext <<_ACEOF
18130/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018131
18132int main()
18133{
Vladimir Marangozova6180282000-07-12 05:05:06 +000018134 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018135}
18136
Martin v. Löwis11437992002-04-12 09:54:03 +000018137_ACEOF
18138rm -f conftest$ac_exeext
18139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18140 (eval $ac_link) 2>&5
18141 ac_status=$?
18142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18143 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18145 (eval $ac_try) 2>&5
18146 ac_status=$?
18147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18148 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000018149 ac_cv_rshift_extends_sign=yes
18150else
Martin v. Löwis11437992002-04-12 09:54:03 +000018151 echo "$as_me: program exited with status $ac_status" >&5
18152echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018153sed 's/^/| /' conftest.$ac_ext >&5
18154
Martin v. Löwis11437992002-04-12 09:54:03 +000018155( exit $ac_status )
18156ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000018157fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018158rm -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 +000018159fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000018160fi
18161
Martin v. Löwis11437992002-04-12 09:54:03 +000018162echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
18163echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000018164if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018165then
Martin v. Löwis11437992002-04-12 09:54:03 +000018166
18167cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018168#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018169_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018170
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018171fi
18172
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018173# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018174echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
18175echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
18176if test "${ac_cv_have_getc_unlocked+set}" = set; then
18177 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018178else
Martin v. Löwis11437992002-04-12 09:54:03 +000018179
18180cat >conftest.$ac_ext <<_ACEOF
18181#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018182/* confdefs.h. */
18183_ACEOF
18184cat confdefs.h >>conftest.$ac_ext
18185cat >>conftest.$ac_ext <<_ACEOF
18186/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018187#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018188int
18189main ()
18190{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018191
18192 FILE *f = fopen("/dev/null", "r");
18193 flockfile(f);
18194 getc_unlocked(f);
18195 funlockfile(f);
18196
Martin v. Löwis11437992002-04-12 09:54:03 +000018197 ;
18198 return 0;
18199}
18200_ACEOF
18201rm -f conftest.$ac_objext conftest$ac_exeext
18202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18203 (eval $ac_link) 2>&5
18204 ac_status=$?
18205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18206 (exit $ac_status); } &&
18207 { ac_try='test -s conftest$ac_exeext'
18208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18209 (eval $ac_try) 2>&5
18210 ac_status=$?
18211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18212 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018213 ac_cv_have_getc_unlocked=yes
18214else
Martin v. Löwis11437992002-04-12 09:54:03 +000018215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018216sed 's/^/| /' conftest.$ac_ext >&5
18217
Martin v. Löwis11437992002-04-12 09:54:03 +000018218ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018220rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018221fi
18222
Martin v. Löwis11437992002-04-12 09:54:03 +000018223echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
18224echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018225if test "$ac_cv_have_getc_unlocked" = yes
18226then
Martin v. Löwis11437992002-04-12 09:54:03 +000018227
18228cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018229#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018230_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018231
18232fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018233
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018234# check for readline 2.2
18235cat >conftest.$ac_ext <<_ACEOF
18236#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018237/* confdefs.h. */
18238_ACEOF
18239cat confdefs.h >>conftest.$ac_ext
18240cat >>conftest.$ac_ext <<_ACEOF
18241/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018242#include <readline/readline.h>
18243_ACEOF
18244if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18245 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18246 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018247 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018248 rm -f conftest.er1
18249 cat conftest.err >&5
18250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18251 (exit $ac_status); } >/dev/null; then
18252 if test -s conftest.err; then
18253 ac_cpp_err=$ac_c_preproc_warn_flag
18254 else
18255 ac_cpp_err=
18256 fi
18257else
18258 ac_cpp_err=yes
18259fi
18260if test -z "$ac_cpp_err"; then
18261 have_readline=yes
18262else
18263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018264sed 's/^/| /' conftest.$ac_ext >&5
18265
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018266 have_readline=no
18267fi
18268rm -f conftest.err conftest.$ac_ext
18269if test $have_readline = yes
18270then
18271 cat >conftest.$ac_ext <<_ACEOF
18272#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018273/* confdefs.h. */
18274_ACEOF
18275cat confdefs.h >>conftest.$ac_ext
18276cat >>conftest.$ac_ext <<_ACEOF
18277/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018278#include <readline/readline.h>
18279
18280_ACEOF
18281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000018282 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018283
18284cat >>confdefs.h <<\_ACEOF
18285#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
18286_ACEOF
18287
18288fi
18289rm -f conftest*
18290
18291fi
18292
Martin v. Löwis0daad592001-09-30 21:09:59 +000018293# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000018294echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
18295echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
18296if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
18297 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000018298else
Martin v. Löwis11437992002-04-12 09:54:03 +000018299 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000018300LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018301cat >conftest.$ac_ext <<_ACEOF
18302#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018303/* confdefs.h. */
18304_ACEOF
18305cat confdefs.h >>conftest.$ac_ext
18306cat >>conftest.$ac_ext <<_ACEOF
18307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018308
Guido van Rossum353ae582001-07-10 16:45:32 +000018309/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018310#ifdef __cplusplus
18311extern "C"
18312#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000018313/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018314 builtin and then its argument prototype would still apply. */
18315char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018316int
18317main ()
18318{
18319rl_pre_input_hook ();
18320 ;
18321 return 0;
18322}
18323_ACEOF
18324rm -f conftest.$ac_objext conftest$ac_exeext
18325if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18326 (eval $ac_link) 2>&5
18327 ac_status=$?
18328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18329 (exit $ac_status); } &&
18330 { ac_try='test -s conftest$ac_exeext'
18331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18332 (eval $ac_try) 2>&5
18333 ac_status=$?
18334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18335 (exit $ac_status); }; }; then
18336 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000018337else
Martin v. Löwis11437992002-04-12 09:54:03 +000018338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018339sed 's/^/| /' conftest.$ac_ext >&5
18340
Martin v. Löwis11437992002-04-12 09:54:03 +000018341ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000018342fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018343rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18344LIBS=$ac_check_lib_save_LIBS
18345fi
18346echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
18347echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
18348if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018349
Martin v. Löwis11437992002-04-12 09:54:03 +000018350cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000018351#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018352_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000018353
Martin v. Löwis0daad592001-09-30 21:09:59 +000018354fi
18355
Michael W. Hudson54241132001-12-07 15:38:26 +000018356
Martin v. Löwis0daad592001-09-30 21:09:59 +000018357# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000018358echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
18359echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
18360if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
18361 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000018362else
Martin v. Löwis11437992002-04-12 09:54:03 +000018363 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000018364LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018365cat >conftest.$ac_ext <<_ACEOF
18366#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018367/* confdefs.h. */
18368_ACEOF
18369cat confdefs.h >>conftest.$ac_ext
18370cat >>conftest.$ac_ext <<_ACEOF
18371/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018372
Martin v. Löwis0daad592001-09-30 21:09:59 +000018373/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018374#ifdef __cplusplus
18375extern "C"
18376#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000018377/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018378 builtin and then its argument prototype would still apply. */
18379char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018380int
18381main ()
18382{
18383rl_completion_matches ();
18384 ;
18385 return 0;
18386}
18387_ACEOF
18388rm -f conftest.$ac_objext conftest$ac_exeext
18389if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18390 (eval $ac_link) 2>&5
18391 ac_status=$?
18392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18393 (exit $ac_status); } &&
18394 { ac_try='test -s conftest$ac_exeext'
18395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18396 (eval $ac_try) 2>&5
18397 ac_status=$?
18398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18399 (exit $ac_status); }; }; then
18400 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000018401else
Martin v. Löwis11437992002-04-12 09:54:03 +000018402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018403sed 's/^/| /' conftest.$ac_ext >&5
18404
Martin v. Löwis11437992002-04-12 09:54:03 +000018405ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000018406fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18408LIBS=$ac_check_lib_save_LIBS
18409fi
18410echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
18411echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
18412if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018413
Martin v. Löwis11437992002-04-12 09:54:03 +000018414cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000018415#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018416_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000018417
Guido van Rossum353ae582001-07-10 16:45:32 +000018418fi
18419
Jack Jansendd19cf82001-12-06 22:36:17 +000018420
Martin v. Löwis11437992002-04-12 09:54:03 +000018421echo "$as_me:$LINENO: checking for broken nice()" >&5
18422echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
18423if test "${ac_cv_broken_nice+set}" = set; then
18424 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018425else
Martin v. Löwis11437992002-04-12 09:54:03 +000018426
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018427if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000018428 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018429else
Martin v. Löwis11437992002-04-12 09:54:03 +000018430 cat >conftest.$ac_ext <<_ACEOF
18431#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018432/* confdefs.h. */
18433_ACEOF
18434cat confdefs.h >>conftest.$ac_ext
18435cat >>conftest.$ac_ext <<_ACEOF
18436/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018437
18438int main()
18439{
18440 int val1 = nice(1);
18441 if (val1 != -1 && val1 == nice(2))
18442 exit(0);
18443 exit(1);
18444}
18445
Martin v. Löwis11437992002-04-12 09:54:03 +000018446_ACEOF
18447rm -f conftest$ac_exeext
18448if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18449 (eval $ac_link) 2>&5
18450 ac_status=$?
18451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18452 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18454 (eval $ac_try) 2>&5
18455 ac_status=$?
18456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18457 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018458 ac_cv_broken_nice=yes
18459else
Martin v. Löwis11437992002-04-12 09:54:03 +000018460 echo "$as_me: program exited with status $ac_status" >&5
18461echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018462sed 's/^/| /' conftest.$ac_ext >&5
18463
Martin v. Löwis11437992002-04-12 09:54:03 +000018464( exit $ac_status )
18465ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018466fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018467rm -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 +000018468fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018469fi
18470
Martin v. Löwis11437992002-04-12 09:54:03 +000018471echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
18472echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018473if test "$ac_cv_broken_nice" = yes
18474then
Martin v. Löwis11437992002-04-12 09:54:03 +000018475
18476cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018477#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018478_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018479
18480fi
18481
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018482# tzset(3) exists and works like we expect it to
18483echo "$as_me:$LINENO: checking for working tzset()" >&5
18484echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
18485if test "${ac_cv_working_tzset+set}" = set; then
18486 echo $ECHO_N "(cached) $ECHO_C" >&6
18487else
18488
18489if test "$cross_compiling" = yes; then
18490 ac_cv_working_tzset=no
18491else
18492 cat >conftest.$ac_ext <<_ACEOF
18493#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018494/* confdefs.h. */
18495_ACEOF
18496cat confdefs.h >>conftest.$ac_ext
18497cat >>conftest.$ac_ext <<_ACEOF
18498/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018499
18500#include <stdlib.h>
18501#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000018502#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018503int main()
18504{
Brett Cannon18367812003-09-19 00:59:16 +000018505 /* Note that we need to ensure that not only does tzset(3)
18506 do 'something' with localtime, but it works as documented
18507 in the library reference and as expected by the test suite.
18508
18509 Red Hat 6.2 doesn't understand the southern hemisphere
18510 after New Year's Day; it thinks swaps on that day.
18511 */
18512
18513 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
18514 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
18515
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018516 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018517 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018518 if (localtime(&groundhogday)->tm_hour != 0)
18519 exit(1);
18520
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018521 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018522 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018523 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018524 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000018525
18526 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
18527 tzset();
18528 if (localtime(&groundhogday)->tm_hour != 11)
18529 exit(1);
18530 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
18531 exit(1);
18532 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
18533 exit(1);
18534
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018535 exit(0);
18536}
18537
18538_ACEOF
18539rm -f conftest$ac_exeext
18540if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18541 (eval $ac_link) 2>&5
18542 ac_status=$?
18543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18544 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18546 (eval $ac_try) 2>&5
18547 ac_status=$?
18548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18549 (exit $ac_status); }; }; then
18550 ac_cv_working_tzset=yes
18551else
18552 echo "$as_me: program exited with status $ac_status" >&5
18553echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018554sed 's/^/| /' conftest.$ac_ext >&5
18555
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018556( exit $ac_status )
18557ac_cv_working_tzset=no
18558fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018559rm -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 +000018560fi
18561fi
18562
18563echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
18564echo "${ECHO_T}$ac_cv_working_tzset" >&6
18565if test "$ac_cv_working_tzset" = yes
18566then
18567
18568cat >>confdefs.h <<\_ACEOF
18569#define HAVE_WORKING_TZSET 1
18570_ACEOF
18571
18572fi
18573
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018574# Look for subsecond timestamps in struct stat
18575echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
18576echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
18577if test "${ac_cv_stat_tv_nsec+set}" = set; then
18578 echo $ECHO_N "(cached) $ECHO_C" >&6
18579else
18580 cat >conftest.$ac_ext <<_ACEOF
18581#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018582/* confdefs.h. */
18583_ACEOF
18584cat confdefs.h >>conftest.$ac_ext
18585cat >>conftest.$ac_ext <<_ACEOF
18586/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018587#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018588int
18589main ()
18590{
18591
18592struct stat st;
18593st.st_mtim.tv_nsec = 1;
18594
18595 ;
18596 return 0;
18597}
18598_ACEOF
18599rm -f conftest.$ac_objext
18600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18601 (eval $ac_compile) 2>&5
18602 ac_status=$?
18603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18604 (exit $ac_status); } &&
18605 { ac_try='test -s conftest.$ac_objext'
18606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18607 (eval $ac_try) 2>&5
18608 ac_status=$?
18609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18610 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000018611 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018612else
18613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018614sed 's/^/| /' conftest.$ac_ext >&5
18615
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018616ac_cv_stat_tv_nsec=no
18617fi
18618rm -f conftest.$ac_objext conftest.$ac_ext
18619fi
18620
18621echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
18622echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
18623if test "$ac_cv_stat_tv_nsec" = yes
18624then
18625
18626cat >>confdefs.h <<\_ACEOF
18627#define HAVE_STAT_TV_NSEC 1
18628_ACEOF
18629
18630fi
18631
Jack Jansen666b1e72001-10-31 12:11:48 +000018632# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000018633echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
18634echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
18635if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
18636 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018637else
Martin v. Löwis11437992002-04-12 09:54:03 +000018638 cat >conftest.$ac_ext <<_ACEOF
18639#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018640/* confdefs.h. */
18641_ACEOF
18642cat confdefs.h >>conftest.$ac_ext
18643cat >>conftest.$ac_ext <<_ACEOF
18644/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018645#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018646int
18647main ()
18648{
Jack Jansen666b1e72001-10-31 12:11:48 +000018649
18650 int rtn;
18651 rtn = mvwdelch(0,0,0);
18652
Martin v. Löwis11437992002-04-12 09:54:03 +000018653 ;
18654 return 0;
18655}
18656_ACEOF
18657rm -f conftest.$ac_objext
18658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18659 (eval $ac_compile) 2>&5
18660 ac_status=$?
18661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18662 (exit $ac_status); } &&
18663 { ac_try='test -s conftest.$ac_objext'
18664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18665 (eval $ac_try) 2>&5
18666 ac_status=$?
18667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18668 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018669 ac_cv_mvwdelch_is_expression=yes
18670else
Martin v. Löwis11437992002-04-12 09:54:03 +000018671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018672sed 's/^/| /' conftest.$ac_ext >&5
18673
Martin v. Löwis11437992002-04-12 09:54:03 +000018674ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018676rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018677fi
18678
Martin v. Löwis11437992002-04-12 09:54:03 +000018679echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
18680echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018681
18682if test "$ac_cv_mvwdelch_is_expression" = yes
18683then
Martin v. Löwis11437992002-04-12 09:54:03 +000018684
18685cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018686#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018687_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018688
18689fi
18690
Martin v. Löwis11437992002-04-12 09:54:03 +000018691echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
18692echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
18693if test "${ac_cv_window_has_flags+set}" = set; then
18694 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018695else
Martin v. Löwis11437992002-04-12 09:54:03 +000018696 cat >conftest.$ac_ext <<_ACEOF
18697#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018698/* confdefs.h. */
18699_ACEOF
18700cat confdefs.h >>conftest.$ac_ext
18701cat >>conftest.$ac_ext <<_ACEOF
18702/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018703#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018704int
18705main ()
18706{
Jack Jansen666b1e72001-10-31 12:11:48 +000018707
18708 WINDOW *w;
18709 w->_flags = 0;
18710
Martin v. Löwis11437992002-04-12 09:54:03 +000018711 ;
18712 return 0;
18713}
18714_ACEOF
18715rm -f conftest.$ac_objext
18716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18717 (eval $ac_compile) 2>&5
18718 ac_status=$?
18719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18720 (exit $ac_status); } &&
18721 { ac_try='test -s conftest.$ac_objext'
18722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18723 (eval $ac_try) 2>&5
18724 ac_status=$?
18725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18726 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018727 ac_cv_window_has_flags=yes
18728else
Martin v. Löwis11437992002-04-12 09:54:03 +000018729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018730sed 's/^/| /' conftest.$ac_ext >&5
18731
Martin v. Löwis11437992002-04-12 09:54:03 +000018732ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018733fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018734rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018735fi
18736
Martin v. Löwis11437992002-04-12 09:54:03 +000018737echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
18738echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018739
Jack Jansen666b1e72001-10-31 12:11:48 +000018740
18741if test "$ac_cv_window_has_flags" = yes
18742then
Martin v. Löwis11437992002-04-12 09:54:03 +000018743
18744cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018745#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018746_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018747
18748fi
18749
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018750echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
18751echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
18752
18753if test -e /dev/ptmx
18754then
18755 echo "$as_me:$LINENO: result: yes" >&5
18756echo "${ECHO_T}yes" >&6
18757
18758cat >>confdefs.h <<\_ACEOF
18759#define HAVE_DEV_PTMX 1
18760_ACEOF
18761
18762else
18763 echo "$as_me:$LINENO: result: no" >&5
18764echo "${ECHO_T}no" >&6
18765fi
18766
Neal Norwitz865400f2003-03-21 01:42:58 +000018767echo "$as_me:$LINENO: checking for /dev/ptc" >&5
18768echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
18769
18770if test -e /dev/ptc
18771then
18772 echo "$as_me:$LINENO: result: yes" >&5
18773echo "${ECHO_T}yes" >&6
18774
18775cat >>confdefs.h <<\_ACEOF
18776#define HAVE_DEV_PTC 1
18777_ACEOF
18778
18779else
18780 echo "$as_me:$LINENO: result: no" >&5
18781echo "${ECHO_T}no" >&6
18782fi
18783
Martin v. Löwis11437992002-04-12 09:54:03 +000018784echo "$as_me:$LINENO: checking for socklen_t" >&5
18785echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
18786if test "${ac_cv_type_socklen_t+set}" = set; then
18787 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000018788else
Martin v. Löwis11437992002-04-12 09:54:03 +000018789 cat >conftest.$ac_ext <<_ACEOF
18790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018791/* confdefs.h. */
18792_ACEOF
18793cat confdefs.h >>conftest.$ac_ext
18794cat >>conftest.$ac_ext <<_ACEOF
18795/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000018796
18797#ifdef HAVE_SYS_TYPES_H
18798#include <sys/types.h>
18799#endif
18800#ifdef HAVE_SYS_SOCKET_H
18801#include <sys/socket.h>
18802#endif
18803
18804
Martin v. Löwis11437992002-04-12 09:54:03 +000018805int
18806main ()
18807{
18808if ((socklen_t *) 0)
18809 return 0;
18810if (sizeof (socklen_t))
18811 return 0;
18812 ;
18813 return 0;
18814}
18815_ACEOF
18816rm -f conftest.$ac_objext
18817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18818 (eval $ac_compile) 2>&5
18819 ac_status=$?
18820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18821 (exit $ac_status); } &&
18822 { ac_try='test -s conftest.$ac_objext'
18823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18824 (eval $ac_try) 2>&5
18825 ac_status=$?
18826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18827 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018828 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018829else
Martin v. Löwis11437992002-04-12 09:54:03 +000018830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018831sed 's/^/| /' conftest.$ac_ext >&5
18832
Martin v. Löwis11437992002-04-12 09:54:03 +000018833ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018835rm -f conftest.$ac_objext conftest.$ac_ext
18836fi
18837echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18838echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18839if test $ac_cv_type_socklen_t = yes; then
18840 :
18841else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018842
Martin v. Löwis01c04012002-11-11 14:58:44 +000018843cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018844#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018845_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018846
18847fi
18848
Michael W. Hudson54241132001-12-07 15:38:26 +000018849
Michael W. Hudson54241132001-12-07 15:38:26 +000018850
18851
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018852for h in `(cd $srcdir;echo Python/thread_*.h)`
18853do
18854 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18855done
18856
Michael W. Hudson54241132001-12-07 15:38:26 +000018857
Jack Jansen0b06be72002-06-21 14:48:38 +000018858SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018859echo "$as_me:$LINENO: checking for build directories" >&5
18860echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018861for dir in $SRCDIRS; do
18862 if test ! -d $dir; then
18863 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018864 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018865done
Martin v. Löwis11437992002-04-12 09:54:03 +000018866echo "$as_me:$LINENO: result: done" >&5
18867echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018868
Guido van Rossum627b2d71993-12-24 10:39:16 +000018869# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018870 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018871
Martin v. Löwis11437992002-04-12 09:54:03 +000018872cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018873# This file is a shell script that caches the results of configure
18874# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018875# scripts and configure runs, see configure's option --config-cache.
18876# It is not useful on other systems. If it contains results you don't
18877# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018878#
Martin v. Löwis11437992002-04-12 09:54:03 +000018879# config.status only pays attention to the cache file if you give it
18880# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018881#
Skip Montanaro6dead952003-09-25 14:50:04 +000018882# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018883# loading this file, other *unset* `ac_cv_foo' will be assigned the
18884# following values.
18885
18886_ACEOF
18887
Guido van Rossumf78abae1997-01-21 22:02:36 +000018888# The following way of writing the cache mishandles newlines in values,
18889# but we know of no workaround that is simple, portable, and efficient.
18890# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018891# Ultrix sh set writes to stderr and can't be redirected directly,
18892# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018893{
18894 (set) 2>&1 |
18895 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18896 *ac_space=\ *)
18897 # `set' does not quote correctly, so add quotes (double-quote
18898 # substitution turns \\\\ into \\, and sed turns \\ into \).
18899 sed -n \
18900 "s/'/'\\\\''/g;
18901 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18902 ;;
18903 *)
18904 # `set' quotes correctly as required by POSIX, so do not add quotes.
18905 sed -n \
18906 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18907 ;;
18908 esac;
18909} |
18910 sed '
18911 t clear
18912 : clear
18913 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18914 t end
18915 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18916 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018917if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018918 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018919 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18920 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018921 else
18922 echo "not updating unwritable cache $cache_file"
18923 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018924fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018925rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018926
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018927test "x$prefix" = xNONE && prefix=$ac_default_prefix
18928# Let make expand exec_prefix.
18929test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018930
Martin v. Löwis11437992002-04-12 09:54:03 +000018931# VPATH may cause trouble with some makes, so we remove $(srcdir),
18932# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18933# trailing colons and then remove the whole line if VPATH becomes empty
18934# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018935if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018936 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18937s/:*\$(srcdir):*/:/;
18938s/:*\${srcdir}:*/:/;
18939s/:*@srcdir@:*/:/;
18940s/^\([^=]*=[ ]*\):*/\1/;
18941s/:*$//;
18942s/^[^=]*=[ ]*$//;
18943}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018944fi
18945
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018946DEFS=-DHAVE_CONFIG_H
18947
Skip Montanaro6dead952003-09-25 14:50:04 +000018948ac_libobjs=
18949ac_ltlibobjs=
18950for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18951 # 1. Remove the extension, and $U if already installed.
18952 ac_i=`echo "$ac_i" |
18953 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18954 # 2. Add them.
18955 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18956 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18957done
18958LIBOBJS=$ac_libobjs
18959
18960LTLIBOBJS=$ac_ltlibobjs
18961
18962
Martin v. Löwis11437992002-04-12 09:54:03 +000018963
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018964: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018965ac_clean_files_save=$ac_clean_files
18966ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18967{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18968echo "$as_me: creating $CONFIG_STATUS" >&6;}
18969cat >$CONFIG_STATUS <<_ACEOF
18970#! $SHELL
18971# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018972# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018973# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018974# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018975
Martin v. Löwis11437992002-04-12 09:54:03 +000018976debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018977ac_cs_recheck=false
18978ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018979SHELL=\${CONFIG_SHELL-$SHELL}
18980_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018981
Martin v. Löwis11437992002-04-12 09:54:03 +000018982cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018983## --------------------- ##
18984## M4sh Initialization. ##
18985## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018986
Martin v. Löwis11437992002-04-12 09:54:03 +000018987# Be Bourne compatible
18988if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18989 emulate sh
18990 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018991 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18992 # is contrary to our usage. Disable this feature.
18993 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018994elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18995 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018996fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018997
Martin v. Löwis11437992002-04-12 09:54:03 +000018998# Support unset when possible.
18999if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19000 as_unset=unset
19001else
19002 as_unset=false
19003fi
Michael W. Hudson54241132001-12-07 15:38:26 +000019004
Skip Montanaro6dead952003-09-25 14:50:04 +000019005
19006# Work around bugs in pre-3.0 UWIN ksh.
19007$as_unset ENV MAIL MAILPATH
19008PS1='$ '
19009PS2='> '
19010PS4='+ '
19011
19012# NLS nuisances.
19013for as_var in \
19014 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
19015 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
19016 LC_TELEPHONE LC_TIME
19017do
19018 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
19019 eval $as_var=C; export $as_var
19020 else
19021 $as_unset $as_var
19022 fi
19023done
19024
19025# Required to use basename.
19026if expr a : '\(a\)' >/dev/null 2>&1; then
19027 as_expr=expr
19028else
19029 as_expr=false
19030fi
19031
19032if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
19033 as_basename=basename
19034else
19035 as_basename=false
19036fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019037
19038
19039# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000019040as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000019041$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19042 X"$0" : 'X\(//\)$' \| \
19043 X"$0" : 'X\(/\)$' \| \
19044 . : '\(.\)' 2>/dev/null ||
19045echo X/"$0" |
19046 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
19047 /^X\/\(\/\/\)$/{ s//\1/; q; }
19048 /^X\/\(\/\).*/{ s//\1/; q; }
19049 s/.*/./; q'`
19050
Skip Montanaro6dead952003-09-25 14:50:04 +000019051
Martin v. Löwis11437992002-04-12 09:54:03 +000019052# PATH needs CR, and LINENO needs CR and PATH.
19053# Avoid depending upon Character Ranges.
19054as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19055as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19056as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19057as_cr_digits='0123456789'
19058as_cr_alnum=$as_cr_Letters$as_cr_digits
19059
19060# The user is always right.
19061if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019062 echo "#! /bin/sh" >conf$$.sh
19063 echo "exit 0" >>conf$$.sh
19064 chmod +x conf$$.sh
19065 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019066 PATH_SEPARATOR=';'
19067 else
19068 PATH_SEPARATOR=:
19069 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019070 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000019071fi
19072
19073
19074 as_lineno_1=$LINENO
19075 as_lineno_2=$LINENO
19076 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19077 test "x$as_lineno_1" != "x$as_lineno_2" &&
19078 test "x$as_lineno_3" = "x$as_lineno_2" || {
19079 # Find who we are. Look in the path if we contain no path at all
19080 # relative or not.
19081 case $0 in
19082 *[\\/]* ) as_myself=$0 ;;
19083 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19084for as_dir in $PATH
19085do
19086 IFS=$as_save_IFS
19087 test -z "$as_dir" && as_dir=.
19088 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19089done
19090
19091 ;;
19092 esac
19093 # We did not find ourselves, most probably we were run as `sh COMMAND'
19094 # in which case we are not to be found in the path.
19095 if test "x$as_myself" = x; then
19096 as_myself=$0
19097 fi
19098 if test ! -f "$as_myself"; then
19099 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
19100echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
19101 { (exit 1); exit 1; }; }
19102 fi
19103 case $CONFIG_SHELL in
19104 '')
19105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19106for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
19107do
19108 IFS=$as_save_IFS
19109 test -z "$as_dir" && as_dir=.
19110 for as_base in sh bash ksh sh5; do
19111 case $as_dir in
19112 /*)
19113 if ("$as_dir/$as_base" -c '
19114 as_lineno_1=$LINENO
19115 as_lineno_2=$LINENO
19116 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19117 test "x$as_lineno_1" != "x$as_lineno_2" &&
19118 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019119 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
19120 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019121 CONFIG_SHELL=$as_dir/$as_base
19122 export CONFIG_SHELL
19123 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
19124 fi;;
19125 esac
19126 done
19127done
19128;;
Jack Jansendd19cf82001-12-06 22:36:17 +000019129 esac
19130
Martin v. Löwis11437992002-04-12 09:54:03 +000019131 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19132 # uniformly replaced by the line number. The first 'sed' inserts a
19133 # line-number line before each line; the second 'sed' does the real
19134 # work. The second script uses 'N' to pair each line-number line
19135 # with the numbered line, and appends trailing '-' during
19136 # substitution so that $LINENO is not a special case at line end.
19137 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19138 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
19139 sed '=' <$as_myself |
19140 sed '
19141 N
19142 s,$,-,
19143 : loop
19144 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
19145 t loop
19146 s,-$,,
19147 s,^['$as_cr_digits']*\n,,
19148 ' >$as_me.lineno &&
19149 chmod +x $as_me.lineno ||
19150 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19151echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19152 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019153
Martin v. Löwis11437992002-04-12 09:54:03 +000019154 # Don't try to exec as it changes $[0], causing all sort of problems
19155 # (the dirname of $[0] is not the place where we might find the
19156 # original and so on. Autoconf is especially sensible to this).
19157 . ./$as_me.lineno
19158 # Exit status is that of the last command.
19159 exit
19160}
19161
19162
19163case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19164 *c*,-n*) ECHO_N= ECHO_C='
19165' ECHO_T=' ' ;;
19166 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19167 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
19168esac
19169
19170if expr a : '\(a\)' >/dev/null 2>&1; then
19171 as_expr=expr
19172else
19173 as_expr=false
19174fi
19175
19176rm -f conf$$ conf$$.exe conf$$.file
19177echo >conf$$.file
19178if ln -s conf$$.file conf$$ 2>/dev/null; then
19179 # We could just check for DJGPP; but this test a) works b) is more generic
19180 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19181 if test -f conf$$.exe; then
19182 # Don't use ln at all; we don't have any links
19183 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019184 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019185 as_ln_s='ln -s'
19186 fi
19187elif ln conf$$.file conf$$ 2>/dev/null; then
19188 as_ln_s=ln
19189else
19190 as_ln_s='cp -p'
19191fi
19192rm -f conf$$ conf$$.exe conf$$.file
19193
Skip Montanaro6dead952003-09-25 14:50:04 +000019194if mkdir -p . 2>/dev/null; then
19195 as_mkdir_p=:
19196else
19197 as_mkdir_p=false
19198fi
19199
Martin v. Löwis11437992002-04-12 09:54:03 +000019200as_executable_p="test -f"
19201
19202# Sed expression to map a string onto a valid CPP name.
19203as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
19204
19205# Sed expression to map a string onto a valid variable name.
19206as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19207
19208
19209# IFS
19210# We need space, tab and new line, in precisely that order.
19211as_nl='
19212'
19213IFS=" $as_nl"
19214
19215# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000019216$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000019217
19218exec 6>&1
19219
19220# Open the log real soon, to keep \$[0] and so on meaningful, and to
19221# report actual input values of CONFIG_FILES etc. instead of their
19222# values after options handling. Logging --version etc. is OK.
19223exec 5>>config.log
19224{
19225 echo
19226 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19227## Running $as_me. ##
19228_ASBOX
19229} >&5
19230cat >&5 <<_CSEOF
19231
Fred Drake9bd44622003-07-30 17:39:48 +000019232This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000019233generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000019234
19235 CONFIG_FILES = $CONFIG_FILES
19236 CONFIG_HEADERS = $CONFIG_HEADERS
19237 CONFIG_LINKS = $CONFIG_LINKS
19238 CONFIG_COMMANDS = $CONFIG_COMMANDS
19239 $ $0 $@
19240
19241_CSEOF
19242echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19243echo >&5
19244_ACEOF
19245
19246# Files that config.status was made for.
19247if test -n "$ac_config_files"; then
19248 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19249fi
19250
19251if test -n "$ac_config_headers"; then
19252 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19253fi
19254
19255if test -n "$ac_config_links"; then
19256 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19257fi
19258
19259if test -n "$ac_config_commands"; then
19260 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19261fi
19262
19263cat >>$CONFIG_STATUS <<\_ACEOF
19264
19265ac_cs_usage="\
19266\`$as_me' instantiates files from templates according to the
19267current configuration.
19268
19269Usage: $0 [OPTIONS] [FILE]...
19270
19271 -h, --help print this help, then exit
19272 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000019273 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000019274 -d, --debug don't remove temporary files
19275 --recheck update $as_me by reconfiguring in the same conditions
19276 --file=FILE[:TEMPLATE]
19277 instantiate the configuration file FILE
19278 --header=FILE[:TEMPLATE]
19279 instantiate the configuration header FILE
19280
19281Configuration files:
19282$config_files
19283
19284Configuration headers:
19285$config_headers
19286
19287Report bugs to <bug-autoconf@gnu.org>."
19288_ACEOF
19289
19290cat >>$CONFIG_STATUS <<_ACEOF
19291ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000019292python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000019293configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000019294 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19295
19296Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19297Free Software Foundation, Inc.
19298This config.status script is free software; the Free Software Foundation
19299gives unlimited permission to copy, distribute and modify it."
19300srcdir=$srcdir
19301INSTALL="$INSTALL"
19302_ACEOF
19303
19304cat >>$CONFIG_STATUS <<\_ACEOF
19305# If no file are specified by the user, then we need to provide default
19306# value. By we need to know if files were specified by the user.
19307ac_need_defaults=:
19308while test $# != 0
19309do
19310 case $1 in
19311 --*=*)
19312 ac_option=`expr "x$1" : 'x\([^=]*\)='`
19313 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019314 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000019315 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019316 -*)
19317 ac_option=$1
19318 ac_optarg=$2
19319 ac_shift=shift
19320 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019321 *) # This is not an option, so the user has probably given explicit
19322 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000019323 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000019324 ac_need_defaults=false;;
19325 esac
19326
Skip Montanaro6dead952003-09-25 14:50:04 +000019327 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000019328 # Handling of the options.
19329_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019330cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019331 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19332 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019333 --version | --vers* | -V )
19334 echo "$ac_cs_version"; exit 0 ;;
19335 --he | --h)
19336 # Conflict between --help and --header
19337 { { echo "$as_me:$LINENO: error: ambiguous option: $1
19338Try \`$0 --help' for more information." >&5
19339echo "$as_me: error: ambiguous option: $1
19340Try \`$0 --help' for more information." >&2;}
19341 { (exit 1); exit 1; }; };;
19342 --help | --hel | -h )
19343 echo "$ac_cs_usage"; exit 0 ;;
19344 --debug | --d* | -d )
19345 debug=: ;;
19346 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000019347 $ac_shift
19348 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000019349 ac_need_defaults=false;;
19350 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000019351 $ac_shift
19352 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000019353 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019354 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19355 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19356 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019357
19358 # This is an error.
19359 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19360Try \`$0 --help' for more information." >&5
19361echo "$as_me: error: unrecognized option: $1
19362Try \`$0 --help' for more information." >&2;}
19363 { (exit 1); exit 1; }; } ;;
19364
19365 *) ac_config_targets="$ac_config_targets $1" ;;
19366
19367 esac
19368 shift
19369done
19370
Skip Montanaro6dead952003-09-25 14:50:04 +000019371ac_configure_extra_args=
19372
19373if $ac_cs_silent; then
19374 exec 6>/dev/null
19375 ac_configure_extra_args="$ac_configure_extra_args --silent"
19376fi
19377
19378_ACEOF
19379cat >>$CONFIG_STATUS <<_ACEOF
19380if \$ac_cs_recheck; then
19381 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19382 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19383fi
19384
Martin v. Löwis11437992002-04-12 09:54:03 +000019385_ACEOF
19386
19387
19388
19389
19390
19391cat >>$CONFIG_STATUS <<\_ACEOF
19392for ac_config_target in $ac_config_targets
19393do
19394 case "$ac_config_target" in
19395 # Handling of arguments.
19396 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
19397 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
19398 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
19399 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19400echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19401 { (exit 1); exit 1; }; };;
19402 esac
19403done
19404
19405# If the user did not use the arguments to specify the items to instantiate,
19406# then the envvar interface is used. Set only those that are not.
19407# We use the long form for the default assignment because of an extremely
19408# bizarre bug on SunOS 4.1.3.
19409if $ac_need_defaults; then
19410 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19411 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19412fi
19413
Skip Montanaro6dead952003-09-25 14:50:04 +000019414# Have a temporary directory for convenience. Make it in the build tree
19415# simply because there is no reason to put it here, and in addition,
19416# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000019417# Create a temporary directory, and hook for its removal unless debugging.
19418$debug ||
19419{
19420 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19421 trap '{ (exit 1); exit 1; }' 1 2 13 15
19422}
19423
19424# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000019425
Martin v. Löwis11437992002-04-12 09:54:03 +000019426{
Skip Montanaro6dead952003-09-25 14:50:04 +000019427 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000019428 test -n "$tmp" && test -d "$tmp"
19429} ||
19430{
Skip Montanaro6dead952003-09-25 14:50:04 +000019431 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000019432 (umask 077 && mkdir $tmp)
19433} ||
19434{
Skip Montanaro6dead952003-09-25 14:50:04 +000019435 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000019436 { (exit 1); exit 1; }
19437}
19438
19439_ACEOF
19440
19441cat >>$CONFIG_STATUS <<_ACEOF
19442
19443#
19444# CONFIG_FILES section.
19445#
19446
19447# No need to generate the scripts if there are no CONFIG_FILES.
19448# This happens for instance when ./config.status config.h
19449if test -n "\$CONFIG_FILES"; then
19450 # Protect against being on the right side of a sed subst in config.status.
19451 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19452 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19453s,@SHELL@,$SHELL,;t t
19454s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19455s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19456s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19457s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19458s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19459s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19460s,@exec_prefix@,$exec_prefix,;t t
19461s,@prefix@,$prefix,;t t
19462s,@program_transform_name@,$program_transform_name,;t t
19463s,@bindir@,$bindir,;t t
19464s,@sbindir@,$sbindir,;t t
19465s,@libexecdir@,$libexecdir,;t t
19466s,@datadir@,$datadir,;t t
19467s,@sysconfdir@,$sysconfdir,;t t
19468s,@sharedstatedir@,$sharedstatedir,;t t
19469s,@localstatedir@,$localstatedir,;t t
19470s,@libdir@,$libdir,;t t
19471s,@includedir@,$includedir,;t t
19472s,@oldincludedir@,$oldincludedir,;t t
19473s,@infodir@,$infodir,;t t
19474s,@mandir@,$mandir,;t t
19475s,@build_alias@,$build_alias,;t t
19476s,@host_alias@,$host_alias,;t t
19477s,@target_alias@,$target_alias,;t t
19478s,@DEFS@,$DEFS,;t t
19479s,@ECHO_C@,$ECHO_C,;t t
19480s,@ECHO_N@,$ECHO_N,;t t
19481s,@ECHO_T@,$ECHO_T,;t t
19482s,@LIBS@,$LIBS,;t t
19483s,@VERSION@,$VERSION,;t t
19484s,@SOVERSION@,$SOVERSION,;t t
19485s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
19486s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
19487s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
19488s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
19489s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
19490s,@MACHDEP@,$MACHDEP,;t t
19491s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000019492s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000019493s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019494s,@CXX@,$CXX,;t t
19495s,@MAINOBJ@,$MAINOBJ,;t t
19496s,@EXEEXT@,$EXEEXT,;t t
19497s,@CC@,$CC,;t t
19498s,@CFLAGS@,$CFLAGS,;t t
19499s,@LDFLAGS@,$LDFLAGS,;t t
19500s,@CPPFLAGS@,$CPPFLAGS,;t t
19501s,@ac_ct_CC@,$ac_ct_CC,;t t
19502s,@OBJEXT@,$OBJEXT,;t t
19503s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019504s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019505s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
19506s,@LIBRARY@,$LIBRARY,;t t
19507s,@LDLIBRARY@,$LDLIBRARY,;t t
19508s,@DLLLIBRARY@,$DLLLIBRARY,;t t
19509s,@BLDLIBRARY@,$BLDLIBRARY,;t t
19510s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
19511s,@INSTSONAME@,$INSTSONAME,;t t
19512s,@RUNSHARED@,$RUNSHARED,;t t
19513s,@LINKCC@,$LINKCC,;t t
19514s,@RANLIB@,$RANLIB,;t t
19515s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19516s,@AR@,$AR,;t t
19517s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19518s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19519s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19520s,@LN@,$LN,;t t
19521s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000019522s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019523s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
19524s,@SO@,$SO,;t t
19525s,@LDSHARED@,$LDSHARED,;t t
19526s,@BLDSHARED@,$BLDSHARED,;t t
19527s,@CCSHARED@,$CCSHARED,;t t
19528s,@LINKFORSHARED@,$LINKFORSHARED,;t t
19529s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000019530s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019531s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
19532s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
19533s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
19534s,@LDLAST@,$LDLAST,;t t
19535s,@THREADOBJ@,$THREADOBJ,;t t
19536s,@DLINCLDIR@,$DLINCLDIR,;t t
19537s,@DYNLOADFILE@,$DYNLOADFILE,;t t
19538s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019539s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019540s,@LIBOBJS@,$LIBOBJS,;t t
19541s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
19542s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
19543s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
19544s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
19545s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
19546s,@LIBM@,$LIBM,;t t
19547s,@LIBC@,$LIBC,;t t
19548s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
19549s,@THREADHEADERS@,$THREADHEADERS,;t t
19550s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019551s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019552CEOF
19553
19554_ACEOF
19555
19556 cat >>$CONFIG_STATUS <<\_ACEOF
19557 # Split the substitutions into bite-sized pieces for seds with
19558 # small command number limits, like on Digital OSF/1 and HP-UX.
19559 ac_max_sed_lines=48
19560 ac_sed_frag=1 # Number of current file.
19561 ac_beg=1 # First line for current file.
19562 ac_end=$ac_max_sed_lines # Line after last line for current file.
19563 ac_more_lines=:
19564 ac_sed_cmds=
19565 while $ac_more_lines; do
19566 if test $ac_beg -gt 1; then
19567 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19568 else
19569 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19570 fi
19571 if test ! -s $tmp/subs.frag; then
19572 ac_more_lines=false
19573 else
19574 # The purpose of the label and of the branching condition is to
19575 # speed up the sed processing (if there are no `@' at all, there
19576 # is no need to browse any of the substitutions).
19577 # These are the two extra sed commands mentioned above.
19578 (echo ':t
19579 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19580 if test -z "$ac_sed_cmds"; then
19581 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19582 else
19583 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19584 fi
19585 ac_sed_frag=`expr $ac_sed_frag + 1`
19586 ac_beg=$ac_end
19587 ac_end=`expr $ac_end + $ac_max_sed_lines`
19588 fi
19589 done
19590 if test -z "$ac_sed_cmds"; then
19591 ac_sed_cmds=cat
19592 fi
19593fi # test -n "$CONFIG_FILES"
19594
19595_ACEOF
19596cat >>$CONFIG_STATUS <<\_ACEOF
19597for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19598 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19599 case $ac_file in
19600 - | *:- | *:-:* ) # input from stdin
19601 cat >$tmp/stdin
19602 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19603 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19604 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19605 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19606 * ) ac_file_in=$ac_file.in ;;
19607 esac
19608
19609 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19610 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19611$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19612 X"$ac_file" : 'X\(//\)[^/]' \| \
19613 X"$ac_file" : 'X\(//\)$' \| \
19614 X"$ac_file" : 'X\(/\)' \| \
19615 . : '\(.\)' 2>/dev/null ||
19616echo X"$ac_file" |
19617 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19618 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19619 /^X\(\/\/\)$/{ s//\1/; q; }
19620 /^X\(\/\).*/{ s//\1/; q; }
19621 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019622 { if $as_mkdir_p; then
19623 mkdir -p "$ac_dir"
19624 else
19625 as_dir="$ac_dir"
19626 as_dirs=
19627 while test ! -d "$as_dir"; do
19628 as_dirs="$as_dir $as_dirs"
19629 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19630$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19631 X"$as_dir" : 'X\(//\)[^/]' \| \
19632 X"$as_dir" : 'X\(//\)$' \| \
19633 X"$as_dir" : 'X\(/\)' \| \
19634 . : '\(.\)' 2>/dev/null ||
19635echo X"$as_dir" |
19636 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19637 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19638 /^X\(\/\/\)$/{ s//\1/; q; }
19639 /^X\(\/\).*/{ s//\1/; q; }
19640 s/.*/./; q'`
19641 done
19642 test ! -n "$as_dirs" || mkdir $as_dirs
19643 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19644echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19645 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019646
19647 ac_builddir=.
19648
19649if test "$ac_dir" != .; then
19650 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19651 # A "../" for each directory in $ac_dir_suffix.
19652 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19653else
19654 ac_dir_suffix= ac_top_builddir=
19655fi
19656
19657case $srcdir in
19658 .) # No --srcdir option. We are building in place.
19659 ac_srcdir=.
19660 if test -z "$ac_top_builddir"; then
19661 ac_top_srcdir=.
19662 else
19663 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19664 fi ;;
19665 [\\/]* | ?:[\\/]* ) # Absolute path.
19666 ac_srcdir=$srcdir$ac_dir_suffix;
19667 ac_top_srcdir=$srcdir ;;
19668 *) # Relative path.
19669 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19670 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19671esac
19672# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19673# absolute.
19674ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000019675ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000019676ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19677ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19678
19679
19680 case $INSTALL in
19681 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19682 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19683 esac
19684
19685 if test x"$ac_file" != x-; then
19686 { echo "$as_me:$LINENO: creating $ac_file" >&5
19687echo "$as_me: creating $ac_file" >&6;}
19688 rm -f "$ac_file"
19689 fi
19690 # Let's still pretend it is `configure' which instantiates (i.e., don't
19691 # use $as_me), people would be surprised to read:
19692 # /* config.h. Generated by config.status. */
19693 if test x"$ac_file" = x-; then
19694 configure_input=
19695 else
19696 configure_input="$ac_file. "
19697 fi
19698 configure_input=$configure_input"Generated from `echo $ac_file_in |
19699 sed 's,.*/,,'` by configure."
19700
19701 # First look for the input files in the build tree, otherwise in the
19702 # src tree.
19703 ac_file_inputs=`IFS=:
19704 for f in $ac_file_in; do
19705 case $f in
19706 -) echo $tmp/stdin ;;
19707 [\\/$]*)
19708 # Absolute (can't be DOS-style, as IFS=:)
19709 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19710echo "$as_me: error: cannot find input file: $f" >&2;}
19711 { (exit 1); exit 1; }; }
19712 echo $f;;
19713 *) # Relative
19714 if test -f "$f"; then
19715 # Build tree
19716 echo $f
19717 elif test -f "$srcdir/$f"; then
19718 # Source tree
19719 echo $srcdir/$f
19720 else
19721 # /dev/null tree
19722 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19723echo "$as_me: error: cannot find input file: $f" >&2;}
19724 { (exit 1); exit 1; }; }
19725 fi;;
19726 esac
19727 done` || { (exit 1); exit 1; }
19728_ACEOF
19729cat >>$CONFIG_STATUS <<_ACEOF
19730 sed "$ac_vpsub
19731$extrasub
19732_ACEOF
19733cat >>$CONFIG_STATUS <<\_ACEOF
19734:t
19735/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19736s,@configure_input@,$configure_input,;t t
19737s,@srcdir@,$ac_srcdir,;t t
19738s,@abs_srcdir@,$ac_abs_srcdir,;t t
19739s,@top_srcdir@,$ac_top_srcdir,;t t
19740s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19741s,@builddir@,$ac_builddir,;t t
19742s,@abs_builddir@,$ac_abs_builddir,;t t
19743s,@top_builddir@,$ac_top_builddir,;t t
19744s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19745s,@INSTALL@,$ac_INSTALL,;t t
19746" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19747 rm -f $tmp/stdin
19748 if test x"$ac_file" != x-; then
19749 mv $tmp/out $ac_file
19750 else
19751 cat $tmp/out
19752 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019753 fi
19754
Martin v. Löwis11437992002-04-12 09:54:03 +000019755done
19756_ACEOF
19757cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019758
Martin v. Löwis11437992002-04-12 09:54:03 +000019759#
19760# CONFIG_HEADER section.
19761#
Guido van Rossum627b2d71993-12-24 10:39:16 +000019762
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019763# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19764# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000019765#
19766# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000019767ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19768ac_dB='[ ].*$,\1#\2'
19769ac_dC=' '
19770ac_dD=',;t'
19771# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19772ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19773ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019774ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000019775ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019776
Martin v. Löwis11437992002-04-12 09:54:03 +000019777for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000019778 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000019779 case $ac_file in
19780 - | *:- | *:-:* ) # input from stdin
19781 cat >$tmp/stdin
19782 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19783 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19784 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19785 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19786 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019787 esac
19788
Martin v. Löwis11437992002-04-12 09:54:03 +000019789 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19790echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019791
Martin v. Löwis11437992002-04-12 09:54:03 +000019792 # First look for the input files in the build tree, otherwise in the
19793 # src tree.
19794 ac_file_inputs=`IFS=:
19795 for f in $ac_file_in; do
19796 case $f in
19797 -) echo $tmp/stdin ;;
19798 [\\/$]*)
19799 # Absolute (can't be DOS-style, as IFS=:)
19800 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19801echo "$as_me: error: cannot find input file: $f" >&2;}
19802 { (exit 1); exit 1; }; }
19803 echo $f;;
19804 *) # Relative
19805 if test -f "$f"; then
19806 # Build tree
19807 echo $f
19808 elif test -f "$srcdir/$f"; then
19809 # Source tree
19810 echo $srcdir/$f
19811 else
19812 # /dev/null tree
19813 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19814echo "$as_me: error: cannot find input file: $f" >&2;}
19815 { (exit 1); exit 1; }; }
19816 fi;;
19817 esac
19818 done` || { (exit 1); exit 1; }
19819 # Remove the trailing spaces.
19820 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019821
Martin v. Löwis11437992002-04-12 09:54:03 +000019822_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019823
Martin v. Löwis11437992002-04-12 09:54:03 +000019824# Transform confdefs.h into two sed scripts, `conftest.defines' and
19825# `conftest.undefs', that substitutes the proper values into
19826# config.h.in to produce config.h. The first handles `#define'
19827# templates, and the second `#undef' templates.
19828# And first: Protect against being on the right side of a sed subst in
19829# config.status. Protect against being in an unquoted here document
19830# in config.status.
19831rm -f conftest.defines conftest.undefs
19832# Using a here document instead of a string reduces the quoting nightmare.
19833# Putting comments in sed scripts is not portable.
19834#
19835# `end' is used to avoid that the second main sed command (meant for
19836# 0-ary CPP macros) applies to n-ary macro definitions.
19837# See the Autoconf documentation for `clear'.
19838cat >confdef2sed.sed <<\_ACEOF
19839s/[\\&,]/\\&/g
19840s,[\\$`],\\&,g
19841t clear
19842: clear
19843s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19844t end
19845s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19846: end
19847_ACEOF
19848# If some macros were called several times there might be several times
19849# the same #defines, which is useless. Nevertheless, we may not want to
19850# sort them, since we want the *last* AC-DEFINE to be honored.
19851uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19852sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19853rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019854
19855# This sed command replaces #undef with comments. This is necessary, for
19856# example, in the case of _POSIX_SOURCE, which is predefined and required
19857# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019858cat >>conftest.undefs <<\_ACEOF
19859s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19860_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019861
Martin v. Löwis11437992002-04-12 09:54:03 +000019862# Break up conftest.defines because some shells have a limit on the size
19863# of here documents, and old seds have small limits too (100 cmds).
19864echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019865echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019866echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19867echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019868rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019869while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019870do
Martin v. Löwis11437992002-04-12 09:54:03 +000019871 # Write a limited-size here document to $tmp/defines.sed.
19872 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19873 # Speed up: don't consider the non `#define' lines.
19874 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19875 # Work around the forget-to-reset-the-flag bug.
19876 echo 't clr' >>$CONFIG_STATUS
19877 echo ': clr' >>$CONFIG_STATUS
19878 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019879 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019880 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19881 rm -f $tmp/in
19882 mv $tmp/out $tmp/in
19883' >>$CONFIG_STATUS
19884 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19885 rm -f conftest.defines
19886 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019887done
Martin v. Löwis11437992002-04-12 09:54:03 +000019888rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019889echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019890echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019891
Martin v. Löwis11437992002-04-12 09:54:03 +000019892# Break up conftest.undefs because some shells have a limit on the size
19893# of here documents, and old seds have small limits too (100 cmds).
19894echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19895rm -f conftest.tail
19896while grep . conftest.undefs >/dev/null
19897do
19898 # Write a limited-size here document to $tmp/undefs.sed.
19899 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19900 # Speed up: don't consider the non `#undef'
19901 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19902 # Work around the forget-to-reset-the-flag bug.
19903 echo 't clr' >>$CONFIG_STATUS
19904 echo ': clr' >>$CONFIG_STATUS
19905 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19906 echo 'CEOF
19907 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19908 rm -f $tmp/in
19909 mv $tmp/out $tmp/in
19910' >>$CONFIG_STATUS
19911 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19912 rm -f conftest.undefs
19913 mv conftest.tail conftest.undefs
19914done
19915rm -f conftest.undefs
19916
19917cat >>$CONFIG_STATUS <<\_ACEOF
19918 # Let's still pretend it is `configure' which instantiates (i.e., don't
19919 # use $as_me), people would be surprised to read:
19920 # /* config.h. Generated by config.status. */
19921 if test x"$ac_file" = x-; then
19922 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019923 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019924 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019925 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019926 cat $tmp/in >>$tmp/config.h
19927 rm -f $tmp/in
19928 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019929 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019930 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19931echo "$as_me: $ac_file is unchanged" >&6;}
19932 else
19933 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19934$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19935 X"$ac_file" : 'X\(//\)[^/]' \| \
19936 X"$ac_file" : 'X\(//\)$' \| \
19937 X"$ac_file" : 'X\(/\)' \| \
19938 . : '\(.\)' 2>/dev/null ||
19939echo X"$ac_file" |
19940 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19941 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19942 /^X\(\/\/\)$/{ s//\1/; q; }
19943 /^X\(\/\).*/{ s//\1/; q; }
19944 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019945 { if $as_mkdir_p; then
19946 mkdir -p "$ac_dir"
19947 else
19948 as_dir="$ac_dir"
19949 as_dirs=
19950 while test ! -d "$as_dir"; do
19951 as_dirs="$as_dir $as_dirs"
19952 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19953$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19954 X"$as_dir" : 'X\(//\)[^/]' \| \
19955 X"$as_dir" : 'X\(//\)$' \| \
19956 X"$as_dir" : 'X\(/\)' \| \
19957 . : '\(.\)' 2>/dev/null ||
19958echo X"$as_dir" |
19959 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19960 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19961 /^X\(\/\/\)$/{ s//\1/; q; }
19962 /^X\(\/\).*/{ s//\1/; q; }
19963 s/.*/./; q'`
19964 done
19965 test ! -n "$as_dirs" || mkdir $as_dirs
19966 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19967echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19968 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019969
Martin v. Löwis11437992002-04-12 09:54:03 +000019970 rm -f $ac_file
19971 mv $tmp/config.h $ac_file
19972 fi
19973 else
19974 cat $tmp/config.h
19975 rm -f $tmp/config.h
19976 fi
19977done
19978_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019979
Martin v. Löwis11437992002-04-12 09:54:03 +000019980cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019981
Martin v. Löwis11437992002-04-12 09:54:03 +000019982{ (exit 0); exit 0; }
19983_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019984chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019985ac_clean_files=$ac_clean_files_save
19986
19987
19988# configure is writing to config.log, and then calls config.status.
19989# config.status does its own redirection, appending to config.log.
19990# Unfortunately, on DOS this fails, as config.log is still kept open
19991# by configure, so config.status won't be able to write to it; its
19992# output is simply discarded. So we exec the FD to /dev/null,
19993# effectively closing config.log, so it can be properly (re)opened and
19994# appended to by config.status. When coming back to configure, we
19995# need to make the FD available again.
19996if test "$no_create" != yes; then
19997 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019998 ac_config_status_args=
19999 test "$silent" = yes &&
20000 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000020001 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000020002 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000020003 exec 5>>config.log
20004 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20005 # would make configure fail if this is the last instruction.
20006 $ac_cs_success || { (exit 1); exit 1; }
20007fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020008
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000020009
20010echo "creating Setup"
20011if test ! -f Modules/Setup
20012then
20013 cp $srcdir/Modules/Setup.dist Modules/Setup
20014fi
20015
20016echo "creating Setup.local"
20017if test ! -f Modules/Setup.local
20018then
20019 echo "# Edit this file for local setup changes" >Modules/Setup.local
20020fi
20021
20022echo "creating Makefile"
20023$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
20024 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000020025 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000020026mv config.c Modules