blob: a5549cc3c79521232885464c1ce3ff1ffd3223e2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis49ee14d2003-11-10 06:35:36 +00002# From configure.in Revision: 1.439 .
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öwis49ee14d2003-11-10 06:35:36 +000013099
Martin v. Löwisd5843682002-11-21 20:41:28 +000013100for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013101 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013102 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000013103 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013104 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013105 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013106 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013107 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013108 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013109 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013110 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013111 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013112do
Martin v. Löwis11437992002-04-12 09:54:03 +000013113as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13114echo "$as_me:$LINENO: checking for $ac_func" >&5
13115echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13116if eval "test \"\${$as_ac_var+set}\" = set"; then
13117 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013118else
Martin v. Löwis11437992002-04-12 09:54:03 +000013119 cat >conftest.$ac_ext <<_ACEOF
13120#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013121/* confdefs.h. */
13122_ACEOF
13123cat confdefs.h >>conftest.$ac_ext
13124cat >>conftest.$ac_ext <<_ACEOF
13125/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013126/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013127 which can conflict with char $ac_func (); below.
13128 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013129 <limits.h> exists even on freestanding compilers. Under hpux,
13130 including <limits.h> includes <sys/time.h> and causes problems
13131 checking for functions defined therein. */
13132#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013133# include <limits.h>
13134#else
13135# include <assert.h>
13136#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013137/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013138#ifdef __cplusplus
13139extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013140{
Martin v. Löwis11437992002-04-12 09:54:03 +000013141#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013142/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013143 builtin and then its argument prototype would still apply. */
13144char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013145/* The GNU C library defines this for functions which it implements
13146 to always fail with ENOSYS. Some functions are actually named
13147 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013148#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013149choke me
13150#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013151char (*f) () = $ac_func;
13152#endif
13153#ifdef __cplusplus
13154}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013155#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013156
Skip Montanaro6dead952003-09-25 14:50:04 +000013157int
13158main ()
13159{
13160return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 ;
13162 return 0;
13163}
13164_ACEOF
13165rm -f conftest.$ac_objext conftest$ac_exeext
13166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13167 (eval $ac_link) 2>&5
13168 ac_status=$?
13169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13170 (exit $ac_status); } &&
13171 { ac_try='test -s conftest$ac_exeext'
13172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13173 (eval $ac_try) 2>&5
13174 ac_status=$?
13175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13176 (exit $ac_status); }; }; then
13177 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013178else
Martin v. Löwis11437992002-04-12 09:54:03 +000013179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013180sed 's/^/| /' conftest.$ac_ext >&5
13181
Martin v. Löwis11437992002-04-12 09:54:03 +000013182eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013183fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013184rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013185fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013186echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13187echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13188if test `eval echo '${'$as_ac_var'}'` = yes; then
13189 cat >>confdefs.h <<_ACEOF
13190#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13191_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013192
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013193fi
13194done
13195
Michael W. Hudson54241132001-12-07 15:38:26 +000013196
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013197# For some functions, having a definition is not sufficient, since
13198# we want to take their address.
13199echo "$as_me:$LINENO: checking for chroot" >&5
13200echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13201cat >conftest.$ac_ext <<_ACEOF
13202#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013203/* confdefs.h. */
13204_ACEOF
13205cat confdefs.h >>conftest.$ac_ext
13206cat >>conftest.$ac_ext <<_ACEOF
13207/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013208#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013209int
13210main ()
13211{
13212void *x=chroot
13213 ;
13214 return 0;
13215}
13216_ACEOF
13217rm -f conftest.$ac_objext
13218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13219 (eval $ac_compile) 2>&5
13220 ac_status=$?
13221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13222 (exit $ac_status); } &&
13223 { ac_try='test -s conftest.$ac_objext'
13224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13225 (eval $ac_try) 2>&5
13226 ac_status=$?
13227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13228 (exit $ac_status); }; }; then
13229
13230cat >>confdefs.h <<\_ACEOF
13231#define HAVE_CHROOT 1
13232_ACEOF
13233
13234 echo "$as_me:$LINENO: result: yes" >&5
13235echo "${ECHO_T}yes" >&6
13236else
13237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013238sed 's/^/| /' conftest.$ac_ext >&5
13239
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013240echo "$as_me:$LINENO: result: no" >&5
13241echo "${ECHO_T}no" >&6
13242
13243fi
13244rm -f conftest.$ac_objext conftest.$ac_ext
13245echo "$as_me:$LINENO: checking for link" >&5
13246echo $ECHO_N "checking for link... $ECHO_C" >&6
13247cat >conftest.$ac_ext <<_ACEOF
13248#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013249/* confdefs.h. */
13250_ACEOF
13251cat confdefs.h >>conftest.$ac_ext
13252cat >>conftest.$ac_ext <<_ACEOF
13253/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013254#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013255int
13256main ()
13257{
13258void *x=link
13259 ;
13260 return 0;
13261}
13262_ACEOF
13263rm -f conftest.$ac_objext
13264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13265 (eval $ac_compile) 2>&5
13266 ac_status=$?
13267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13268 (exit $ac_status); } &&
13269 { ac_try='test -s conftest.$ac_objext'
13270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13271 (eval $ac_try) 2>&5
13272 ac_status=$?
13273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13274 (exit $ac_status); }; }; then
13275
13276cat >>confdefs.h <<\_ACEOF
13277#define HAVE_LINK 1
13278_ACEOF
13279
13280 echo "$as_me:$LINENO: result: yes" >&5
13281echo "${ECHO_T}yes" >&6
13282else
13283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013284sed 's/^/| /' conftest.$ac_ext >&5
13285
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013286echo "$as_me:$LINENO: result: no" >&5
13287echo "${ECHO_T}no" >&6
13288
13289fi
13290rm -f conftest.$ac_objext conftest.$ac_ext
13291echo "$as_me:$LINENO: checking for symlink" >&5
13292echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13293cat >conftest.$ac_ext <<_ACEOF
13294#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013295/* confdefs.h. */
13296_ACEOF
13297cat confdefs.h >>conftest.$ac_ext
13298cat >>conftest.$ac_ext <<_ACEOF
13299/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013300#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013301int
13302main ()
13303{
13304void *x=symlink
13305 ;
13306 return 0;
13307}
13308_ACEOF
13309rm -f conftest.$ac_objext
13310if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13311 (eval $ac_compile) 2>&5
13312 ac_status=$?
13313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13314 (exit $ac_status); } &&
13315 { ac_try='test -s conftest.$ac_objext'
13316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13317 (eval $ac_try) 2>&5
13318 ac_status=$?
13319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13320 (exit $ac_status); }; }; then
13321
13322cat >>confdefs.h <<\_ACEOF
13323#define HAVE_SYMLINK 1
13324_ACEOF
13325
13326 echo "$as_me:$LINENO: result: yes" >&5
13327echo "${ECHO_T}yes" >&6
13328else
13329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013330sed 's/^/| /' conftest.$ac_ext >&5
13331
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013332echo "$as_me:$LINENO: result: no" >&5
13333echo "${ECHO_T}no" >&6
13334
13335fi
13336rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013337echo "$as_me:$LINENO: checking for fchdir" >&5
13338echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13339cat >conftest.$ac_ext <<_ACEOF
13340#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013341/* confdefs.h. */
13342_ACEOF
13343cat confdefs.h >>conftest.$ac_ext
13344cat >>conftest.$ac_ext <<_ACEOF
13345/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013346#include <unistd.h>
13347int
13348main ()
13349{
13350void *x=fchdir
13351 ;
13352 return 0;
13353}
13354_ACEOF
13355rm -f conftest.$ac_objext
13356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13357 (eval $ac_compile) 2>&5
13358 ac_status=$?
13359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13360 (exit $ac_status); } &&
13361 { ac_try='test -s conftest.$ac_objext'
13362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13363 (eval $ac_try) 2>&5
13364 ac_status=$?
13365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13366 (exit $ac_status); }; }; then
13367
13368cat >>confdefs.h <<\_ACEOF
13369#define HAVE_FCHDIR 1
13370_ACEOF
13371
13372 echo "$as_me:$LINENO: result: yes" >&5
13373echo "${ECHO_T}yes" >&6
13374else
13375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013376sed 's/^/| /' conftest.$ac_ext >&5
13377
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013378echo "$as_me:$LINENO: result: no" >&5
13379echo "${ECHO_T}no" >&6
13380
13381fi
13382rm -f conftest.$ac_objext conftest.$ac_ext
13383echo "$as_me:$LINENO: checking for fsync" >&5
13384echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13385cat >conftest.$ac_ext <<_ACEOF
13386#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013387/* confdefs.h. */
13388_ACEOF
13389cat confdefs.h >>conftest.$ac_ext
13390cat >>conftest.$ac_ext <<_ACEOF
13391/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013392#include <unistd.h>
13393int
13394main ()
13395{
13396void *x=fsync
13397 ;
13398 return 0;
13399}
13400_ACEOF
13401rm -f conftest.$ac_objext
13402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13403 (eval $ac_compile) 2>&5
13404 ac_status=$?
13405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13406 (exit $ac_status); } &&
13407 { ac_try='test -s conftest.$ac_objext'
13408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13409 (eval $ac_try) 2>&5
13410 ac_status=$?
13411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13412 (exit $ac_status); }; }; then
13413
13414cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013415#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013416_ACEOF
13417
13418 echo "$as_me:$LINENO: result: yes" >&5
13419echo "${ECHO_T}yes" >&6
13420else
13421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013422sed 's/^/| /' conftest.$ac_ext >&5
13423
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013424echo "$as_me:$LINENO: result: no" >&5
13425echo "${ECHO_T}no" >&6
13426
13427fi
13428rm -f conftest.$ac_objext conftest.$ac_ext
13429echo "$as_me:$LINENO: checking for fdatasync" >&5
13430echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13431cat >conftest.$ac_ext <<_ACEOF
13432#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013433/* confdefs.h. */
13434_ACEOF
13435cat confdefs.h >>conftest.$ac_ext
13436cat >>conftest.$ac_ext <<_ACEOF
13437/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013438#include <unistd.h>
13439int
13440main ()
13441{
13442void *x=fdatasync
13443 ;
13444 return 0;
13445}
13446_ACEOF
13447rm -f conftest.$ac_objext
13448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13449 (eval $ac_compile) 2>&5
13450 ac_status=$?
13451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13452 (exit $ac_status); } &&
13453 { ac_try='test -s conftest.$ac_objext'
13454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13455 (eval $ac_try) 2>&5
13456 ac_status=$?
13457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13458 (exit $ac_status); }; }; then
13459
13460cat >>confdefs.h <<\_ACEOF
13461#define HAVE_FDATASYNC 1
13462_ACEOF
13463
13464 echo "$as_me:$LINENO: result: yes" >&5
13465echo "${ECHO_T}yes" >&6
13466else
13467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013468sed 's/^/| /' conftest.$ac_ext >&5
13469
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013470echo "$as_me:$LINENO: result: no" >&5
13471echo "${ECHO_T}no" >&6
13472
13473fi
13474rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013475
Martin v. Löwisd5843682002-11-21 20:41:28 +000013476# On some systems (eg. FreeBSD 5), we would find a definition of the
13477# functions ctermid_r, setgroups in the library, but no prototype
13478# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13479# address to avoid compiler warnings and potential miscompilations
13480# because of the missing prototypes.
13481
13482echo "$as_me:$LINENO: checking for ctermid_r" >&5
13483echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13484cat >conftest.$ac_ext <<_ACEOF
13485#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013486/* confdefs.h. */
13487_ACEOF
13488cat confdefs.h >>conftest.$ac_ext
13489cat >>conftest.$ac_ext <<_ACEOF
13490/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013491
13492#include "confdefs.h"
13493#include <stdio.h>
13494
Martin v. Löwisd5843682002-11-21 20:41:28 +000013495int
13496main ()
13497{
13498void* p = ctermid_r
13499 ;
13500 return 0;
13501}
13502_ACEOF
13503rm -f conftest.$ac_objext
13504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13505 (eval $ac_compile) 2>&5
13506 ac_status=$?
13507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13508 (exit $ac_status); } &&
13509 { ac_try='test -s conftest.$ac_objext'
13510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13511 (eval $ac_try) 2>&5
13512 ac_status=$?
13513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13514 (exit $ac_status); }; }; then
13515
13516cat >>confdefs.h <<\_ACEOF
13517#define HAVE_CTERMID_R 1
13518_ACEOF
13519
13520 echo "$as_me:$LINENO: result: yes" >&5
13521echo "${ECHO_T}yes" >&6
13522else
13523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013524sed 's/^/| /' conftest.$ac_ext >&5
13525
Martin v. Löwisd5843682002-11-21 20:41:28 +000013526echo "$as_me:$LINENO: result: no" >&5
13527echo "${ECHO_T}no" >&6
13528
13529fi
13530rm -f conftest.$ac_objext conftest.$ac_ext
13531
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013532echo "$as_me:$LINENO: checking for flock" >&5
13533echo $ECHO_N "checking for flock... $ECHO_C" >&6
13534cat >conftest.$ac_ext <<_ACEOF
13535#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013536/* confdefs.h. */
13537_ACEOF
13538cat confdefs.h >>conftest.$ac_ext
13539cat >>conftest.$ac_ext <<_ACEOF
13540/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013541
13542#include "confdefs.h"
13543#include <sys/file.h>
13544
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013545int
13546main ()
13547{
13548void* p = flock
13549 ;
13550 return 0;
13551}
13552_ACEOF
13553rm -f conftest.$ac_objext
13554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13555 (eval $ac_compile) 2>&5
13556 ac_status=$?
13557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13558 (exit $ac_status); } &&
13559 { ac_try='test -s conftest.$ac_objext'
13560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13561 (eval $ac_try) 2>&5
13562 ac_status=$?
13563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13564 (exit $ac_status); }; }; then
13565
13566cat >>confdefs.h <<\_ACEOF
13567#define HAVE_FLOCK 1
13568_ACEOF
13569
13570 echo "$as_me:$LINENO: result: yes" >&5
13571echo "${ECHO_T}yes" >&6
13572else
13573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013574sed 's/^/| /' conftest.$ac_ext >&5
13575
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013576echo "$as_me:$LINENO: result: no" >&5
13577echo "${ECHO_T}no" >&6
13578
13579fi
13580rm -f conftest.$ac_objext conftest.$ac_ext
13581
13582echo "$as_me:$LINENO: checking for getpagesize" >&5
13583echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
13584cat >conftest.$ac_ext <<_ACEOF
13585#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013586/* confdefs.h. */
13587_ACEOF
13588cat confdefs.h >>conftest.$ac_ext
13589cat >>conftest.$ac_ext <<_ACEOF
13590/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013591
13592#include "confdefs.h"
13593#include <unistd.h>
13594
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013595int
13596main ()
13597{
13598void* p = getpagesize
13599 ;
13600 return 0;
13601}
13602_ACEOF
13603rm -f conftest.$ac_objext
13604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13605 (eval $ac_compile) 2>&5
13606 ac_status=$?
13607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13608 (exit $ac_status); } &&
13609 { ac_try='test -s conftest.$ac_objext'
13610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13611 (eval $ac_try) 2>&5
13612 ac_status=$?
13613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13614 (exit $ac_status); }; }; then
13615
13616cat >>confdefs.h <<\_ACEOF
13617#define HAVE_GETPAGESIZE 1
13618_ACEOF
13619
13620 echo "$as_me:$LINENO: result: yes" >&5
13621echo "${ECHO_T}yes" >&6
13622else
13623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013624sed 's/^/| /' conftest.$ac_ext >&5
13625
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013626echo "$as_me:$LINENO: result: no" >&5
13627echo "${ECHO_T}no" >&6
13628
13629fi
13630rm -f conftest.$ac_objext conftest.$ac_ext
13631
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013632for ac_prog in true
13633do
13634 # Extract the first word of "$ac_prog", so it can be a program name with args.
13635set dummy $ac_prog; ac_word=$2
13636echo "$as_me:$LINENO: checking for $ac_word" >&5
13637echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13638if test "${ac_cv_prog_TRUE+set}" = set; then
13639 echo $ECHO_N "(cached) $ECHO_C" >&6
13640else
13641 if test -n "$TRUE"; then
13642 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
13643else
13644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13645for as_dir in $PATH
13646do
13647 IFS=$as_save_IFS
13648 test -z "$as_dir" && as_dir=.
13649 for ac_exec_ext in '' $ac_executable_extensions; do
13650 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13651 ac_cv_prog_TRUE="$ac_prog"
13652 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13653 break 2
13654 fi
13655done
13656done
13657
13658fi
13659fi
13660TRUE=$ac_cv_prog_TRUE
13661if test -n "$TRUE"; then
13662 echo "$as_me:$LINENO: result: $TRUE" >&5
13663echo "${ECHO_T}$TRUE" >&6
13664else
13665 echo "$as_me:$LINENO: result: no" >&5
13666echo "${ECHO_T}no" >&6
13667fi
13668
13669 test -n "$TRUE" && break
13670done
13671test -n "$TRUE" || TRUE="/bin/true"
13672
13673
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013674echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
13675echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
13676if test "${ac_cv_lib_c_inet_aton+set}" = set; then
13677 echo $ECHO_N "(cached) $ECHO_C" >&6
13678else
13679 ac_check_lib_save_LIBS=$LIBS
13680LIBS="-lc $LIBS"
13681cat >conftest.$ac_ext <<_ACEOF
13682#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013683/* confdefs.h. */
13684_ACEOF
13685cat confdefs.h >>conftest.$ac_ext
13686cat >>conftest.$ac_ext <<_ACEOF
13687/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013688
13689/* Override any gcc2 internal prototype to avoid an error. */
13690#ifdef __cplusplus
13691extern "C"
13692#endif
13693/* We use char because int might match the return type of a gcc2
13694 builtin and then its argument prototype would still apply. */
13695char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013696int
13697main ()
13698{
13699inet_aton ();
13700 ;
13701 return 0;
13702}
13703_ACEOF
13704rm -f conftest.$ac_objext conftest$ac_exeext
13705if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13706 (eval $ac_link) 2>&5
13707 ac_status=$?
13708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13709 (exit $ac_status); } &&
13710 { ac_try='test -s conftest$ac_exeext'
13711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13712 (eval $ac_try) 2>&5
13713 ac_status=$?
13714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13715 (exit $ac_status); }; }; then
13716 ac_cv_lib_c_inet_aton=yes
13717else
13718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013719sed 's/^/| /' conftest.$ac_ext >&5
13720
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013721ac_cv_lib_c_inet_aton=no
13722fi
13723rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13724LIBS=$ac_check_lib_save_LIBS
13725fi
13726echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
13727echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
13728if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013729 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013730else
13731
13732echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
13733echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
13734if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
13735 echo $ECHO_N "(cached) $ECHO_C" >&6
13736else
13737 ac_check_lib_save_LIBS=$LIBS
13738LIBS="-lresolv $LIBS"
13739cat >conftest.$ac_ext <<_ACEOF
13740#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013741/* confdefs.h. */
13742_ACEOF
13743cat confdefs.h >>conftest.$ac_ext
13744cat >>conftest.$ac_ext <<_ACEOF
13745/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013746
13747/* Override any gcc2 internal prototype to avoid an error. */
13748#ifdef __cplusplus
13749extern "C"
13750#endif
13751/* We use char because int might match the return type of a gcc2
13752 builtin and then its argument prototype would still apply. */
13753char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013754int
13755main ()
13756{
13757inet_aton ();
13758 ;
13759 return 0;
13760}
13761_ACEOF
13762rm -f conftest.$ac_objext conftest$ac_exeext
13763if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13764 (eval $ac_link) 2>&5
13765 ac_status=$?
13766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13767 (exit $ac_status); } &&
13768 { ac_try='test -s conftest$ac_exeext'
13769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13770 (eval $ac_try) 2>&5
13771 ac_status=$?
13772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13773 (exit $ac_status); }; }; then
13774 ac_cv_lib_resolv_inet_aton=yes
13775else
13776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013777sed 's/^/| /' conftest.$ac_ext >&5
13778
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013779ac_cv_lib_resolv_inet_aton=no
13780fi
13781rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13782LIBS=$ac_check_lib_save_LIBS
13783fi
13784echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13785echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13786if test $ac_cv_lib_resolv_inet_aton = yes; then
13787 cat >>confdefs.h <<_ACEOF
13788#define HAVE_LIBRESOLV 1
13789_ACEOF
13790
13791 LIBS="-lresolv $LIBS"
13792
13793fi
13794
13795
13796fi
13797
13798
Martin v. Löwise9416172003-05-03 10:12:45 +000013799echo "$as_me:$LINENO: checking for hstrerror" >&5
13800echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13801cat >conftest.$ac_ext <<_ACEOF
13802#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013803/* confdefs.h. */
13804_ACEOF
13805cat confdefs.h >>conftest.$ac_ext
13806cat >>conftest.$ac_ext <<_ACEOF
13807/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013808
13809#include "confdefs.h"
13810#include <netdb.h>
13811
Martin v. Löwise9416172003-05-03 10:12:45 +000013812int
13813main ()
13814{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013815void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013816 ;
13817 return 0;
13818}
13819_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013820rm -f conftest.$ac_objext conftest$ac_exeext
13821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13822 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013823 ac_status=$?
13824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13825 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013826 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13828 (eval $ac_try) 2>&5
13829 ac_status=$?
13830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13831 (exit $ac_status); }; }; then
13832
13833cat >>confdefs.h <<\_ACEOF
13834#define HAVE_HSTRERROR 1
13835_ACEOF
13836
13837 echo "$as_me:$LINENO: result: yes" >&5
13838echo "${ECHO_T}yes" >&6
13839else
13840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013841sed 's/^/| /' conftest.$ac_ext >&5
13842
Martin v. Löwise9416172003-05-03 10:12:45 +000013843echo "$as_me:$LINENO: result: no" >&5
13844echo "${ECHO_T}no" >&6
13845
13846fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013847rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013848
13849echo "$as_me:$LINENO: checking for inet_aton" >&5
13850echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13851cat >conftest.$ac_ext <<_ACEOF
13852#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013853/* confdefs.h. */
13854_ACEOF
13855cat confdefs.h >>conftest.$ac_ext
13856cat >>conftest.$ac_ext <<_ACEOF
13857/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013858
13859#include "confdefs.h"
13860#include <sys/socket.h>
13861#include <netinet/in.h>
13862#include <arpa/inet.h>
13863
Martin v. Löwise9416172003-05-03 10:12:45 +000013864int
13865main ()
13866{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013867void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013868 ;
13869 return 0;
13870}
13871_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013872rm -f conftest.$ac_objext conftest$ac_exeext
13873if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13874 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013875 ac_status=$?
13876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13877 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013878 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13880 (eval $ac_try) 2>&5
13881 ac_status=$?
13882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13883 (exit $ac_status); }; }; then
13884
13885cat >>confdefs.h <<\_ACEOF
13886#define HAVE_INET_ATON 1
13887_ACEOF
13888
13889 echo "$as_me:$LINENO: result: yes" >&5
13890echo "${ECHO_T}yes" >&6
13891else
13892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013893sed 's/^/| /' conftest.$ac_ext >&5
13894
Martin v. Löwise9416172003-05-03 10:12:45 +000013895echo "$as_me:$LINENO: result: no" >&5
13896echo "${ECHO_T}no" >&6
13897
13898fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013899rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013900
13901echo "$as_me:$LINENO: checking for inet_pton" >&5
13902echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13903cat >conftest.$ac_ext <<_ACEOF
13904#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013905/* confdefs.h. */
13906_ACEOF
13907cat confdefs.h >>conftest.$ac_ext
13908cat >>conftest.$ac_ext <<_ACEOF
13909/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013910
13911#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013912#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013913#include <sys/socket.h>
13914#include <netinet/in.h>
13915#include <arpa/inet.h>
13916
Martin v. Löwise9416172003-05-03 10:12:45 +000013917int
13918main ()
13919{
13920void* p = inet_pton
13921 ;
13922 return 0;
13923}
13924_ACEOF
13925rm -f conftest.$ac_objext
13926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13927 (eval $ac_compile) 2>&5
13928 ac_status=$?
13929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13930 (exit $ac_status); } &&
13931 { ac_try='test -s conftest.$ac_objext'
13932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13933 (eval $ac_try) 2>&5
13934 ac_status=$?
13935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13936 (exit $ac_status); }; }; then
13937
13938cat >>confdefs.h <<\_ACEOF
13939#define HAVE_INET_PTON 1
13940_ACEOF
13941
13942 echo "$as_me:$LINENO: result: yes" >&5
13943echo "${ECHO_T}yes" >&6
13944else
13945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013946sed 's/^/| /' conftest.$ac_ext >&5
13947
Martin v. Löwise9416172003-05-03 10:12:45 +000013948echo "$as_me:$LINENO: result: no" >&5
13949echo "${ECHO_T}no" >&6
13950
13951fi
13952rm -f conftest.$ac_objext conftest.$ac_ext
13953
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013954# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013955echo "$as_me:$LINENO: checking for setgroups" >&5
13956echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13957cat >conftest.$ac_ext <<_ACEOF
13958#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013959/* confdefs.h. */
13960_ACEOF
13961cat confdefs.h >>conftest.$ac_ext
13962cat >>conftest.$ac_ext <<_ACEOF
13963/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013964
13965#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013966#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013967#ifdef HAVE_GRP_H
13968#include <grp.h>
13969#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013970
Martin v. Löwisd5843682002-11-21 20:41:28 +000013971int
13972main ()
13973{
13974void* p = setgroups
13975 ;
13976 return 0;
13977}
13978_ACEOF
13979rm -f conftest.$ac_objext
13980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13981 (eval $ac_compile) 2>&5
13982 ac_status=$?
13983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13984 (exit $ac_status); } &&
13985 { ac_try='test -s conftest.$ac_objext'
13986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13987 (eval $ac_try) 2>&5
13988 ac_status=$?
13989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13990 (exit $ac_status); }; }; then
13991
13992cat >>confdefs.h <<\_ACEOF
13993#define HAVE_SETGROUPS 1
13994_ACEOF
13995
13996 echo "$as_me:$LINENO: result: yes" >&5
13997echo "${ECHO_T}yes" >&6
13998else
13999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014000sed 's/^/| /' conftest.$ac_ext >&5
14001
Martin v. Löwisd5843682002-11-21 20:41:28 +000014002echo "$as_me:$LINENO: result: no" >&5
14003echo "${ECHO_T}no" >&6
14004
14005fi
14006rm -f conftest.$ac_objext conftest.$ac_ext
14007
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014008# check for openpty and forkpty
14009
Martin v. Löwis11437992002-04-12 09:54:03 +000014010
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014011for ac_func in openpty
14012do
Martin v. Löwis11437992002-04-12 09:54:03 +000014013as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14014echo "$as_me:$LINENO: checking for $ac_func" >&5
14015echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14016if eval "test \"\${$as_ac_var+set}\" = set"; then
14017 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014018else
Martin v. Löwis11437992002-04-12 09:54:03 +000014019 cat >conftest.$ac_ext <<_ACEOF
14020#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014021/* confdefs.h. */
14022_ACEOF
14023cat confdefs.h >>conftest.$ac_ext
14024cat >>conftest.$ac_ext <<_ACEOF
14025/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014026/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014027 which can conflict with char $ac_func (); below.
14028 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014029 <limits.h> exists even on freestanding compilers. Under hpux,
14030 including <limits.h> includes <sys/time.h> and causes problems
14031 checking for functions defined therein. */
14032#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014033# include <limits.h>
14034#else
14035# include <assert.h>
14036#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014037/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014038#ifdef __cplusplus
14039extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014040{
Martin v. Löwis11437992002-04-12 09:54:03 +000014041#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014042/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014043 builtin and then its argument prototype would still apply. */
14044char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014045/* The GNU C library defines this for functions which it implements
14046 to always fail with ENOSYS. Some functions are actually named
14047 something starting with __ and the normal name is an alias. */
14048#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14049choke me
14050#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014051char (*f) () = $ac_func;
14052#endif
14053#ifdef __cplusplus
14054}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014055#endif
14056
Skip Montanaro6dead952003-09-25 14:50:04 +000014057int
14058main ()
14059{
14060return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 ;
14062 return 0;
14063}
14064_ACEOF
14065rm -f conftest.$ac_objext conftest$ac_exeext
14066if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14067 (eval $ac_link) 2>&5
14068 ac_status=$?
14069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14070 (exit $ac_status); } &&
14071 { ac_try='test -s conftest$ac_exeext'
14072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14073 (eval $ac_try) 2>&5
14074 ac_status=$?
14075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14076 (exit $ac_status); }; }; then
14077 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014078else
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014080sed 's/^/| /' conftest.$ac_ext >&5
14081
Martin v. Löwis11437992002-04-12 09:54:03 +000014082eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014084rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014086echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14087echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14088if test `eval echo '${'$as_ac_var'}'` = yes; then
14089 cat >>confdefs.h <<_ACEOF
14090#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14091_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014092
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014093else
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14095echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14096if test "${ac_cv_lib_util_openpty+set}" = set; then
14097 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014098else
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014100LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014101cat >conftest.$ac_ext <<_ACEOF
14102#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014103/* confdefs.h. */
14104_ACEOF
14105cat confdefs.h >>conftest.$ac_ext
14106cat >>conftest.$ac_ext <<_ACEOF
14107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014108
Fred Drake8cef4cf2000-06-28 16:40:38 +000014109/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014110#ifdef __cplusplus
14111extern "C"
14112#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014113/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 builtin and then its argument prototype would still apply. */
14115char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014116int
14117main ()
14118{
14119openpty ();
14120 ;
14121 return 0;
14122}
14123_ACEOF
14124rm -f conftest.$ac_objext conftest$ac_exeext
14125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14126 (eval $ac_link) 2>&5
14127 ac_status=$?
14128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14129 (exit $ac_status); } &&
14130 { ac_try='test -s conftest$ac_exeext'
14131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14132 (eval $ac_try) 2>&5
14133 ac_status=$?
14134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14135 (exit $ac_status); }; }; then
14136 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014137else
Martin v. Löwis11437992002-04-12 09:54:03 +000014138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014139sed 's/^/| /' conftest.$ac_ext >&5
14140
Martin v. Löwis11437992002-04-12 09:54:03 +000014141ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014142fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014143rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14144LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014145fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014146echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14147echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14148if test $ac_cv_lib_util_openpty = yes; then
14149 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014150#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014151_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014152 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014153fi
14154
14155fi
14156done
14157
Martin v. Löwis11437992002-04-12 09:54:03 +000014158
Fred Drake8cef4cf2000-06-28 16:40:38 +000014159for ac_func in forkpty
14160do
Martin v. Löwis11437992002-04-12 09:54:03 +000014161as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14162echo "$as_me:$LINENO: checking for $ac_func" >&5
14163echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14164if eval "test \"\${$as_ac_var+set}\" = set"; then
14165 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014166else
Martin v. Löwis11437992002-04-12 09:54:03 +000014167 cat >conftest.$ac_ext <<_ACEOF
14168#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014169/* confdefs.h. */
14170_ACEOF
14171cat confdefs.h >>conftest.$ac_ext
14172cat >>conftest.$ac_ext <<_ACEOF
14173/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014174/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014175 which can conflict with char $ac_func (); below.
14176 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014177 <limits.h> exists even on freestanding compilers. Under hpux,
14178 including <limits.h> includes <sys/time.h> and causes problems
14179 checking for functions defined therein. */
14180#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014181# include <limits.h>
14182#else
14183# include <assert.h>
14184#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014185/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014186#ifdef __cplusplus
14187extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014188{
Martin v. Löwis11437992002-04-12 09:54:03 +000014189#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014190/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014191 builtin and then its argument prototype would still apply. */
14192char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014193/* The GNU C library defines this for functions which it implements
14194 to always fail with ENOSYS. Some functions are actually named
14195 something starting with __ and the normal name is an alias. */
14196#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14197choke me
14198#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014199char (*f) () = $ac_func;
14200#endif
14201#ifdef __cplusplus
14202}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014203#endif
14204
Skip Montanaro6dead952003-09-25 14:50:04 +000014205int
14206main ()
14207{
14208return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014209 ;
14210 return 0;
14211}
14212_ACEOF
14213rm -f conftest.$ac_objext conftest$ac_exeext
14214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14215 (eval $ac_link) 2>&5
14216 ac_status=$?
14217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14218 (exit $ac_status); } &&
14219 { ac_try='test -s conftest$ac_exeext'
14220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14221 (eval $ac_try) 2>&5
14222 ac_status=$?
14223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14224 (exit $ac_status); }; }; then
14225 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014226else
Martin v. Löwis11437992002-04-12 09:54:03 +000014227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014228sed 's/^/| /' conftest.$ac_ext >&5
14229
Martin v. Löwis11437992002-04-12 09:54:03 +000014230eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014232rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014233fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014234echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14235echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14236if test `eval echo '${'$as_ac_var'}'` = yes; then
14237 cat >>confdefs.h <<_ACEOF
14238#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14239_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014240
Fred Drake8cef4cf2000-06-28 16:40:38 +000014241else
Martin v. Löwis11437992002-04-12 09:54:03 +000014242 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14243echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14244if test "${ac_cv_lib_util_forkpty+set}" = set; then
14245 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014246else
Martin v. Löwis11437992002-04-12 09:54:03 +000014247 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014248LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014249cat >conftest.$ac_ext <<_ACEOF
14250#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014251/* confdefs.h. */
14252_ACEOF
14253cat confdefs.h >>conftest.$ac_ext
14254cat >>conftest.$ac_ext <<_ACEOF
14255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014256
Fred Drake8cef4cf2000-06-28 16:40:38 +000014257/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014258#ifdef __cplusplus
14259extern "C"
14260#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014261/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014262 builtin and then its argument prototype would still apply. */
14263char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014264int
14265main ()
14266{
14267forkpty ();
14268 ;
14269 return 0;
14270}
14271_ACEOF
14272rm -f conftest.$ac_objext conftest$ac_exeext
14273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14274 (eval $ac_link) 2>&5
14275 ac_status=$?
14276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14277 (exit $ac_status); } &&
14278 { ac_try='test -s conftest$ac_exeext'
14279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14280 (eval $ac_try) 2>&5
14281 ac_status=$?
14282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14283 (exit $ac_status); }; }; then
14284 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014285else
Martin v. Löwis11437992002-04-12 09:54:03 +000014286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014287sed 's/^/| /' conftest.$ac_ext >&5
14288
Martin v. Löwis11437992002-04-12 09:54:03 +000014289ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014290fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014291rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14292LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014294echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14295echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14296if test $ac_cv_lib_util_forkpty = yes; then
14297 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014298#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014299_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014300 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014301fi
14302
14303fi
14304done
14305
Jack Jansendd19cf82001-12-06 22:36:17 +000014306
Michael W. Hudson54241132001-12-07 15:38:26 +000014307# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
14309
14310
14311
14312
14313
Fred Drake8cef4cf2000-06-28 16:40:38 +000014314for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14315do
Martin v. Löwis11437992002-04-12 09:54:03 +000014316as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14317echo "$as_me:$LINENO: checking for $ac_func" >&5
14318echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14319if eval "test \"\${$as_ac_var+set}\" = set"; then
14320 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014321else
Martin v. Löwis11437992002-04-12 09:54:03 +000014322 cat >conftest.$ac_ext <<_ACEOF
14323#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014324/* confdefs.h. */
14325_ACEOF
14326cat confdefs.h >>conftest.$ac_ext
14327cat >>conftest.$ac_ext <<_ACEOF
14328/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014329/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014330 which can conflict with char $ac_func (); below.
14331 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014332 <limits.h> exists even on freestanding compilers. Under hpux,
14333 including <limits.h> includes <sys/time.h> and causes problems
14334 checking for functions defined therein. */
14335#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014336# include <limits.h>
14337#else
14338# include <assert.h>
14339#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014340/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014341#ifdef __cplusplus
14342extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014343{
Martin v. Löwis11437992002-04-12 09:54:03 +000014344#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014345/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 builtin and then its argument prototype would still apply. */
14347char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014348/* The GNU C library defines this for functions which it implements
14349 to always fail with ENOSYS. Some functions are actually named
14350 something starting with __ and the normal name is an alias. */
14351#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14352choke me
14353#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014354char (*f) () = $ac_func;
14355#endif
14356#ifdef __cplusplus
14357}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014358#endif
14359
Skip Montanaro6dead952003-09-25 14:50:04 +000014360int
14361main ()
14362{
14363return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 ;
14365 return 0;
14366}
14367_ACEOF
14368rm -f conftest.$ac_objext conftest$ac_exeext
14369if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14370 (eval $ac_link) 2>&5
14371 ac_status=$?
14372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14373 (exit $ac_status); } &&
14374 { ac_try='test -s conftest$ac_exeext'
14375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14376 (eval $ac_try) 2>&5
14377 ac_status=$?
14378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14379 (exit $ac_status); }; }; then
14380 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014381else
Martin v. Löwis11437992002-04-12 09:54:03 +000014382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014383sed 's/^/| /' conftest.$ac_ext >&5
14384
Martin v. Löwis11437992002-04-12 09:54:03 +000014385eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014387rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014388fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014389echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14390echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14391if test `eval echo '${'$as_ac_var'}'` = yes; then
14392 cat >>confdefs.h <<_ACEOF
14393#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14394_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014395
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014396fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014397done
14398
Michael W. Hudson54241132001-12-07 15:38:26 +000014399
Martin v. Löwis11437992002-04-12 09:54:03 +000014400
14401
14402
14403
14404
Martin v. Löwis1142de32002-03-29 16:28:31 +000014405for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000014406do
Martin v. Löwis11437992002-04-12 09:54:03 +000014407as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14408echo "$as_me:$LINENO: checking for $ac_func" >&5
14409echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14410if eval "test \"\${$as_ac_var+set}\" = set"; then
14411 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014412else
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 cat >conftest.$ac_ext <<_ACEOF
14414#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014415/* confdefs.h. */
14416_ACEOF
14417cat confdefs.h >>conftest.$ac_ext
14418cat >>conftest.$ac_ext <<_ACEOF
14419/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014420/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014421 which can conflict with char $ac_func (); below.
14422 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014423 <limits.h> exists even on freestanding compilers. Under hpux,
14424 including <limits.h> includes <sys/time.h> and causes problems
14425 checking for functions defined therein. */
14426#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014427# include <limits.h>
14428#else
14429# include <assert.h>
14430#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014431/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014432#ifdef __cplusplus
14433extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014434{
Martin v. Löwis11437992002-04-12 09:54:03 +000014435#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014436/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 builtin and then its argument prototype would still apply. */
14438char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014439/* The GNU C library defines this for functions which it implements
14440 to always fail with ENOSYS. Some functions are actually named
14441 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014442#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014443choke me
14444#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014445char (*f) () = $ac_func;
14446#endif
14447#ifdef __cplusplus
14448}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014449#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014450
Skip Montanaro6dead952003-09-25 14:50:04 +000014451int
14452main ()
14453{
14454return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 ;
14456 return 0;
14457}
14458_ACEOF
14459rm -f conftest.$ac_objext conftest$ac_exeext
14460if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14461 (eval $ac_link) 2>&5
14462 ac_status=$?
14463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14464 (exit $ac_status); } &&
14465 { ac_try='test -s conftest$ac_exeext'
14466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14467 (eval $ac_try) 2>&5
14468 ac_status=$?
14469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14470 (exit $ac_status); }; }; then
14471 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014472else
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014474sed 's/^/| /' conftest.$ac_ext >&5
14475
Martin v. Löwis11437992002-04-12 09:54:03 +000014476eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014478rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000014479fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014480echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14481echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14482if test `eval echo '${'$as_ac_var'}'` = yes; then
14483 cat >>confdefs.h <<_ACEOF
14484#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14485_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000014486
Martin v. Löwis1142de32002-03-29 16:28:31 +000014487else
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014489fi
14490done
14491
14492
Martin v. Löwis11437992002-04-12 09:54:03 +000014493
Martin v. Löwis1142de32002-03-29 16:28:31 +000014494for ac_func in getpgrp
14495do
Martin v. Löwis11437992002-04-12 09:54:03 +000014496as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14497echo "$as_me:$LINENO: checking for $ac_func" >&5
14498echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14499if eval "test \"\${$as_ac_var+set}\" = set"; then
14500 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000014501else
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 cat >conftest.$ac_ext <<_ACEOF
14503#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014504/* confdefs.h. */
14505_ACEOF
14506cat confdefs.h >>conftest.$ac_ext
14507cat >>conftest.$ac_ext <<_ACEOF
14508/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000014509/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014510 which can conflict with char $ac_func (); below.
14511 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014512 <limits.h> exists even on freestanding compilers. Under hpux,
14513 including <limits.h> includes <sys/time.h> and causes problems
14514 checking for functions defined therein. */
14515#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014516# include <limits.h>
14517#else
14518# include <assert.h>
14519#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014520/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014521#ifdef __cplusplus
14522extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014523{
Martin v. Löwis11437992002-04-12 09:54:03 +000014524#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014525/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014526 builtin and then its argument prototype would still apply. */
14527char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000014528/* The GNU C library defines this for functions which it implements
14529 to always fail with ENOSYS. Some functions are actually named
14530 something starting with __ and the normal name is an alias. */
14531#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14532choke me
14533#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014534char (*f) () = $ac_func;
14535#endif
14536#ifdef __cplusplus
14537}
Martin v. Löwis1142de32002-03-29 16:28:31 +000014538#endif
14539
Skip Montanaro6dead952003-09-25 14:50:04 +000014540int
14541main ()
14542{
14543return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014544 ;
14545 return 0;
14546}
14547_ACEOF
14548rm -f conftest.$ac_objext conftest$ac_exeext
14549if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14550 (eval $ac_link) 2>&5
14551 ac_status=$?
14552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14553 (exit $ac_status); } &&
14554 { ac_try='test -s conftest$ac_exeext'
14555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14556 (eval $ac_try) 2>&5
14557 ac_status=$?
14558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14559 (exit $ac_status); }; }; then
14560 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014561else
Martin v. Löwis11437992002-04-12 09:54:03 +000014562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014563sed 's/^/| /' conftest.$ac_ext >&5
14564
Martin v. Löwis11437992002-04-12 09:54:03 +000014565eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014567rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014569echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14570echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14571if test `eval echo '${'$as_ac_var'}'` = yes; then
14572 cat >>confdefs.h <<_ACEOF
14573#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14574_ACEOF
14575 cat >conftest.$ac_ext <<_ACEOF
14576#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014577/* confdefs.h. */
14578_ACEOF
14579cat confdefs.h >>conftest.$ac_ext
14580cat >>conftest.$ac_ext <<_ACEOF
14581/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014582#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014583int
14584main ()
14585{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014586getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014587 ;
14588 return 0;
14589}
14590_ACEOF
14591rm -f conftest.$ac_objext
14592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14593 (eval $ac_compile) 2>&5
14594 ac_status=$?
14595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14596 (exit $ac_status); } &&
14597 { ac_try='test -s conftest.$ac_objext'
14598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14599 (eval $ac_try) 2>&5
14600 ac_status=$?
14601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14602 (exit $ac_status); }; }; then
14603
14604cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014605#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014606_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608
Guido van Rossumf78abae1997-01-21 22:02:36 +000014609else
Martin v. Löwis11437992002-04-12 09:54:03 +000014610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014611sed 's/^/| /' conftest.$ac_ext >&5
14612
Guido van Rossum627b2d71993-12-24 10:39:16 +000014613fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014614rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014615
Guido van Rossum627b2d71993-12-24 10:39:16 +000014616fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014617done
Guido van Rossum627b2d71993-12-24 10:39:16 +000014618
Jack Jansen150753c2003-03-29 22:07:47 +000014619
14620for ac_func in setpgrp
14621do
14622as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14623echo "$as_me:$LINENO: checking for $ac_func" >&5
14624echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14625if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014626 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014627else
Martin v. Löwis11437992002-04-12 09:54:03 +000014628 cat >conftest.$ac_ext <<_ACEOF
14629#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014630/* confdefs.h. */
14631_ACEOF
14632cat confdefs.h >>conftest.$ac_ext
14633cat >>conftest.$ac_ext <<_ACEOF
14634/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014635/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014636 which can conflict with char $ac_func (); below.
14637 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014638 <limits.h> exists even on freestanding compilers. Under hpux,
14639 including <limits.h> includes <sys/time.h> and causes problems
14640 checking for functions defined therein. */
14641#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014642# include <limits.h>
14643#else
14644# include <assert.h>
14645#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014646/* Override any gcc2 internal prototype to avoid an error. */
14647#ifdef __cplusplus
14648extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014649{
Martin v. Löwis11437992002-04-12 09:54:03 +000014650#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014651/* We use char because int might match the return type of a gcc2
14652 builtin and then its argument prototype would still apply. */
14653char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000014654/* The GNU C library defines this for functions which it implements
14655 to always fail with ENOSYS. Some functions are actually named
14656 something starting with __ and the normal name is an alias. */
14657#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14658choke me
14659#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014660char (*f) () = $ac_func;
14661#endif
14662#ifdef __cplusplus
14663}
Jack Jansen150753c2003-03-29 22:07:47 +000014664#endif
14665
Skip Montanaro6dead952003-09-25 14:50:04 +000014666int
14667main ()
14668{
14669return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014670 ;
14671 return 0;
14672}
14673_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014674rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000014675if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14676 (eval $ac_link) 2>&5
14677 ac_status=$?
14678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000014679 (exit $ac_status); } &&
14680 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14682 (eval $ac_try) 2>&5
14683 ac_status=$?
14684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14685 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000014686 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014687else
Jack Jansen150753c2003-03-29 22:07:47 +000014688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014689sed 's/^/| /' conftest.$ac_ext >&5
14690
Jack Jansen150753c2003-03-29 22:07:47 +000014691eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014692fi
Jack Jansen150753c2003-03-29 22:07:47 +000014693rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014694fi
Jack Jansen150753c2003-03-29 22:07:47 +000014695echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14696echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14697if test `eval echo '${'$as_ac_var'}'` = yes; then
14698 cat >>confdefs.h <<_ACEOF
14699#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14700_ACEOF
14701 cat >conftest.$ac_ext <<_ACEOF
14702#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014703/* confdefs.h. */
14704_ACEOF
14705cat confdefs.h >>conftest.$ac_ext
14706cat >>conftest.$ac_ext <<_ACEOF
14707/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014708#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000014709int
14710main ()
14711{
14712setpgrp(0,0);
14713 ;
14714 return 0;
14715}
14716_ACEOF
14717rm -f conftest.$ac_objext
14718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14719 (eval $ac_compile) 2>&5
14720 ac_status=$?
14721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14722 (exit $ac_status); } &&
14723 { ac_try='test -s conftest.$ac_objext'
14724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14725 (eval $ac_try) 2>&5
14726 ac_status=$?
14727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14728 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014729
14730cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014731#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014732_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014733
Jack Jansen150753c2003-03-29 22:07:47 +000014734
14735else
14736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014737sed 's/^/| /' conftest.$ac_ext >&5
14738
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014739fi
Jack Jansen150753c2003-03-29 22:07:47 +000014740rm -f conftest.$ac_objext conftest.$ac_ext
14741
14742fi
14743done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014744
Martin v. Löwis11437992002-04-12 09:54:03 +000014745
Thomas Wouters3a584202000-08-05 23:28:51 +000014746for ac_func in gettimeofday
14747do
Martin v. Löwis11437992002-04-12 09:54:03 +000014748as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14749echo "$as_me:$LINENO: checking for $ac_func" >&5
14750echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14751if eval "test \"\${$as_ac_var+set}\" = set"; then
14752 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014753else
Martin v. Löwis11437992002-04-12 09:54:03 +000014754 cat >conftest.$ac_ext <<_ACEOF
14755#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014756/* confdefs.h. */
14757_ACEOF
14758cat confdefs.h >>conftest.$ac_ext
14759cat >>conftest.$ac_ext <<_ACEOF
14760/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014761/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014762 which can conflict with char $ac_func (); below.
14763 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014764 <limits.h> exists even on freestanding compilers. Under hpux,
14765 including <limits.h> includes <sys/time.h> and causes problems
14766 checking for functions defined therein. */
14767#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014768# include <limits.h>
14769#else
14770# include <assert.h>
14771#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014772/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014773#ifdef __cplusplus
14774extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014775{
Martin v. Löwis11437992002-04-12 09:54:03 +000014776#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014777/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014778 builtin and then its argument prototype would still apply. */
14779char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014780/* The GNU C library defines this for functions which it implements
14781 to always fail with ENOSYS. Some functions are actually named
14782 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014783#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014784choke me
14785#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014786char (*f) () = $ac_func;
14787#endif
14788#ifdef __cplusplus
14789}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014790#endif
14791
Skip Montanaro6dead952003-09-25 14:50:04 +000014792int
14793main ()
14794{
14795return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014796 ;
14797 return 0;
14798}
14799_ACEOF
14800rm -f conftest.$ac_objext conftest$ac_exeext
14801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14802 (eval $ac_link) 2>&5
14803 ac_status=$?
14804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14805 (exit $ac_status); } &&
14806 { ac_try='test -s conftest$ac_exeext'
14807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14808 (eval $ac_try) 2>&5
14809 ac_status=$?
14810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14811 (exit $ac_status); }; }; then
14812 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014813else
Martin v. Löwis11437992002-04-12 09:54:03 +000014814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014815sed 's/^/| /' conftest.$ac_ext >&5
14816
Martin v. Löwis11437992002-04-12 09:54:03 +000014817eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014818fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014819rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014820fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014821echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14822echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14823if test `eval echo '${'$as_ac_var'}'` = yes; then
14824 cat >>confdefs.h <<_ACEOF
14825#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14826_ACEOF
14827 cat >conftest.$ac_ext <<_ACEOF
14828#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014829/* confdefs.h. */
14830_ACEOF
14831cat confdefs.h >>conftest.$ac_ext
14832cat >>conftest.$ac_ext <<_ACEOF
14833/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014834#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014835int
14836main ()
14837{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014838gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 ;
14840 return 0;
14841}
14842_ACEOF
14843rm -f conftest.$ac_objext
14844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14845 (eval $ac_compile) 2>&5
14846 ac_status=$?
14847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14848 (exit $ac_status); } &&
14849 { ac_try='test -s conftest.$ac_objext'
14850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14851 (eval $ac_try) 2>&5
14852 ac_status=$?
14853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14854 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014855 :
14856else
Martin v. Löwis11437992002-04-12 09:54:03 +000014857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014858sed 's/^/| /' conftest.$ac_ext >&5
14859
Martin v. Löwis11437992002-04-12 09:54:03 +000014860
14861cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014862#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014863_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014864
Martin v. Löwis11437992002-04-12 09:54:03 +000014865
Guido van Rossum627b2d71993-12-24 10:39:16 +000014866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014867rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014868
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014869fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014870done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014871
Michael W. Hudson54241132001-12-07 15:38:26 +000014872
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014873echo "$as_me:$LINENO: checking for major" >&5
14874echo $ECHO_N "checking for major... $ECHO_C" >&6
14875cat >conftest.$ac_ext <<_ACEOF
14876#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014877/* confdefs.h. */
14878_ACEOF
14879cat confdefs.h >>conftest.$ac_ext
14880cat >>conftest.$ac_ext <<_ACEOF
14881/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014882
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014883#if defined(MAJOR_IN_MKDEV)
14884#include <sys/mkdev.h>
14885#elif defined(MAJOR_IN_SYSMACROS)
14886#include <sys/sysmacros.h>
14887#else
14888#include <sys/types.h>
14889#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014890
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014891int
14892main ()
14893{
14894
14895 makedev(major(0),minor(0));
14896
14897 ;
14898 return 0;
14899}
14900_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014901rm -f conftest.$ac_objext conftest$ac_exeext
14902if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14903 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014904 ac_status=$?
14905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14906 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014907 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14909 (eval $ac_try) 2>&5
14910 ac_status=$?
14911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14912 (exit $ac_status); }; }; then
14913
14914
14915cat >>confdefs.h <<\_ACEOF
14916#define HAVE_DEVICE_MACROS 1
14917_ACEOF
14918
14919 echo "$as_me:$LINENO: result: yes" >&5
14920echo "${ECHO_T}yes" >&6
14921
14922else
14923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014924sed 's/^/| /' conftest.$ac_ext >&5
14925
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014926
14927 echo "$as_me:$LINENO: result: no" >&5
14928echo "${ECHO_T}no" >&6
14929
14930fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014931rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014932
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014933# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014934# for [no]getaddrinfo in netdb.h.
14935echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14936echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14937cat >conftest.$ac_ext <<_ACEOF
14938#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014939/* confdefs.h. */
14940_ACEOF
14941cat confdefs.h >>conftest.$ac_ext
14942cat >>conftest.$ac_ext <<_ACEOF
14943/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014944
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014945#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014946#include <sys/socket.h>
14947#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014948#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014949
Martin v. Löwis11437992002-04-12 09:54:03 +000014950int
14951main ()
14952{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014953
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014954getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014955
Martin v. Löwis11437992002-04-12 09:54:03 +000014956 ;
14957 return 0;
14958}
14959_ACEOF
14960rm -f conftest.$ac_objext conftest$ac_exeext
14961if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14962 (eval $ac_link) 2>&5
14963 ac_status=$?
14964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14965 (exit $ac_status); } &&
14966 { ac_try='test -s conftest$ac_exeext'
14967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14968 (eval $ac_try) 2>&5
14969 ac_status=$?
14970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14971 (exit $ac_status); }; }; then
14972
14973echo "$as_me:$LINENO: result: yes" >&5
14974echo "${ECHO_T}yes" >&6
14975echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14976echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014977if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 echo "$as_me:$LINENO: result: buggy" >&5
14979echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014980buggygetaddrinfo=yes
14981else
Martin v. Löwis11437992002-04-12 09:54:03 +000014982 cat >conftest.$ac_ext <<_ACEOF
14983#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014984/* confdefs.h. */
14985_ACEOF
14986cat confdefs.h >>conftest.$ac_ext
14987cat >>conftest.$ac_ext <<_ACEOF
14988/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014989
14990#include <sys/types.h>
14991#include <netdb.h>
14992#include <string.h>
14993#include <sys/socket.h>
14994#include <netinet/in.h>
14995
14996main()
14997{
14998 int passive, gaierr, inet4 = 0, inet6 = 0;
14999 struct addrinfo hints, *ai, *aitop;
15000 char straddr[INET6_ADDRSTRLEN], strport[16];
15001
15002 for (passive = 0; passive <= 1; passive++) {
15003 memset(&hints, 0, sizeof(hints));
15004 hints.ai_family = AF_UNSPEC;
15005 hints.ai_flags = passive ? AI_PASSIVE : 0;
15006 hints.ai_socktype = SOCK_STREAM;
15007 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15008 (void)gai_strerror(gaierr);
15009 goto bad;
15010 }
15011 for (ai = aitop; ai; ai = ai->ai_next) {
15012 if (ai->ai_addr == NULL ||
15013 ai->ai_addrlen == 0 ||
15014 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15015 straddr, sizeof(straddr), strport, sizeof(strport),
15016 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15017 goto bad;
15018 }
15019 switch (ai->ai_family) {
15020 case AF_INET:
15021 if (strcmp(strport, "54321") != 0) {
15022 goto bad;
15023 }
15024 if (passive) {
15025 if (strcmp(straddr, "0.0.0.0") != 0) {
15026 goto bad;
15027 }
15028 } else {
15029 if (strcmp(straddr, "127.0.0.1") != 0) {
15030 goto bad;
15031 }
15032 }
15033 inet4++;
15034 break;
15035 case AF_INET6:
15036 if (strcmp(strport, "54321") != 0) {
15037 goto bad;
15038 }
15039 if (passive) {
15040 if (strcmp(straddr, "::") != 0) {
15041 goto bad;
15042 }
15043 } else {
15044 if (strcmp(straddr, "::1") != 0) {
15045 goto bad;
15046 }
15047 }
15048 inet6++;
15049 break;
15050 case AF_UNSPEC:
15051 goto bad;
15052 break;
15053 default:
15054 /* another family support? */
15055 break;
15056 }
15057 }
15058 }
15059
15060 if (!(inet4 == 0 || inet4 == 2))
15061 goto bad;
15062 if (!(inet6 == 0 || inet6 == 2))
15063 goto bad;
15064
15065 if (aitop)
15066 freeaddrinfo(aitop);
15067 exit(0);
15068
15069 bad:
15070 if (aitop)
15071 freeaddrinfo(aitop);
15072 exit(1);
15073}
15074
Martin v. Löwis11437992002-04-12 09:54:03 +000015075_ACEOF
15076rm -f conftest$ac_exeext
15077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15078 (eval $ac_link) 2>&5
15079 ac_status=$?
15080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15081 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15083 (eval $ac_try) 2>&5
15084 ac_status=$?
15085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15086 (exit $ac_status); }; }; then
15087 echo "$as_me:$LINENO: result: good" >&5
15088echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015089buggygetaddrinfo=no
15090else
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 echo "$as_me: program exited with status $ac_status" >&5
15092echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015093sed 's/^/| /' conftest.$ac_ext >&5
15094
Martin v. Löwis11437992002-04-12 09:54:03 +000015095( exit $ac_status )
15096echo "$as_me:$LINENO: result: buggy" >&5
15097echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015098buggygetaddrinfo=yes
15099fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015100rm -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 +000015101fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015102else
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015104sed 's/^/| /' conftest.$ac_ext >&5
15105
Martin v. Löwis11437992002-04-12 09:54:03 +000015106
15107echo "$as_me:$LINENO: result: no" >&5
15108echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015109buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015110
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015112rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015113
15114if test "$buggygetaddrinfo" = "yes"; then
15115 if test "$ipv6" = "yes"; then
15116 echo 'Fatal: You must get working getaddrinfo() function.'
15117 echo ' or you can specify "--disable-ipv6"'.
15118 exit 1
15119 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015120else
Martin v. Löwis11437992002-04-12 09:54:03 +000015121
15122cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015123#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015124_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015125
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015127
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015128for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015129do
Martin v. Löwis11437992002-04-12 09:54:03 +000015130as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15131echo "$as_me:$LINENO: checking for $ac_func" >&5
15132echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15133if eval "test \"\${$as_ac_var+set}\" = set"; then
15134 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015135else
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 cat >conftest.$ac_ext <<_ACEOF
15137#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015138/* confdefs.h. */
15139_ACEOF
15140cat confdefs.h >>conftest.$ac_ext
15141cat >>conftest.$ac_ext <<_ACEOF
15142/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015143/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015144 which can conflict with char $ac_func (); below.
15145 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015146 <limits.h> exists even on freestanding compilers. Under hpux,
15147 including <limits.h> includes <sys/time.h> and causes problems
15148 checking for functions defined therein. */
15149#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015150# include <limits.h>
15151#else
15152# include <assert.h>
15153#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015154/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015155#ifdef __cplusplus
15156extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015157{
Martin v. Löwis11437992002-04-12 09:54:03 +000015158#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015159/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 builtin and then its argument prototype would still apply. */
15161char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015162/* The GNU C library defines this for functions which it implements
15163 to always fail with ENOSYS. Some functions are actually named
15164 something starting with __ and the normal name is an alias. */
15165#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15166choke me
15167#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015168char (*f) () = $ac_func;
15169#endif
15170#ifdef __cplusplus
15171}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015172#endif
15173
Skip Montanaro6dead952003-09-25 14:50:04 +000015174int
15175main ()
15176{
15177return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015178 ;
15179 return 0;
15180}
15181_ACEOF
15182rm -f conftest.$ac_objext conftest$ac_exeext
15183if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15184 (eval $ac_link) 2>&5
15185 ac_status=$?
15186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15187 (exit $ac_status); } &&
15188 { ac_try='test -s conftest$ac_exeext'
15189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15190 (eval $ac_try) 2>&5
15191 ac_status=$?
15192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15193 (exit $ac_status); }; }; then
15194 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015195else
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015197sed 's/^/| /' conftest.$ac_ext >&5
15198
Martin v. Löwis11437992002-04-12 09:54:03 +000015199eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015200fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015202fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015203echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15204echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15205if test `eval echo '${'$as_ac_var'}'` = yes; then
15206 cat >>confdefs.h <<_ACEOF
15207#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15208_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015209
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015210fi
15211done
15212
Michael W. Hudson54241132001-12-07 15:38:26 +000015213
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015214# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015215echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15216echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15217if test "${ac_cv_header_time+set}" = set; then
15218 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015219else
Martin v. Löwis11437992002-04-12 09:54:03 +000015220 cat >conftest.$ac_ext <<_ACEOF
15221#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015222/* confdefs.h. */
15223_ACEOF
15224cat confdefs.h >>conftest.$ac_ext
15225cat >>conftest.$ac_ext <<_ACEOF
15226/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015227#include <sys/types.h>
15228#include <sys/time.h>
15229#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015230
Martin v. Löwis11437992002-04-12 09:54:03 +000015231int
15232main ()
15233{
15234if ((struct tm *) 0)
15235return 0;
15236 ;
15237 return 0;
15238}
15239_ACEOF
15240rm -f conftest.$ac_objext
15241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15242 (eval $ac_compile) 2>&5
15243 ac_status=$?
15244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15245 (exit $ac_status); } &&
15246 { ac_try='test -s conftest.$ac_objext'
15247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15248 (eval $ac_try) 2>&5
15249 ac_status=$?
15250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15251 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015252 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015253else
Martin v. Löwis11437992002-04-12 09:54:03 +000015254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015255sed 's/^/| /' conftest.$ac_ext >&5
15256
Martin v. Löwis11437992002-04-12 09:54:03 +000015257ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015259rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015260fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015261echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15262echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015263if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015264
15265cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015266#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015267_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015268
15269fi
15270
Martin v. Löwis11437992002-04-12 09:54:03 +000015271echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15272echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
15273if test "${ac_cv_struct_tm+set}" = set; then
15274 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015275else
Martin v. Löwis11437992002-04-12 09:54:03 +000015276 cat >conftest.$ac_ext <<_ACEOF
15277#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015278/* confdefs.h. */
15279_ACEOF
15280cat confdefs.h >>conftest.$ac_ext
15281cat >>conftest.$ac_ext <<_ACEOF
15282/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015283#include <sys/types.h>
15284#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015285
Martin v. Löwis11437992002-04-12 09:54:03 +000015286int
15287main ()
15288{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015289struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 ;
15291 return 0;
15292}
15293_ACEOF
15294rm -f conftest.$ac_objext
15295if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15296 (eval $ac_compile) 2>&5
15297 ac_status=$?
15298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15299 (exit $ac_status); } &&
15300 { ac_try='test -s conftest.$ac_objext'
15301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15302 (eval $ac_try) 2>&5
15303 ac_status=$?
15304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15305 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015306 ac_cv_struct_tm=time.h
15307else
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015309sed 's/^/| /' conftest.$ac_ext >&5
15310
Martin v. Löwis11437992002-04-12 09:54:03 +000015311ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015313rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015314fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015315echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15316echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015317if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015318
15319cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015320#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015321_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015322
15323fi
15324
Martin v. Löwis11437992002-04-12 09:54:03 +000015325echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
15326echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
15327if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
15328 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015329else
Martin v. Löwis11437992002-04-12 09:54:03 +000015330 cat >conftest.$ac_ext <<_ACEOF
15331#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015332/* confdefs.h. */
15333_ACEOF
15334cat confdefs.h >>conftest.$ac_ext
15335cat >>conftest.$ac_ext <<_ACEOF
15336/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015337#include <sys/types.h>
15338#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015339
15340
Martin v. Löwis11437992002-04-12 09:54:03 +000015341int
15342main ()
15343{
15344static struct tm ac_aggr;
15345if (ac_aggr.tm_zone)
15346return 0;
15347 ;
15348 return 0;
15349}
15350_ACEOF
15351rm -f conftest.$ac_objext
15352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15353 (eval $ac_compile) 2>&5
15354 ac_status=$?
15355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15356 (exit $ac_status); } &&
15357 { ac_try='test -s conftest.$ac_objext'
15358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15359 (eval $ac_try) 2>&5
15360 ac_status=$?
15361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15362 (exit $ac_status); }; }; then
15363 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015364else
Martin v. Löwis11437992002-04-12 09:54:03 +000015365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015366sed 's/^/| /' conftest.$ac_ext >&5
15367
15368cat >conftest.$ac_ext <<_ACEOF
15369#line $LINENO "configure"
15370/* confdefs.h. */
15371_ACEOF
15372cat confdefs.h >>conftest.$ac_ext
15373cat >>conftest.$ac_ext <<_ACEOF
15374/* end confdefs.h. */
15375#include <sys/types.h>
15376#include <$ac_cv_struct_tm>
15377
15378
15379int
15380main ()
15381{
15382static struct tm ac_aggr;
15383if (sizeof ac_aggr.tm_zone)
15384return 0;
15385 ;
15386 return 0;
15387}
15388_ACEOF
15389rm -f conftest.$ac_objext
15390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15391 (eval $ac_compile) 2>&5
15392 ac_status=$?
15393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15394 (exit $ac_status); } &&
15395 { ac_try='test -s conftest.$ac_objext'
15396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15397 (eval $ac_try) 2>&5
15398 ac_status=$?
15399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15400 (exit $ac_status); }; }; then
15401 ac_cv_member_struct_tm_tm_zone=yes
15402else
15403 echo "$as_me: failed program was:" >&5
15404sed 's/^/| /' conftest.$ac_ext >&5
15405
Martin v. Löwis11437992002-04-12 09:54:03 +000015406ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015407fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015408rm -f conftest.$ac_objext conftest.$ac_ext
15409fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015410rm -f conftest.$ac_objext conftest.$ac_ext
15411fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015412echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
15413echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
15414if test $ac_cv_member_struct_tm_tm_zone = yes; then
15415
15416cat >>confdefs.h <<_ACEOF
15417#define HAVE_STRUCT_TM_TM_ZONE 1
15418_ACEOF
15419
15420
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015421fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015422
Martin v. Löwis11437992002-04-12 09:54:03 +000015423if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15424
15425cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015426#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015427_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015428
15429else
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 echo "$as_me:$LINENO: checking for tzname" >&5
15431echo $ECHO_N "checking for tzname... $ECHO_C" >&6
15432if test "${ac_cv_var_tzname+set}" = set; then
15433 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015434else
Martin v. Löwis11437992002-04-12 09:54:03 +000015435 cat >conftest.$ac_ext <<_ACEOF
15436#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015437/* confdefs.h. */
15438_ACEOF
15439cat confdefs.h >>conftest.$ac_ext
15440cat >>conftest.$ac_ext <<_ACEOF
15441/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015442#include <time.h>
15443#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015444extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015445#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015446
Martin v. Löwis11437992002-04-12 09:54:03 +000015447int
15448main ()
15449{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015450atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000015451 ;
15452 return 0;
15453}
15454_ACEOF
15455rm -f conftest.$ac_objext conftest$ac_exeext
15456if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15457 (eval $ac_link) 2>&5
15458 ac_status=$?
15459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15460 (exit $ac_status); } &&
15461 { ac_try='test -s conftest$ac_exeext'
15462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15463 (eval $ac_try) 2>&5
15464 ac_status=$?
15465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15466 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015467 ac_cv_var_tzname=yes
15468else
Martin v. Löwis11437992002-04-12 09:54:03 +000015469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015470sed 's/^/| /' conftest.$ac_ext >&5
15471
Martin v. Löwis11437992002-04-12 09:54:03 +000015472ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015473fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015474rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000015475fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015476echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
15477echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015478 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015479
15480cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015481#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015482_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015483
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015484 fi
15485fi
15486
Martin v. Löwis11437992002-04-12 09:54:03 +000015487echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
15488echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
15489if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
15490 echo $ECHO_N "(cached) $ECHO_C" >&6
15491else
15492 cat >conftest.$ac_ext <<_ACEOF
15493#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015494/* confdefs.h. */
15495_ACEOF
15496cat confdefs.h >>conftest.$ac_ext
15497cat >>conftest.$ac_ext <<_ACEOF
15498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015499$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015500int
15501main ()
15502{
15503static struct stat ac_aggr;
15504if (ac_aggr.st_rdev)
15505return 0;
15506 ;
15507 return 0;
15508}
15509_ACEOF
15510rm -f conftest.$ac_objext
15511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15512 (eval $ac_compile) 2>&5
15513 ac_status=$?
15514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15515 (exit $ac_status); } &&
15516 { ac_try='test -s conftest.$ac_objext'
15517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15518 (eval $ac_try) 2>&5
15519 ac_status=$?
15520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15521 (exit $ac_status); }; }; then
15522 ac_cv_member_struct_stat_st_rdev=yes
15523else
15524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015525sed 's/^/| /' conftest.$ac_ext >&5
15526
15527cat >conftest.$ac_ext <<_ACEOF
15528#line $LINENO "configure"
15529/* confdefs.h. */
15530_ACEOF
15531cat confdefs.h >>conftest.$ac_ext
15532cat >>conftest.$ac_ext <<_ACEOF
15533/* end confdefs.h. */
15534$ac_includes_default
15535int
15536main ()
15537{
15538static struct stat ac_aggr;
15539if (sizeof ac_aggr.st_rdev)
15540return 0;
15541 ;
15542 return 0;
15543}
15544_ACEOF
15545rm -f conftest.$ac_objext
15546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15547 (eval $ac_compile) 2>&5
15548 ac_status=$?
15549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15550 (exit $ac_status); } &&
15551 { ac_try='test -s conftest.$ac_objext'
15552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15553 (eval $ac_try) 2>&5
15554 ac_status=$?
15555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15556 (exit $ac_status); }; }; then
15557 ac_cv_member_struct_stat_st_rdev=yes
15558else
15559 echo "$as_me: failed program was:" >&5
15560sed 's/^/| /' conftest.$ac_ext >&5
15561
Martin v. Löwis11437992002-04-12 09:54:03 +000015562ac_cv_member_struct_stat_st_rdev=no
15563fi
15564rm -f conftest.$ac_objext conftest.$ac_ext
15565fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015566rm -f conftest.$ac_objext conftest.$ac_ext
15567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015568echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
15569echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
15570if test $ac_cv_member_struct_stat_st_rdev = yes; then
15571
15572cat >>confdefs.h <<_ACEOF
15573#define HAVE_STRUCT_STAT_ST_RDEV 1
15574_ACEOF
15575
15576
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015577fi
15578
Martin v. Löwis11437992002-04-12 09:54:03 +000015579echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
15580echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
15581if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
15582 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015583else
Martin v. Löwis11437992002-04-12 09:54:03 +000015584 cat >conftest.$ac_ext <<_ACEOF
15585#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015586/* confdefs.h. */
15587_ACEOF
15588cat confdefs.h >>conftest.$ac_ext
15589cat >>conftest.$ac_ext <<_ACEOF
15590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015591$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015592int
15593main ()
15594{
15595static struct stat ac_aggr;
15596if (ac_aggr.st_blksize)
15597return 0;
15598 ;
15599 return 0;
15600}
15601_ACEOF
15602rm -f conftest.$ac_objext
15603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15604 (eval $ac_compile) 2>&5
15605 ac_status=$?
15606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15607 (exit $ac_status); } &&
15608 { ac_try='test -s conftest.$ac_objext'
15609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15610 (eval $ac_try) 2>&5
15611 ac_status=$?
15612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15613 (exit $ac_status); }; }; then
15614 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015615else
Martin v. Löwis11437992002-04-12 09:54:03 +000015616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015617sed 's/^/| /' conftest.$ac_ext >&5
15618
15619cat >conftest.$ac_ext <<_ACEOF
15620#line $LINENO "configure"
15621/* confdefs.h. */
15622_ACEOF
15623cat confdefs.h >>conftest.$ac_ext
15624cat >>conftest.$ac_ext <<_ACEOF
15625/* end confdefs.h. */
15626$ac_includes_default
15627int
15628main ()
15629{
15630static struct stat ac_aggr;
15631if (sizeof ac_aggr.st_blksize)
15632return 0;
15633 ;
15634 return 0;
15635}
15636_ACEOF
15637rm -f conftest.$ac_objext
15638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15639 (eval $ac_compile) 2>&5
15640 ac_status=$?
15641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15642 (exit $ac_status); } &&
15643 { ac_try='test -s conftest.$ac_objext'
15644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15645 (eval $ac_try) 2>&5
15646 ac_status=$?
15647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15648 (exit $ac_status); }; }; then
15649 ac_cv_member_struct_stat_st_blksize=yes
15650else
15651 echo "$as_me: failed program was:" >&5
15652sed 's/^/| /' conftest.$ac_ext >&5
15653
Martin v. Löwis11437992002-04-12 09:54:03 +000015654ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015655fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015656rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015657fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015658rm -f conftest.$ac_objext conftest.$ac_ext
15659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015660echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
15661echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
15662if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015663
Martin v. Löwis11437992002-04-12 09:54:03 +000015664cat >>confdefs.h <<_ACEOF
15665#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
15666_ACEOF
15667
15668
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015669fi
15670
Martin v. Löwis11437992002-04-12 09:54:03 +000015671echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
15672echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
15673if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
15674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015675else
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 cat >conftest.$ac_ext <<_ACEOF
15677#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015678/* confdefs.h. */
15679_ACEOF
15680cat confdefs.h >>conftest.$ac_ext
15681cat >>conftest.$ac_ext <<_ACEOF
15682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015683$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015684int
15685main ()
15686{
15687static struct stat ac_aggr;
15688if (ac_aggr.st_blocks)
15689return 0;
15690 ;
15691 return 0;
15692}
15693_ACEOF
15694rm -f conftest.$ac_objext
15695if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15696 (eval $ac_compile) 2>&5
15697 ac_status=$?
15698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15699 (exit $ac_status); } &&
15700 { ac_try='test -s conftest.$ac_objext'
15701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15702 (eval $ac_try) 2>&5
15703 ac_status=$?
15704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15705 (exit $ac_status); }; }; then
15706 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015707else
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015709sed 's/^/| /' conftest.$ac_ext >&5
15710
15711cat >conftest.$ac_ext <<_ACEOF
15712#line $LINENO "configure"
15713/* confdefs.h. */
15714_ACEOF
15715cat confdefs.h >>conftest.$ac_ext
15716cat >>conftest.$ac_ext <<_ACEOF
15717/* end confdefs.h. */
15718$ac_includes_default
15719int
15720main ()
15721{
15722static struct stat ac_aggr;
15723if (sizeof ac_aggr.st_blocks)
15724return 0;
15725 ;
15726 return 0;
15727}
15728_ACEOF
15729rm -f conftest.$ac_objext
15730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15731 (eval $ac_compile) 2>&5
15732 ac_status=$?
15733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15734 (exit $ac_status); } &&
15735 { ac_try='test -s conftest.$ac_objext'
15736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15737 (eval $ac_try) 2>&5
15738 ac_status=$?
15739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15740 (exit $ac_status); }; }; then
15741 ac_cv_member_struct_stat_st_blocks=yes
15742else
15743 echo "$as_me: failed program was:" >&5
15744sed 's/^/| /' conftest.$ac_ext >&5
15745
Martin v. Löwis11437992002-04-12 09:54:03 +000015746ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015748rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015749fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015750rm -f conftest.$ac_objext conftest.$ac_ext
15751fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015752echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
15753echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
15754if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015755
Martin v. Löwis11437992002-04-12 09:54:03 +000015756cat >>confdefs.h <<_ACEOF
15757#define HAVE_STRUCT_STAT_ST_BLOCKS 1
15758_ACEOF
15759
15760
15761cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015762#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015763_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015764
15765else
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015767fi
15768
Michael W. Hudson54241132001-12-07 15:38:26 +000015769
Martin v. Löwis11437992002-04-12 09:54:03 +000015770
15771echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
15772echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
15773if test "${ac_cv_header_time_altzone+set}" = set; then
15774 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015775else
Martin v. Löwis11437992002-04-12 09:54:03 +000015776 cat >conftest.$ac_ext <<_ACEOF
15777#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015778/* confdefs.h. */
15779_ACEOF
15780cat confdefs.h >>conftest.$ac_ext
15781cat >>conftest.$ac_ext <<_ACEOF
15782/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015783#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015784int
15785main ()
15786{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015787return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015788 ;
15789 return 0;
15790}
15791_ACEOF
15792rm -f conftest.$ac_objext
15793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15794 (eval $ac_compile) 2>&5
15795 ac_status=$?
15796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15797 (exit $ac_status); } &&
15798 { ac_try='test -s conftest.$ac_objext'
15799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15800 (eval $ac_try) 2>&5
15801 ac_status=$?
15802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15803 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015804 ac_cv_header_time_altzone=yes
15805else
Martin v. Löwis11437992002-04-12 09:54:03 +000015806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015807sed 's/^/| /' conftest.$ac_ext >&5
15808
Martin v. Löwis11437992002-04-12 09:54:03 +000015809ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015811rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015812fi
15813
Martin v. Löwis11437992002-04-12 09:54:03 +000015814echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
15815echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015816if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015817
15818cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015819#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015820_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015821
15822fi
15823
Guido van Rossumda88dad1995-01-26 00:46:29 +000015824was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015825echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15826echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15827cat >conftest.$ac_ext <<_ACEOF
15828#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015829/* confdefs.h. */
15830_ACEOF
15831cat confdefs.h >>conftest.$ac_ext
15832cat >>conftest.$ac_ext <<_ACEOF
15833/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015834
15835#include <sys/types.h>
15836#include <sys/select.h>
15837#include <sys/time.h>
15838
Martin v. Löwis11437992002-04-12 09:54:03 +000015839int
15840main ()
15841{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015842;
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 ;
15844 return 0;
15845}
15846_ACEOF
15847rm -f conftest.$ac_objext
15848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15849 (eval $ac_compile) 2>&5
15850 ac_status=$?
15851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15852 (exit $ac_status); } &&
15853 { ac_try='test -s conftest.$ac_objext'
15854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15855 (eval $ac_try) 2>&5
15856 ac_status=$?
15857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15858 (exit $ac_status); }; }; then
15859
15860
15861cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015862#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015863_ACEOF
15864
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015865 was_it_defined=yes
15866
Guido van Rossumf78abae1997-01-21 22:02:36 +000015867else
Martin v. Löwis11437992002-04-12 09:54:03 +000015868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015869sed 's/^/| /' conftest.$ac_ext >&5
15870
Guido van Rossum7f43da71994-08-01 12:15:30 +000015871fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015872rm -f conftest.$ac_objext conftest.$ac_ext
15873echo "$as_me:$LINENO: result: $was_it_defined" >&5
15874echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015875
Martin v. Löwis11437992002-04-12 09:54:03 +000015876echo "$as_me:$LINENO: checking for addrinfo" >&5
15877echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15878if test "${ac_cv_struct_addrinfo+set}" = set; then
15879 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015880else
Martin v. Löwis11437992002-04-12 09:54:03 +000015881 cat >conftest.$ac_ext <<_ACEOF
15882#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015883/* confdefs.h. */
15884_ACEOF
15885cat confdefs.h >>conftest.$ac_ext
15886cat >>conftest.$ac_ext <<_ACEOF
15887/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015888
15889# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015890int
15891main ()
15892{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015893struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 ;
15895 return 0;
15896}
15897_ACEOF
15898rm -f conftest.$ac_objext
15899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15900 (eval $ac_compile) 2>&5
15901 ac_status=$?
15902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15903 (exit $ac_status); } &&
15904 { ac_try='test -s conftest.$ac_objext'
15905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15906 (eval $ac_try) 2>&5
15907 ac_status=$?
15908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15909 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015910 ac_cv_struct_addrinfo=yes
15911else
Martin v. Löwis11437992002-04-12 09:54:03 +000015912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015913sed 's/^/| /' conftest.$ac_ext >&5
15914
Martin v. Löwis11437992002-04-12 09:54:03 +000015915ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015916fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015917rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015918fi
15919
Martin v. Löwis11437992002-04-12 09:54:03 +000015920echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15921echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015922if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015923
15924cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015925#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015926_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015927
15928fi
15929
Martin v. Löwis11437992002-04-12 09:54:03 +000015930echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15931echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15932if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15933 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015934else
Martin v. Löwis11437992002-04-12 09:54:03 +000015935 cat >conftest.$ac_ext <<_ACEOF
15936#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015937/* confdefs.h. */
15938_ACEOF
15939cat confdefs.h >>conftest.$ac_ext
15940cat >>conftest.$ac_ext <<_ACEOF
15941/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015942
15943# include <sys/types.h>
15944# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015945int
15946main ()
15947{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015948struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 ;
15950 return 0;
15951}
15952_ACEOF
15953rm -f conftest.$ac_objext
15954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15955 (eval $ac_compile) 2>&5
15956 ac_status=$?
15957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15958 (exit $ac_status); } &&
15959 { ac_try='test -s conftest.$ac_objext'
15960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15961 (eval $ac_try) 2>&5
15962 ac_status=$?
15963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015965 ac_cv_struct_sockaddr_storage=yes
15966else
Martin v. Löwis11437992002-04-12 09:54:03 +000015967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015968sed 's/^/| /' conftest.$ac_ext >&5
15969
Martin v. Löwis11437992002-04-12 09:54:03 +000015970ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015971fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015972rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015973fi
15974
Martin v. Löwis11437992002-04-12 09:54:03 +000015975echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15976echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015977if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015978
15979cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015980#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015981_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015982
15983fi
15984
Guido van Rossum627b2d71993-12-24 10:39:16 +000015985# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015986
Michael W. Hudson54241132001-12-07 15:38:26 +000015987
Martin v. Löwis11437992002-04-12 09:54:03 +000015988echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15989echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15990if test "${ac_cv_c_char_unsigned+set}" = set; then
15991 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015992else
Martin v. Löwis11437992002-04-12 09:54:03 +000015993 cat >conftest.$ac_ext <<_ACEOF
15994#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015995/* confdefs.h. */
15996_ACEOF
15997cat confdefs.h >>conftest.$ac_ext
15998cat >>conftest.$ac_ext <<_ACEOF
15999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016000$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016001int
16002main ()
16003{
16004static int test_array [1 - 2 * !(((char) -1) < 0)];
16005test_array [0] = 0
16006
16007 ;
16008 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016009}
Martin v. Löwis11437992002-04-12 09:54:03 +000016010_ACEOF
16011rm -f conftest.$ac_objext
16012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16013 (eval $ac_compile) 2>&5
16014 ac_status=$?
16015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16016 (exit $ac_status); } &&
16017 { ac_try='test -s conftest.$ac_objext'
16018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16019 (eval $ac_try) 2>&5
16020 ac_status=$?
16021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16022 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016023 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016024else
16025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016026sed 's/^/| /' conftest.$ac_ext >&5
16027
Martin v. Löwis11437992002-04-12 09:54:03 +000016028ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016030rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016031fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016032echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16033echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016034if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016036#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016037_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016038
16039fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016040
Martin v. Löwis11437992002-04-12 09:54:03 +000016041echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
16042echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16043if test "${ac_cv_c_const+set}" = set; then
16044 echo $ECHO_N "(cached) $ECHO_C" >&6
16045else
16046 cat >conftest.$ac_ext <<_ACEOF
16047#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016048/* confdefs.h. */
16049_ACEOF
16050cat confdefs.h >>conftest.$ac_ext
16051cat >>conftest.$ac_ext <<_ACEOF
16052/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016053
Martin v. Löwis11437992002-04-12 09:54:03 +000016054int
16055main ()
16056{
16057/* FIXME: Include the comments suggested by Paul. */
16058#ifndef __cplusplus
16059 /* Ultrix mips cc rejects this. */
16060 typedef int charset[2];
16061 const charset x;
16062 /* SunOS 4.1.1 cc rejects this. */
16063 char const *const *ccp;
16064 char **p;
16065 /* NEC SVR4.0.2 mips cc rejects this. */
16066 struct point {int x, y;};
16067 static struct point const zero = {0,0};
16068 /* AIX XL C 1.02.0.0 rejects this.
16069 It does not let you subtract one const X* pointer from another in
16070 an arm of an if-expression whose if-part is not a constant
16071 expression */
16072 const char *g = "string";
16073 ccp = &g + (g ? g-g : 0);
16074 /* HPUX 7.0 cc rejects these. */
16075 ++ccp;
16076 p = (char**) ccp;
16077 ccp = (char const *const *) p;
16078 { /* SCO 3.2v4 cc rejects this. */
16079 char *t;
16080 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016081
Martin v. Löwis11437992002-04-12 09:54:03 +000016082 *t++ = 0;
16083 }
16084 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16085 int x[] = {25, 17};
16086 const int *foo = &x[0];
16087 ++foo;
16088 }
16089 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16090 typedef const int *iptr;
16091 iptr p = 0;
16092 ++p;
16093 }
16094 { /* AIX XL C 1.02.0.0 rejects this saying
16095 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16096 struct s { int j; const int *ap[3]; };
16097 struct s *b; b->j = 5;
16098 }
16099 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16100 const int foo = 10;
16101 }
16102#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016103
Martin v. Löwis11437992002-04-12 09:54:03 +000016104 ;
16105 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016106}
Martin v. Löwis11437992002-04-12 09:54:03 +000016107_ACEOF
16108rm -f conftest.$ac_objext
16109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16110 (eval $ac_compile) 2>&5
16111 ac_status=$?
16112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16113 (exit $ac_status); } &&
16114 { ac_try='test -s conftest.$ac_objext'
16115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16116 (eval $ac_try) 2>&5
16117 ac_status=$?
16118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16119 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016120 ac_cv_c_const=yes
16121else
Martin v. Löwis11437992002-04-12 09:54:03 +000016122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016123sed 's/^/| /' conftest.$ac_ext >&5
16124
Martin v. Löwis11437992002-04-12 09:54:03 +000016125ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016127rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016129echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
16130echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016131if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016132
16133cat >>confdefs.h <<\_ACEOF
16134#define const
16135_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016136
16137fi
16138
Michael W. Hudson54241132001-12-07 15:38:26 +000016139
Guido van Rossumda88dad1995-01-26 00:46:29 +000016140works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016141echo "$as_me:$LINENO: checking for working volatile" >&5
16142echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
16143cat >conftest.$ac_ext <<_ACEOF
16144#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016145/* confdefs.h. */
16146_ACEOF
16147cat confdefs.h >>conftest.$ac_ext
16148cat >>conftest.$ac_ext <<_ACEOF
16149/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016150
Martin v. Löwis11437992002-04-12 09:54:03 +000016151int
16152main ()
16153{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016154volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016155 ;
16156 return 0;
16157}
16158_ACEOF
16159rm -f conftest.$ac_objext
16160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16161 (eval $ac_compile) 2>&5
16162 ac_status=$?
16163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16164 (exit $ac_status); } &&
16165 { ac_try='test -s conftest.$ac_objext'
16166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16167 (eval $ac_try) 2>&5
16168 ac_status=$?
16169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16170 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016171 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016172else
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016174sed 's/^/| /' conftest.$ac_ext >&5
16175
Martin v. Löwis11437992002-04-12 09:54:03 +000016176
16177cat >>confdefs.h <<\_ACEOF
16178#define volatile
16179_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016180
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016181
Guido van Rossum627b2d71993-12-24 10:39:16 +000016182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016183rm -f conftest.$ac_objext conftest.$ac_ext
16184echo "$as_me:$LINENO: result: $works" >&5
16185echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016186
Guido van Rossumda88dad1995-01-26 00:46:29 +000016187works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016188echo "$as_me:$LINENO: checking for working signed char" >&5
16189echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
16190cat >conftest.$ac_ext <<_ACEOF
16191#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016192/* confdefs.h. */
16193_ACEOF
16194cat confdefs.h >>conftest.$ac_ext
16195cat >>conftest.$ac_ext <<_ACEOF
16196/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016197
Martin v. Löwis11437992002-04-12 09:54:03 +000016198int
16199main ()
16200{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016201signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000016202 ;
16203 return 0;
16204}
16205_ACEOF
16206rm -f conftest.$ac_objext
16207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16208 (eval $ac_compile) 2>&5
16209 ac_status=$?
16210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16211 (exit $ac_status); } &&
16212 { ac_try='test -s conftest.$ac_objext'
16213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16214 (eval $ac_try) 2>&5
16215 ac_status=$?
16216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16217 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016218 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016219else
Martin v. Löwis11437992002-04-12 09:54:03 +000016220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016221sed 's/^/| /' conftest.$ac_ext >&5
16222
Martin v. Löwis11437992002-04-12 09:54:03 +000016223
16224cat >>confdefs.h <<\_ACEOF
16225#define signed
16226_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016227
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016228
Guido van Rossum7f43da71994-08-01 12:15:30 +000016229fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016230rm -f conftest.$ac_objext conftest.$ac_ext
16231echo "$as_me:$LINENO: result: $works" >&5
16232echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016233
Guido van Rossumda88dad1995-01-26 00:46:29 +000016234have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016235echo "$as_me:$LINENO: checking for prototypes" >&5
16236echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
16237cat >conftest.$ac_ext <<_ACEOF
16238#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016239/* confdefs.h. */
16240_ACEOF
16241cat confdefs.h >>conftest.$ac_ext
16242cat >>conftest.$ac_ext <<_ACEOF
16243/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016244int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016245int
16246main ()
16247{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016248return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000016249 ;
16250 return 0;
16251}
16252_ACEOF
16253rm -f conftest.$ac_objext
16254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16255 (eval $ac_compile) 2>&5
16256 ac_status=$?
16257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16258 (exit $ac_status); } &&
16259 { ac_try='test -s conftest.$ac_objext'
16260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16261 (eval $ac_try) 2>&5
16262 ac_status=$?
16263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16264 (exit $ac_status); }; }; then
16265
16266
16267cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016268#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016269_ACEOF
16270
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016271 have_prototypes=yes
16272
Guido van Rossumf78abae1997-01-21 22:02:36 +000016273else
Martin v. Löwis11437992002-04-12 09:54:03 +000016274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016275sed 's/^/| /' conftest.$ac_ext >&5
16276
Guido van Rossum7f43da71994-08-01 12:15:30 +000016277fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016278rm -f conftest.$ac_objext conftest.$ac_ext
16279echo "$as_me:$LINENO: result: $have_prototypes" >&5
16280echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016281
Guido van Rossumda88dad1995-01-26 00:46:29 +000016282works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016283echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
16284echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
16285cat >conftest.$ac_ext <<_ACEOF
16286#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016287/* confdefs.h. */
16288_ACEOF
16289cat confdefs.h >>conftest.$ac_ext
16290cat >>conftest.$ac_ext <<_ACEOF
16291/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016292
16293#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000016294int foo(int x, ...) {
16295 va_list va;
16296 va_start(va, x);
16297 va_arg(va, int);
16298 va_arg(va, char *);
16299 va_arg(va, double);
16300 return 0;
16301}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016302
Martin v. Löwis11437992002-04-12 09:54:03 +000016303int
16304main ()
16305{
Guido van Rossum90eea071996-08-30 20:58:57 +000016306return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000016307 ;
16308 return 0;
16309}
16310_ACEOF
16311rm -f conftest.$ac_objext
16312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16313 (eval $ac_compile) 2>&5
16314 ac_status=$?
16315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16316 (exit $ac_status); } &&
16317 { ac_try='test -s conftest.$ac_objext'
16318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16319 (eval $ac_try) 2>&5
16320 ac_status=$?
16321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16322 (exit $ac_status); }; }; then
16323
16324
16325cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016326#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016327_ACEOF
16328
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016329 works=yes
16330
Guido van Rossumf78abae1997-01-21 22:02:36 +000016331else
Martin v. Löwis11437992002-04-12 09:54:03 +000016332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016333sed 's/^/| /' conftest.$ac_ext >&5
16334
Guido van Rossum627b2d71993-12-24 10:39:16 +000016335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016336rm -f conftest.$ac_objext conftest.$ac_ext
16337echo "$as_me:$LINENO: result: $works" >&5
16338echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016339
Guido van Rossumda88dad1995-01-26 00:46:29 +000016340if test "$have_prototypes" = yes; then
16341bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016342echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
16343echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
16344cat >conftest.$ac_ext <<_ACEOF
16345#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016346/* confdefs.h. */
16347_ACEOF
16348cat confdefs.h >>conftest.$ac_ext
16349cat >>conftest.$ac_ext <<_ACEOF
16350/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016351#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016352int
16353main ()
16354{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016355char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000016356 ;
16357 return 0;
16358}
16359_ACEOF
16360rm -f conftest.$ac_objext
16361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16362 (eval $ac_compile) 2>&5
16363 ac_status=$?
16364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16365 (exit $ac_status); } &&
16366 { ac_try='test -s conftest.$ac_objext'
16367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16368 (eval $ac_try) 2>&5
16369 ac_status=$?
16370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16371 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000016372 :
16373else
Martin v. Löwis11437992002-04-12 09:54:03 +000016374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016375sed 's/^/| /' conftest.$ac_ext >&5
16376
Martin v. Löwis11437992002-04-12 09:54:03 +000016377
16378cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016379#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016380_ACEOF
16381
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016382 bad_prototypes=yes
16383
Guido van Rossum627b2d71993-12-24 10:39:16 +000016384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016385rm -f conftest.$ac_objext conftest.$ac_ext
16386echo "$as_me:$LINENO: result: $bad_prototypes" >&5
16387echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000016388fi
16389
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016390# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000016391echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
16392echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
16393cat >conftest.$ac_ext <<_ACEOF
16394#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016395/* confdefs.h. */
16396_ACEOF
16397cat confdefs.h >>conftest.$ac_ext
16398cat >>conftest.$ac_ext <<_ACEOF
16399/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016400#include <sys/types.h>
16401#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016402int
16403main ()
16404{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016405struct sockaddr x;
16406x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 ;
16408 return 0;
16409}
16410_ACEOF
16411rm -f conftest.$ac_objext
16412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16413 (eval $ac_compile) 2>&5
16414 ac_status=$?
16415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16416 (exit $ac_status); } &&
16417 { ac_try='test -s conftest.$ac_objext'
16418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16419 (eval $ac_try) 2>&5
16420 ac_status=$?
16421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16422 (exit $ac_status); }; }; then
16423 echo "$as_me:$LINENO: result: yes" >&5
16424echo "${ECHO_T}yes" >&6
16425
16426cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016427#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016428_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016429
16430else
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016432sed 's/^/| /' conftest.$ac_ext >&5
16433
Martin v. Löwis11437992002-04-12 09:54:03 +000016434echo "$as_me:$LINENO: result: no" >&5
16435echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016436fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016437rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016438
Guido van Rossumda88dad1995-01-26 00:46:29 +000016439va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016440echo "$as_me:$LINENO: checking whether va_list is an array" >&5
16441echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
16442cat >conftest.$ac_ext <<_ACEOF
16443#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016444/* confdefs.h. */
16445_ACEOF
16446cat confdefs.h >>conftest.$ac_ext
16447cat >>conftest.$ac_ext <<_ACEOF
16448/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016449
16450#ifdef HAVE_STDARG_PROTOTYPES
16451#include <stdarg.h>
16452#else
16453#include <varargs.h>
16454#endif
16455
Martin v. Löwis11437992002-04-12 09:54:03 +000016456int
16457main ()
16458{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016459va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000016460 ;
16461 return 0;
16462}
16463_ACEOF
16464rm -f conftest.$ac_objext
16465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16466 (eval $ac_compile) 2>&5
16467 ac_status=$?
16468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16469 (exit $ac_status); } &&
16470 { ac_try='test -s conftest.$ac_objext'
16471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16472 (eval $ac_try) 2>&5
16473 ac_status=$?
16474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16475 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016476 :
16477else
Martin v. Löwis11437992002-04-12 09:54:03 +000016478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016479sed 's/^/| /' conftest.$ac_ext >&5
16480
Martin v. Löwis11437992002-04-12 09:54:03 +000016481
16482
16483cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016484#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016485_ACEOF
16486
Guido van Rossumda88dad1995-01-26 00:46:29 +000016487 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016488
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016489fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016490rm -f conftest.$ac_objext conftest.$ac_ext
16491echo "$as_me:$LINENO: result: $va_list_is_array" >&5
16492echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016493
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016494# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000016495
16496
16497
16498echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
16499echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
16500if test "${ac_cv_func_gethostbyname_r+set}" = set; then
16501 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016502else
Martin v. Löwis11437992002-04-12 09:54:03 +000016503 cat >conftest.$ac_ext <<_ACEOF
16504#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016505/* confdefs.h. */
16506_ACEOF
16507cat confdefs.h >>conftest.$ac_ext
16508cat >>conftest.$ac_ext <<_ACEOF
16509/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016510/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016511 which can conflict with char gethostbyname_r (); below.
16512 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016513 <limits.h> exists even on freestanding compilers. Under hpux,
16514 including <limits.h> includes <sys/time.h> and causes problems
16515 checking for functions defined therein. */
16516#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016517# include <limits.h>
16518#else
16519# include <assert.h>
16520#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016521/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016522#ifdef __cplusplus
16523extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016524{
Martin v. Löwis11437992002-04-12 09:54:03 +000016525#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016526/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016527 builtin and then its argument prototype would still apply. */
16528char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016529/* The GNU C library defines this for functions which it implements
16530 to always fail with ENOSYS. Some functions are actually named
16531 something starting with __ and the normal name is an alias. */
16532#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
16533choke me
16534#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016535char (*f) () = gethostbyname_r;
16536#endif
16537#ifdef __cplusplus
16538}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016539#endif
16540
Skip Montanaro6dead952003-09-25 14:50:04 +000016541int
16542main ()
16543{
16544return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000016545 ;
16546 return 0;
16547}
16548_ACEOF
16549rm -f conftest.$ac_objext conftest$ac_exeext
16550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16551 (eval $ac_link) 2>&5
16552 ac_status=$?
16553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16554 (exit $ac_status); } &&
16555 { ac_try='test -s conftest$ac_exeext'
16556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16557 (eval $ac_try) 2>&5
16558 ac_status=$?
16559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16560 (exit $ac_status); }; }; then
16561 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016562else
Martin v. Löwis11437992002-04-12 09:54:03 +000016563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016564sed 's/^/| /' conftest.$ac_ext >&5
16565
Martin v. Löwis11437992002-04-12 09:54:03 +000016566ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016568rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016569fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016570echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
16571echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
16572if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016573
Martin v. Löwis11437992002-04-12 09:54:03 +000016574 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016575#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016576_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016577
Martin v. Löwis11437992002-04-12 09:54:03 +000016578 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
16579echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016580 OLD_CFLAGS=$CFLAGS
16581 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016582 cat >conftest.$ac_ext <<_ACEOF
16583#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016584/* confdefs.h. */
16585_ACEOF
16586cat confdefs.h >>conftest.$ac_ext
16587cat >>conftest.$ac_ext <<_ACEOF
16588/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016589
16590# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016591
Martin v. Löwis11437992002-04-12 09:54:03 +000016592int
16593main ()
16594{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016595
16596 char *name;
16597 struct hostent *he, *res;
16598 char buffer[2048];
16599 int buflen = 2048;
16600 int h_errnop;
16601
16602 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016603
16604 ;
16605 return 0;
16606}
16607_ACEOF
16608rm -f conftest.$ac_objext
16609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16610 (eval $ac_compile) 2>&5
16611 ac_status=$?
16612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16613 (exit $ac_status); } &&
16614 { ac_try='test -s conftest.$ac_objext'
16615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16616 (eval $ac_try) 2>&5
16617 ac_status=$?
16618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16619 (exit $ac_status); }; }; then
16620
16621 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016622#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016623_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016624
Martin v. Löwis11437992002-04-12 09:54:03 +000016625
16626cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016627#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016628_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016629
Martin v. Löwis11437992002-04-12 09:54:03 +000016630 echo "$as_me:$LINENO: result: yes" >&5
16631echo "${ECHO_T}yes" >&6
16632
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016633else
Martin v. Löwis11437992002-04-12 09:54:03 +000016634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016635sed 's/^/| /' conftest.$ac_ext >&5
16636
Martin v. Löwis11437992002-04-12 09:54:03 +000016637
16638 echo "$as_me:$LINENO: result: no" >&5
16639echo "${ECHO_T}no" >&6
16640 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
16641echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
16642 cat >conftest.$ac_ext <<_ACEOF
16643#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016644/* confdefs.h. */
16645_ACEOF
16646cat confdefs.h >>conftest.$ac_ext
16647cat >>conftest.$ac_ext <<_ACEOF
16648/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016649
16650# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016651
Martin v. Löwis11437992002-04-12 09:54:03 +000016652int
16653main ()
16654{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016655
16656 char *name;
16657 struct hostent *he;
16658 char buffer[2048];
16659 int buflen = 2048;
16660 int h_errnop;
16661
16662 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016663
16664 ;
16665 return 0;
16666}
16667_ACEOF
16668rm -f conftest.$ac_objext
16669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16670 (eval $ac_compile) 2>&5
16671 ac_status=$?
16672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16673 (exit $ac_status); } &&
16674 { ac_try='test -s conftest.$ac_objext'
16675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16676 (eval $ac_try) 2>&5
16677 ac_status=$?
16678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16679 (exit $ac_status); }; }; then
16680
16681 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016682#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016683_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016684
Martin v. Löwis11437992002-04-12 09:54:03 +000016685
16686cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016687#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016688_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016689
Martin v. Löwis11437992002-04-12 09:54:03 +000016690 echo "$as_me:$LINENO: result: yes" >&5
16691echo "${ECHO_T}yes" >&6
16692
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016693else
Martin v. Löwis11437992002-04-12 09:54:03 +000016694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016695sed 's/^/| /' conftest.$ac_ext >&5
16696
Martin v. Löwis11437992002-04-12 09:54:03 +000016697
16698 echo "$as_me:$LINENO: result: no" >&5
16699echo "${ECHO_T}no" >&6
16700 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
16701echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
16702 cat >conftest.$ac_ext <<_ACEOF
16703#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016704/* confdefs.h. */
16705_ACEOF
16706cat confdefs.h >>conftest.$ac_ext
16707cat >>conftest.$ac_ext <<_ACEOF
16708/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016709
16710# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016711
Martin v. Löwis11437992002-04-12 09:54:03 +000016712int
16713main ()
16714{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016715
16716 char *name;
16717 struct hostent *he;
16718 struct hostent_data data;
16719
16720 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000016721
16722 ;
16723 return 0;
16724}
16725_ACEOF
16726rm -f conftest.$ac_objext
16727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16728 (eval $ac_compile) 2>&5
16729 ac_status=$?
16730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16731 (exit $ac_status); } &&
16732 { ac_try='test -s conftest.$ac_objext'
16733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16734 (eval $ac_try) 2>&5
16735 ac_status=$?
16736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16737 (exit $ac_status); }; }; then
16738
16739 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016740#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016741_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016742
Martin v. Löwis11437992002-04-12 09:54:03 +000016743
16744cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016745#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016746_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016747
Martin v. Löwis11437992002-04-12 09:54:03 +000016748 echo "$as_me:$LINENO: result: yes" >&5
16749echo "${ECHO_T}yes" >&6
16750
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016751else
Martin v. Löwis11437992002-04-12 09:54:03 +000016752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016753sed 's/^/| /' conftest.$ac_ext >&5
16754
Martin v. Löwis11437992002-04-12 09:54:03 +000016755
16756 echo "$as_me:$LINENO: result: no" >&5
16757echo "${ECHO_T}no" >&6
16758
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016759fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016760rm -f conftest.$ac_objext conftest.$ac_ext
16761
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016762fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016763rm -f conftest.$ac_objext conftest.$ac_ext
16764
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016765fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016766rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016767 CFLAGS=$OLD_CFLAGS
16768
16769else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016770
Martin v. Löwis11437992002-04-12 09:54:03 +000016771
16772for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000016773do
Martin v. Löwis11437992002-04-12 09:54:03 +000016774as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16775echo "$as_me:$LINENO: checking for $ac_func" >&5
16776echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16777if eval "test \"\${$as_ac_var+set}\" = set"; then
16778 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016779else
Martin v. Löwis11437992002-04-12 09:54:03 +000016780 cat >conftest.$ac_ext <<_ACEOF
16781#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016782/* confdefs.h. */
16783_ACEOF
16784cat confdefs.h >>conftest.$ac_ext
16785cat >>conftest.$ac_ext <<_ACEOF
16786/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016787/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016788 which can conflict with char $ac_func (); below.
16789 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016790 <limits.h> exists even on freestanding compilers. Under hpux,
16791 including <limits.h> includes <sys/time.h> and causes problems
16792 checking for functions defined therein. */
16793#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016794# include <limits.h>
16795#else
16796# include <assert.h>
16797#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016798/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016799#ifdef __cplusplus
16800extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016801{
Martin v. Löwis11437992002-04-12 09:54:03 +000016802#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016803/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016804 builtin and then its argument prototype would still apply. */
16805char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016806/* The GNU C library defines this for functions which it implements
16807 to always fail with ENOSYS. Some functions are actually named
16808 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016809#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016810choke me
16811#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016812char (*f) () = $ac_func;
16813#endif
16814#ifdef __cplusplus
16815}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016816#endif
16817
Skip Montanaro6dead952003-09-25 14:50:04 +000016818int
16819main ()
16820{
16821return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016822 ;
16823 return 0;
16824}
16825_ACEOF
16826rm -f conftest.$ac_objext conftest$ac_exeext
16827if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16828 (eval $ac_link) 2>&5
16829 ac_status=$?
16830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16831 (exit $ac_status); } &&
16832 { ac_try='test -s conftest$ac_exeext'
16833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16834 (eval $ac_try) 2>&5
16835 ac_status=$?
16836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16837 (exit $ac_status); }; }; then
16838 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016839else
Martin v. Löwis11437992002-04-12 09:54:03 +000016840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016841sed 's/^/| /' conftest.$ac_ext >&5
16842
Martin v. Löwis11437992002-04-12 09:54:03 +000016843eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016844fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016845rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016847echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16848echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16849if test `eval echo '${'$as_ac_var'}'` = yes; then
16850 cat >>confdefs.h <<_ACEOF
16851#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16852_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016853
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016854fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016855done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016856
Michael W. Hudson54241132001-12-07 15:38:26 +000016857
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016858fi
16859
Michael W. Hudson54241132001-12-07 15:38:26 +000016860
16861
16862
16863
16864
16865
Guido van Rossum627b2d71993-12-24 10:39:16 +000016866# checks for system services
16867# (none yet)
16868
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016869# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016870echo "$as_me:$LINENO: checking for __fpu_control" >&5
16871echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16872if test "${ac_cv_func___fpu_control+set}" = set; then
16873 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016874else
Martin v. Löwis11437992002-04-12 09:54:03 +000016875 cat >conftest.$ac_ext <<_ACEOF
16876#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016877/* confdefs.h. */
16878_ACEOF
16879cat confdefs.h >>conftest.$ac_ext
16880cat >>conftest.$ac_ext <<_ACEOF
16881/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016882/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016883 which can conflict with char __fpu_control (); below.
16884 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016885 <limits.h> exists even on freestanding compilers. Under hpux,
16886 including <limits.h> includes <sys/time.h> and causes problems
16887 checking for functions defined therein. */
16888#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016889# include <limits.h>
16890#else
16891# include <assert.h>
16892#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016893/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016894#ifdef __cplusplus
16895extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016896{
Martin v. Löwis11437992002-04-12 09:54:03 +000016897#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016898/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016899 builtin and then its argument prototype would still apply. */
16900char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016901/* The GNU C library defines this for functions which it implements
16902 to always fail with ENOSYS. Some functions are actually named
16903 something starting with __ and the normal name is an alias. */
16904#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16905choke me
16906#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016907char (*f) () = __fpu_control;
16908#endif
16909#ifdef __cplusplus
16910}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016911#endif
16912
Skip Montanaro6dead952003-09-25 14:50:04 +000016913int
16914main ()
16915{
16916return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016917 ;
16918 return 0;
16919}
16920_ACEOF
16921rm -f conftest.$ac_objext conftest$ac_exeext
16922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16923 (eval $ac_link) 2>&5
16924 ac_status=$?
16925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16926 (exit $ac_status); } &&
16927 { ac_try='test -s conftest$ac_exeext'
16928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16929 (eval $ac_try) 2>&5
16930 ac_status=$?
16931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16932 (exit $ac_status); }; }; then
16933 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016934else
Martin v. Löwis11437992002-04-12 09:54:03 +000016935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016936sed 's/^/| /' conftest.$ac_ext >&5
16937
Martin v. Löwis11437992002-04-12 09:54:03 +000016938ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016939fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016940rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016941fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016942echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16943echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16944if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016945 :
16946else
Martin v. Löwis11437992002-04-12 09:54:03 +000016947
16948echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16949echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16950if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16951 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016952else
Martin v. Löwis11437992002-04-12 09:54:03 +000016953 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016954LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016955cat >conftest.$ac_ext <<_ACEOF
16956#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016957/* confdefs.h. */
16958_ACEOF
16959cat confdefs.h >>conftest.$ac_ext
16960cat >>conftest.$ac_ext <<_ACEOF
16961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016962
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016963/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016964#ifdef __cplusplus
16965extern "C"
16966#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016967/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016968 builtin and then its argument prototype would still apply. */
16969char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016970int
16971main ()
16972{
16973__fpu_control ();
16974 ;
16975 return 0;
16976}
16977_ACEOF
16978rm -f conftest.$ac_objext conftest$ac_exeext
16979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16980 (eval $ac_link) 2>&5
16981 ac_status=$?
16982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16983 (exit $ac_status); } &&
16984 { ac_try='test -s conftest$ac_exeext'
16985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16986 (eval $ac_try) 2>&5
16987 ac_status=$?
16988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16989 (exit $ac_status); }; }; then
16990 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016991else
Martin v. Löwis11437992002-04-12 09:54:03 +000016992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016993sed 's/^/| /' conftest.$ac_ext >&5
16994
Martin v. Löwis11437992002-04-12 09:54:03 +000016995ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016996fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016997rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16998LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016999fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017000echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
17001echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
17002if test $ac_cv_lib_ieee___fpu_control = yes; then
17003 cat >>confdefs.h <<_ACEOF
17004#define HAVE_LIBIEEE 1
17005_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017006
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017007 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017008
Guido van Rossum627b2d71993-12-24 10:39:16 +000017009fi
17010
Michael W. Hudson54241132001-12-07 15:38:26 +000017011
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017012fi
17013
Michael W. Hudson54241132001-12-07 15:38:26 +000017014
Guido van Rossum7f253911997-05-09 02:42:48 +000017015# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000017016echo "$as_me:$LINENO: checking for --with-fpectl" >&5
17017echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
17018
Guido van Rossum7f253911997-05-09 02:42:48 +000017019# Check whether --with-fpectl or --without-fpectl was given.
17020if test "${with_fpectl+set}" = set; then
17021 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000017022
Guido van Rossum7f253911997-05-09 02:42:48 +000017023if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017024then
17025
17026cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000017027#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017028_ACEOF
17029
17030 echo "$as_me:$LINENO: result: yes" >&5
17031echo "${ECHO_T}yes" >&6
17032else echo "$as_me:$LINENO: result: no" >&5
17033echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017034fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017035else
Martin v. Löwis11437992002-04-12 09:54:03 +000017036 echo "$as_me:$LINENO: result: no" >&5
17037echo "${ECHO_T}no" >&6
17038fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000017039
Guido van Rossum7f43da71994-08-01 12:15:30 +000017040# check for --with-libm=...
17041
Guido van Rossum563e7081996-09-10 18:20:48 +000017042case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000017043Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000017044BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000017045*) LIBM=-lm
17046esac
Martin v. Löwis11437992002-04-12 09:54:03 +000017047echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
17048echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
17049
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017050# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017051if test "${with_libm+set}" = set; then
17052 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000017053
Guido van Rossum7f253911997-05-09 02:42:48 +000017054if test "$withval" = no
17055then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000017056 echo "$as_me:$LINENO: result: force LIBM empty" >&5
17057echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017058elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017059then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017060 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
17061echo "${ECHO_T}set LIBM=\"$withval\"" >&6
17062else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
17063echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
17064 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017065fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017066else
Martin v. Löwis11437992002-04-12 09:54:03 +000017067 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
17068echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
17069fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017070
17071# check for --with-libc=...
17072
Martin v. Löwis11437992002-04-12 09:54:03 +000017073echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
17074echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
17075
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017076# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017077if test "${with_libc+set}" = set; then
17078 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000017079
Guido van Rossum7f253911997-05-09 02:42:48 +000017080if test "$withval" = no
17081then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000017082 echo "$as_me:$LINENO: result: force LIBC empty" >&5
17083echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017084elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017085then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017086 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
17087echo "${ECHO_T}set LIBC=\"$withval\"" >&6
17088else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
17089echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
17090 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017091fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017092else
Martin v. Löwis11437992002-04-12 09:54:03 +000017093 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
17094echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
17095fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017096
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017097# check for hypot() in math library
17098LIBS_SAVE=$LIBS
17099LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000017100
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017101for ac_func in hypot
17102do
Martin v. Löwis11437992002-04-12 09:54:03 +000017103as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17104echo "$as_me:$LINENO: checking for $ac_func" >&5
17105echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17106if eval "test \"\${$as_ac_var+set}\" = set"; then
17107 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017108else
Martin v. Löwis11437992002-04-12 09:54:03 +000017109 cat >conftest.$ac_ext <<_ACEOF
17110#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017111/* confdefs.h. */
17112_ACEOF
17113cat confdefs.h >>conftest.$ac_ext
17114cat >>conftest.$ac_ext <<_ACEOF
17115/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017116/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017117 which can conflict with char $ac_func (); below.
17118 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017119 <limits.h> exists even on freestanding compilers. Under hpux,
17120 including <limits.h> includes <sys/time.h> and causes problems
17121 checking for functions defined therein. */
17122#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017123# include <limits.h>
17124#else
17125# include <assert.h>
17126#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017127/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017128#ifdef __cplusplus
17129extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017130{
Martin v. Löwis11437992002-04-12 09:54:03 +000017131#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017132/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017133 builtin and then its argument prototype would still apply. */
17134char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017135/* The GNU C library defines this for functions which it implements
17136 to always fail with ENOSYS. Some functions are actually named
17137 something starting with __ and the normal name is an alias. */
17138#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17139choke me
17140#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017141char (*f) () = $ac_func;
17142#endif
17143#ifdef __cplusplus
17144}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017145#endif
17146
Skip Montanaro6dead952003-09-25 14:50:04 +000017147int
17148main ()
17149{
17150return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017151 ;
17152 return 0;
17153}
17154_ACEOF
17155rm -f conftest.$ac_objext conftest$ac_exeext
17156if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17157 (eval $ac_link) 2>&5
17158 ac_status=$?
17159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17160 (exit $ac_status); } &&
17161 { ac_try='test -s conftest$ac_exeext'
17162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17163 (eval $ac_try) 2>&5
17164 ac_status=$?
17165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17166 (exit $ac_status); }; }; then
17167 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017168else
Martin v. Löwis11437992002-04-12 09:54:03 +000017169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017170sed 's/^/| /' conftest.$ac_ext >&5
17171
Martin v. Löwis11437992002-04-12 09:54:03 +000017172eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017174rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017176echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17177echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17178if test `eval echo '${'$as_ac_var'}'` = yes; then
17179 cat >>confdefs.h <<_ACEOF
17180#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17181_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017182
Michael W. Hudson54241132001-12-07 15:38:26 +000017183else
Martin v. Löwis11437992002-04-12 09:54:03 +000017184 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017185fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017186done
17187
Michael W. Hudson54241132001-12-07 15:38:26 +000017188
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017189LIBS=$LIBS_SAVE
17190
Guido van Rossumef2255b2000-03-10 22:30:29 +000017191# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017192if test "${ac_cv_header_wchar_h+set}" = set; then
17193 echo "$as_me:$LINENO: checking for wchar.h" >&5
17194echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
17195if test "${ac_cv_header_wchar_h+set}" = set; then
17196 echo $ECHO_N "(cached) $ECHO_C" >&6
17197fi
17198echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
17199echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017200else
Martin v. Löwis11437992002-04-12 09:54:03 +000017201 # Is the header compilable?
17202echo "$as_me:$LINENO: checking wchar.h usability" >&5
17203echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
17204cat >conftest.$ac_ext <<_ACEOF
17205#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017206/* confdefs.h. */
17207_ACEOF
17208cat confdefs.h >>conftest.$ac_ext
17209cat >>conftest.$ac_ext <<_ACEOF
17210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017211$ac_includes_default
17212#include <wchar.h>
17213_ACEOF
17214rm -f conftest.$ac_objext
17215if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17216 (eval $ac_compile) 2>&5
17217 ac_status=$?
17218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17219 (exit $ac_status); } &&
17220 { ac_try='test -s conftest.$ac_objext'
17221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17222 (eval $ac_try) 2>&5
17223 ac_status=$?
17224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17225 (exit $ac_status); }; }; then
17226 ac_header_compiler=yes
17227else
17228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017229sed 's/^/| /' conftest.$ac_ext >&5
17230
Martin v. Löwis11437992002-04-12 09:54:03 +000017231ac_header_compiler=no
17232fi
17233rm -f conftest.$ac_objext conftest.$ac_ext
17234echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17235echo "${ECHO_T}$ac_header_compiler" >&6
17236
17237# Is the header present?
17238echo "$as_me:$LINENO: checking wchar.h presence" >&5
17239echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
17240cat >conftest.$ac_ext <<_ACEOF
17241#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017242/* confdefs.h. */
17243_ACEOF
17244cat confdefs.h >>conftest.$ac_ext
17245cat >>conftest.$ac_ext <<_ACEOF
17246/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017247#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017248_ACEOF
17249if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17250 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17251 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017252 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000017253 rm -f conftest.er1
17254 cat conftest.err >&5
17255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17256 (exit $ac_status); } >/dev/null; then
17257 if test -s conftest.err; then
17258 ac_cpp_err=$ac_c_preproc_warn_flag
17259 else
17260 ac_cpp_err=
17261 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017262else
Martin v. Löwis11437992002-04-12 09:54:03 +000017263 ac_cpp_err=yes
17264fi
17265if test -z "$ac_cpp_err"; then
17266 ac_header_preproc=yes
17267else
17268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017269sed 's/^/| /' conftest.$ac_ext >&5
17270
Martin v. Löwis11437992002-04-12 09:54:03 +000017271 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017273rm -f conftest.err conftest.$ac_ext
17274echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17275echo "${ECHO_T}$ac_header_preproc" >&6
17276
17277# So? What about this header?
17278case $ac_header_compiler:$ac_header_preproc in
17279 yes:no )
17280 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
17281echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17282 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017283echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
17284 (
17285 cat <<\_ASBOX
17286## ------------------------------------ ##
17287## Report this to bug-autoconf@gnu.org. ##
17288## ------------------------------------ ##
17289_ASBOX
17290 ) |
17291 sed "s/^/$as_me: WARNING: /" >&2
17292 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017293 no:yes )
17294 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
17295echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
17296 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
17297echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
17298 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017299echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
17300 (
17301 cat <<\_ASBOX
17302## ------------------------------------ ##
17303## Report this to bug-autoconf@gnu.org. ##
17304## ------------------------------------ ##
17305_ASBOX
17306 ) |
17307 sed "s/^/$as_me: WARNING: /" >&2
17308 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017309esac
17310echo "$as_me:$LINENO: checking for wchar.h" >&5
17311echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
17312if test "${ac_cv_header_wchar_h+set}" = set; then
17313 echo $ECHO_N "(cached) $ECHO_C" >&6
17314else
17315 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000017316fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017317echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
17318echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
17319
17320fi
17321if test $ac_cv_header_wchar_h = yes; then
17322
17323
17324cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017325#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017326_ACEOF
17327
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017328 wchar_h="yes"
17329
Guido van Rossumef2255b2000-03-10 22:30:29 +000017330else
Martin v. Löwis11437992002-04-12 09:54:03 +000017331 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000017332
17333fi
17334
Michael W. Hudson54241132001-12-07 15:38:26 +000017335
Martin v. Löwis11437992002-04-12 09:54:03 +000017336
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017337# determine wchar_t size
17338if test "$wchar_h" = yes
17339then
Martin v. Löwis11437992002-04-12 09:54:03 +000017340 echo "$as_me:$LINENO: checking for wchar_t" >&5
17341echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
17342if test "${ac_cv_type_wchar_t+set}" = set; then
17343 echo $ECHO_N "(cached) $ECHO_C" >&6
17344else
17345 cat >conftest.$ac_ext <<_ACEOF
17346#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017347/* confdefs.h. */
17348_ACEOF
17349cat confdefs.h >>conftest.$ac_ext
17350cat >>conftest.$ac_ext <<_ACEOF
17351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017352#include <wchar.h>
17353
Martin v. Löwis11437992002-04-12 09:54:03 +000017354int
17355main ()
17356{
17357if ((wchar_t *) 0)
17358 return 0;
17359if (sizeof (wchar_t))
17360 return 0;
17361 ;
17362 return 0;
17363}
17364_ACEOF
17365rm -f conftest.$ac_objext
17366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17367 (eval $ac_compile) 2>&5
17368 ac_status=$?
17369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17370 (exit $ac_status); } &&
17371 { ac_try='test -s conftest.$ac_objext'
17372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17373 (eval $ac_try) 2>&5
17374 ac_status=$?
17375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17376 (exit $ac_status); }; }; then
17377 ac_cv_type_wchar_t=yes
17378else
17379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017380sed 's/^/| /' conftest.$ac_ext >&5
17381
Martin v. Löwis11437992002-04-12 09:54:03 +000017382ac_cv_type_wchar_t=no
17383fi
17384rm -f conftest.$ac_objext conftest.$ac_ext
17385fi
17386echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
17387echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
17388
17389echo "$as_me:$LINENO: checking size of wchar_t" >&5
17390echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
17391if test "${ac_cv_sizeof_wchar_t+set}" = set; then
17392 echo $ECHO_N "(cached) $ECHO_C" >&6
17393else
17394 if test "$ac_cv_type_wchar_t" = yes; then
17395 # The cast to unsigned long works around a bug in the HP C Compiler
17396 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17397 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17398 # This bug is HP SR number 8606223364.
17399 if test "$cross_compiling" = yes; then
17400 # Depending upon the size, compute the lo and hi bounds.
17401cat >conftest.$ac_ext <<_ACEOF
17402#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017403/* confdefs.h. */
17404_ACEOF
17405cat confdefs.h >>conftest.$ac_ext
17406cat >>conftest.$ac_ext <<_ACEOF
17407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017408#include <wchar.h>
17409
Martin v. Löwis11437992002-04-12 09:54:03 +000017410int
17411main ()
17412{
17413static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
17414test_array [0] = 0
17415
17416 ;
17417 return 0;
17418}
17419_ACEOF
17420rm -f conftest.$ac_objext
17421if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17422 (eval $ac_compile) 2>&5
17423 ac_status=$?
17424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17425 (exit $ac_status); } &&
17426 { ac_try='test -s conftest.$ac_objext'
17427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17428 (eval $ac_try) 2>&5
17429 ac_status=$?
17430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17431 (exit $ac_status); }; }; then
17432 ac_lo=0 ac_mid=0
17433 while :; do
17434 cat >conftest.$ac_ext <<_ACEOF
17435#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017436/* confdefs.h. */
17437_ACEOF
17438cat confdefs.h >>conftest.$ac_ext
17439cat >>conftest.$ac_ext <<_ACEOF
17440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017441#include <wchar.h>
17442
Martin v. Löwis11437992002-04-12 09:54:03 +000017443int
17444main ()
17445{
17446static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
17447test_array [0] = 0
17448
17449 ;
17450 return 0;
17451}
17452_ACEOF
17453rm -f conftest.$ac_objext
17454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17455 (eval $ac_compile) 2>&5
17456 ac_status=$?
17457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17458 (exit $ac_status); } &&
17459 { ac_try='test -s conftest.$ac_objext'
17460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17461 (eval $ac_try) 2>&5
17462 ac_status=$?
17463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17464 (exit $ac_status); }; }; then
17465 ac_hi=$ac_mid; break
17466else
17467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017468sed 's/^/| /' conftest.$ac_ext >&5
17469
Martin v. Löwis11437992002-04-12 09:54:03 +000017470ac_lo=`expr $ac_mid + 1`
17471 if test $ac_lo -le $ac_mid; then
17472 ac_lo= ac_hi=
17473 break
17474 fi
17475 ac_mid=`expr 2 '*' $ac_mid + 1`
17476fi
17477rm -f conftest.$ac_objext conftest.$ac_ext
17478 done
17479else
17480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017481sed 's/^/| /' conftest.$ac_ext >&5
17482
Martin v. Löwis11437992002-04-12 09:54:03 +000017483cat >conftest.$ac_ext <<_ACEOF
17484#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017485/* confdefs.h. */
17486_ACEOF
17487cat confdefs.h >>conftest.$ac_ext
17488cat >>conftest.$ac_ext <<_ACEOF
17489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017490#include <wchar.h>
17491
Martin v. Löwis11437992002-04-12 09:54:03 +000017492int
17493main ()
17494{
17495static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
17496test_array [0] = 0
17497
17498 ;
17499 return 0;
17500}
17501_ACEOF
17502rm -f conftest.$ac_objext
17503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17504 (eval $ac_compile) 2>&5
17505 ac_status=$?
17506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17507 (exit $ac_status); } &&
17508 { ac_try='test -s conftest.$ac_objext'
17509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17510 (eval $ac_try) 2>&5
17511 ac_status=$?
17512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17513 (exit $ac_status); }; }; then
17514 ac_hi=-1 ac_mid=-1
17515 while :; do
17516 cat >conftest.$ac_ext <<_ACEOF
17517#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017518/* confdefs.h. */
17519_ACEOF
17520cat confdefs.h >>conftest.$ac_ext
17521cat >>conftest.$ac_ext <<_ACEOF
17522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017523#include <wchar.h>
17524
Martin v. Löwis11437992002-04-12 09:54:03 +000017525int
17526main ()
17527{
17528static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
17529test_array [0] = 0
17530
17531 ;
17532 return 0;
17533}
17534_ACEOF
17535rm -f conftest.$ac_objext
17536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17537 (eval $ac_compile) 2>&5
17538 ac_status=$?
17539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17540 (exit $ac_status); } &&
17541 { ac_try='test -s conftest.$ac_objext'
17542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17543 (eval $ac_try) 2>&5
17544 ac_status=$?
17545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17546 (exit $ac_status); }; }; then
17547 ac_lo=$ac_mid; break
17548else
17549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017550sed 's/^/| /' conftest.$ac_ext >&5
17551
Martin v. Löwis11437992002-04-12 09:54:03 +000017552ac_hi=`expr '(' $ac_mid ')' - 1`
17553 if test $ac_mid -le $ac_hi; then
17554 ac_lo= ac_hi=
17555 break
17556 fi
17557 ac_mid=`expr 2 '*' $ac_mid`
17558fi
17559rm -f conftest.$ac_objext conftest.$ac_ext
17560 done
17561else
17562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017563sed 's/^/| /' conftest.$ac_ext >&5
17564
Martin v. Löwis11437992002-04-12 09:54:03 +000017565ac_lo= ac_hi=
17566fi
17567rm -f conftest.$ac_objext conftest.$ac_ext
17568fi
17569rm -f conftest.$ac_objext conftest.$ac_ext
17570# Binary search between lo and hi bounds.
17571while test "x$ac_lo" != "x$ac_hi"; do
17572 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17573 cat >conftest.$ac_ext <<_ACEOF
17574#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017575/* confdefs.h. */
17576_ACEOF
17577cat confdefs.h >>conftest.$ac_ext
17578cat >>conftest.$ac_ext <<_ACEOF
17579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017580#include <wchar.h>
17581
Martin v. Löwis11437992002-04-12 09:54:03 +000017582int
17583main ()
17584{
17585static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
17586test_array [0] = 0
17587
17588 ;
17589 return 0;
17590}
17591_ACEOF
17592rm -f conftest.$ac_objext
17593if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17594 (eval $ac_compile) 2>&5
17595 ac_status=$?
17596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17597 (exit $ac_status); } &&
17598 { ac_try='test -s conftest.$ac_objext'
17599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17600 (eval $ac_try) 2>&5
17601 ac_status=$?
17602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17603 (exit $ac_status); }; }; then
17604 ac_hi=$ac_mid
17605else
17606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017607sed 's/^/| /' conftest.$ac_ext >&5
17608
Martin v. Löwis11437992002-04-12 09:54:03 +000017609ac_lo=`expr '(' $ac_mid ')' + 1`
17610fi
17611rm -f conftest.$ac_objext conftest.$ac_ext
17612done
17613case $ac_lo in
17614?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017615'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17616See \`config.log' for more details." >&5
17617echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17618See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 { (exit 1); exit 1; }; } ;;
17620esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017621else
17622 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017623 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17624See \`config.log' for more details." >&5
17625echo "$as_me: error: cannot run test program while cross compiling
17626See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017627 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000017628else
Martin v. Löwis11437992002-04-12 09:54:03 +000017629 cat >conftest.$ac_ext <<_ACEOF
17630#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017631/* confdefs.h. */
17632_ACEOF
17633cat confdefs.h >>conftest.$ac_ext
17634cat >>conftest.$ac_ext <<_ACEOF
17635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017636#include <wchar.h>
17637
17638long longval () { return (long) (sizeof (wchar_t)); }
17639unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000017640#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017641#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017642int
17643main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017644{
Martin v. Löwis11437992002-04-12 09:54:03 +000017645
17646 FILE *f = fopen ("conftest.val", "w");
17647 if (! f)
17648 exit (1);
17649 if (((long) (sizeof (wchar_t))) < 0)
17650 {
17651 long i = longval ();
17652 if (i != ((long) (sizeof (wchar_t))))
17653 exit (1);
17654 fprintf (f, "%ld\n", i);
17655 }
17656 else
17657 {
17658 unsigned long i = ulongval ();
17659 if (i != ((long) (sizeof (wchar_t))))
17660 exit (1);
17661 fprintf (f, "%lu\n", i);
17662 }
17663 exit (ferror (f) || fclose (f) != 0);
17664
17665 ;
17666 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000017667}
Martin v. Löwis11437992002-04-12 09:54:03 +000017668_ACEOF
17669rm -f conftest$ac_exeext
17670if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17671 (eval $ac_link) 2>&5
17672 ac_status=$?
17673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17674 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17676 (eval $ac_try) 2>&5
17677 ac_status=$?
17678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17679 (exit $ac_status); }; }; then
17680 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000017681else
Martin v. Löwis11437992002-04-12 09:54:03 +000017682 echo "$as_me: program exited with status $ac_status" >&5
17683echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017684sed 's/^/| /' conftest.$ac_ext >&5
17685
Martin v. Löwis11437992002-04-12 09:54:03 +000017686( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000017687{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17688See \`config.log' for more details." >&5
17689echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17690See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017691 { (exit 1); exit 1; }; }
17692fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017693rm -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 +000017694fi
17695fi
17696rm -f conftest.val
17697else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017698 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000017699fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017700fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017701echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
17702echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
17703cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017704#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017705_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017706
Michael W. Hudson54241132001-12-07 15:38:26 +000017707
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017708fi
17709
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017710echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
17711echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
17712have_ucs4_tcl=no
17713cat >conftest.$ac_ext <<_ACEOF
17714#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017715/* confdefs.h. */
17716_ACEOF
17717cat confdefs.h >>conftest.$ac_ext
17718cat >>conftest.$ac_ext <<_ACEOF
17719/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017720
17721#include <tcl.h>
17722#if TCL_UTF_MAX != 6
17723# error "NOT UCS4_TCL"
17724#endif
17725int
17726main ()
17727{
17728
17729 ;
17730 return 0;
17731}
17732_ACEOF
17733rm -f conftest.$ac_objext
17734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17735 (eval $ac_compile) 2>&5
17736 ac_status=$?
17737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17738 (exit $ac_status); } &&
17739 { ac_try='test -s conftest.$ac_objext'
17740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17741 (eval $ac_try) 2>&5
17742 ac_status=$?
17743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17744 (exit $ac_status); }; }; then
17745
17746
17747cat >>confdefs.h <<\_ACEOF
17748#define HAVE_UCS4_TCL 1
17749_ACEOF
17750
17751 have_ucs4_tcl=yes
17752
17753else
17754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017755sed 's/^/| /' conftest.$ac_ext >&5
17756
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017757fi
17758rm -f conftest.$ac_objext conftest.$ac_ext
17759echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
17760echo "${ECHO_T}$have_ucs4_tcl" >&6
17761
Skip Montanaro6dead952003-09-25 14:50:04 +000017762# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017763if test "$wchar_h" = yes
17764then
17765 # check whether wchar_t is signed or not
17766 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
17767echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
17768 if test "${ac_cv_wchar_t_signed+set}" = set; then
17769 echo $ECHO_N "(cached) $ECHO_C" >&6
17770else
17771
17772 if test "$cross_compiling" = yes; then
17773 ac_cv_wchar_t_signed=yes
17774else
17775 cat >conftest.$ac_ext <<_ACEOF
17776#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017777/* confdefs.h. */
17778_ACEOF
17779cat confdefs.h >>conftest.$ac_ext
17780cat >>conftest.$ac_ext <<_ACEOF
17781/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017782
17783 #include <wchar.h>
17784 int main()
17785 {
17786 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
17787 }
17788
17789_ACEOF
17790rm -f conftest$ac_exeext
17791if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17792 (eval $ac_link) 2>&5
17793 ac_status=$?
17794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17795 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17797 (eval $ac_try) 2>&5
17798 ac_status=$?
17799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17800 (exit $ac_status); }; }; then
17801 ac_cv_wchar_t_signed=yes
17802else
17803 echo "$as_me: program exited with status $ac_status" >&5
17804echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017805sed 's/^/| /' conftest.$ac_ext >&5
17806
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017807( exit $ac_status )
17808ac_cv_wchar_t_signed=no
17809fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017810rm -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 +000017811fi
17812fi
17813
17814 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
17815echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
17816fi
17817
Martin v. Löwis11437992002-04-12 09:54:03 +000017818echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17819echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017820# Check whether --enable-unicode or --disable-unicode was given.
17821if test "${enable_unicode+set}" = set; then
17822 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017823
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017824else
17825 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017826fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017827
17828if test $enable_unicode = yes
17829then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017830 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017831 case "$have_ucs4_tcl" in
17832 yes) enable_unicode="ucs4"
17833 ;;
17834 *) enable_unicode="ucs2"
17835 ;;
17836 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017837fi
17838
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017839
17840
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017841case "$enable_unicode" in
17842ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017843 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017844#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017845_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017846
17847 ;;
17848ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017849 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017850#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017851_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017852
17853 ;;
17854esac
17855
Michael W. Hudson54241132001-12-07 15:38:26 +000017856
Martin v. Löwis11437992002-04-12 09:54:03 +000017857
17858
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017859
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017860if test "$enable_unicode" = "no"
17861then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017862 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017863 echo "$as_me:$LINENO: result: not used" >&5
17864echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017865else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017866 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017867
17868cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017869#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017870_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017871
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017872
17873 # wchar_t is only usable if it maps to an unsigned type
17874 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17875 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017876 then
17877 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017878
Martin v. Löwis11437992002-04-12 09:54:03 +000017879cat >>confdefs.h <<\_ACEOF
17880#define HAVE_USABLE_WCHAR_T 1
17881_ACEOF
17882
17883 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017884#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017885_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017886
17887 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17888 then
17889 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017890 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017891#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017892_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017893
17894 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17895 then
17896 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017898#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017899_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017900
17901 else
17902 PY_UNICODE_TYPE="no type found"
17903 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017904 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17905echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017906fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017907
17908# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017909echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17910echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17911if test "${ac_cv_c_bigendian+set}" = set; then
17912 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017913else
Martin v. Löwis11437992002-04-12 09:54:03 +000017914 # See if sys/param.h defines the BYTE_ORDER macro.
17915cat >conftest.$ac_ext <<_ACEOF
17916#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017917/* confdefs.h. */
17918_ACEOF
17919cat confdefs.h >>conftest.$ac_ext
17920cat >>conftest.$ac_ext <<_ACEOF
17921/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017922#include <sys/types.h>
17923#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017924
Martin v. Löwis11437992002-04-12 09:54:03 +000017925int
17926main ()
17927{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017928#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17929 bogus endian macros
17930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017931
17932 ;
17933 return 0;
17934}
17935_ACEOF
17936rm -f conftest.$ac_objext
17937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17938 (eval $ac_compile) 2>&5
17939 ac_status=$?
17940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17941 (exit $ac_status); } &&
17942 { ac_try='test -s conftest.$ac_objext'
17943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17944 (eval $ac_try) 2>&5
17945 ac_status=$?
17946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17947 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017948 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017949cat >conftest.$ac_ext <<_ACEOF
17950#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017951/* confdefs.h. */
17952_ACEOF
17953cat confdefs.h >>conftest.$ac_ext
17954cat >>conftest.$ac_ext <<_ACEOF
17955/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017956#include <sys/types.h>
17957#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017958
Martin v. Löwis11437992002-04-12 09:54:03 +000017959int
17960main ()
17961{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017962#if BYTE_ORDER != BIG_ENDIAN
17963 not big endian
17964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017965
17966 ;
17967 return 0;
17968}
17969_ACEOF
17970rm -f conftest.$ac_objext
17971if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17972 (eval $ac_compile) 2>&5
17973 ac_status=$?
17974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17975 (exit $ac_status); } &&
17976 { ac_try='test -s conftest.$ac_objext'
17977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17978 (eval $ac_try) 2>&5
17979 ac_status=$?
17980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17981 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017982 ac_cv_c_bigendian=yes
17983else
Martin v. Löwis11437992002-04-12 09:54:03 +000017984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017985sed 's/^/| /' conftest.$ac_ext >&5
17986
Martin v. Löwis11437992002-04-12 09:54:03 +000017987ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017988fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017989rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017990else
Martin v. Löwis11437992002-04-12 09:54:03 +000017991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017992sed 's/^/| /' conftest.$ac_ext >&5
17993
Martin v. Löwis11437992002-04-12 09:54:03 +000017994# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017995if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017996 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017997 ac_cv_c_bigendian=unknown
17998 cat >conftest.$ac_ext <<_ACEOF
17999#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018000/* confdefs.h. */
18001_ACEOF
18002cat confdefs.h >>conftest.$ac_ext
18003cat >>conftest.$ac_ext <<_ACEOF
18004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018005short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
18006short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
18007void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
18008short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18009short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18010void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018011int
18012main ()
18013{
18014 _ascii (); _ebcdic ();
18015 ;
18016 return 0;
18017}
18018_ACEOF
18019rm -f conftest.$ac_objext
18020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18021 (eval $ac_compile) 2>&5
18022 ac_status=$?
18023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18024 (exit $ac_status); } &&
18025 { ac_try='test -s conftest.$ac_objext'
18026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18027 (eval $ac_try) 2>&5
18028 ac_status=$?
18029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18030 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018031 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018032 ac_cv_c_bigendian=yes
18033fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018034if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018035 if test "$ac_cv_c_bigendian" = unknown; then
18036 ac_cv_c_bigendian=no
18037 else
18038 # finding both strings is unlikely to happen, but who knows?
18039 ac_cv_c_bigendian=unknown
18040 fi
18041fi
18042else
18043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018044sed 's/^/| /' conftest.$ac_ext >&5
18045
Martin v. Löwis11437992002-04-12 09:54:03 +000018046fi
18047rm -f conftest.$ac_objext conftest.$ac_ext
18048else
18049 cat >conftest.$ac_ext <<_ACEOF
18050#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018051/* confdefs.h. */
18052_ACEOF
18053cat confdefs.h >>conftest.$ac_ext
18054cat >>conftest.$ac_ext <<_ACEOF
18055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018056int
18057main ()
18058{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018059 /* Are we little or big endian? From Harbison&Steele. */
18060 union
18061 {
18062 long l;
18063 char c[sizeof (long)];
18064 } u;
18065 u.l = 1;
18066 exit (u.c[sizeof (long) - 1] == 1);
18067}
Martin v. Löwis11437992002-04-12 09:54:03 +000018068_ACEOF
18069rm -f conftest$ac_exeext
18070if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18071 (eval $ac_link) 2>&5
18072 ac_status=$?
18073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18076 (eval $ac_try) 2>&5
18077 ac_status=$?
18078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18079 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000018080 ac_cv_c_bigendian=no
18081else
Martin v. Löwis11437992002-04-12 09:54:03 +000018082 echo "$as_me: program exited with status $ac_status" >&5
18083echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018084sed 's/^/| /' conftest.$ac_ext >&5
18085
Martin v. Löwis11437992002-04-12 09:54:03 +000018086( exit $ac_status )
18087ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000018088fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018089rm -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 +000018090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018091fi
18092rm -f conftest.$ac_objext conftest.$ac_ext
18093fi
18094echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
18095echo "${ECHO_T}$ac_cv_c_bigendian" >&6
18096case $ac_cv_c_bigendian in
18097 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000018098
Martin v. Löwis11437992002-04-12 09:54:03 +000018099cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018100#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018101_ACEOF
18102 ;;
18103 no)
18104 ;;
18105 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018106 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018107presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018108echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018109presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
18110 { (exit 1); exit 1; }; } ;;
18111esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000018112
Michael W. Hudson54241132001-12-07 15:38:26 +000018113
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018114# Check whether right shifting a negative integer extends the sign bit
18115# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000018116echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
18117echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
18118if test "${ac_cv_rshift_extends_sign+set}" = set; then
18119 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000018120else
Martin v. Löwis11437992002-04-12 09:54:03 +000018121
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018122if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000018123 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018124else
Martin v. Löwis11437992002-04-12 09:54:03 +000018125 cat >conftest.$ac_ext <<_ACEOF
18126#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018127/* confdefs.h. */
18128_ACEOF
18129cat confdefs.h >>conftest.$ac_ext
18130cat >>conftest.$ac_ext <<_ACEOF
18131/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018132
18133int main()
18134{
Vladimir Marangozova6180282000-07-12 05:05:06 +000018135 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018136}
18137
Martin v. Löwis11437992002-04-12 09:54:03 +000018138_ACEOF
18139rm -f conftest$ac_exeext
18140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18141 (eval $ac_link) 2>&5
18142 ac_status=$?
18143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18144 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18146 (eval $ac_try) 2>&5
18147 ac_status=$?
18148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18149 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000018150 ac_cv_rshift_extends_sign=yes
18151else
Martin v. Löwis11437992002-04-12 09:54:03 +000018152 echo "$as_me: program exited with status $ac_status" >&5
18153echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018154sed 's/^/| /' conftest.$ac_ext >&5
18155
Martin v. Löwis11437992002-04-12 09:54:03 +000018156( exit $ac_status )
18157ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000018158fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018159rm -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 +000018160fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000018161fi
18162
Martin v. Löwis11437992002-04-12 09:54:03 +000018163echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
18164echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000018165if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018166then
Martin v. Löwis11437992002-04-12 09:54:03 +000018167
18168cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018169#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018170_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018171
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018172fi
18173
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018174# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018175echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
18176echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
18177if test "${ac_cv_have_getc_unlocked+set}" = set; then
18178 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018179else
Martin v. Löwis11437992002-04-12 09:54:03 +000018180
18181cat >conftest.$ac_ext <<_ACEOF
18182#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018183/* confdefs.h. */
18184_ACEOF
18185cat confdefs.h >>conftest.$ac_ext
18186cat >>conftest.$ac_ext <<_ACEOF
18187/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018188#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018189int
18190main ()
18191{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018192
18193 FILE *f = fopen("/dev/null", "r");
18194 flockfile(f);
18195 getc_unlocked(f);
18196 funlockfile(f);
18197
Martin v. Löwis11437992002-04-12 09:54:03 +000018198 ;
18199 return 0;
18200}
18201_ACEOF
18202rm -f conftest.$ac_objext conftest$ac_exeext
18203if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18204 (eval $ac_link) 2>&5
18205 ac_status=$?
18206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18207 (exit $ac_status); } &&
18208 { ac_try='test -s conftest$ac_exeext'
18209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18210 (eval $ac_try) 2>&5
18211 ac_status=$?
18212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18213 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018214 ac_cv_have_getc_unlocked=yes
18215else
Martin v. Löwis11437992002-04-12 09:54:03 +000018216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018217sed 's/^/| /' conftest.$ac_ext >&5
18218
Martin v. Löwis11437992002-04-12 09:54:03 +000018219ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018220fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018221rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018222fi
18223
Martin v. Löwis11437992002-04-12 09:54:03 +000018224echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
18225echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018226if test "$ac_cv_have_getc_unlocked" = yes
18227then
Martin v. Löwis11437992002-04-12 09:54:03 +000018228
18229cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018230#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018231_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018232
18233fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018234
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018235# check for readline 2.2
18236cat >conftest.$ac_ext <<_ACEOF
18237#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018238/* confdefs.h. */
18239_ACEOF
18240cat confdefs.h >>conftest.$ac_ext
18241cat >>conftest.$ac_ext <<_ACEOF
18242/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018243#include <readline/readline.h>
18244_ACEOF
18245if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18246 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18247 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018248 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018249 rm -f conftest.er1
18250 cat conftest.err >&5
18251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18252 (exit $ac_status); } >/dev/null; then
18253 if test -s conftest.err; then
18254 ac_cpp_err=$ac_c_preproc_warn_flag
18255 else
18256 ac_cpp_err=
18257 fi
18258else
18259 ac_cpp_err=yes
18260fi
18261if test -z "$ac_cpp_err"; then
18262 have_readline=yes
18263else
18264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018265sed 's/^/| /' conftest.$ac_ext >&5
18266
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018267 have_readline=no
18268fi
18269rm -f conftest.err conftest.$ac_ext
18270if test $have_readline = yes
18271then
18272 cat >conftest.$ac_ext <<_ACEOF
18273#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018274/* confdefs.h. */
18275_ACEOF
18276cat confdefs.h >>conftest.$ac_ext
18277cat >>conftest.$ac_ext <<_ACEOF
18278/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018279#include <readline/readline.h>
18280
18281_ACEOF
18282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000018283 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018284
18285cat >>confdefs.h <<\_ACEOF
18286#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
18287_ACEOF
18288
18289fi
18290rm -f conftest*
18291
18292fi
18293
Martin v. Löwis0daad592001-09-30 21:09:59 +000018294# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000018295echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
18296echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
18297if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
18298 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000018299else
Martin v. Löwis11437992002-04-12 09:54:03 +000018300 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000018301LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018302cat >conftest.$ac_ext <<_ACEOF
18303#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018304/* confdefs.h. */
18305_ACEOF
18306cat confdefs.h >>conftest.$ac_ext
18307cat >>conftest.$ac_ext <<_ACEOF
18308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018309
Guido van Rossum353ae582001-07-10 16:45:32 +000018310/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018311#ifdef __cplusplus
18312extern "C"
18313#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000018314/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018315 builtin and then its argument prototype would still apply. */
18316char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018317int
18318main ()
18319{
18320rl_pre_input_hook ();
18321 ;
18322 return 0;
18323}
18324_ACEOF
18325rm -f conftest.$ac_objext conftest$ac_exeext
18326if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18327 (eval $ac_link) 2>&5
18328 ac_status=$?
18329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18330 (exit $ac_status); } &&
18331 { ac_try='test -s conftest$ac_exeext'
18332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18333 (eval $ac_try) 2>&5
18334 ac_status=$?
18335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18336 (exit $ac_status); }; }; then
18337 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000018338else
Martin v. Löwis11437992002-04-12 09:54:03 +000018339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018340sed 's/^/| /' conftest.$ac_ext >&5
18341
Martin v. Löwis11437992002-04-12 09:54:03 +000018342ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000018343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018344rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18345LIBS=$ac_check_lib_save_LIBS
18346fi
18347echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
18348echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
18349if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018350
Martin v. Löwis11437992002-04-12 09:54:03 +000018351cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000018352#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018353_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000018354
Martin v. Löwis0daad592001-09-30 21:09:59 +000018355fi
18356
Michael W. Hudson54241132001-12-07 15:38:26 +000018357
Martin v. Löwis0daad592001-09-30 21:09:59 +000018358# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000018359echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
18360echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
18361if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
18362 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000018363else
Martin v. Löwis11437992002-04-12 09:54:03 +000018364 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000018365LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018366cat >conftest.$ac_ext <<_ACEOF
18367#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018368/* confdefs.h. */
18369_ACEOF
18370cat confdefs.h >>conftest.$ac_ext
18371cat >>conftest.$ac_ext <<_ACEOF
18372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018373
Martin v. Löwis0daad592001-09-30 21:09:59 +000018374/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018375#ifdef __cplusplus
18376extern "C"
18377#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000018378/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018379 builtin and then its argument prototype would still apply. */
18380char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018381int
18382main ()
18383{
18384rl_completion_matches ();
18385 ;
18386 return 0;
18387}
18388_ACEOF
18389rm -f conftest.$ac_objext conftest$ac_exeext
18390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18391 (eval $ac_link) 2>&5
18392 ac_status=$?
18393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18394 (exit $ac_status); } &&
18395 { ac_try='test -s conftest$ac_exeext'
18396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18397 (eval $ac_try) 2>&5
18398 ac_status=$?
18399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18400 (exit $ac_status); }; }; then
18401 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000018402else
Martin v. Löwis11437992002-04-12 09:54:03 +000018403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018404sed 's/^/| /' conftest.$ac_ext >&5
18405
Martin v. Löwis11437992002-04-12 09:54:03 +000018406ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000018407fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018408rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18409LIBS=$ac_check_lib_save_LIBS
18410fi
18411echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
18412echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
18413if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018414
Martin v. Löwis11437992002-04-12 09:54:03 +000018415cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000018416#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018417_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000018418
Guido van Rossum353ae582001-07-10 16:45:32 +000018419fi
18420
Jack Jansendd19cf82001-12-06 22:36:17 +000018421
Martin v. Löwis11437992002-04-12 09:54:03 +000018422echo "$as_me:$LINENO: checking for broken nice()" >&5
18423echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
18424if test "${ac_cv_broken_nice+set}" = set; then
18425 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018426else
Martin v. Löwis11437992002-04-12 09:54:03 +000018427
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018428if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000018429 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018430else
Martin v. Löwis11437992002-04-12 09:54:03 +000018431 cat >conftest.$ac_ext <<_ACEOF
18432#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018433/* confdefs.h. */
18434_ACEOF
18435cat confdefs.h >>conftest.$ac_ext
18436cat >>conftest.$ac_ext <<_ACEOF
18437/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018438
18439int main()
18440{
18441 int val1 = nice(1);
18442 if (val1 != -1 && val1 == nice(2))
18443 exit(0);
18444 exit(1);
18445}
18446
Martin v. Löwis11437992002-04-12 09:54:03 +000018447_ACEOF
18448rm -f conftest$ac_exeext
18449if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18450 (eval $ac_link) 2>&5
18451 ac_status=$?
18452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18453 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18455 (eval $ac_try) 2>&5
18456 ac_status=$?
18457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18458 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018459 ac_cv_broken_nice=yes
18460else
Martin v. Löwis11437992002-04-12 09:54:03 +000018461 echo "$as_me: program exited with status $ac_status" >&5
18462echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018463sed 's/^/| /' conftest.$ac_ext >&5
18464
Martin v. Löwis11437992002-04-12 09:54:03 +000018465( exit $ac_status )
18466ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018467fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018468rm -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 +000018469fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018470fi
18471
Martin v. Löwis11437992002-04-12 09:54:03 +000018472echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
18473echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018474if test "$ac_cv_broken_nice" = yes
18475then
Martin v. Löwis11437992002-04-12 09:54:03 +000018476
18477cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018478#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018479_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018480
18481fi
18482
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018483# tzset(3) exists and works like we expect it to
18484echo "$as_me:$LINENO: checking for working tzset()" >&5
18485echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
18486if test "${ac_cv_working_tzset+set}" = set; then
18487 echo $ECHO_N "(cached) $ECHO_C" >&6
18488else
18489
18490if test "$cross_compiling" = yes; then
18491 ac_cv_working_tzset=no
18492else
18493 cat >conftest.$ac_ext <<_ACEOF
18494#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018495/* confdefs.h. */
18496_ACEOF
18497cat confdefs.h >>conftest.$ac_ext
18498cat >>conftest.$ac_ext <<_ACEOF
18499/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018500
18501#include <stdlib.h>
18502#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000018503#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018504int main()
18505{
Brett Cannon18367812003-09-19 00:59:16 +000018506 /* Note that we need to ensure that not only does tzset(3)
18507 do 'something' with localtime, but it works as documented
18508 in the library reference and as expected by the test suite.
18509
18510 Red Hat 6.2 doesn't understand the southern hemisphere
18511 after New Year's Day; it thinks swaps on that day.
18512 */
18513
18514 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
18515 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
18516
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018517 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018518 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018519 if (localtime(&groundhogday)->tm_hour != 0)
18520 exit(1);
18521
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018522 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018523 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018524 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018525 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000018526
18527 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
18528 tzset();
18529 if (localtime(&groundhogday)->tm_hour != 11)
18530 exit(1);
18531 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
18532 exit(1);
18533 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
18534 exit(1);
18535
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018536 exit(0);
18537}
18538
18539_ACEOF
18540rm -f conftest$ac_exeext
18541if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18542 (eval $ac_link) 2>&5
18543 ac_status=$?
18544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18545 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18547 (eval $ac_try) 2>&5
18548 ac_status=$?
18549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18550 (exit $ac_status); }; }; then
18551 ac_cv_working_tzset=yes
18552else
18553 echo "$as_me: program exited with status $ac_status" >&5
18554echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018555sed 's/^/| /' conftest.$ac_ext >&5
18556
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018557( exit $ac_status )
18558ac_cv_working_tzset=no
18559fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018560rm -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 +000018561fi
18562fi
18563
18564echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
18565echo "${ECHO_T}$ac_cv_working_tzset" >&6
18566if test "$ac_cv_working_tzset" = yes
18567then
18568
18569cat >>confdefs.h <<\_ACEOF
18570#define HAVE_WORKING_TZSET 1
18571_ACEOF
18572
18573fi
18574
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018575# Look for subsecond timestamps in struct stat
18576echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
18577echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
18578if test "${ac_cv_stat_tv_nsec+set}" = set; then
18579 echo $ECHO_N "(cached) $ECHO_C" >&6
18580else
18581 cat >conftest.$ac_ext <<_ACEOF
18582#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018583/* confdefs.h. */
18584_ACEOF
18585cat confdefs.h >>conftest.$ac_ext
18586cat >>conftest.$ac_ext <<_ACEOF
18587/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018588#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018589int
18590main ()
18591{
18592
18593struct stat st;
18594st.st_mtim.tv_nsec = 1;
18595
18596 ;
18597 return 0;
18598}
18599_ACEOF
18600rm -f conftest.$ac_objext
18601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18602 (eval $ac_compile) 2>&5
18603 ac_status=$?
18604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18605 (exit $ac_status); } &&
18606 { ac_try='test -s conftest.$ac_objext'
18607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18608 (eval $ac_try) 2>&5
18609 ac_status=$?
18610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18611 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000018612 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018613else
18614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018615sed 's/^/| /' conftest.$ac_ext >&5
18616
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018617ac_cv_stat_tv_nsec=no
18618fi
18619rm -f conftest.$ac_objext conftest.$ac_ext
18620fi
18621
18622echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
18623echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
18624if test "$ac_cv_stat_tv_nsec" = yes
18625then
18626
18627cat >>confdefs.h <<\_ACEOF
18628#define HAVE_STAT_TV_NSEC 1
18629_ACEOF
18630
18631fi
18632
Jack Jansen666b1e72001-10-31 12:11:48 +000018633# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000018634echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
18635echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
18636if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
18637 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018638else
Martin v. Löwis11437992002-04-12 09:54:03 +000018639 cat >conftest.$ac_ext <<_ACEOF
18640#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018641/* confdefs.h. */
18642_ACEOF
18643cat confdefs.h >>conftest.$ac_ext
18644cat >>conftest.$ac_ext <<_ACEOF
18645/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018646#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018647int
18648main ()
18649{
Jack Jansen666b1e72001-10-31 12:11:48 +000018650
18651 int rtn;
18652 rtn = mvwdelch(0,0,0);
18653
Martin v. Löwis11437992002-04-12 09:54:03 +000018654 ;
18655 return 0;
18656}
18657_ACEOF
18658rm -f conftest.$ac_objext
18659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18660 (eval $ac_compile) 2>&5
18661 ac_status=$?
18662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18663 (exit $ac_status); } &&
18664 { ac_try='test -s conftest.$ac_objext'
18665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18666 (eval $ac_try) 2>&5
18667 ac_status=$?
18668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18669 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018670 ac_cv_mvwdelch_is_expression=yes
18671else
Martin v. Löwis11437992002-04-12 09:54:03 +000018672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018673sed 's/^/| /' conftest.$ac_ext >&5
18674
Martin v. Löwis11437992002-04-12 09:54:03 +000018675ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018676fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018677rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018678fi
18679
Martin v. Löwis11437992002-04-12 09:54:03 +000018680echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
18681echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018682
18683if test "$ac_cv_mvwdelch_is_expression" = yes
18684then
Martin v. Löwis11437992002-04-12 09:54:03 +000018685
18686cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018687#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018688_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018689
18690fi
18691
Martin v. Löwis11437992002-04-12 09:54:03 +000018692echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
18693echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
18694if test "${ac_cv_window_has_flags+set}" = set; then
18695 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018696else
Martin v. Löwis11437992002-04-12 09:54:03 +000018697 cat >conftest.$ac_ext <<_ACEOF
18698#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018699/* confdefs.h. */
18700_ACEOF
18701cat confdefs.h >>conftest.$ac_ext
18702cat >>conftest.$ac_ext <<_ACEOF
18703/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018704#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018705int
18706main ()
18707{
Jack Jansen666b1e72001-10-31 12:11:48 +000018708
18709 WINDOW *w;
18710 w->_flags = 0;
18711
Martin v. Löwis11437992002-04-12 09:54:03 +000018712 ;
18713 return 0;
18714}
18715_ACEOF
18716rm -f conftest.$ac_objext
18717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18718 (eval $ac_compile) 2>&5
18719 ac_status=$?
18720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18721 (exit $ac_status); } &&
18722 { ac_try='test -s conftest.$ac_objext'
18723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18724 (eval $ac_try) 2>&5
18725 ac_status=$?
18726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18727 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018728 ac_cv_window_has_flags=yes
18729else
Martin v. Löwis11437992002-04-12 09:54:03 +000018730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018731sed 's/^/| /' conftest.$ac_ext >&5
18732
Martin v. Löwis11437992002-04-12 09:54:03 +000018733ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018734fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018735rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018736fi
18737
Martin v. Löwis11437992002-04-12 09:54:03 +000018738echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
18739echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018740
Jack Jansen666b1e72001-10-31 12:11:48 +000018741
18742if test "$ac_cv_window_has_flags" = yes
18743then
Martin v. Löwis11437992002-04-12 09:54:03 +000018744
18745cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018746#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018747_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018748
18749fi
18750
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018751echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
18752echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
18753
18754if test -e /dev/ptmx
18755then
18756 echo "$as_me:$LINENO: result: yes" >&5
18757echo "${ECHO_T}yes" >&6
18758
18759cat >>confdefs.h <<\_ACEOF
18760#define HAVE_DEV_PTMX 1
18761_ACEOF
18762
18763else
18764 echo "$as_me:$LINENO: result: no" >&5
18765echo "${ECHO_T}no" >&6
18766fi
18767
Neal Norwitz865400f2003-03-21 01:42:58 +000018768echo "$as_me:$LINENO: checking for /dev/ptc" >&5
18769echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
18770
18771if test -e /dev/ptc
18772then
18773 echo "$as_me:$LINENO: result: yes" >&5
18774echo "${ECHO_T}yes" >&6
18775
18776cat >>confdefs.h <<\_ACEOF
18777#define HAVE_DEV_PTC 1
18778_ACEOF
18779
18780else
18781 echo "$as_me:$LINENO: result: no" >&5
18782echo "${ECHO_T}no" >&6
18783fi
18784
Martin v. Löwis11437992002-04-12 09:54:03 +000018785echo "$as_me:$LINENO: checking for socklen_t" >&5
18786echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
18787if test "${ac_cv_type_socklen_t+set}" = set; then
18788 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000018789else
Martin v. Löwis11437992002-04-12 09:54:03 +000018790 cat >conftest.$ac_ext <<_ACEOF
18791#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018792/* confdefs.h. */
18793_ACEOF
18794cat confdefs.h >>conftest.$ac_ext
18795cat >>conftest.$ac_ext <<_ACEOF
18796/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000018797
18798#ifdef HAVE_SYS_TYPES_H
18799#include <sys/types.h>
18800#endif
18801#ifdef HAVE_SYS_SOCKET_H
18802#include <sys/socket.h>
18803#endif
18804
18805
Martin v. Löwis11437992002-04-12 09:54:03 +000018806int
18807main ()
18808{
18809if ((socklen_t *) 0)
18810 return 0;
18811if (sizeof (socklen_t))
18812 return 0;
18813 ;
18814 return 0;
18815}
18816_ACEOF
18817rm -f conftest.$ac_objext
18818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18819 (eval $ac_compile) 2>&5
18820 ac_status=$?
18821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18822 (exit $ac_status); } &&
18823 { ac_try='test -s conftest.$ac_objext'
18824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18825 (eval $ac_try) 2>&5
18826 ac_status=$?
18827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18828 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018829 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018830else
Martin v. Löwis11437992002-04-12 09:54:03 +000018831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018832sed 's/^/| /' conftest.$ac_ext >&5
18833
Martin v. Löwis11437992002-04-12 09:54:03 +000018834ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018836rm -f conftest.$ac_objext conftest.$ac_ext
18837fi
18838echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18839echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18840if test $ac_cv_type_socklen_t = yes; then
18841 :
18842else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018843
Martin v. Löwis01c04012002-11-11 14:58:44 +000018844cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018845#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018846_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018847
18848fi
18849
Michael W. Hudson54241132001-12-07 15:38:26 +000018850
Michael W. Hudson54241132001-12-07 15:38:26 +000018851
18852
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018853for h in `(cd $srcdir;echo Python/thread_*.h)`
18854do
18855 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18856done
18857
Michael W. Hudson54241132001-12-07 15:38:26 +000018858
Jack Jansen0b06be72002-06-21 14:48:38 +000018859SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018860echo "$as_me:$LINENO: checking for build directories" >&5
18861echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018862for dir in $SRCDIRS; do
18863 if test ! -d $dir; then
18864 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018865 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018866done
Martin v. Löwis11437992002-04-12 09:54:03 +000018867echo "$as_me:$LINENO: result: done" >&5
18868echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018869
Guido van Rossum627b2d71993-12-24 10:39:16 +000018870# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018871 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018872
Martin v. Löwis11437992002-04-12 09:54:03 +000018873cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018874# This file is a shell script that caches the results of configure
18875# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018876# scripts and configure runs, see configure's option --config-cache.
18877# It is not useful on other systems. If it contains results you don't
18878# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018879#
Martin v. Löwis11437992002-04-12 09:54:03 +000018880# config.status only pays attention to the cache file if you give it
18881# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018882#
Skip Montanaro6dead952003-09-25 14:50:04 +000018883# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018884# loading this file, other *unset* `ac_cv_foo' will be assigned the
18885# following values.
18886
18887_ACEOF
18888
Guido van Rossumf78abae1997-01-21 22:02:36 +000018889# The following way of writing the cache mishandles newlines in values,
18890# but we know of no workaround that is simple, portable, and efficient.
18891# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018892# Ultrix sh set writes to stderr and can't be redirected directly,
18893# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018894{
18895 (set) 2>&1 |
18896 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18897 *ac_space=\ *)
18898 # `set' does not quote correctly, so add quotes (double-quote
18899 # substitution turns \\\\ into \\, and sed turns \\ into \).
18900 sed -n \
18901 "s/'/'\\\\''/g;
18902 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18903 ;;
18904 *)
18905 # `set' quotes correctly as required by POSIX, so do not add quotes.
18906 sed -n \
18907 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18908 ;;
18909 esac;
18910} |
18911 sed '
18912 t clear
18913 : clear
18914 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18915 t end
18916 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18917 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018918if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018919 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018920 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18921 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018922 else
18923 echo "not updating unwritable cache $cache_file"
18924 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018925fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018926rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018927
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018928test "x$prefix" = xNONE && prefix=$ac_default_prefix
18929# Let make expand exec_prefix.
18930test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018931
Martin v. Löwis11437992002-04-12 09:54:03 +000018932# VPATH may cause trouble with some makes, so we remove $(srcdir),
18933# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18934# trailing colons and then remove the whole line if VPATH becomes empty
18935# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018936if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018937 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18938s/:*\$(srcdir):*/:/;
18939s/:*\${srcdir}:*/:/;
18940s/:*@srcdir@:*/:/;
18941s/^\([^=]*=[ ]*\):*/\1/;
18942s/:*$//;
18943s/^[^=]*=[ ]*$//;
18944}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018945fi
18946
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018947DEFS=-DHAVE_CONFIG_H
18948
Skip Montanaro6dead952003-09-25 14:50:04 +000018949ac_libobjs=
18950ac_ltlibobjs=
18951for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18952 # 1. Remove the extension, and $U if already installed.
18953 ac_i=`echo "$ac_i" |
18954 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18955 # 2. Add them.
18956 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18957 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18958done
18959LIBOBJS=$ac_libobjs
18960
18961LTLIBOBJS=$ac_ltlibobjs
18962
18963
Martin v. Löwis11437992002-04-12 09:54:03 +000018964
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018965: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018966ac_clean_files_save=$ac_clean_files
18967ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18968{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18969echo "$as_me: creating $CONFIG_STATUS" >&6;}
18970cat >$CONFIG_STATUS <<_ACEOF
18971#! $SHELL
18972# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018973# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018974# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018975# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018976
Martin v. Löwis11437992002-04-12 09:54:03 +000018977debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018978ac_cs_recheck=false
18979ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018980SHELL=\${CONFIG_SHELL-$SHELL}
18981_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018982
Martin v. Löwis11437992002-04-12 09:54:03 +000018983cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018984## --------------------- ##
18985## M4sh Initialization. ##
18986## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018987
Martin v. Löwis11437992002-04-12 09:54:03 +000018988# Be Bourne compatible
18989if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18990 emulate sh
18991 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018992 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18993 # is contrary to our usage. Disable this feature.
18994 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018995elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18996 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018997fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018998
Martin v. Löwis11437992002-04-12 09:54:03 +000018999# Support unset when possible.
19000if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19001 as_unset=unset
19002else
19003 as_unset=false
19004fi
Michael W. Hudson54241132001-12-07 15:38:26 +000019005
Skip Montanaro6dead952003-09-25 14:50:04 +000019006
19007# Work around bugs in pre-3.0 UWIN ksh.
19008$as_unset ENV MAIL MAILPATH
19009PS1='$ '
19010PS2='> '
19011PS4='+ '
19012
19013# NLS nuisances.
19014for as_var in \
19015 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
19016 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
19017 LC_TELEPHONE LC_TIME
19018do
19019 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
19020 eval $as_var=C; export $as_var
19021 else
19022 $as_unset $as_var
19023 fi
19024done
19025
19026# Required to use basename.
19027if expr a : '\(a\)' >/dev/null 2>&1; then
19028 as_expr=expr
19029else
19030 as_expr=false
19031fi
19032
19033if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
19034 as_basename=basename
19035else
19036 as_basename=false
19037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019038
19039
19040# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000019041as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000019042$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19043 X"$0" : 'X\(//\)$' \| \
19044 X"$0" : 'X\(/\)$' \| \
19045 . : '\(.\)' 2>/dev/null ||
19046echo X/"$0" |
19047 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
19048 /^X\/\(\/\/\)$/{ s//\1/; q; }
19049 /^X\/\(\/\).*/{ s//\1/; q; }
19050 s/.*/./; q'`
19051
Skip Montanaro6dead952003-09-25 14:50:04 +000019052
Martin v. Löwis11437992002-04-12 09:54:03 +000019053# PATH needs CR, and LINENO needs CR and PATH.
19054# Avoid depending upon Character Ranges.
19055as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19056as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19057as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19058as_cr_digits='0123456789'
19059as_cr_alnum=$as_cr_Letters$as_cr_digits
19060
19061# The user is always right.
19062if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019063 echo "#! /bin/sh" >conf$$.sh
19064 echo "exit 0" >>conf$$.sh
19065 chmod +x conf$$.sh
19066 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019067 PATH_SEPARATOR=';'
19068 else
19069 PATH_SEPARATOR=:
19070 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019071 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000019072fi
19073
19074
19075 as_lineno_1=$LINENO
19076 as_lineno_2=$LINENO
19077 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19078 test "x$as_lineno_1" != "x$as_lineno_2" &&
19079 test "x$as_lineno_3" = "x$as_lineno_2" || {
19080 # Find who we are. Look in the path if we contain no path at all
19081 # relative or not.
19082 case $0 in
19083 *[\\/]* ) as_myself=$0 ;;
19084 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19085for as_dir in $PATH
19086do
19087 IFS=$as_save_IFS
19088 test -z "$as_dir" && as_dir=.
19089 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19090done
19091
19092 ;;
19093 esac
19094 # We did not find ourselves, most probably we were run as `sh COMMAND'
19095 # in which case we are not to be found in the path.
19096 if test "x$as_myself" = x; then
19097 as_myself=$0
19098 fi
19099 if test ! -f "$as_myself"; then
19100 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
19101echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
19102 { (exit 1); exit 1; }; }
19103 fi
19104 case $CONFIG_SHELL in
19105 '')
19106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19107for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
19108do
19109 IFS=$as_save_IFS
19110 test -z "$as_dir" && as_dir=.
19111 for as_base in sh bash ksh sh5; do
19112 case $as_dir in
19113 /*)
19114 if ("$as_dir/$as_base" -c '
19115 as_lineno_1=$LINENO
19116 as_lineno_2=$LINENO
19117 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19118 test "x$as_lineno_1" != "x$as_lineno_2" &&
19119 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019120 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
19121 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019122 CONFIG_SHELL=$as_dir/$as_base
19123 export CONFIG_SHELL
19124 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
19125 fi;;
19126 esac
19127 done
19128done
19129;;
Jack Jansendd19cf82001-12-06 22:36:17 +000019130 esac
19131
Martin v. Löwis11437992002-04-12 09:54:03 +000019132 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19133 # uniformly replaced by the line number. The first 'sed' inserts a
19134 # line-number line before each line; the second 'sed' does the real
19135 # work. The second script uses 'N' to pair each line-number line
19136 # with the numbered line, and appends trailing '-' during
19137 # substitution so that $LINENO is not a special case at line end.
19138 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19139 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
19140 sed '=' <$as_myself |
19141 sed '
19142 N
19143 s,$,-,
19144 : loop
19145 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
19146 t loop
19147 s,-$,,
19148 s,^['$as_cr_digits']*\n,,
19149 ' >$as_me.lineno &&
19150 chmod +x $as_me.lineno ||
19151 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19152echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19153 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019154
Martin v. Löwis11437992002-04-12 09:54:03 +000019155 # Don't try to exec as it changes $[0], causing all sort of problems
19156 # (the dirname of $[0] is not the place where we might find the
19157 # original and so on. Autoconf is especially sensible to this).
19158 . ./$as_me.lineno
19159 # Exit status is that of the last command.
19160 exit
19161}
19162
19163
19164case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19165 *c*,-n*) ECHO_N= ECHO_C='
19166' ECHO_T=' ' ;;
19167 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19168 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
19169esac
19170
19171if expr a : '\(a\)' >/dev/null 2>&1; then
19172 as_expr=expr
19173else
19174 as_expr=false
19175fi
19176
19177rm -f conf$$ conf$$.exe conf$$.file
19178echo >conf$$.file
19179if ln -s conf$$.file conf$$ 2>/dev/null; then
19180 # We could just check for DJGPP; but this test a) works b) is more generic
19181 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19182 if test -f conf$$.exe; then
19183 # Don't use ln at all; we don't have any links
19184 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019185 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019186 as_ln_s='ln -s'
19187 fi
19188elif ln conf$$.file conf$$ 2>/dev/null; then
19189 as_ln_s=ln
19190else
19191 as_ln_s='cp -p'
19192fi
19193rm -f conf$$ conf$$.exe conf$$.file
19194
Skip Montanaro6dead952003-09-25 14:50:04 +000019195if mkdir -p . 2>/dev/null; then
19196 as_mkdir_p=:
19197else
19198 as_mkdir_p=false
19199fi
19200
Martin v. Löwis11437992002-04-12 09:54:03 +000019201as_executable_p="test -f"
19202
19203# Sed expression to map a string onto a valid CPP name.
19204as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
19205
19206# Sed expression to map a string onto a valid variable name.
19207as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19208
19209
19210# IFS
19211# We need space, tab and new line, in precisely that order.
19212as_nl='
19213'
19214IFS=" $as_nl"
19215
19216# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000019217$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000019218
19219exec 6>&1
19220
19221# Open the log real soon, to keep \$[0] and so on meaningful, and to
19222# report actual input values of CONFIG_FILES etc. instead of their
19223# values after options handling. Logging --version etc. is OK.
19224exec 5>>config.log
19225{
19226 echo
19227 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19228## Running $as_me. ##
19229_ASBOX
19230} >&5
19231cat >&5 <<_CSEOF
19232
Fred Drake9bd44622003-07-30 17:39:48 +000019233This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000019234generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000019235
19236 CONFIG_FILES = $CONFIG_FILES
19237 CONFIG_HEADERS = $CONFIG_HEADERS
19238 CONFIG_LINKS = $CONFIG_LINKS
19239 CONFIG_COMMANDS = $CONFIG_COMMANDS
19240 $ $0 $@
19241
19242_CSEOF
19243echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19244echo >&5
19245_ACEOF
19246
19247# Files that config.status was made for.
19248if test -n "$ac_config_files"; then
19249 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19250fi
19251
19252if test -n "$ac_config_headers"; then
19253 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19254fi
19255
19256if test -n "$ac_config_links"; then
19257 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19258fi
19259
19260if test -n "$ac_config_commands"; then
19261 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19262fi
19263
19264cat >>$CONFIG_STATUS <<\_ACEOF
19265
19266ac_cs_usage="\
19267\`$as_me' instantiates files from templates according to the
19268current configuration.
19269
19270Usage: $0 [OPTIONS] [FILE]...
19271
19272 -h, --help print this help, then exit
19273 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000019274 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000019275 -d, --debug don't remove temporary files
19276 --recheck update $as_me by reconfiguring in the same conditions
19277 --file=FILE[:TEMPLATE]
19278 instantiate the configuration file FILE
19279 --header=FILE[:TEMPLATE]
19280 instantiate the configuration header FILE
19281
19282Configuration files:
19283$config_files
19284
19285Configuration headers:
19286$config_headers
19287
19288Report bugs to <bug-autoconf@gnu.org>."
19289_ACEOF
19290
19291cat >>$CONFIG_STATUS <<_ACEOF
19292ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000019293python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000019294configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000019295 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19296
19297Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19298Free Software Foundation, Inc.
19299This config.status script is free software; the Free Software Foundation
19300gives unlimited permission to copy, distribute and modify it."
19301srcdir=$srcdir
19302INSTALL="$INSTALL"
19303_ACEOF
19304
19305cat >>$CONFIG_STATUS <<\_ACEOF
19306# If no file are specified by the user, then we need to provide default
19307# value. By we need to know if files were specified by the user.
19308ac_need_defaults=:
19309while test $# != 0
19310do
19311 case $1 in
19312 --*=*)
19313 ac_option=`expr "x$1" : 'x\([^=]*\)='`
19314 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019315 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000019316 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019317 -*)
19318 ac_option=$1
19319 ac_optarg=$2
19320 ac_shift=shift
19321 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019322 *) # This is not an option, so the user has probably given explicit
19323 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000019324 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000019325 ac_need_defaults=false;;
19326 esac
19327
Skip Montanaro6dead952003-09-25 14:50:04 +000019328 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000019329 # Handling of the options.
19330_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019331cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019332 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19333 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019334 --version | --vers* | -V )
19335 echo "$ac_cs_version"; exit 0 ;;
19336 --he | --h)
19337 # Conflict between --help and --header
19338 { { echo "$as_me:$LINENO: error: ambiguous option: $1
19339Try \`$0 --help' for more information." >&5
19340echo "$as_me: error: ambiguous option: $1
19341Try \`$0 --help' for more information." >&2;}
19342 { (exit 1); exit 1; }; };;
19343 --help | --hel | -h )
19344 echo "$ac_cs_usage"; exit 0 ;;
19345 --debug | --d* | -d )
19346 debug=: ;;
19347 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000019348 $ac_shift
19349 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000019350 ac_need_defaults=false;;
19351 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000019352 $ac_shift
19353 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000019354 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019355 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19356 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19357 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019358
19359 # This is an error.
19360 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19361Try \`$0 --help' for more information." >&5
19362echo "$as_me: error: unrecognized option: $1
19363Try \`$0 --help' for more information." >&2;}
19364 { (exit 1); exit 1; }; } ;;
19365
19366 *) ac_config_targets="$ac_config_targets $1" ;;
19367
19368 esac
19369 shift
19370done
19371
Skip Montanaro6dead952003-09-25 14:50:04 +000019372ac_configure_extra_args=
19373
19374if $ac_cs_silent; then
19375 exec 6>/dev/null
19376 ac_configure_extra_args="$ac_configure_extra_args --silent"
19377fi
19378
19379_ACEOF
19380cat >>$CONFIG_STATUS <<_ACEOF
19381if \$ac_cs_recheck; then
19382 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19383 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19384fi
19385
Martin v. Löwis11437992002-04-12 09:54:03 +000019386_ACEOF
19387
19388
19389
19390
19391
19392cat >>$CONFIG_STATUS <<\_ACEOF
19393for ac_config_target in $ac_config_targets
19394do
19395 case "$ac_config_target" in
19396 # Handling of arguments.
19397 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
19398 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
19399 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
19400 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19401echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19402 { (exit 1); exit 1; }; };;
19403 esac
19404done
19405
19406# If the user did not use the arguments to specify the items to instantiate,
19407# then the envvar interface is used. Set only those that are not.
19408# We use the long form for the default assignment because of an extremely
19409# bizarre bug on SunOS 4.1.3.
19410if $ac_need_defaults; then
19411 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19412 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19413fi
19414
Skip Montanaro6dead952003-09-25 14:50:04 +000019415# Have a temporary directory for convenience. Make it in the build tree
19416# simply because there is no reason to put it here, and in addition,
19417# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000019418# Create a temporary directory, and hook for its removal unless debugging.
19419$debug ||
19420{
19421 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19422 trap '{ (exit 1); exit 1; }' 1 2 13 15
19423}
19424
19425# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000019426
Martin v. Löwis11437992002-04-12 09:54:03 +000019427{
Skip Montanaro6dead952003-09-25 14:50:04 +000019428 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000019429 test -n "$tmp" && test -d "$tmp"
19430} ||
19431{
Skip Montanaro6dead952003-09-25 14:50:04 +000019432 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000019433 (umask 077 && mkdir $tmp)
19434} ||
19435{
Skip Montanaro6dead952003-09-25 14:50:04 +000019436 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000019437 { (exit 1); exit 1; }
19438}
19439
19440_ACEOF
19441
19442cat >>$CONFIG_STATUS <<_ACEOF
19443
19444#
19445# CONFIG_FILES section.
19446#
19447
19448# No need to generate the scripts if there are no CONFIG_FILES.
19449# This happens for instance when ./config.status config.h
19450if test -n "\$CONFIG_FILES"; then
19451 # Protect against being on the right side of a sed subst in config.status.
19452 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19453 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19454s,@SHELL@,$SHELL,;t t
19455s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19456s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19457s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19458s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19459s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19460s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19461s,@exec_prefix@,$exec_prefix,;t t
19462s,@prefix@,$prefix,;t t
19463s,@program_transform_name@,$program_transform_name,;t t
19464s,@bindir@,$bindir,;t t
19465s,@sbindir@,$sbindir,;t t
19466s,@libexecdir@,$libexecdir,;t t
19467s,@datadir@,$datadir,;t t
19468s,@sysconfdir@,$sysconfdir,;t t
19469s,@sharedstatedir@,$sharedstatedir,;t t
19470s,@localstatedir@,$localstatedir,;t t
19471s,@libdir@,$libdir,;t t
19472s,@includedir@,$includedir,;t t
19473s,@oldincludedir@,$oldincludedir,;t t
19474s,@infodir@,$infodir,;t t
19475s,@mandir@,$mandir,;t t
19476s,@build_alias@,$build_alias,;t t
19477s,@host_alias@,$host_alias,;t t
19478s,@target_alias@,$target_alias,;t t
19479s,@DEFS@,$DEFS,;t t
19480s,@ECHO_C@,$ECHO_C,;t t
19481s,@ECHO_N@,$ECHO_N,;t t
19482s,@ECHO_T@,$ECHO_T,;t t
19483s,@LIBS@,$LIBS,;t t
19484s,@VERSION@,$VERSION,;t t
19485s,@SOVERSION@,$SOVERSION,;t t
19486s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
19487s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
19488s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
19489s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
19490s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
19491s,@MACHDEP@,$MACHDEP,;t t
19492s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000019493s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000019494s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019495s,@CXX@,$CXX,;t t
19496s,@MAINOBJ@,$MAINOBJ,;t t
19497s,@EXEEXT@,$EXEEXT,;t t
19498s,@CC@,$CC,;t t
19499s,@CFLAGS@,$CFLAGS,;t t
19500s,@LDFLAGS@,$LDFLAGS,;t t
19501s,@CPPFLAGS@,$CPPFLAGS,;t t
19502s,@ac_ct_CC@,$ac_ct_CC,;t t
19503s,@OBJEXT@,$OBJEXT,;t t
19504s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019505s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019506s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
19507s,@LIBRARY@,$LIBRARY,;t t
19508s,@LDLIBRARY@,$LDLIBRARY,;t t
19509s,@DLLLIBRARY@,$DLLLIBRARY,;t t
19510s,@BLDLIBRARY@,$BLDLIBRARY,;t t
19511s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
19512s,@INSTSONAME@,$INSTSONAME,;t t
19513s,@RUNSHARED@,$RUNSHARED,;t t
19514s,@LINKCC@,$LINKCC,;t t
19515s,@RANLIB@,$RANLIB,;t t
19516s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19517s,@AR@,$AR,;t t
19518s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19519s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19520s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19521s,@LN@,$LN,;t t
19522s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000019523s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019524s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
19525s,@SO@,$SO,;t t
19526s,@LDSHARED@,$LDSHARED,;t t
19527s,@BLDSHARED@,$BLDSHARED,;t t
19528s,@CCSHARED@,$CCSHARED,;t t
19529s,@LINKFORSHARED@,$LINKFORSHARED,;t t
19530s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000019531s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019532s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
19533s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
19534s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
19535s,@LDLAST@,$LDLAST,;t t
19536s,@THREADOBJ@,$THREADOBJ,;t t
19537s,@DLINCLDIR@,$DLINCLDIR,;t t
19538s,@DYNLOADFILE@,$DYNLOADFILE,;t t
19539s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019540s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019541s,@LIBOBJS@,$LIBOBJS,;t t
19542s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
19543s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
19544s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
19545s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
19546s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
19547s,@LIBM@,$LIBM,;t t
19548s,@LIBC@,$LIBC,;t t
19549s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
19550s,@THREADHEADERS@,$THREADHEADERS,;t t
19551s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019552s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019553CEOF
19554
19555_ACEOF
19556
19557 cat >>$CONFIG_STATUS <<\_ACEOF
19558 # Split the substitutions into bite-sized pieces for seds with
19559 # small command number limits, like on Digital OSF/1 and HP-UX.
19560 ac_max_sed_lines=48
19561 ac_sed_frag=1 # Number of current file.
19562 ac_beg=1 # First line for current file.
19563 ac_end=$ac_max_sed_lines # Line after last line for current file.
19564 ac_more_lines=:
19565 ac_sed_cmds=
19566 while $ac_more_lines; do
19567 if test $ac_beg -gt 1; then
19568 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19569 else
19570 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19571 fi
19572 if test ! -s $tmp/subs.frag; then
19573 ac_more_lines=false
19574 else
19575 # The purpose of the label and of the branching condition is to
19576 # speed up the sed processing (if there are no `@' at all, there
19577 # is no need to browse any of the substitutions).
19578 # These are the two extra sed commands mentioned above.
19579 (echo ':t
19580 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19581 if test -z "$ac_sed_cmds"; then
19582 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19583 else
19584 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19585 fi
19586 ac_sed_frag=`expr $ac_sed_frag + 1`
19587 ac_beg=$ac_end
19588 ac_end=`expr $ac_end + $ac_max_sed_lines`
19589 fi
19590 done
19591 if test -z "$ac_sed_cmds"; then
19592 ac_sed_cmds=cat
19593 fi
19594fi # test -n "$CONFIG_FILES"
19595
19596_ACEOF
19597cat >>$CONFIG_STATUS <<\_ACEOF
19598for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19599 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19600 case $ac_file in
19601 - | *:- | *:-:* ) # input from stdin
19602 cat >$tmp/stdin
19603 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19604 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19605 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19606 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19607 * ) ac_file_in=$ac_file.in ;;
19608 esac
19609
19610 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19611 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19612$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19613 X"$ac_file" : 'X\(//\)[^/]' \| \
19614 X"$ac_file" : 'X\(//\)$' \| \
19615 X"$ac_file" : 'X\(/\)' \| \
19616 . : '\(.\)' 2>/dev/null ||
19617echo X"$ac_file" |
19618 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19619 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19620 /^X\(\/\/\)$/{ s//\1/; q; }
19621 /^X\(\/\).*/{ s//\1/; q; }
19622 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019623 { if $as_mkdir_p; then
19624 mkdir -p "$ac_dir"
19625 else
19626 as_dir="$ac_dir"
19627 as_dirs=
19628 while test ! -d "$as_dir"; do
19629 as_dirs="$as_dir $as_dirs"
19630 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19631$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19632 X"$as_dir" : 'X\(//\)[^/]' \| \
19633 X"$as_dir" : 'X\(//\)$' \| \
19634 X"$as_dir" : 'X\(/\)' \| \
19635 . : '\(.\)' 2>/dev/null ||
19636echo X"$as_dir" |
19637 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19638 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19639 /^X\(\/\/\)$/{ s//\1/; q; }
19640 /^X\(\/\).*/{ s//\1/; q; }
19641 s/.*/./; q'`
19642 done
19643 test ! -n "$as_dirs" || mkdir $as_dirs
19644 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19645echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19646 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019647
19648 ac_builddir=.
19649
19650if test "$ac_dir" != .; then
19651 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19652 # A "../" for each directory in $ac_dir_suffix.
19653 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19654else
19655 ac_dir_suffix= ac_top_builddir=
19656fi
19657
19658case $srcdir in
19659 .) # No --srcdir option. We are building in place.
19660 ac_srcdir=.
19661 if test -z "$ac_top_builddir"; then
19662 ac_top_srcdir=.
19663 else
19664 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19665 fi ;;
19666 [\\/]* | ?:[\\/]* ) # Absolute path.
19667 ac_srcdir=$srcdir$ac_dir_suffix;
19668 ac_top_srcdir=$srcdir ;;
19669 *) # Relative path.
19670 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19671 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19672esac
19673# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19674# absolute.
19675ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000019676ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000019677ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19678ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19679
19680
19681 case $INSTALL in
19682 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19683 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19684 esac
19685
19686 if test x"$ac_file" != x-; then
19687 { echo "$as_me:$LINENO: creating $ac_file" >&5
19688echo "$as_me: creating $ac_file" >&6;}
19689 rm -f "$ac_file"
19690 fi
19691 # Let's still pretend it is `configure' which instantiates (i.e., don't
19692 # use $as_me), people would be surprised to read:
19693 # /* config.h. Generated by config.status. */
19694 if test x"$ac_file" = x-; then
19695 configure_input=
19696 else
19697 configure_input="$ac_file. "
19698 fi
19699 configure_input=$configure_input"Generated from `echo $ac_file_in |
19700 sed 's,.*/,,'` by configure."
19701
19702 # First look for the input files in the build tree, otherwise in the
19703 # src tree.
19704 ac_file_inputs=`IFS=:
19705 for f in $ac_file_in; do
19706 case $f in
19707 -) echo $tmp/stdin ;;
19708 [\\/$]*)
19709 # Absolute (can't be DOS-style, as IFS=:)
19710 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19711echo "$as_me: error: cannot find input file: $f" >&2;}
19712 { (exit 1); exit 1; }; }
19713 echo $f;;
19714 *) # Relative
19715 if test -f "$f"; then
19716 # Build tree
19717 echo $f
19718 elif test -f "$srcdir/$f"; then
19719 # Source tree
19720 echo $srcdir/$f
19721 else
19722 # /dev/null tree
19723 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19724echo "$as_me: error: cannot find input file: $f" >&2;}
19725 { (exit 1); exit 1; }; }
19726 fi;;
19727 esac
19728 done` || { (exit 1); exit 1; }
19729_ACEOF
19730cat >>$CONFIG_STATUS <<_ACEOF
19731 sed "$ac_vpsub
19732$extrasub
19733_ACEOF
19734cat >>$CONFIG_STATUS <<\_ACEOF
19735:t
19736/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19737s,@configure_input@,$configure_input,;t t
19738s,@srcdir@,$ac_srcdir,;t t
19739s,@abs_srcdir@,$ac_abs_srcdir,;t t
19740s,@top_srcdir@,$ac_top_srcdir,;t t
19741s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19742s,@builddir@,$ac_builddir,;t t
19743s,@abs_builddir@,$ac_abs_builddir,;t t
19744s,@top_builddir@,$ac_top_builddir,;t t
19745s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19746s,@INSTALL@,$ac_INSTALL,;t t
19747" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19748 rm -f $tmp/stdin
19749 if test x"$ac_file" != x-; then
19750 mv $tmp/out $ac_file
19751 else
19752 cat $tmp/out
19753 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019754 fi
19755
Martin v. Löwis11437992002-04-12 09:54:03 +000019756done
19757_ACEOF
19758cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019759
Martin v. Löwis11437992002-04-12 09:54:03 +000019760#
19761# CONFIG_HEADER section.
19762#
Guido van Rossum627b2d71993-12-24 10:39:16 +000019763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019764# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19765# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000019766#
19767# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000019768ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19769ac_dB='[ ].*$,\1#\2'
19770ac_dC=' '
19771ac_dD=',;t'
19772# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19773ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19774ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019775ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000019776ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019777
Martin v. Löwis11437992002-04-12 09:54:03 +000019778for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000019779 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000019780 case $ac_file in
19781 - | *:- | *:-:* ) # input from stdin
19782 cat >$tmp/stdin
19783 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19784 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19785 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19786 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19787 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019788 esac
19789
Martin v. Löwis11437992002-04-12 09:54:03 +000019790 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19791echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019792
Martin v. Löwis11437992002-04-12 09:54:03 +000019793 # First look for the input files in the build tree, otherwise in the
19794 # src tree.
19795 ac_file_inputs=`IFS=:
19796 for f in $ac_file_in; do
19797 case $f in
19798 -) echo $tmp/stdin ;;
19799 [\\/$]*)
19800 # Absolute (can't be DOS-style, as IFS=:)
19801 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19802echo "$as_me: error: cannot find input file: $f" >&2;}
19803 { (exit 1); exit 1; }; }
19804 echo $f;;
19805 *) # Relative
19806 if test -f "$f"; then
19807 # Build tree
19808 echo $f
19809 elif test -f "$srcdir/$f"; then
19810 # Source tree
19811 echo $srcdir/$f
19812 else
19813 # /dev/null tree
19814 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19815echo "$as_me: error: cannot find input file: $f" >&2;}
19816 { (exit 1); exit 1; }; }
19817 fi;;
19818 esac
19819 done` || { (exit 1); exit 1; }
19820 # Remove the trailing spaces.
19821 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019822
Martin v. Löwis11437992002-04-12 09:54:03 +000019823_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019824
Martin v. Löwis11437992002-04-12 09:54:03 +000019825# Transform confdefs.h into two sed scripts, `conftest.defines' and
19826# `conftest.undefs', that substitutes the proper values into
19827# config.h.in to produce config.h. The first handles `#define'
19828# templates, and the second `#undef' templates.
19829# And first: Protect against being on the right side of a sed subst in
19830# config.status. Protect against being in an unquoted here document
19831# in config.status.
19832rm -f conftest.defines conftest.undefs
19833# Using a here document instead of a string reduces the quoting nightmare.
19834# Putting comments in sed scripts is not portable.
19835#
19836# `end' is used to avoid that the second main sed command (meant for
19837# 0-ary CPP macros) applies to n-ary macro definitions.
19838# See the Autoconf documentation for `clear'.
19839cat >confdef2sed.sed <<\_ACEOF
19840s/[\\&,]/\\&/g
19841s,[\\$`],\\&,g
19842t clear
19843: clear
19844s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19845t end
19846s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19847: end
19848_ACEOF
19849# If some macros were called several times there might be several times
19850# the same #defines, which is useless. Nevertheless, we may not want to
19851# sort them, since we want the *last* AC-DEFINE to be honored.
19852uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19853sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19854rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019855
19856# This sed command replaces #undef with comments. This is necessary, for
19857# example, in the case of _POSIX_SOURCE, which is predefined and required
19858# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019859cat >>conftest.undefs <<\_ACEOF
19860s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19861_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019862
Martin v. Löwis11437992002-04-12 09:54:03 +000019863# Break up conftest.defines because some shells have a limit on the size
19864# of here documents, and old seds have small limits too (100 cmds).
19865echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019866echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019867echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19868echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019869rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019870while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019871do
Martin v. Löwis11437992002-04-12 09:54:03 +000019872 # Write a limited-size here document to $tmp/defines.sed.
19873 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19874 # Speed up: don't consider the non `#define' lines.
19875 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19876 # Work around the forget-to-reset-the-flag bug.
19877 echo 't clr' >>$CONFIG_STATUS
19878 echo ': clr' >>$CONFIG_STATUS
19879 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019880 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019881 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19882 rm -f $tmp/in
19883 mv $tmp/out $tmp/in
19884' >>$CONFIG_STATUS
19885 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19886 rm -f conftest.defines
19887 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019888done
Martin v. Löwis11437992002-04-12 09:54:03 +000019889rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019890echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019891echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019892
Martin v. Löwis11437992002-04-12 09:54:03 +000019893# Break up conftest.undefs because some shells have a limit on the size
19894# of here documents, and old seds have small limits too (100 cmds).
19895echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19896rm -f conftest.tail
19897while grep . conftest.undefs >/dev/null
19898do
19899 # Write a limited-size here document to $tmp/undefs.sed.
19900 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19901 # Speed up: don't consider the non `#undef'
19902 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19903 # Work around the forget-to-reset-the-flag bug.
19904 echo 't clr' >>$CONFIG_STATUS
19905 echo ': clr' >>$CONFIG_STATUS
19906 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19907 echo 'CEOF
19908 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19909 rm -f $tmp/in
19910 mv $tmp/out $tmp/in
19911' >>$CONFIG_STATUS
19912 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19913 rm -f conftest.undefs
19914 mv conftest.tail conftest.undefs
19915done
19916rm -f conftest.undefs
19917
19918cat >>$CONFIG_STATUS <<\_ACEOF
19919 # Let's still pretend it is `configure' which instantiates (i.e., don't
19920 # use $as_me), people would be surprised to read:
19921 # /* config.h. Generated by config.status. */
19922 if test x"$ac_file" = x-; then
19923 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019924 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019925 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019926 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019927 cat $tmp/in >>$tmp/config.h
19928 rm -f $tmp/in
19929 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019930 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019931 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19932echo "$as_me: $ac_file is unchanged" >&6;}
19933 else
19934 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19935$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19936 X"$ac_file" : 'X\(//\)[^/]' \| \
19937 X"$ac_file" : 'X\(//\)$' \| \
19938 X"$ac_file" : 'X\(/\)' \| \
19939 . : '\(.\)' 2>/dev/null ||
19940echo X"$ac_file" |
19941 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19942 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19943 /^X\(\/\/\)$/{ s//\1/; q; }
19944 /^X\(\/\).*/{ s//\1/; q; }
19945 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019946 { if $as_mkdir_p; then
19947 mkdir -p "$ac_dir"
19948 else
19949 as_dir="$ac_dir"
19950 as_dirs=
19951 while test ! -d "$as_dir"; do
19952 as_dirs="$as_dir $as_dirs"
19953 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19954$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19955 X"$as_dir" : 'X\(//\)[^/]' \| \
19956 X"$as_dir" : 'X\(//\)$' \| \
19957 X"$as_dir" : 'X\(/\)' \| \
19958 . : '\(.\)' 2>/dev/null ||
19959echo X"$as_dir" |
19960 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19961 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19962 /^X\(\/\/\)$/{ s//\1/; q; }
19963 /^X\(\/\).*/{ s//\1/; q; }
19964 s/.*/./; q'`
19965 done
19966 test ! -n "$as_dirs" || mkdir $as_dirs
19967 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19968echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19969 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019970
Martin v. Löwis11437992002-04-12 09:54:03 +000019971 rm -f $ac_file
19972 mv $tmp/config.h $ac_file
19973 fi
19974 else
19975 cat $tmp/config.h
19976 rm -f $tmp/config.h
19977 fi
19978done
19979_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019980
Martin v. Löwis11437992002-04-12 09:54:03 +000019981cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019982
Martin v. Löwis11437992002-04-12 09:54:03 +000019983{ (exit 0); exit 0; }
19984_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019985chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019986ac_clean_files=$ac_clean_files_save
19987
19988
19989# configure is writing to config.log, and then calls config.status.
19990# config.status does its own redirection, appending to config.log.
19991# Unfortunately, on DOS this fails, as config.log is still kept open
19992# by configure, so config.status won't be able to write to it; its
19993# output is simply discarded. So we exec the FD to /dev/null,
19994# effectively closing config.log, so it can be properly (re)opened and
19995# appended to by config.status. When coming back to configure, we
19996# need to make the FD available again.
19997if test "$no_create" != yes; then
19998 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019999 ac_config_status_args=
20000 test "$silent" = yes &&
20001 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000020002 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000020003 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000020004 exec 5>>config.log
20005 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20006 # would make configure fail if this is the last instruction.
20007 $ac_cs_success || { (exit 1); exit 1; }
20008fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020009
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000020010
20011echo "creating Setup"
20012if test ! -f Modules/Setup
20013then
20014 cp $srcdir/Modules/Setup.dist Modules/Setup
20015fi
20016
20017echo "creating Setup.local"
20018if test ! -f Modules/Setup.local
20019then
20020 echo "# Edit this file for local setup changes" >Modules/Setup.local
20021fi
20022
20023echo "creating Makefile"
20024$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
20025 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000020026 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000020027mv config.c Modules