blob: 0f8d4fb06301c053bd24f615b248e6866bf56322 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis12af0482004-01-31 12:34:17 +00002# From configure.in Revision: 1.447 .
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
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000874 --with-fpectl enable SIGFPE catching
875 --with-libm=STRING math library
876 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000877
878Some influential environment variables:
879 CC C compiler command
880 CFLAGS C compiler flags
881 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
882 nonstandard directory <lib dir>
883 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
884 headers in a nonstandard directory <include dir>
885 CPP C preprocessor
886
887Use these variables to override the choices made by `configure' or to help
888it to find libraries and programs with nonstandard names/locations.
889
890_ACEOF
891fi
892
893if test "$ac_init_help" = "recursive"; then
894 # If there are subdirs, report their specific --help.
895 ac_popdir=`pwd`
896 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
897 test -d $ac_dir || continue
898 ac_builddir=.
899
900if test "$ac_dir" != .; then
901 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
902 # A "../" for each directory in $ac_dir_suffix.
903 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
904else
905 ac_dir_suffix= ac_top_builddir=
906fi
907
908case $srcdir in
909 .) # No --srcdir option. We are building in place.
910 ac_srcdir=.
911 if test -z "$ac_top_builddir"; then
912 ac_top_srcdir=.
913 else
914 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
915 fi ;;
916 [\\/]* | ?:[\\/]* ) # Absolute path.
917 ac_srcdir=$srcdir$ac_dir_suffix;
918 ac_top_srcdir=$srcdir ;;
919 *) # Relative path.
920 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
921 ac_top_srcdir=$ac_top_builddir$srcdir ;;
922esac
923# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
924# absolute.
925ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +0000926ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000927ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
928ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
929
930 cd $ac_dir
931 # Check for guested configure; otherwise get Cygnus style configure.
932 if test -f $ac_srcdir/configure.gnu; then
933 echo
934 $SHELL $ac_srcdir/configure.gnu --help=recursive
935 elif test -f $ac_srcdir/configure; then
936 echo
937 $SHELL $ac_srcdir/configure --help=recursive
938 elif test -f $ac_srcdir/configure.ac ||
939 test -f $ac_srcdir/configure.in; then
940 echo
941 $ac_configure --help
942 else
943 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
944 fi
945 cd $ac_popdir
946 done
947fi
948
949test -n "$ac_init_help" && exit 0
950if $ac_init_version; then
951 cat <<\_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000952python configure 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +0000953generated by GNU Autoconf 2.57
Martin v. Löwis11437992002-04-12 09:54:03 +0000954
955Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
956Free Software Foundation, Inc.
957This configure script is free software; the Free Software Foundation
958gives unlimited permission to copy, distribute and modify it.
959_ACEOF
960 exit 0
961fi
962exec 5>config.log
963cat >&5 <<_ACEOF
964This file contains any messages produced by compilers while
965running configure, to aid debugging if configure makes a mistake.
966
Fred Drake9bd44622003-07-30 17:39:48 +0000967It was created by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +0000968generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000969
970 $ $0 $@
971
972_ACEOF
973{
974cat <<_ASUNAME
975## --------- ##
976## Platform. ##
977## --------- ##
978
979hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
980uname -m = `(uname -m) 2>/dev/null || echo unknown`
981uname -r = `(uname -r) 2>/dev/null || echo unknown`
982uname -s = `(uname -s) 2>/dev/null || echo unknown`
983uname -v = `(uname -v) 2>/dev/null || echo unknown`
984
985/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
986/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
987
988/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
989/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
990/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
991hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
992/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
993/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
994/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
995
996_ASUNAME
997
998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
999for as_dir in $PATH
1000do
1001 IFS=$as_save_IFS
1002 test -z "$as_dir" && as_dir=.
1003 echo "PATH: $as_dir"
1004done
1005
1006} >&5
1007
1008cat >&5 <<_ACEOF
1009
1010
1011## ----------- ##
1012## Core tests. ##
1013## ----------- ##
1014
1015_ACEOF
1016
1017
1018# Keep a trace of the command line.
1019# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001020# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001021# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001022# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001023ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001024ac_configure_args0=
1025ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001026ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001027ac_must_keep_next=false
1028for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001029do
Skip Montanaro6dead952003-09-25 14:50:04 +00001030 for ac_arg
1031 do
1032 case $ac_arg in
1033 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1034 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1035 | -silent | --silent | --silen | --sile | --sil)
1036 continue ;;
1037 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1038 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1039 esac
1040 case $ac_pass in
1041 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1042 2)
1043 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1044 if test $ac_must_keep_next = true; then
1045 ac_must_keep_next=false # Got value, back to normal.
1046 else
1047 case $ac_arg in
1048 *=* | --config-cache | -C | -disable-* | --disable-* \
1049 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1050 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1051 | -with-* | --with-* | -without-* | --without-* | --x)
1052 case "$ac_configure_args0 " in
1053 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1054 esac
1055 ;;
1056 -* ) ac_must_keep_next=true ;;
1057 esac
1058 fi
1059 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1060 # Get rid of the leading space.
1061 ac_sep=" "
1062 ;;
1063 esac
1064 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001065done
Skip Montanaro6dead952003-09-25 14:50:04 +00001066$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1067$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001068
1069# When interrupted or exit'd, cleanup temporary files, and complete
1070# config.log. We remove comments because anyway the quotes in there
1071# would cause problems or look ugly.
1072# WARNING: Be sure not to use single quotes in there, as some shells,
1073# such as our DU 5.0 friend, will then `close' the trap.
1074trap 'exit_status=$?
1075 # Save into config.log some information that might help in debugging.
1076 {
1077 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001078
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 cat <<\_ASBOX
1080## ---------------- ##
1081## Cache variables. ##
1082## ---------------- ##
1083_ASBOX
1084 echo
1085 # The following way of writing the cache mishandles newlines in values,
1086{
1087 (set) 2>&1 |
1088 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1089 *ac_space=\ *)
1090 sed -n \
1091 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1092 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1093 ;;
1094 *)
1095 sed -n \
1096 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1097 ;;
1098 esac;
1099}
1100 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001101
1102 cat <<\_ASBOX
1103## ----------------- ##
1104## Output variables. ##
1105## ----------------- ##
1106_ASBOX
1107 echo
1108 for ac_var in $ac_subst_vars
1109 do
1110 eval ac_val=$`echo $ac_var`
1111 echo "$ac_var='"'"'$ac_val'"'"'"
1112 done | sort
1113 echo
1114
1115 if test -n "$ac_subst_files"; then
1116 cat <<\_ASBOX
1117## ------------- ##
1118## Output files. ##
1119## ------------- ##
1120_ASBOX
1121 echo
1122 for ac_var in $ac_subst_files
1123 do
1124 eval ac_val=$`echo $ac_var`
1125 echo "$ac_var='"'"'$ac_val'"'"'"
1126 done | sort
1127 echo
1128 fi
1129
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 if test -s confdefs.h; then
1131 cat <<\_ASBOX
1132## ----------- ##
1133## confdefs.h. ##
1134## ----------- ##
1135_ASBOX
1136 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001137 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 echo
1139 fi
1140 test "$ac_signal" != 0 &&
1141 echo "$as_me: caught signal $ac_signal"
1142 echo "$as_me: exit $exit_status"
1143 } >&5
1144 rm -f core core.* *.core &&
1145 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1146 exit $exit_status
1147 ' 0
1148for ac_signal in 1 2 13 15; do
1149 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1150done
1151ac_signal=0
1152
1153# confdefs.h avoids OS command line length limits that DEFS can exceed.
1154rm -rf conftest* confdefs.h
1155# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1156echo >confdefs.h
1157
1158# Predefined preprocessor variables.
1159
1160cat >>confdefs.h <<_ACEOF
1161#define PACKAGE_NAME "$PACKAGE_NAME"
1162_ACEOF
1163
1164
1165cat >>confdefs.h <<_ACEOF
1166#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1167_ACEOF
1168
1169
1170cat >>confdefs.h <<_ACEOF
1171#define PACKAGE_VERSION "$PACKAGE_VERSION"
1172_ACEOF
1173
1174
1175cat >>confdefs.h <<_ACEOF
1176#define PACKAGE_STRING "$PACKAGE_STRING"
1177_ACEOF
1178
1179
1180cat >>confdefs.h <<_ACEOF
1181#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1182_ACEOF
1183
1184
1185# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186# Prefer explicitly selected file to automatically selected ones.
1187if test -z "$CONFIG_SITE"; then
1188 if test "x$prefix" != xNONE; then
1189 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1190 else
1191 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1192 fi
1193fi
1194for ac_site_file in $CONFIG_SITE; do
1195 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1197echo "$as_me: loading site script $ac_site_file" >&6;}
1198 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 . "$ac_site_file"
1200 fi
1201done
1202
1203if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 # Some versions of bash will fail to source /dev/null (special
1205 # files actually), so we avoid doing that.
1206 if test -f "$cache_file"; then
1207 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1208echo "$as_me: loading cache $cache_file" >&6;}
1209 case $cache_file in
1210 [\\/]* | ?:[\\/]* ) . $cache_file;;
1211 *) . ./$cache_file;;
1212 esac
1213 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214else
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1216echo "$as_me: creating cache $cache_file" >&6;}
1217 >$cache_file
1218fi
1219
1220# Check that the precious variables saved in the cache have kept the same
1221# value.
1222ac_cache_corrupted=false
1223for ac_var in `(set) 2>&1 |
1224 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1225 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1226 eval ac_new_set=\$ac_env_${ac_var}_set
1227 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1228 eval ac_new_val="\$ac_env_${ac_var}_value"
1229 case $ac_old_set,$ac_new_set in
1230 set,)
1231 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1232echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1233 ac_cache_corrupted=: ;;
1234 ,set)
1235 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1236echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1237 ac_cache_corrupted=: ;;
1238 ,);;
1239 *)
1240 if test "x$ac_old_val" != "x$ac_new_val"; then
1241 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1242echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1243 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1244echo "$as_me: former value: $ac_old_val" >&2;}
1245 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1246echo "$as_me: current value: $ac_new_val" >&2;}
1247 ac_cache_corrupted=:
1248 fi;;
1249 esac
1250 # Pass precious variables to config.status.
1251 if test "$ac_new_set" = set; then
1252 case $ac_new_val in
1253 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1254 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1255 *) ac_arg=$ac_var=$ac_new_val ;;
1256 esac
1257 case " $ac_configure_args " in
1258 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1259 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1260 esac
1261 fi
1262done
1263if $ac_cache_corrupted; then
1264 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1265echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1266 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1267echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1268 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269fi
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001273ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1274ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1275ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001276
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277
Michael W. Hudson54241132001-12-07 15:38:26 +00001278
1279
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280
Martin v. Löwis11437992002-04-12 09:54:03 +00001281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
Martin v. Löwis88afe662002-10-26 13:47:44 +00001294
1295
1296
1297
1298
1299
1300
1301
1302
Skip Montanaro6dead952003-09-25 14:50:04 +00001303
1304 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001305
1306
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308
1309
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001310
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001311
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001312# We don't use PACKAGE_ variables, and they cause conflicts
1313# with other autoconf-based packages that include Python.h
1314grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1315rm confdefs.h
1316mv confdefs.h.new confdefs.h
1317
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001318
Fred Drake9bd44622003-07-30 17:39:48 +00001319VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001320
Martin v. Löwis1142de32002-03-29 16:28:31 +00001321
1322SOVERSION=1.0
1323
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001324# The later defininition of _XOPEN_SOURCE disables certain features
1325# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1326
1327cat >>confdefs.h <<\_ACEOF
1328#define _GNU_SOURCE 1
1329_ACEOF
1330
1331
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001332# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1333# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1334# them.
1335
1336cat >>confdefs.h <<\_ACEOF
1337#define _NETBSD_SOURCE 1
1338_ACEOF
1339
1340
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001341# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1342# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1343# them.
1344
1345cat >>confdefs.h <<\_ACEOF
1346#define __BSD_VISIBLE 1
1347_ACEOF
1348
1349
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001350define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001351
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001352# Arguments passed to configure.
1353
1354CONFIG_ARGS="$ac_configure_args"
1355
Jack Jansene578a632001-08-15 01:27:14 +00001356# Check whether --enable-framework or --disable-framework was given.
1357if test "${enable_framework+set}" = set; then
1358 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001359
Jack Jansene578a632001-08-15 01:27:14 +00001360 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001361 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001362 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001363 esac
1364 case $enableval in
1365 no)
1366 PYTHONFRAMEWORK=
1367 PYTHONFRAMEWORKDIR=no-framework
1368 PYTHONFRAMEWORKPREFIX=
1369 PYTHONFRAMEWORKINSTALLDIR=
1370 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001371 ;;
1372 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001373 PYTHONFRAMEWORK=Python
1374 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001375 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001376 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1377 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001378 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001379
Guido van Rossum563e7081996-09-10 18:20:48 +00001380else
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
Jack Jansene578a632001-08-15 01:27:14 +00001382 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001383 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001384 PYTHONFRAMEWORKPREFIX=
1385 PYTHONFRAMEWORKINSTALLDIR=
1386 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001387
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001389
1390
1391
1392
Jack Jansene578a632001-08-15 01:27:14 +00001393
1394##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395## AC_HELP_STRING(--with-dyld,
1396## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001397##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001398# Set name for machine-dependent library files
1399
Martin v. Löwis11437992002-04-12 09:54:03 +00001400echo "$as_me:$LINENO: checking MACHDEP" >&5
1401echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001402if test -z "$MACHDEP"
1403then
Guido van Rossum563e7081996-09-10 18:20:48 +00001404 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001405 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1406 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001407 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001408 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001409 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001410 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001411 ac_md_system=`echo $ac_sys_system |
1412 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1413 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001414 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001415 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001416
Guido van Rossum07397971997-04-29 21:49:50 +00001417 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001418 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001419 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001420 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001421 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001422 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001423 esac
1424fi
Guido van Rossum91922671997-10-09 20:24:13 +00001425
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001426# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1427# disable features if it is defined, without any means to access these
1428# features as extensions. For these systems, we skip the definition of
1429# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1430# some feature, make sure there is no alternative way to access this
1431# feature. Also, when using wildcards, make sure you have verified the
1432# need for not defining _XOPEN_SOURCE on all systems matching the
1433# wildcard, and that the wildcard does not include future systems
1434# (which may remove their limitations).
1435case $ac_sys_system/$ac_sys_release in
1436 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1437 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001438 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1439 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001440 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001441 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1442 # of union __?sigval. Reported by Stuart Bishop.
1443 SunOS/5.6)
1444 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001445 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1446 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1447 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1448 define_xopen_source=no;;
1449 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001450 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001451 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001452 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001453 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1454 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1455 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1456 # This should hopefully be fixed in FreeBSD 4.9
1457 FreeBSD/4.8* | Darwin/6* )
1458 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001459 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1460 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1461 # has another value. By not (re)defining it, the defaults come in place.
1462 AIX/4)
1463 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001464esac
1465
1466if test $define_xopen_source = yes
1467then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001468
1469cat >>confdefs.h <<\_ACEOF
1470#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001471_ACEOF
1472
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001473
1474 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1475 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1476 # several APIs are not declared. Since this is also needed in some
1477 # cases for HP-UX, we define it globally.
1478
1479
1480cat >>confdefs.h <<\_ACEOF
1481#define _XOPEN_SOURCE_EXTENDED 1
1482_ACEOF
1483
1484
1485cat >>confdefs.h <<\_ACEOF
1486#define _POSIX_C_SOURCE 200112L
1487_ACEOF
1488
1489
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001490fi
1491
Guido van Rossum91922671997-10-09 20:24:13 +00001492#
1493# SGI compilers allow the specification of the both the ABI and the
1494# ISA on the command line. Depending on the values of these switches,
1495# different and often incompatable code will be generated.
1496#
1497# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1498# thus supply support for various ABI/ISA combinations. The MACHDEP
1499# variable is also adjusted.
1500#
1501
1502if test ! -z "$SGI_ABI"
1503then
1504 CC="cc $SGI_ABI"
1505 LDFLAGS="$SGI_ABI $LDFLAGS"
1506 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1507fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001508echo "$as_me:$LINENO: result: $MACHDEP" >&5
1509echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001510
Jack Jansen83f898c2002-12-30 22:23:40 +00001511# And add extra plat-mac for darwin
1512
Jack Jansen7b59b422003-03-17 15:44:10 +00001513
Jack Jansen83f898c2002-12-30 22:23:40 +00001514echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1515echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1516if test -z "$EXTRAPLATDIR"
1517then
1518 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001519 darwin)
1520 EXTRAPLATDIR="\$(PLATMACDIRS)"
1521 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1522 ;;
1523 *)
1524 EXTRAPLATDIR=""
1525 EXTRAMACHDEPPATH=""
1526 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001527 esac
1528fi
1529echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1530echo "${ECHO_T}$EXTRAPLATDIR" >&6
1531
Guido van Rossum627b2d71993-12-24 10:39:16 +00001532# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001533
1534# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1535# for debug/optimization stuff. BASECFLAGS is for flags that are required
1536# just to get things to compile and link. Users are free to override OPT
1537# when running configure or make. The build should not break if they do.
1538# BASECFLAGS should generally not be messed with, however.
1539
1540# XXX shouldn't some/most/all of this code be merged with the stuff later
1541# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001542echo "$as_me:$LINENO: checking for --without-gcc" >&5
1543echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1544
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001545# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001546if test "${with_gcc+set}" = set; then
1547 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
Guido van Rossum7f43da71994-08-01 12:15:30 +00001549 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001550 no) CC=cc
1551 without_gcc=yes;;
1552 yes) CC=gcc
1553 without_gcc=no;;
1554 *) CC=$withval
1555 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001556 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001557else
Martin v. Löwis11437992002-04-12 09:54:03 +00001558
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001559 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001560 AIX*) CC=cc_r
1561 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001562 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001563 case $BE_HOST_CPU in
1564 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001565 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001566 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001567 BASECFLAGS="$BASECFLAGS -export pragma"
1568 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001569 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001570 ;;
1571 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001572 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001573 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001574 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001575 ;;
1576 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1578echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1579 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001580 ;;
1581 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001582 AR="\$(srcdir)/Modules/ar_beos"
1583 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001584 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001585 Monterey*)
1586 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001587 without_gcc=;;
1588 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001589 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001590fi;
1591echo "$as_me:$LINENO: result: $without_gcc" >&5
1592echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001593
1594
Guido van Rossum95012191999-12-16 17:50:52 +00001595
Fred Drakea1a84e72001-03-06 05:52:16 +00001596MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001597echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1598echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1599
Guido van Rossum95012191999-12-16 17:50:52 +00001600# Check whether --with-cxx or --without-cxx was given.
1601if test "${with_cxx+set}" = set; then
1602 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001603
Martin v. Löwis22352952000-12-13 17:37:02 +00001604 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001605 case $withval in
1606 no) CXX=
1607 with_cxx=no;;
1608 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001609 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001610 with_cxx=$withval;;
1611 esac
1612else
Martin v. Löwis11437992002-04-12 09:54:03 +00001613
Guido van Rossum95012191999-12-16 17:50:52 +00001614 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001615 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001616
Martin v. Löwis11437992002-04-12 09:54:03 +00001617fi;
1618echo "$as_me:$LINENO: result: $with_cxx" >&5
1619echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001620
1621if test "$with_cxx" = "yes"
1622then
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1624echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1625 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001626fi
1627
1628
1629
1630
Martin v. Löwis11437992002-04-12 09:54:03 +00001631if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001632then
1633 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1634do
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 # 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 +00001636set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001637echo "$as_me:$LINENO: checking for $ac_word" >&5
1638echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1639if test "${ac_cv_prog_CXX+set}" = set; then
1640 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001641else
1642 if test -n "$CXX"; then
1643 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1644else
Martin v. Löwis11437992002-04-12 09:54:03 +00001645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1646for as_dir in $PATH
1647do
1648 IFS=$as_save_IFS
1649 test -z "$as_dir" && as_dir=.
1650 for ac_exec_ext in '' $ac_executable_extensions; do
1651 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1652 ac_cv_prog_CXX="$ac_prog"
1653 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1654 break 2
1655 fi
1656done
1657done
1658
Martin v. Löwis22352952000-12-13 17:37:02 +00001659fi
1660fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001661CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001662if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001663 echo "$as_me:$LINENO: result: $CXX" >&5
1664echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001665else
Martin v. Löwis11437992002-04-12 09:54:03 +00001666 echo "$as_me:$LINENO: result: no" >&5
1667echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001668fi
1669
Martin v. Löwis11437992002-04-12 09:54:03 +00001670 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001671done
1672test -n "$CXX" || CXX="notfound"
1673
1674 if test "$CXX" = "notfound"
1675 then
1676 CXX=
1677 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001678 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001679ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001680ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1681ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1682ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1683 cat >conftest.$ac_ext <<_ACEOF
1684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001685/* confdefs.h. */
1686_ACEOF
1687cat confdefs.h >>conftest.$ac_ext
1688cat >>conftest.$ac_ext <<_ACEOF
1689/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001690
Martin v. Löwis11437992002-04-12 09:54:03 +00001691int
1692main ()
1693{
Michael W. Hudson54241132001-12-07 15:38:26 +00001694
Martin v. Löwis11437992002-04-12 09:54:03 +00001695 ;
1696 return 0;
1697}
1698_ACEOF
1699ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001700ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001701# Try to create an executable without -o first, disregard a.out.
1702# It will help us diagnose broken compilers, and finding out an intuition
1703# of exeext.
1704echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1705echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1706ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1707if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1708 (eval $ac_link_default) 2>&5
1709 ac_status=$?
1710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1711 (exit $ac_status); }; then
1712 # Find the output, starting from the most likely. This scheme is
1713# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1714# resort.
1715
1716# Be careful to initialize this variable, since it used to be cached.
1717# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1718ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001719# b.out is created by i960 compilers.
1720for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1721do
1722 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001724 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1725 ;;
1726 conftest.$ac_ext )
1727 # This is the source file.
1728 ;;
1729 [ab].out )
1730 # We found the default executable, but exeext='' is most
1731 # certainly right.
1732 break;;
1733 *.* )
1734 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1735 # FIXME: I believe we export ac_cv_exeext for Libtool,
1736 # but it would be cool to find out if it's true. Does anybody
1737 # maintain Libtool? --akim.
1738 export ac_cv_exeext
1739 break;;
1740 * )
1741 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001742 esac
1743done
1744else
1745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001746sed 's/^/| /' conftest.$ac_ext >&5
1747
1748{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1749See \`config.log' for more details." >&5
1750echo "$as_me: error: C++ compiler cannot create executables
1751See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001752 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001754
1755ac_exeext=$ac_cv_exeext
1756echo "$as_me:$LINENO: result: $ac_file" >&5
1757echo "${ECHO_T}$ac_file" >&6
1758
1759# Check the compiler produces executables we can run. If not, either
1760# the compiler is broken, or we cross compile.
1761echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1762echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1763# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1764# If not cross compiling, check that we can run a simple program.
1765if test "$cross_compiling" != yes; then
1766 if { ac_try='./$ac_file'
1767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1768 (eval $ac_try) 2>&5
1769 ac_status=$?
1770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1771 (exit $ac_status); }; }; then
1772 cross_compiling=no
1773 else
1774 if test "$cross_compiling" = maybe; then
1775 cross_compiling=yes
1776 else
1777 { { echo "$as_me:$LINENO: 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." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001780echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001781If you meant to cross compile, use \`--host'.
1782See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001783 { (exit 1); exit 1; }; }
1784 fi
1785 fi
1786fi
1787echo "$as_me:$LINENO: result: yes" >&5
1788echo "${ECHO_T}yes" >&6
1789
Skip Montanaro6dead952003-09-25 14:50:04 +00001790rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001791ac_clean_files=$ac_clean_files_save
1792# Check the compiler produces executables we can run. If not, either
1793# the compiler is broken, or we cross compile.
1794echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1795echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1796echo "$as_me:$LINENO: result: $cross_compiling" >&5
1797echo "${ECHO_T}$cross_compiling" >&6
1798
1799echo "$as_me:$LINENO: checking for suffix of executables" >&5
1800echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1802 (eval $ac_link) 2>&5
1803 ac_status=$?
1804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1805 (exit $ac_status); }; then
1806 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1807# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1808# work properly (i.e., refer to `conftest.exe'), while it won't with
1809# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001810for ac_file in conftest.exe conftest conftest.*; do
1811 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001812 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001813 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001814 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1815 export ac_cv_exeext
1816 break;;
1817 * ) break;;
1818 esac
1819done
1820else
Skip Montanaro6dead952003-09-25 14:50:04 +00001821 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1822See \`config.log' for more details." >&5
1823echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1824See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001825 { (exit 1); exit 1; }; }
1826fi
1827
1828rm -f conftest$ac_cv_exeext
1829echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1830echo "${ECHO_T}$ac_cv_exeext" >&6
1831
1832rm -f conftest.$ac_ext
1833EXEEXT=$ac_cv_exeext
1834ac_exeext=$EXEEXT
1835
1836 ac_ext=c
1837ac_cpp='$CPP $CPPFLAGS'
1838ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1839ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1840ac_compiler_gnu=$ac_cv_c_compiler_gnu
1841
1842
Martin v. Löwis22352952000-12-13 17:37:02 +00001843
1844 fi
1845fi
1846
Guido van Rossum8b131c51995-03-09 14:10:13 +00001847# If the user switches compilers, we can't believe the cache
1848if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1849then
Martin v. Löwis11437992002-04-12 09:54:03 +00001850 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1851(it is also a good idea to do 'make clean' before compiling)" >&5
1852echo "$as_me: error: cached CC is different -- throw away $cache_file
1853(it is also a good idea to do 'make clean' before compiling)" >&2;}
1854 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001855fi
1856
Martin v. Löwis11437992002-04-12 09:54:03 +00001857ac_ext=c
1858ac_cpp='$CPP $CPPFLAGS'
1859ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1860ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1861ac_compiler_gnu=$ac_cv_c_compiler_gnu
1862if test -n "$ac_tool_prefix"; then
1863 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1864set dummy ${ac_tool_prefix}gcc; ac_word=$2
1865echo "$as_me:$LINENO: checking for $ac_word" >&5
1866echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1867if test "${ac_cv_prog_CC+set}" = set; then
1868 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001869else
1870 if test -n "$CC"; then
1871 ac_cv_prog_CC="$CC" # Let the user override the test.
1872else
Martin v. Löwis11437992002-04-12 09:54:03 +00001873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1874for as_dir in $PATH
1875do
1876 IFS=$as_save_IFS
1877 test -z "$as_dir" && as_dir=.
1878 for ac_exec_ext in '' $ac_executable_extensions; do
1879 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1880 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1881 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1882 break 2
1883 fi
1884done
1885done
1886
Jack Jansendd19cf82001-12-06 22:36:17 +00001887fi
1888fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001889CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001890if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001891 echo "$as_me:$LINENO: result: $CC" >&5
1892echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001893else
Martin v. Löwis11437992002-04-12 09:54:03 +00001894 echo "$as_me:$LINENO: result: no" >&5
1895echo "${ECHO_T}no" >&6
1896fi
1897
1898fi
1899if test -z "$ac_cv_prog_CC"; then
1900 ac_ct_CC=$CC
1901 # Extract the first word of "gcc", so it can be a program name with args.
1902set dummy gcc; ac_word=$2
1903echo "$as_me:$LINENO: checking for $ac_word" >&5
1904echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1905if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1906 echo $ECHO_N "(cached) $ECHO_C" >&6
1907else
1908 if test -n "$ac_ct_CC"; then
1909 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1910else
1911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1912for as_dir in $PATH
1913do
1914 IFS=$as_save_IFS
1915 test -z "$as_dir" && as_dir=.
1916 for ac_exec_ext in '' $ac_executable_extensions; do
1917 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1918 ac_cv_prog_ac_ct_CC="gcc"
1919 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1920 break 2
1921 fi
1922done
1923done
1924
1925fi
1926fi
1927ac_ct_CC=$ac_cv_prog_ac_ct_CC
1928if test -n "$ac_ct_CC"; then
1929 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1930echo "${ECHO_T}$ac_ct_CC" >&6
1931else
1932 echo "$as_me:$LINENO: result: no" >&5
1933echo "${ECHO_T}no" >&6
1934fi
1935
1936 CC=$ac_ct_CC
1937else
1938 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001939fi
1940
Jack Jansendd19cf82001-12-06 22:36:17 +00001941if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001942 if test -n "$ac_tool_prefix"; then
1943 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1944set dummy ${ac_tool_prefix}cc; ac_word=$2
1945echo "$as_me:$LINENO: checking for $ac_word" >&5
1946echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1947if test "${ac_cv_prog_CC+set}" = set; then
1948 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001949else
1950 if test -n "$CC"; then
1951 ac_cv_prog_CC="$CC" # Let the user override the test.
1952else
Martin v. Löwis11437992002-04-12 09:54:03 +00001953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1954for as_dir in $PATH
1955do
1956 IFS=$as_save_IFS
1957 test -z "$as_dir" && as_dir=.
1958 for ac_exec_ext in '' $ac_executable_extensions; do
1959 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1960 ac_cv_prog_CC="${ac_tool_prefix}cc"
1961 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1962 break 2
1963 fi
1964done
1965done
1966
1967fi
1968fi
1969CC=$ac_cv_prog_CC
1970if test -n "$CC"; then
1971 echo "$as_me:$LINENO: result: $CC" >&5
1972echo "${ECHO_T}$CC" >&6
1973else
1974 echo "$as_me:$LINENO: result: no" >&5
1975echo "${ECHO_T}no" >&6
1976fi
1977
1978fi
1979if test -z "$ac_cv_prog_CC"; then
1980 ac_ct_CC=$CC
1981 # Extract the first word of "cc", so it can be a program name with args.
1982set dummy cc; ac_word=$2
1983echo "$as_me:$LINENO: checking for $ac_word" >&5
1984echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1985if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1986 echo $ECHO_N "(cached) $ECHO_C" >&6
1987else
1988 if test -n "$ac_ct_CC"; then
1989 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1990else
1991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1992for as_dir in $PATH
1993do
1994 IFS=$as_save_IFS
1995 test -z "$as_dir" && as_dir=.
1996 for ac_exec_ext in '' $ac_executable_extensions; do
1997 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1998 ac_cv_prog_ac_ct_CC="cc"
1999 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2000 break 2
2001 fi
2002done
2003done
2004
2005fi
2006fi
2007ac_ct_CC=$ac_cv_prog_ac_ct_CC
2008if test -n "$ac_ct_CC"; then
2009 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2010echo "${ECHO_T}$ac_ct_CC" >&6
2011else
2012 echo "$as_me:$LINENO: result: no" >&5
2013echo "${ECHO_T}no" >&6
2014fi
2015
2016 CC=$ac_ct_CC
2017else
2018 CC="$ac_cv_prog_CC"
2019fi
2020
2021fi
2022if test -z "$CC"; then
2023 # Extract the first word of "cc", so it can be a program name with args.
2024set dummy cc; ac_word=$2
2025echo "$as_me:$LINENO: checking for $ac_word" >&5
2026echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2027if test "${ac_cv_prog_CC+set}" = set; then
2028 echo $ECHO_N "(cached) $ECHO_C" >&6
2029else
2030 if test -n "$CC"; then
2031 ac_cv_prog_CC="$CC" # Let the user override the test.
2032else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002033 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2035for as_dir in $PATH
2036do
2037 IFS=$as_save_IFS
2038 test -z "$as_dir" && as_dir=.
2039 for ac_exec_ext in '' $ac_executable_extensions; do
2040 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2041 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2042 ac_prog_rejected=yes
2043 continue
2044 fi
2045 ac_cv_prog_CC="cc"
2046 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2047 break 2
2048 fi
2049done
2050done
2051
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002052if test $ac_prog_rejected = yes; then
2053 # We found a bogon in the path, so make sure we never use it.
2054 set dummy $ac_cv_prog_CC
2055 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002056 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002057 # We chose a different compiler from the bogus one.
2058 # However, it has the same basename, so the bogon will be chosen
2059 # first if we set CC to just the basename; use the full file name.
2060 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002061 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002062 fi
2063fi
2064fi
2065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002066CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002067if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002068 echo "$as_me:$LINENO: result: $CC" >&5
2069echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002070else
Martin v. Löwis11437992002-04-12 09:54:03 +00002071 echo "$as_me:$LINENO: result: no" >&5
2072echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002073fi
2074
Martin v. Löwis11437992002-04-12 09:54:03 +00002075fi
2076if test -z "$CC"; then
2077 if test -n "$ac_tool_prefix"; then
2078 for ac_prog in cl
2079 do
2080 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2082echo "$as_me:$LINENO: checking for $ac_word" >&5
2083echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2084if test "${ac_cv_prog_CC+set}" = set; then
2085 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002086else
2087 if test -n "$CC"; then
2088 ac_cv_prog_CC="$CC" # Let the user override the test.
2089else
Martin v. Löwis11437992002-04-12 09:54:03 +00002090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2091for as_dir in $PATH
2092do
2093 IFS=$as_save_IFS
2094 test -z "$as_dir" && as_dir=.
2095 for ac_exec_ext in '' $ac_executable_extensions; do
2096 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2097 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2098 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2099 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002100 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002101done
2102done
2103
2104fi
2105fi
2106CC=$ac_cv_prog_CC
2107if test -n "$CC"; then
2108 echo "$as_me:$LINENO: result: $CC" >&5
2109echo "${ECHO_T}$CC" >&6
2110else
2111 echo "$as_me:$LINENO: result: no" >&5
2112echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002113fi
2114
Martin v. Löwis11437992002-04-12 09:54:03 +00002115 test -n "$CC" && break
2116 done
2117fi
2118if test -z "$CC"; then
2119 ac_ct_CC=$CC
2120 for ac_prog in cl
2121do
2122 # Extract the first word of "$ac_prog", so it can be a program name with args.
2123set dummy $ac_prog; ac_word=$2
2124echo "$as_me:$LINENO: checking for $ac_word" >&5
2125echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2126if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2127 echo $ECHO_N "(cached) $ECHO_C" >&6
2128else
2129 if test -n "$ac_ct_CC"; then
2130 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2131else
2132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2133for as_dir in $PATH
2134do
2135 IFS=$as_save_IFS
2136 test -z "$as_dir" && as_dir=.
2137 for ac_exec_ext in '' $ac_executable_extensions; do
2138 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2139 ac_cv_prog_ac_ct_CC="$ac_prog"
2140 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2141 break 2
2142 fi
2143done
2144done
Jack Jansendd19cf82001-12-06 22:36:17 +00002145
Martin v. Löwis11437992002-04-12 09:54:03 +00002146fi
2147fi
2148ac_ct_CC=$ac_cv_prog_ac_ct_CC
2149if test -n "$ac_ct_CC"; then
2150 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2151echo "${ECHO_T}$ac_ct_CC" >&6
2152else
2153 echo "$as_me:$LINENO: result: no" >&5
2154echo "${ECHO_T}no" >&6
2155fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002156
Martin v. Löwis11437992002-04-12 09:54:03 +00002157 test -n "$ac_ct_CC" && break
2158done
Michael W. Hudson54241132001-12-07 15:38:26 +00002159
Martin v. Löwis11437992002-04-12 09:54:03 +00002160 CC=$ac_ct_CC
2161fi
2162
2163fi
2164
2165
Skip Montanaro6dead952003-09-25 14:50:04 +00002166test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2167See \`config.log' for more details." >&5
2168echo "$as_me: error: no acceptable C compiler found in \$PATH
2169See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002170 { (exit 1); exit 1; }; }
2171
2172# Provide some information about the compiler.
2173echo "$as_me:$LINENO:" \
2174 "checking for C compiler version" >&5
2175ac_compiler=`set X $ac_compile; echo $2`
2176{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2177 (eval $ac_compiler --version </dev/null >&5) 2>&5
2178 ac_status=$?
2179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2180 (exit $ac_status); }
2181{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2182 (eval $ac_compiler -v </dev/null >&5) 2>&5
2183 ac_status=$?
2184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2185 (exit $ac_status); }
2186{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2187 (eval $ac_compiler -V </dev/null >&5) 2>&5
2188 ac_status=$?
2189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2190 (exit $ac_status); }
2191
2192cat >conftest.$ac_ext <<_ACEOF
2193#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002194/* confdefs.h. */
2195_ACEOF
2196cat confdefs.h >>conftest.$ac_ext
2197cat >>conftest.$ac_ext <<_ACEOF
2198/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002199
Martin v. Löwis11437992002-04-12 09:54:03 +00002200int
2201main ()
2202{
2203
2204 ;
2205 return 0;
2206}
2207_ACEOF
2208ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002209ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002210# Try to create an executable without -o first, disregard a.out.
2211# It will help us diagnose broken compilers, and finding out an intuition
2212# of exeext.
2213echo "$as_me:$LINENO: checking for C compiler default output" >&5
2214echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2215ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2216if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2217 (eval $ac_link_default) 2>&5
2218 ac_status=$?
2219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2220 (exit $ac_status); }; then
2221 # Find the output, starting from the most likely. This scheme is
2222# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2223# resort.
2224
2225# Be careful to initialize this variable, since it used to be cached.
2226# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2227ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002228# b.out is created by i960 compilers.
2229for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2230do
2231 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002232 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002233 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2234 ;;
2235 conftest.$ac_ext )
2236 # This is the source file.
2237 ;;
2238 [ab].out )
2239 # We found the default executable, but exeext='' is most
2240 # certainly right.
2241 break;;
2242 *.* )
2243 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2244 # FIXME: I believe we export ac_cv_exeext for Libtool,
2245 # but it would be cool to find out if it's true. Does anybody
2246 # maintain Libtool? --akim.
2247 export ac_cv_exeext
2248 break;;
2249 * )
2250 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002251 esac
2252done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002253else
Martin v. Löwis11437992002-04-12 09:54:03 +00002254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002255sed 's/^/| /' conftest.$ac_ext >&5
2256
2257{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2258See \`config.log' for more details." >&5
2259echo "$as_me: error: C compiler cannot create executables
2260See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002261 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002262fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002263
Martin v. Löwis11437992002-04-12 09:54:03 +00002264ac_exeext=$ac_cv_exeext
2265echo "$as_me:$LINENO: result: $ac_file" >&5
2266echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002267
Martin v. Löwis11437992002-04-12 09:54:03 +00002268# Check the compiler produces executables we can run. If not, either
2269# the compiler is broken, or we cross compile.
2270echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2271echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2272# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2273# If not cross compiling, check that we can run a simple program.
2274if test "$cross_compiling" != yes; then
2275 if { ac_try='./$ac_file'
2276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2277 (eval $ac_try) 2>&5
2278 ac_status=$?
2279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2280 (exit $ac_status); }; }; then
2281 cross_compiling=no
2282 else
2283 if test "$cross_compiling" = maybe; then
2284 cross_compiling=yes
2285 else
2286 { { echo "$as_me:$LINENO: 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." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002289echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002290If you meant to cross compile, use \`--host'.
2291See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002292 { (exit 1); exit 1; }; }
2293 fi
2294 fi
2295fi
2296echo "$as_me:$LINENO: result: yes" >&5
2297echo "${ECHO_T}yes" >&6
2298
Skip Montanaro6dead952003-09-25 14:50:04 +00002299rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002300ac_clean_files=$ac_clean_files_save
2301# Check the compiler produces executables we can run. If not, either
2302# the compiler is broken, or we cross compile.
2303echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2304echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2305echo "$as_me:$LINENO: result: $cross_compiling" >&5
2306echo "${ECHO_T}$cross_compiling" >&6
2307
2308echo "$as_me:$LINENO: checking for suffix of executables" >&5
2309echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2310if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2311 (eval $ac_link) 2>&5
2312 ac_status=$?
2313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2314 (exit $ac_status); }; then
2315 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2316# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2317# work properly (i.e., refer to `conftest.exe'), while it won't with
2318# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002319for ac_file in conftest.exe conftest conftest.*; do
2320 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002321 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002322 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002323 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2324 export ac_cv_exeext
2325 break;;
2326 * ) break;;
2327 esac
2328done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002329else
Skip Montanaro6dead952003-09-25 14:50:04 +00002330 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2331See \`config.log' for more details." >&5
2332echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2333See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002334 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002335fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002336
Martin v. Löwis11437992002-04-12 09:54:03 +00002337rm -f conftest$ac_cv_exeext
2338echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2339echo "${ECHO_T}$ac_cv_exeext" >&6
2340
2341rm -f conftest.$ac_ext
2342EXEEXT=$ac_cv_exeext
2343ac_exeext=$EXEEXT
2344echo "$as_me:$LINENO: checking for suffix of object files" >&5
2345echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2346if test "${ac_cv_objext+set}" = set; then
2347 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002348else
Martin v. Löwis11437992002-04-12 09:54:03 +00002349 cat >conftest.$ac_ext <<_ACEOF
2350#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002351/* confdefs.h. */
2352_ACEOF
2353cat confdefs.h >>conftest.$ac_ext
2354cat >>conftest.$ac_ext <<_ACEOF
2355/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002356
Martin v. Löwis11437992002-04-12 09:54:03 +00002357int
2358main ()
2359{
2360
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365rm -f conftest.o conftest.obj
2366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2367 (eval $ac_compile) 2>&5
2368 ac_status=$?
2369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2370 (exit $ac_status); }; then
2371 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2372 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002373 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002374 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2375 break;;
2376 esac
2377done
2378else
2379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002380sed 's/^/| /' conftest.$ac_ext >&5
2381
2382{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2383See \`config.log' for more details." >&5
2384echo "$as_me: error: cannot compute suffix of object files: cannot compile
2385See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002386 { (exit 1); exit 1; }; }
2387fi
2388
2389rm -f conftest.$ac_cv_objext conftest.$ac_ext
2390fi
2391echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2392echo "${ECHO_T}$ac_cv_objext" >&6
2393OBJEXT=$ac_cv_objext
2394ac_objext=$OBJEXT
2395echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2396echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2397if test "${ac_cv_c_compiler_gnu+set}" = set; then
2398 echo $ECHO_N "(cached) $ECHO_C" >&6
2399else
2400 cat >conftest.$ac_ext <<_ACEOF
2401#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002402/* confdefs.h. */
2403_ACEOF
2404cat confdefs.h >>conftest.$ac_ext
2405cat >>conftest.$ac_ext <<_ACEOF
2406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002407
Martin v. Löwis11437992002-04-12 09:54:03 +00002408int
2409main ()
2410{
2411#ifndef __GNUC__
2412 choke me
2413#endif
2414
2415 ;
2416 return 0;
2417}
2418_ACEOF
2419rm -f conftest.$ac_objext
2420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2421 (eval $ac_compile) 2>&5
2422 ac_status=$?
2423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2424 (exit $ac_status); } &&
2425 { ac_try='test -s conftest.$ac_objext'
2426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2427 (eval $ac_try) 2>&5
2428 ac_status=$?
2429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2430 (exit $ac_status); }; }; then
2431 ac_compiler_gnu=yes
2432else
2433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002434sed 's/^/| /' conftest.$ac_ext >&5
2435
Martin v. Löwis11437992002-04-12 09:54:03 +00002436ac_compiler_gnu=no
2437fi
2438rm -f conftest.$ac_objext conftest.$ac_ext
2439ac_cv_c_compiler_gnu=$ac_compiler_gnu
2440
2441fi
2442echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2443echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2444GCC=`test $ac_compiler_gnu = yes && echo yes`
2445ac_test_CFLAGS=${CFLAGS+set}
2446ac_save_CFLAGS=$CFLAGS
2447CFLAGS="-g"
2448echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2449echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2450if test "${ac_cv_prog_cc_g+set}" = set; then
2451 echo $ECHO_N "(cached) $ECHO_C" >&6
2452else
2453 cat >conftest.$ac_ext <<_ACEOF
2454#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002455/* confdefs.h. */
2456_ACEOF
2457cat confdefs.h >>conftest.$ac_ext
2458cat >>conftest.$ac_ext <<_ACEOF
2459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002460
Martin v. Löwis11437992002-04-12 09:54:03 +00002461int
2462main ()
2463{
2464
2465 ;
2466 return 0;
2467}
2468_ACEOF
2469rm -f conftest.$ac_objext
2470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2471 (eval $ac_compile) 2>&5
2472 ac_status=$?
2473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2474 (exit $ac_status); } &&
2475 { ac_try='test -s conftest.$ac_objext'
2476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2477 (eval $ac_try) 2>&5
2478 ac_status=$?
2479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2480 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002481 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002482else
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002484sed 's/^/| /' conftest.$ac_ext >&5
2485
Martin v. Löwis11437992002-04-12 09:54:03 +00002486ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002488rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002490echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2491echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002492if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002494elif test $ac_cv_prog_cc_g = yes; then
2495 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002496 CFLAGS="-g -O2"
2497 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002498 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002499 fi
2500else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002501 if test "$GCC" = yes; then
2502 CFLAGS="-O2"
2503 else
2504 CFLAGS=
2505 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002506fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002507echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2508echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2509if test "${ac_cv_prog_cc_stdc+set}" = set; then
2510 echo $ECHO_N "(cached) $ECHO_C" >&6
2511else
2512 ac_cv_prog_cc_stdc=no
2513ac_save_CC=$CC
2514cat >conftest.$ac_ext <<_ACEOF
2515#line $LINENO "configure"
2516/* confdefs.h. */
2517_ACEOF
2518cat confdefs.h >>conftest.$ac_ext
2519cat >>conftest.$ac_ext <<_ACEOF
2520/* end confdefs.h. */
2521#include <stdarg.h>
2522#include <stdio.h>
2523#include <sys/types.h>
2524#include <sys/stat.h>
2525/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2526struct buf { int x; };
2527FILE * (*rcsopen) (struct buf *, struct stat *, int);
2528static char *e (p, i)
2529 char **p;
2530 int i;
2531{
2532 return p[i];
2533}
2534static char *f (char * (*g) (char **, int), char **p, ...)
2535{
2536 char *s;
2537 va_list v;
2538 va_start (v,p);
2539 s = g (p, va_arg (v,int));
2540 va_end (v);
2541 return s;
2542}
2543int test (int i, double x);
2544struct s1 {int (*f) (int a);};
2545struct s2 {int (*f) (double a);};
2546int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2547int argc;
2548char **argv;
2549int
2550main ()
2551{
2552return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2553 ;
2554 return 0;
2555}
2556_ACEOF
2557# Don't try gcc -ansi; that turns off useful extensions and
2558# breaks some systems' header files.
2559# AIX -qlanglvl=ansi
2560# Ultrix and OSF/1 -std1
2561# HP-UX 10.20 and later -Ae
2562# HP-UX older versions -Aa -D_HPUX_SOURCE
2563# SVR4 -Xc -D__EXTENSIONS__
2564for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2565do
2566 CC="$ac_save_CC $ac_arg"
2567 rm -f conftest.$ac_objext
2568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2569 (eval $ac_compile) 2>&5
2570 ac_status=$?
2571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2572 (exit $ac_status); } &&
2573 { ac_try='test -s conftest.$ac_objext'
2574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2575 (eval $ac_try) 2>&5
2576 ac_status=$?
2577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2578 (exit $ac_status); }; }; then
2579 ac_cv_prog_cc_stdc=$ac_arg
2580break
2581else
2582 echo "$as_me: failed program was:" >&5
2583sed 's/^/| /' conftest.$ac_ext >&5
2584
2585fi
2586rm -f conftest.$ac_objext
2587done
2588rm -f conftest.$ac_ext conftest.$ac_objext
2589CC=$ac_save_CC
2590
2591fi
2592
2593case "x$ac_cv_prog_cc_stdc" in
2594 x|xno)
2595 echo "$as_me:$LINENO: result: none needed" >&5
2596echo "${ECHO_T}none needed" >&6 ;;
2597 *)
2598 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2599echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2600 CC="$CC $ac_cv_prog_cc_stdc" ;;
2601esac
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603# Some people use a C++ compiler to compile C. Since we use `exit',
2604# in C++ we need to declare it. In case someone uses the same compiler
2605# for both compiling C and C++ we need to have the C++ compiler decide
2606# the declaration of exit, since it's the most demanding environment.
2607cat >conftest.$ac_ext <<_ACEOF
2608#ifndef __cplusplus
2609 choke me
2610#endif
2611_ACEOF
2612rm -f conftest.$ac_objext
2613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2614 (eval $ac_compile) 2>&5
2615 ac_status=$?
2616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2617 (exit $ac_status); } &&
2618 { ac_try='test -s conftest.$ac_objext'
2619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2620 (eval $ac_try) 2>&5
2621 ac_status=$?
2622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2623 (exit $ac_status); }; }; then
2624 for ac_declaration in \
2625 ''\
2626 '#include <stdlib.h>' \
2627 'extern "C" void std::exit (int) throw (); using std::exit;' \
2628 'extern "C" void std::exit (int); using std::exit;' \
2629 'extern "C" void exit (int) throw ();' \
2630 'extern "C" void exit (int);' \
2631 'void exit (int);'
2632do
2633 cat >conftest.$ac_ext <<_ACEOF
2634#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002635/* confdefs.h. */
2636_ACEOF
2637cat confdefs.h >>conftest.$ac_ext
2638cat >>conftest.$ac_ext <<_ACEOF
2639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002640#include <stdlib.h>
2641$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002642int
2643main ()
2644{
2645exit (42);
2646 ;
2647 return 0;
2648}
2649_ACEOF
2650rm -f conftest.$ac_objext
2651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2652 (eval $ac_compile) 2>&5
2653 ac_status=$?
2654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2655 (exit $ac_status); } &&
2656 { ac_try='test -s conftest.$ac_objext'
2657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2658 (eval $ac_try) 2>&5
2659 ac_status=$?
2660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661 (exit $ac_status); }; }; then
2662 :
2663else
2664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002665sed 's/^/| /' conftest.$ac_ext >&5
2666
Martin v. Löwis11437992002-04-12 09:54:03 +00002667continue
2668fi
2669rm -f conftest.$ac_objext conftest.$ac_ext
2670 cat >conftest.$ac_ext <<_ACEOF
2671#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002672/* confdefs.h. */
2673_ACEOF
2674cat confdefs.h >>conftest.$ac_ext
2675cat >>conftest.$ac_ext <<_ACEOF
2676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002677$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002678int
2679main ()
2680{
2681exit (42);
2682 ;
2683 return 0;
2684}
2685_ACEOF
2686rm -f conftest.$ac_objext
2687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2688 (eval $ac_compile) 2>&5
2689 ac_status=$?
2690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2691 (exit $ac_status); } &&
2692 { ac_try='test -s conftest.$ac_objext'
2693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2694 (eval $ac_try) 2>&5
2695 ac_status=$?
2696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2697 (exit $ac_status); }; }; then
2698 break
2699else
2700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002701sed 's/^/| /' conftest.$ac_ext >&5
2702
Martin v. Löwis11437992002-04-12 09:54:03 +00002703fi
2704rm -f conftest.$ac_objext conftest.$ac_ext
2705done
2706rm -f conftest*
2707if test -n "$ac_declaration"; then
2708 echo '#ifdef __cplusplus' >>confdefs.h
2709 echo $ac_declaration >>confdefs.h
2710 echo '#endif' >>confdefs.h
2711fi
2712
2713else
2714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002715sed 's/^/| /' conftest.$ac_ext >&5
2716
Martin v. Löwis11437992002-04-12 09:54:03 +00002717fi
2718rm -f conftest.$ac_objext conftest.$ac_ext
2719ac_ext=c
2720ac_cpp='$CPP $CPPFLAGS'
2721ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2722ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2723ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002724
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002725
2726# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002727
2728ac_ext=c
2729ac_cpp='$CPP $CPPFLAGS'
2730ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2731ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2732ac_compiler_gnu=$ac_cv_c_compiler_gnu
2733echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2734echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002735# On Suns, sometimes $CPP names a directory.
2736if test -n "$CPP" && test -d "$CPP"; then
2737 CPP=
2738fi
2739if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 if test "${ac_cv_prog_CPP+set}" = set; then
2741 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002742else
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 # Double quotes because CPP needs to be expanded
2744 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2745 do
2746 ac_preproc_ok=false
2747for ac_c_preproc_warn_flag in '' yes
2748do
2749 # Use a header file that comes with gcc, so configuring glibc
2750 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002751 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2752 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002753 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 # not just through cpp. "Syntax error" is here to catch this case.
2755 cat >conftest.$ac_ext <<_ACEOF
2756#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002757/* confdefs.h. */
2758_ACEOF
2759cat confdefs.h >>conftest.$ac_ext
2760cat >>conftest.$ac_ext <<_ACEOF
2761/* end confdefs.h. */
2762#ifdef __STDC__
2763# include <limits.h>
2764#else
2765# include <assert.h>
2766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 Syntax error
2768_ACEOF
2769if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2770 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2771 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002772 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002773 rm -f conftest.er1
2774 cat conftest.err >&5
2775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2776 (exit $ac_status); } >/dev/null; then
2777 if test -s conftest.err; then
2778 ac_cpp_err=$ac_c_preproc_warn_flag
2779 else
2780 ac_cpp_err=
2781 fi
2782else
2783 ac_cpp_err=yes
2784fi
2785if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002786 :
2787else
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002789sed 's/^/| /' conftest.$ac_ext >&5
2790
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 # Broken: fails on valid input.
2792continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002793fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002794rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002795
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 # OK, works on sane cases. Now check whether non-existent headers
2797 # can be detected and how.
2798 cat >conftest.$ac_ext <<_ACEOF
2799#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002800/* confdefs.h. */
2801_ACEOF
2802cat confdefs.h >>conftest.$ac_ext
2803cat >>conftest.$ac_ext <<_ACEOF
2804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002805#include <ac_nonexistent.h>
2806_ACEOF
2807if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2808 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2809 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002810 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002811 rm -f conftest.er1
2812 cat conftest.err >&5
2813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2814 (exit $ac_status); } >/dev/null; then
2815 if test -s conftest.err; then
2816 ac_cpp_err=$ac_c_preproc_warn_flag
2817 else
2818 ac_cpp_err=
2819 fi
2820else
2821 ac_cpp_err=yes
2822fi
2823if test -z "$ac_cpp_err"; then
2824 # Broken: success on invalid input.
2825continue
2826else
2827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002828sed 's/^/| /' conftest.$ac_ext >&5
2829
Martin v. Löwis11437992002-04-12 09:54:03 +00002830 # Passes both tests.
2831ac_preproc_ok=:
2832break
2833fi
2834rm -f conftest.err conftest.$ac_ext
2835
2836done
2837# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2838rm -f conftest.err conftest.$ac_ext
2839if $ac_preproc_ok; then
2840 break
2841fi
2842
2843 done
2844 ac_cv_prog_CPP=$CPP
2845
2846fi
2847 CPP=$ac_cv_prog_CPP
2848else
2849 ac_cv_prog_CPP=$CPP
2850fi
2851echo "$as_me:$LINENO: result: $CPP" >&5
2852echo "${ECHO_T}$CPP" >&6
2853ac_preproc_ok=false
2854for ac_c_preproc_warn_flag in '' yes
2855do
2856 # Use a header file that comes with gcc, so configuring glibc
2857 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002858 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2859 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002860 # On the NeXT, cc -E runs the code through the compiler's parser,
2861 # not just through cpp. "Syntax error" is here to catch this case.
2862 cat >conftest.$ac_ext <<_ACEOF
2863#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002864/* confdefs.h. */
2865_ACEOF
2866cat confdefs.h >>conftest.$ac_ext
2867cat >>conftest.$ac_ext <<_ACEOF
2868/* end confdefs.h. */
2869#ifdef __STDC__
2870# include <limits.h>
2871#else
2872# include <assert.h>
2873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 Syntax error
2875_ACEOF
2876if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2877 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2878 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002879 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002880 rm -f conftest.er1
2881 cat conftest.err >&5
2882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2883 (exit $ac_status); } >/dev/null; then
2884 if test -s conftest.err; then
2885 ac_cpp_err=$ac_c_preproc_warn_flag
2886 else
2887 ac_cpp_err=
2888 fi
2889else
2890 ac_cpp_err=yes
2891fi
2892if test -z "$ac_cpp_err"; then
2893 :
2894else
2895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002896sed 's/^/| /' conftest.$ac_ext >&5
2897
Martin v. Löwis11437992002-04-12 09:54:03 +00002898 # Broken: fails on valid input.
2899continue
2900fi
2901rm -f conftest.err conftest.$ac_ext
2902
2903 # OK, works on sane cases. Now check whether non-existent headers
2904 # can be detected and how.
2905 cat >conftest.$ac_ext <<_ACEOF
2906#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002907/* confdefs.h. */
2908_ACEOF
2909cat confdefs.h >>conftest.$ac_ext
2910cat >>conftest.$ac_ext <<_ACEOF
2911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002912#include <ac_nonexistent.h>
2913_ACEOF
2914if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2916 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002917 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002918 rm -f conftest.er1
2919 cat conftest.err >&5
2920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2921 (exit $ac_status); } >/dev/null; then
2922 if test -s conftest.err; then
2923 ac_cpp_err=$ac_c_preproc_warn_flag
2924 else
2925 ac_cpp_err=
2926 fi
2927else
2928 ac_cpp_err=yes
2929fi
2930if test -z "$ac_cpp_err"; then
2931 # Broken: success on invalid input.
2932continue
2933else
2934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002935sed 's/^/| /' conftest.$ac_ext >&5
2936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 # Passes both tests.
2938ac_preproc_ok=:
2939break
2940fi
2941rm -f conftest.err conftest.$ac_ext
2942
2943done
2944# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2945rm -f conftest.err conftest.$ac_ext
2946if $ac_preproc_ok; then
2947 :
2948else
Skip Montanaro6dead952003-09-25 14:50:04 +00002949 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2950See \`config.log' for more details." >&5
2951echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2952See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002953 { (exit 1); exit 1; }; }
2954fi
2955
2956ac_ext=c
2957ac_cpp='$CPP $CPPFLAGS'
2958ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2959ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2960ac_compiler_gnu=$ac_cv_c_compiler_gnu
2961
2962
Skip Montanaro6dead952003-09-25 14:50:04 +00002963echo "$as_me:$LINENO: checking for egrep" >&5
2964echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2965if test "${ac_cv_prog_egrep+set}" = set; then
2966 echo $ECHO_N "(cached) $ECHO_C" >&6
2967else
2968 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2969 then ac_cv_prog_egrep='grep -E'
2970 else ac_cv_prog_egrep='egrep'
2971 fi
2972fi
2973echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2974echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2975 EGREP=$ac_cv_prog_egrep
2976
2977
Martin v. Löwis11437992002-04-12 09:54:03 +00002978
2979echo "$as_me:$LINENO: checking for AIX" >&5
2980echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2981cat >conftest.$ac_ext <<_ACEOF
2982#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002983/* confdefs.h. */
2984_ACEOF
2985cat confdefs.h >>conftest.$ac_ext
2986cat >>conftest.$ac_ext <<_ACEOF
2987/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002988#ifdef _AIX
2989 yes
2990#endif
2991
Martin v. Löwis11437992002-04-12 09:54:03 +00002992_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002994 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002995 echo "$as_me:$LINENO: result: yes" >&5
2996echo "${ECHO_T}yes" >&6
2997cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002999_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000
3001else
Martin v. Löwis11437992002-04-12 09:54:03 +00003002 echo "$as_me:$LINENO: result: no" >&5
3003echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003004fi
3005rm -f conftest*
3006
Michael W. Hudson54241132001-12-07 15:38:26 +00003007
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003008
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003009# Check for unsupported systems
3010case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003011Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003012 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3013 echo See README for details.
3014 exit 1;;
3015esac
3016
Michael W. Hudson54241132001-12-07 15:38:26 +00003017
Martin v. Löwis11437992002-04-12 09:54:03 +00003018echo "$as_me:$LINENO: checking for --with-suffix" >&5
3019echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003020
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003021# Check whether --with-suffix or --without-suffix was given.
3022if test "${with_suffix+set}" = set; then
3023 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003024
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003025 case $withval in
3026 no) EXEEXT=;;
3027 yes) EXEEXT=.exe;;
3028 *) EXEEXT=$withval;;
3029 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003030fi;
3031echo "$as_me:$LINENO: result: $EXEEXT" >&5
3032echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003033
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003034# Test whether we're running on a non-case-sensitive system, in which
3035# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003036
Martin v. Löwis11437992002-04-12 09:54:03 +00003037echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3038echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003039if test ! -d CaseSensitiveTestDir; then
3040mkdir CaseSensitiveTestDir
3041fi
3042
3043if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003044then
Martin v. Löwis11437992002-04-12 09:54:03 +00003045 echo "$as_me:$LINENO: result: yes" >&5
3046echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003047 BUILDEXEEXT=.exe
3048else
Martin v. Löwis11437992002-04-12 09:54:03 +00003049 echo "$as_me:$LINENO: result: no" >&5
3050echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003051 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003052fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003053rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003054
Guido van Rossumdd997f71998-10-07 19:58:26 +00003055case $MACHDEP in
3056bsdos*)
3057 case $CC in
3058 gcc) CC="$CC -D_HAVE_BSDI";;
3059 esac;;
3060esac
3061
Guido van Rossum24b1e751997-08-21 02:29:16 +00003062case $ac_sys_system in
3063hp*|HP*)
3064 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003065 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003066 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003067Monterey*)
3068 case $CC in
3069 cc) CC="$CC -Wl,-Bexport";;
3070 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003071SunOS*)
3072 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003073
3074cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003075#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003076_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003077
3078 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003079esac
3080
Michael W. Hudson54241132001-12-07 15:38:26 +00003081
3082
Martin v. Löwis11437992002-04-12 09:54:03 +00003083echo "$as_me:$LINENO: checking LIBRARY" >&5
3084echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003085if test -z "$LIBRARY"
3086then
3087 LIBRARY='libpython$(VERSION).a'
3088fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003089echo "$as_me:$LINENO: result: $LIBRARY" >&5
3090echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003091
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003092# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003093# name of the library into which to insert object files). BLDLIBRARY is also
3094# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3095# is blank as the main program is not linked directly against LDLIBRARY.
3096# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3097# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3098# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3099# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003100#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003101# RUNSHARED is used to run shared python without installed libraries
3102#
3103# INSTSONAME is the name of the shared library that will be use to install
3104# on the system - some systems like version suffix, others don't
3105
3106
Michael W. Hudson54241132001-12-07 15:38:26 +00003107
3108
3109
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003110
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003111LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003112BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003113INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003114DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003115LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003116RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003117
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003118# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003119# If CXX is set, and if it is needed to link a main function that was
3120# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3121# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003122# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003123# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003124
Martin v. Löwis11437992002-04-12 09:54:03 +00003125echo "$as_me:$LINENO: checking LINKCC" >&5
3126echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003127if test -z "$LINKCC"
3128then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003129 if test -z "$CXX"; then
3130 LINKCC="\$(PURIFY) \$(CC)"
3131 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003132 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003133 $CXX -c conftest.$ac_ext 2>&5
3134 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3135 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3136 then
3137 LINKCC="\$(PURIFY) \$(CC)"
3138 else
3139 LINKCC="\$(PURIFY) \$(CXX)"
3140 fi
3141 rm -fr conftest*
3142 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003143 case $ac_sys_system in
3144 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003145 exp_extra="\"\""
3146 if test $ac_sys_release -ge 5 -o \
3147 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3148 exp_extra="."
3149 fi
3150 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003151 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003152 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003153 esac
3154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003155echo "$as_me:$LINENO: result: $LINKCC" >&5
3156echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003157
Martin v. Löwis11437992002-04-12 09:54:03 +00003158echo "$as_me:$LINENO: checking for --enable-shared" >&5
3159echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003160# Check whether --enable-shared or --disable-shared was given.
3161if test "${enable_shared+set}" = set; then
3162 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003163
Martin v. Löwis11437992002-04-12 09:54:03 +00003164fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003165
3166if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003167then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003168 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003169 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003170 enable_shared="yes";;
3171 *)
3172 enable_shared="no";;
3173 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003175echo "$as_me:$LINENO: result: $enable_shared" >&5
3176echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003177
3178
Martin v. Löwis11437992002-04-12 09:54:03 +00003179echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3180echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003181
Guido van Rossumb8552162001-09-05 14:58:11 +00003182# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3183# library that we build, but we do not want to link against it (we
3184# will find it with a -framework option). For this reason there is an
3185# extra variable BLDLIBRARY against which Python and the extension
3186# modules are linked, BLDLIBRARY. This is normally the same as
3187# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003188if test "$enable_framework"
3189then
3190 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003191 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003192 BLDLIBRARY=''
3193else
3194 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003195fi
Jack Jansene578a632001-08-15 01:27:14 +00003196
Martin v. Löwis1142de32002-03-29 16:28:31 +00003197# Other platforms follow
3198if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003199
3200cat >>confdefs.h <<\_ACEOF
3201#define Py_ENABLE_SHARED 1
3202_ACEOF
3203
Martin v. Löwis1142de32002-03-29 16:28:31 +00003204 case $ac_sys_system in
3205 BeOS*)
3206 LDLIBRARY='libpython$(VERSION).so'
3207 ;;
3208 CYGWIN*)
3209 LDLIBRARY='libpython$(VERSION).dll.a'
3210 DLLLIBRARY='libpython$(VERSION).dll'
3211 ;;
3212 SunOS*)
3213 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003214 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003215 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003216 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003217 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003218 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003219 LDLIBRARY='libpython$(VERSION).so'
3220 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003221 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003222 INSTSONAME="$LDLIBRARY".$SOVERSION
3223 ;;
3224 hp*|HP*)
3225 LDLIBRARY='libpython$(VERSION).sl'
3226 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003227 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003228 ;;
3229 OSF*)
3230 LDLIBRARY='libpython$(VERSION).so'
3231 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003232 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003233 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003234 atheos*)
3235 LDLIBRARY='libpython$(VERSION).so'
3236 BLDLIBRARY='-L. -lpython$(VERSION)'
3237 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3238 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003239 esac
Jason Tishler30765592003-09-04 11:04:06 +00003240else # shared is disabled
3241 case $ac_sys_system in
3242 CYGWIN*)
3243 BLDLIBRARY='$(LIBRARY)'
3244 LDLIBRARY='libpython$(VERSION).dll.a'
3245 ;;
3246 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003247fi
3248
Martin v. Löwis11437992002-04-12 09:54:03 +00003249echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3250echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003251
Martin v. Löwis11437992002-04-12 09:54:03 +00003252if test -n "$ac_tool_prefix"; then
3253 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3254set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3255echo "$as_me:$LINENO: checking for $ac_word" >&5
3256echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3257if test "${ac_cv_prog_RANLIB+set}" = set; then
3258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003259else
3260 if test -n "$RANLIB"; then
3261 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3262else
Martin v. Löwis11437992002-04-12 09:54:03 +00003263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3264for as_dir in $PATH
3265do
3266 IFS=$as_save_IFS
3267 test -z "$as_dir" && as_dir=.
3268 for ac_exec_ext in '' $ac_executable_extensions; do
3269 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3270 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3271 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3272 break 2
3273 fi
3274done
3275done
3276
Guido van Rossum627b2d71993-12-24 10:39:16 +00003277fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003278fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003279RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003280if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003281 echo "$as_me:$LINENO: result: $RANLIB" >&5
3282echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003283else
Martin v. Löwis11437992002-04-12 09:54:03 +00003284 echo "$as_me:$LINENO: result: no" >&5
3285echo "${ECHO_T}no" >&6
3286fi
3287
3288fi
3289if test -z "$ac_cv_prog_RANLIB"; then
3290 ac_ct_RANLIB=$RANLIB
3291 # Extract the first word of "ranlib", so it can be a program name with args.
3292set dummy ranlib; ac_word=$2
3293echo "$as_me:$LINENO: checking for $ac_word" >&5
3294echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3295if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3296 echo $ECHO_N "(cached) $ECHO_C" >&6
3297else
3298 if test -n "$ac_ct_RANLIB"; then
3299 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3300else
3301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3302for as_dir in $PATH
3303do
3304 IFS=$as_save_IFS
3305 test -z "$as_dir" && as_dir=.
3306 for ac_exec_ext in '' $ac_executable_extensions; do
3307 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3308 ac_cv_prog_ac_ct_RANLIB="ranlib"
3309 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3310 break 2
3311 fi
3312done
3313done
3314
3315 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3316fi
3317fi
3318ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3319if test -n "$ac_ct_RANLIB"; then
3320 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3321echo "${ECHO_T}$ac_ct_RANLIB" >&6
3322else
3323 echo "$as_me:$LINENO: result: no" >&5
3324echo "${ECHO_T}no" >&6
3325fi
3326
3327 RANLIB=$ac_ct_RANLIB
3328else
3329 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003330fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003331
3332
Guido van Rossum7f43da71994-08-01 12:15:30 +00003333for ac_prog in ar aal
3334do
Martin v. Löwis11437992002-04-12 09:54:03 +00003335 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003337echo "$as_me:$LINENO: checking for $ac_word" >&5
3338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3339if test "${ac_cv_prog_AR+set}" = set; then
3340 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003341else
3342 if test -n "$AR"; then
3343 ac_cv_prog_AR="$AR" # Let the user override the test.
3344else
Martin v. Löwis11437992002-04-12 09:54:03 +00003345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3346for as_dir in $PATH
3347do
3348 IFS=$as_save_IFS
3349 test -z "$as_dir" && as_dir=.
3350 for ac_exec_ext in '' $ac_executable_extensions; do
3351 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3352 ac_cv_prog_AR="$ac_prog"
3353 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3354 break 2
3355 fi
3356done
3357done
3358
Guido van Rossum7f43da71994-08-01 12:15:30 +00003359fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003361AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003362if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003363 echo "$as_me:$LINENO: result: $AR" >&5
3364echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365else
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 echo "$as_me:$LINENO: result: no" >&5
3367echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003368fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003369
Martin v. Löwis11437992002-04-12 09:54:03 +00003370 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003371done
3372test -n "$AR" || AR="ar"
3373
Michael W. Hudson54241132001-12-07 15:38:26 +00003374
Neil Schemenauera42c8272001-03-31 00:01:55 +00003375case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003376bsdos*|hp*|HP*)
3377 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003378 if test -z "$INSTALL"
3379 then
3380 INSTALL="${srcdir}/install-sh -c"
3381 fi
3382esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003383ac_aux_dir=
3384for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3385 if test -f $ac_dir/install-sh; then
3386 ac_aux_dir=$ac_dir
3387 ac_install_sh="$ac_aux_dir/install-sh -c"
3388 break
3389 elif test -f $ac_dir/install.sh; then
3390 ac_aux_dir=$ac_dir
3391 ac_install_sh="$ac_aux_dir/install.sh -c"
3392 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003393 elif test -f $ac_dir/shtool; then
3394 ac_aux_dir=$ac_dir
3395 ac_install_sh="$ac_aux_dir/shtool install -c"
3396 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003397 fi
3398done
3399if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003400 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3401echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3402 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003403fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003404ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3405ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3406ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003407
3408# Find a good install program. We prefer a C program (faster),
3409# so one script is as good as another. But avoid the broken or
3410# incompatible versions:
3411# SysV /etc/install, /usr/sbin/install
3412# SunOS /usr/etc/install
3413# IRIX /sbin/install
3414# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003415# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003416# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3417# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3418# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3419# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003420echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3421echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003422if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003423if test "${ac_cv_path_install+set}" = set; then
3424 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003425else
Martin v. Löwis11437992002-04-12 09:54:03 +00003426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3427for as_dir in $PATH
3428do
3429 IFS=$as_save_IFS
3430 test -z "$as_dir" && as_dir=.
3431 # Account for people who put trailing slashes in PATH elements.
3432case $as_dir/ in
3433 ./ | .// | /cC/* | \
3434 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3435 /usr/ucb/* ) ;;
3436 *)
3437 # OSF1 and SCO ODT 3.0 have their own names for install.
3438 # Don't use installbsd from OSF since it installs stuff as root
3439 # by default.
3440 for ac_prog in ginstall scoinst install; do
3441 for ac_exec_ext in '' $ac_executable_extensions; do
3442 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3443 if test $ac_prog = install &&
3444 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3445 # AIX install. It has an incompatible calling convention.
3446 :
3447 elif test $ac_prog = install &&
3448 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3449 # program-specific install script used by HP pwplus--don't use.
3450 :
3451 else
3452 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3453 break 3
3454 fi
3455 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003456 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003457 done
3458 ;;
3459esac
3460done
3461
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003462
3463fi
3464 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003465 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003466 else
3467 # As a last resort, use the slow shell script. We don't cache a
3468 # path for INSTALL within a source directory, because that will
3469 # break other packages using the cache if that directory is
3470 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003472 fi
3473fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003474echo "$as_me:$LINENO: result: $INSTALL" >&5
3475echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003476
3477# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3478# It thinks the first close brace ends the variable substitution.
3479test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3480
Martin v. Löwis11437992002-04-12 09:54:03 +00003481test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003482
3483test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3484
Michael W. Hudson54241132001-12-07 15:38:26 +00003485
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003486# Not every filesystem supports hard links
3487
3488if test -z "$LN" ; then
3489 case $ac_sys_system in
3490 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003491 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003492 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003493 *) LN=ln;;
3494 esac
3495fi
3496
Fred Drake109d9862001-07-11 06:27:56 +00003497# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003498echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3499echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3500
Fred Drake109d9862001-07-11 06:27:56 +00003501# Check whether --with-pydebug or --without-pydebug was given.
3502if test "${with_pydebug+set}" = set; then
3503 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003504
Fred Drake109d9862001-07-11 06:27:56 +00003505if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003506then
3507
3508cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003509#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003510_ACEOF
3511
3512 echo "$as_me:$LINENO: result: yes" >&5
3513echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003514 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003515else echo "$as_me:$LINENO: result: no" >&5
3516echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003517fi
3518else
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 echo "$as_me:$LINENO: result: no" >&5
3520echo "${ECHO_T}no" >&6
3521fi;
Fred Drake109d9862001-07-11 06:27:56 +00003522
Skip Montanarodecc6a42003-01-01 20:07:49 +00003523# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3524# merged with this chunk of code?
3525
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003526# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003527# ------------------------
3528# (The following bit of code is complicated enough - please keep things
3529# indented properly. Just pretend you're editing Python code. ;-)
3530
3531# There are two parallel sets of case statements below, one that checks to
3532# see if OPT was set and one that does BASECFLAGS setting based upon
3533# compiler and platform. BASECFLAGS tweaks need to be made even if the
3534# user set OPT.
3535
3536# tweak OPT based on compiler and platform, only if the user didn't set
3537# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003538
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003539if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003540then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003541 case $GCC in
3542 yes)
3543 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003544 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003545 if test "$Py_DEBUG" = 'true' ; then
3546 # Optimization messes up debuggers, so turn it off for
3547 # debug builds.
3548 OPT="-g -Wall -Wstrict-prototypes"
3549 else
3550 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003551 fi
3552 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003553 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003554 OPT="-O3 -Wall -Wstrict-prototypes"
3555 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003556 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003557 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003558 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3559 ;;
3560 esac
Fred Drake109d9862001-07-11 06:27:56 +00003561 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003562
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003563 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003564 OPT="-O"
3565 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003566 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003567
3568 # The current (beta) Monterey compiler dies with optimizations
3569 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003570 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003571 Monterey*)
3572 OPT=""
3573 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003574 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003575
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003576fi
3577
Skip Montanarodecc6a42003-01-01 20:07:49 +00003578
3579# tweak BASECFLAGS based on compiler and platform
3580case $GCC in
3581yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003582 # Python violates C99 rules, by casting between incompatible
3583 # pointer types. GCC may generate bad code as a result of that,
3584 # so use -fno-strict-aliasing if supported.
3585 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3586echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3587 ac_save_cc="$CC"
3588 CC="$CC -fno-strict-aliasing"
3589 if test "$cross_compiling" = yes; then
3590 ac_cv_no_strict_aliasing_ok=no
3591else
3592 cat >conftest.$ac_ext <<_ACEOF
3593#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003594/* confdefs.h. */
3595_ACEOF
3596cat confdefs.h >>conftest.$ac_ext
3597cat >>conftest.$ac_ext <<_ACEOF
3598/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003599int main() { return 0; }
3600_ACEOF
3601rm -f conftest$ac_exeext
3602if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3603 (eval $ac_link) 2>&5
3604 ac_status=$?
3605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3606 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3608 (eval $ac_try) 2>&5
3609 ac_status=$?
3610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3611 (exit $ac_status); }; }; then
3612 ac_cv_no_strict_aliasing_ok=yes
3613else
3614 echo "$as_me: program exited with status $ac_status" >&5
3615echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003616sed 's/^/| /' conftest.$ac_ext >&5
3617
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003618( exit $ac_status )
3619ac_cv_no_strict_aliasing_ok=no
3620fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003621rm -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 +00003622fi
3623 CC="$ac_save_cc"
3624 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3625echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3626 if test $ac_cv_no_strict_aliasing_ok = yes
3627 then
3628 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3629 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003630 case $ac_sys_system in
3631 SCO_SV*)
3632 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3633 ;;
3634 # is there any other compiler on Darwin besides gcc?
3635 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003636 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003637 ;;
3638 esac
3639 ;;
3640
3641*)
3642 case $ac_sys_system in
3643 OpenUNIX*|UnixWare*)
3644 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3645 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003646 OSF*)
3647 BASECFLAGS="$BASECFLAGS -ieee -std"
3648 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003649 SCO_SV*)
3650 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3651 ;;
3652 esac
3653 ;;
3654esac
3655
Fred Drakee1ceaa02001-12-04 20:55:47 +00003656if test "$Py_DEBUG" = 'true'; then
3657 :
3658else
3659 OPT="-DNDEBUG $OPT"
3660fi
3661
Guido van Rossum563e7081996-09-10 18:20:48 +00003662if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003663then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003664 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003665fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003666
Martin v. Löwis11437992002-04-12 09:54:03 +00003667echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3668echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3669if test "${ac_cv_opt_olimit_ok+set}" = set; then
3670 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003671else
3672 ac_save_cc="$CC"
3673CC="$CC -OPT:Olimit=0"
3674if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003675 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003676else
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 cat >conftest.$ac_ext <<_ACEOF
3678#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003679/* confdefs.h. */
3680_ACEOF
3681cat confdefs.h >>conftest.$ac_ext
3682cat >>conftest.$ac_ext <<_ACEOF
3683/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003684int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003685_ACEOF
3686rm -f conftest$ac_exeext
3687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3688 (eval $ac_link) 2>&5
3689 ac_status=$?
3690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3691 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3693 (eval $ac_try) 2>&5
3694 ac_status=$?
3695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3696 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003697 ac_cv_opt_olimit_ok=yes
3698else
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 echo "$as_me: program exited with status $ac_status" >&5
3700echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003701sed 's/^/| /' conftest.$ac_ext >&5
3702
Martin v. Löwis11437992002-04-12 09:54:03 +00003703( exit $ac_status )
3704ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003705fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003706rm -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 +00003707fi
Guido van Rossum91922671997-10-09 20:24:13 +00003708CC="$ac_save_cc"
3709fi
3710
Martin v. Löwis11437992002-04-12 09:54:03 +00003711echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3712echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003713if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003714 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003715 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3716 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3717 # environment?
3718 Darwin*)
3719 ;;
3720 *)
3721 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3722 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003723 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003724else
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3726echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3727 if test "${ac_cv_olimit_ok+set}" = set; then
3728 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003729else
3730 ac_save_cc="$CC"
3731 CC="$CC -Olimit 1500"
3732 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003733 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003734else
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 cat >conftest.$ac_ext <<_ACEOF
3736#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003737/* confdefs.h. */
3738_ACEOF
3739cat confdefs.h >>conftest.$ac_ext
3740cat >>conftest.$ac_ext <<_ACEOF
3741/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003742int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743_ACEOF
3744rm -f conftest$ac_exeext
3745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3746 (eval $ac_link) 2>&5
3747 ac_status=$?
3748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3751 (eval $ac_try) 2>&5
3752 ac_status=$?
3753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3754 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003755 ac_cv_olimit_ok=yes
3756else
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 echo "$as_me: program exited with status $ac_status" >&5
3758echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003759sed 's/^/| /' conftest.$ac_ext >&5
3760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761( exit $ac_status )
3762ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003763fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003764rm -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 +00003765fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003766 CC="$ac_save_cc"
3767fi
3768
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3770echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003771 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003772 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003773 fi
3774fi
3775
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003776# On some compilers, pthreads are available without further options
3777# (e.g. MacOS X). On some of these systems, the compiler will not
3778# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3779# So we have to see first whether pthreads are available without
3780# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003781echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3782echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3783if test "${ac_cv_pthread_is_default+set}" = set; then
3784 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003785else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003786 if test "$cross_compiling" = yes; then
3787 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003788else
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 cat >conftest.$ac_ext <<_ACEOF
3790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003791/* confdefs.h. */
3792_ACEOF
3793cat confdefs.h >>conftest.$ac_ext
3794cat >>conftest.$ac_ext <<_ACEOF
3795/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003796
Martin v. Löwis130fb172001-07-19 11:00:41 +00003797#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003798
3799void* routine(void* p){return NULL;}
3800
3801int main(){
3802 pthread_t p;
3803 if(pthread_create(&p,NULL,routine,NULL)!=0)
3804 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003805 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003806 return 0;
3807}
3808
Martin v. Löwis11437992002-04-12 09:54:03 +00003809_ACEOF
3810rm -f conftest$ac_exeext
3811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3812 (eval $ac_link) 2>&5
3813 ac_status=$?
3814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3817 (eval $ac_try) 2>&5
3818 ac_status=$?
3819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3820 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003821
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003822 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003823 ac_cv_kthread=no
3824 ac_cv_pthread=no
3825
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003826else
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 echo "$as_me: program exited with status $ac_status" >&5
3828echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003829sed 's/^/| /' conftest.$ac_ext >&5
3830
Martin v. Löwis11437992002-04-12 09:54:03 +00003831( exit $ac_status )
3832ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003833fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003834rm -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 +00003835fi
3836
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003837fi
3838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3840echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003841
Michael W. Hudson54241132001-12-07 15:38:26 +00003842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003844then
3845 ac_cv_kpthread=no
3846else
3847# -Kpthread, if available, provides the right #defines
3848# and linker options to make pthread_create available
3849# Some compilers won't report that they do not support -Kpthread,
3850# so we need to run a program to see whether it really made the
3851# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003852echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3853echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3854if test "${ac_cv_kpthread+set}" = set; then
3855 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003856else
3857 ac_save_cc="$CC"
3858CC="$CC -Kpthread"
3859if test "$cross_compiling" = yes; then
3860 ac_cv_kpthread=no
3861else
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 cat >conftest.$ac_ext <<_ACEOF
3863#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003864/* confdefs.h. */
3865_ACEOF
3866cat confdefs.h >>conftest.$ac_ext
3867cat >>conftest.$ac_ext <<_ACEOF
3868/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003869
3870#include <pthread.h>
3871
3872void* routine(void* p){return NULL;}
3873
3874int main(){
3875 pthread_t p;
3876 if(pthread_create(&p,NULL,routine,NULL)!=0)
3877 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003878 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003879 return 0;
3880}
3881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882_ACEOF
3883rm -f conftest$ac_exeext
3884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3885 (eval $ac_link) 2>&5
3886 ac_status=$?
3887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3890 (eval $ac_try) 2>&5
3891 ac_status=$?
3892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3893 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003894 ac_cv_kpthread=yes
3895else
Martin v. Löwis11437992002-04-12 09:54:03 +00003896 echo "$as_me: program exited with status $ac_status" >&5
3897echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003898sed 's/^/| /' conftest.$ac_ext >&5
3899
Martin v. Löwis11437992002-04-12 09:54:03 +00003900( exit $ac_status )
3901ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003902fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003903rm -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 +00003904fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003905CC="$ac_save_cc"
3906fi
3907
Martin v. Löwis11437992002-04-12 09:54:03 +00003908echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3909echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003910fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003911
Skip Montanarod8d39a02003-07-10 20:44:10 +00003912if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003913then
3914# -Kthread, if available, provides the right #defines
3915# and linker options to make pthread_create available
3916# Some compilers won't report that they do not support -Kthread,
3917# so we need to run a program to see whether it really made the
3918# function available.
3919echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3920echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3921if test "${ac_cv_kthread+set}" = set; then
3922 echo $ECHO_N "(cached) $ECHO_C" >&6
3923else
3924 ac_save_cc="$CC"
3925CC="$CC -Kthread"
3926if test "$cross_compiling" = yes; then
3927 ac_cv_kthread=no
3928else
3929 cat >conftest.$ac_ext <<_ACEOF
3930#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003931/* confdefs.h. */
3932_ACEOF
3933cat confdefs.h >>conftest.$ac_ext
3934cat >>conftest.$ac_ext <<_ACEOF
3935/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003936
3937#include <pthread.h>
3938
3939void* routine(void* p){return NULL;}
3940
3941int main(){
3942 pthread_t p;
3943 if(pthread_create(&p,NULL,routine,NULL)!=0)
3944 return 1;
3945 (void)pthread_detach(p);
3946 return 0;
3947}
3948
3949_ACEOF
3950rm -f conftest$ac_exeext
3951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3952 (eval $ac_link) 2>&5
3953 ac_status=$?
3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3957 (eval $ac_try) 2>&5
3958 ac_status=$?
3959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3960 (exit $ac_status); }; }; then
3961 ac_cv_kthread=yes
3962else
3963 echo "$as_me: program exited with status $ac_status" >&5
3964echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003965sed 's/^/| /' conftest.$ac_ext >&5
3966
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003967( exit $ac_status )
3968ac_cv_kthread=no
3969fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003970rm -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 +00003971fi
3972CC="$ac_save_cc"
3973fi
3974
3975echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3976echo "${ECHO_T}$ac_cv_kthread" >&6
3977fi
3978
Skip Montanarod8d39a02003-07-10 20:44:10 +00003979if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003980then
3981# -pthread, if available, provides the right #defines
3982# and linker options to make pthread_create available
3983# Some compilers won't report that they do not support -pthread,
3984# so we need to run a program to see whether it really made the
3985# function available.
3986echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3987echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3988if test "${ac_cv_thread+set}" = set; then
3989 echo $ECHO_N "(cached) $ECHO_C" >&6
3990else
3991 ac_save_cc="$CC"
3992CC="$CC -pthread"
3993if test "$cross_compiling" = yes; then
3994 ac_cv_pthread=no
3995else
3996 cat >conftest.$ac_ext <<_ACEOF
3997#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003998/* confdefs.h. */
3999_ACEOF
4000cat confdefs.h >>conftest.$ac_ext
4001cat >>conftest.$ac_ext <<_ACEOF
4002/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004003
4004#include <pthread.h>
4005
4006void* routine(void* p){return NULL;}
4007
4008int main(){
4009 pthread_t p;
4010 if(pthread_create(&p,NULL,routine,NULL)!=0)
4011 return 1;
4012 (void)pthread_detach(p);
4013 return 0;
4014}
4015
4016_ACEOF
4017rm -f conftest$ac_exeext
4018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4019 (eval $ac_link) 2>&5
4020 ac_status=$?
4021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4024 (eval $ac_try) 2>&5
4025 ac_status=$?
4026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4027 (exit $ac_status); }; }; then
4028 ac_cv_pthread=yes
4029else
4030 echo "$as_me: program exited with status $ac_status" >&5
4031echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004032sed 's/^/| /' conftest.$ac_ext >&5
4033
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004034( exit $ac_status )
4035ac_cv_pthread=no
4036fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004037rm -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 +00004038fi
4039CC="$ac_save_cc"
4040fi
4041
4042echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4043echo "${ECHO_T}$ac_cv_pthread" >&6
4044fi
4045
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004046# If we have set a CC compiler flag for thread support then
4047# check if it works for CXX, too.
4048ac_cv_cxx_thread=no
4049if test ! -z "$CXX"
4050then
4051echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4052echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4053ac_save_cxx="$CXX"
4054
4055if test "$ac_cv_kpthread" = "yes"
4056then
4057 CXX="$CXX -Kpthread"
4058 ac_cv_cxx_thread=yes
4059elif test "$ac_cv_kthread" = "yes"
4060then
4061 CXX="$CXX -Kthread"
4062 ac_cv_cxx_thread=yes
4063elif test "$ac_cv_pthread" = "yes"
4064then
4065 CXX="$CXX -pthread"
4066 ac_cv_cxx_thread=yes
4067fi
4068
4069if test $ac_cv_cxx_thread = yes
4070then
4071 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4072 $CXX -c conftest.$ac_ext 2>&5
4073 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4074 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4075 then
4076 ac_cv_cxx_thread=yes
4077 else
4078 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004079 fi
4080 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004081fi
4082fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004083CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004084echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4085echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4086
Michael W. Hudson54241132001-12-07 15:38:26 +00004087
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004088# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004089echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4090echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4091if test "${ac_cv_header_stdc+set}" = set; then
4092 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004093else
Martin v. Löwis11437992002-04-12 09:54:03 +00004094 cat >conftest.$ac_ext <<_ACEOF
4095#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004096/* confdefs.h. */
4097_ACEOF
4098cat confdefs.h >>conftest.$ac_ext
4099cat >>conftest.$ac_ext <<_ACEOF
4100/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004101#include <stdlib.h>
4102#include <stdarg.h>
4103#include <string.h>
4104#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004105
Skip Montanaro6dead952003-09-25 14:50:04 +00004106int
4107main ()
4108{
4109
4110 ;
4111 return 0;
4112}
Martin v. Löwis11437992002-04-12 09:54:03 +00004113_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004114rm -f conftest.$ac_objext
4115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4116 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004117 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004119 (exit $ac_status); } &&
4120 { ac_try='test -s conftest.$ac_objext'
4121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4122 (eval $ac_try) 2>&5
4123 ac_status=$?
4124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4125 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004126 ac_cv_header_stdc=yes
4127else
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004129sed 's/^/| /' conftest.$ac_ext >&5
4130
4131ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004132fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004133rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134
4135if test $ac_cv_header_stdc = yes; then
4136 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 cat >conftest.$ac_ext <<_ACEOF
4138#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004139/* confdefs.h. */
4140_ACEOF
4141cat confdefs.h >>conftest.$ac_ext
4142cat >>conftest.$ac_ext <<_ACEOF
4143/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004144#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004145
4146_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004148 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149 :
4150else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004151 ac_cv_header_stdc=no
4152fi
4153rm -f conftest*
4154
4155fi
4156
4157if test $ac_cv_header_stdc = yes; then
4158 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 cat >conftest.$ac_ext <<_ACEOF
4160#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004161/* confdefs.h. */
4162_ACEOF
4163cat confdefs.h >>conftest.$ac_ext
4164cat >>conftest.$ac_ext <<_ACEOF
4165/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004166#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004167
4168_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004170 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171 :
4172else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004173 ac_cv_header_stdc=no
4174fi
4175rm -f conftest*
4176
4177fi
4178
4179if test $ac_cv_header_stdc = yes; then
4180 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004182 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183else
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 cat >conftest.$ac_ext <<_ACEOF
4185#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004186/* confdefs.h. */
4187_ACEOF
4188cat confdefs.h >>conftest.$ac_ext
4189cat >>conftest.$ac_ext <<_ACEOF
4190/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004191#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004192#if ((' ' & 0x0FF) == 0x020)
4193# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4194# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4195#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004196# define ISLOWER(c) \
4197 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 || ('j' <= (c) && (c) <= 'r') \
4199 || ('s' <= (c) && (c) <= 'z'))
4200# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4201#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4204int
4205main ()
4206{
4207 int i;
4208 for (i = 0; i < 256; i++)
4209 if (XOR (islower (i), ISLOWER (i))
4210 || toupper (i) != TOUPPER (i))
4211 exit(2);
4212 exit (0);
4213}
4214_ACEOF
4215rm -f conftest$ac_exeext
4216if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4217 (eval $ac_link) 2>&5
4218 ac_status=$?
4219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4222 (eval $ac_try) 2>&5
4223 ac_status=$?
4224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4225 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226 :
4227else
Martin v. Löwis11437992002-04-12 09:54:03 +00004228 echo "$as_me: program exited with status $ac_status" >&5
4229echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004230sed 's/^/| /' conftest.$ac_ext >&5
4231
Martin v. Löwis11437992002-04-12 09:54:03 +00004232( exit $ac_status )
4233ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004234fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004235rm -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 +00004236fi
4237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004238fi
4239echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4240echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004241if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004242
4243cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004245_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246
4247fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004248
Skip Montanarob9820a32004-01-17 00:16:12 +00004249# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4260 inttypes.h stdint.h unistd.h
4261do
4262as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4263echo "$as_me:$LINENO: checking for $ac_header" >&5
4264echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4265if eval "test \"\${$as_ac_Header+set}\" = set"; then
4266 echo $ECHO_N "(cached) $ECHO_C" >&6
4267else
4268 cat >conftest.$ac_ext <<_ACEOF
4269#line $LINENO "configure"
4270/* confdefs.h. */
4271_ACEOF
4272cat confdefs.h >>conftest.$ac_ext
4273cat >>conftest.$ac_ext <<_ACEOF
4274/* end confdefs.h. */
4275$ac_includes_default
4276
4277#include <$ac_header>
4278_ACEOF
4279rm -f conftest.$ac_objext
4280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4281 (eval $ac_compile) 2>&5
4282 ac_status=$?
4283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4284 (exit $ac_status); } &&
4285 { ac_try='test -s conftest.$ac_objext'
4286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4287 (eval $ac_try) 2>&5
4288 ac_status=$?
4289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4290 (exit $ac_status); }; }; then
4291 eval "$as_ac_Header=yes"
4292else
4293 echo "$as_me: failed program was:" >&5
4294sed 's/^/| /' conftest.$ac_ext >&5
4295
4296eval "$as_ac_Header=no"
4297fi
4298rm -f conftest.$ac_objext conftest.$ac_ext
4299fi
4300echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4301echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4302if test `eval echo '${'$as_ac_Header'}'` = yes; then
4303 cat >>confdefs.h <<_ACEOF
4304#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4305_ACEOF
4306
4307fi
4308
4309done
4310
4311
Martin v. Löwis11437992002-04-12 09:54:03 +00004312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004349
Barry Warsawfe33b792003-01-07 22:42:49 +00004350
Neal Norwitz82251032003-05-23 14:35:24 +00004351
Martin v. Löwis12af0482004-01-31 12:34:17 +00004352
Martin v. Löwis11437992002-04-12 09:54:03 +00004353for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004354libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004355signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4356unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004357sys/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 +00004358sys/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 +00004359sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwis12af0482004-01-31 12:34:17 +00004360sys/resource.h netpacket/packet.h sysexits.h bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004361do
Martin v. Löwis11437992002-04-12 09:54:03 +00004362as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4363if eval "test \"\${$as_ac_Header+set}\" = set"; then
4364 echo "$as_me:$LINENO: checking for $ac_header" >&5
4365echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4366if eval "test \"\${$as_ac_Header+set}\" = set"; then
4367 echo $ECHO_N "(cached) $ECHO_C" >&6
4368fi
4369echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4370echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004371else
Martin v. Löwis11437992002-04-12 09:54:03 +00004372 # Is the header compilable?
4373echo "$as_me:$LINENO: checking $ac_header usability" >&5
4374echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4375cat >conftest.$ac_ext <<_ACEOF
4376#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004377/* confdefs.h. */
4378_ACEOF
4379cat confdefs.h >>conftest.$ac_ext
4380cat >>conftest.$ac_ext <<_ACEOF
4381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004382$ac_includes_default
4383#include <$ac_header>
4384_ACEOF
4385rm -f conftest.$ac_objext
4386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4387 (eval $ac_compile) 2>&5
4388 ac_status=$?
4389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4390 (exit $ac_status); } &&
4391 { ac_try='test -s conftest.$ac_objext'
4392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4393 (eval $ac_try) 2>&5
4394 ac_status=$?
4395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4396 (exit $ac_status); }; }; then
4397 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004398else
Martin v. Löwis11437992002-04-12 09:54:03 +00004399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004400sed 's/^/| /' conftest.$ac_ext >&5
4401
Martin v. Löwis11437992002-04-12 09:54:03 +00004402ac_header_compiler=no
4403fi
4404rm -f conftest.$ac_objext conftest.$ac_ext
4405echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4406echo "${ECHO_T}$ac_header_compiler" >&6
4407
4408# Is the header present?
4409echo "$as_me:$LINENO: checking $ac_header presence" >&5
4410echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4411cat >conftest.$ac_ext <<_ACEOF
4412#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004413/* confdefs.h. */
4414_ACEOF
4415cat confdefs.h >>conftest.$ac_ext
4416cat >>conftest.$ac_ext <<_ACEOF
4417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004418#include <$ac_header>
4419_ACEOF
4420if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4421 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4422 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004423 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004424 rm -f conftest.er1
4425 cat conftest.err >&5
4426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4427 (exit $ac_status); } >/dev/null; then
4428 if test -s conftest.err; then
4429 ac_cpp_err=$ac_c_preproc_warn_flag
4430 else
4431 ac_cpp_err=
4432 fi
4433else
4434 ac_cpp_err=yes
4435fi
4436if test -z "$ac_cpp_err"; then
4437 ac_header_preproc=yes
4438else
4439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004440sed 's/^/| /' conftest.$ac_ext >&5
4441
Martin v. Löwis11437992002-04-12 09:54:03 +00004442 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004443fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004444rm -f conftest.err conftest.$ac_ext
4445echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4446echo "${ECHO_T}$ac_header_preproc" >&6
4447
4448# So? What about this header?
4449case $ac_header_compiler:$ac_header_preproc in
4450 yes:no )
4451 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4452echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4453 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004454echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4455 (
4456 cat <<\_ASBOX
4457## ------------------------------------ ##
4458## Report this to bug-autoconf@gnu.org. ##
4459## ------------------------------------ ##
4460_ASBOX
4461 ) |
4462 sed "s/^/$as_me: WARNING: /" >&2
4463 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004464 no:yes )
4465 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4466echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4467 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4468echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4469 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004470echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4471 (
4472 cat <<\_ASBOX
4473## ------------------------------------ ##
4474## Report this to bug-autoconf@gnu.org. ##
4475## ------------------------------------ ##
4476_ASBOX
4477 ) |
4478 sed "s/^/$as_me: WARNING: /" >&2
4479 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004480esac
4481echo "$as_me:$LINENO: checking for $ac_header" >&5
4482echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4483if eval "test \"\${$as_ac_Header+set}\" = set"; then
4484 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004485else
Martin v. Löwis11437992002-04-12 09:54:03 +00004486 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004488echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4489echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4490
4491fi
4492if test `eval echo '${'$as_ac_Header'}'` = yes; then
4493 cat >>confdefs.h <<_ACEOF
4494#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4495_ACEOF
4496
4497fi
4498
Guido van Rossum627b2d71993-12-24 10:39:16 +00004499done
4500
Martin v. Löwis11437992002-04-12 09:54:03 +00004501
4502
4503
4504
4505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004506ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004507for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4508 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4509echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4510echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4511if eval "test \"\${$as_ac_Header+set}\" = set"; then
4512 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004513else
Martin v. Löwis11437992002-04-12 09:54:03 +00004514 cat >conftest.$ac_ext <<_ACEOF
4515#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004516/* confdefs.h. */
4517_ACEOF
4518cat confdefs.h >>conftest.$ac_ext
4519cat >>conftest.$ac_ext <<_ACEOF
4520/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004521#include <sys/types.h>
4522#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004523
Martin v. Löwis11437992002-04-12 09:54:03 +00004524int
4525main ()
4526{
4527if ((DIR *) 0)
4528return 0;
4529 ;
4530 return 0;
4531}
4532_ACEOF
4533rm -f conftest.$ac_objext
4534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4535 (eval $ac_compile) 2>&5
4536 ac_status=$?
4537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4538 (exit $ac_status); } &&
4539 { ac_try='test -s conftest.$ac_objext'
4540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4541 (eval $ac_try) 2>&5
4542 ac_status=$?
4543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4544 (exit $ac_status); }; }; then
4545 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004546else
Martin v. Löwis11437992002-04-12 09:54:03 +00004547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004548sed 's/^/| /' conftest.$ac_ext >&5
4549
Martin v. Löwis11437992002-04-12 09:54:03 +00004550eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004551fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004552rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004554echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4555echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4556if test `eval echo '${'$as_ac_Header'}'` = yes; then
4557 cat >>confdefs.h <<_ACEOF
4558#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4559_ACEOF
4560
4561ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004562fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004563
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004564done
4565# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4566if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004567 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4568echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4569if test "${ac_cv_search_opendir+set}" = set; then
4570 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004571else
Martin v. Löwis11437992002-04-12 09:54:03 +00004572 ac_func_search_save_LIBS=$LIBS
4573ac_cv_search_opendir=no
4574cat >conftest.$ac_ext <<_ACEOF
4575#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004576/* confdefs.h. */
4577_ACEOF
4578cat confdefs.h >>conftest.$ac_ext
4579cat >>conftest.$ac_ext <<_ACEOF
4580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004581
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004582/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004583#ifdef __cplusplus
4584extern "C"
4585#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004586/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004587 builtin and then its argument prototype would still apply. */
4588char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004589int
4590main ()
4591{
4592opendir ();
4593 ;
4594 return 0;
4595}
4596_ACEOF
4597rm -f conftest.$ac_objext conftest$ac_exeext
4598if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4599 (eval $ac_link) 2>&5
4600 ac_status=$?
4601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602 (exit $ac_status); } &&
4603 { ac_try='test -s conftest$ac_exeext'
4604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4605 (eval $ac_try) 2>&5
4606 ac_status=$?
4607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4608 (exit $ac_status); }; }; then
4609 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610else
Martin v. Löwis11437992002-04-12 09:54:03 +00004611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004612sed 's/^/| /' conftest.$ac_ext >&5
4613
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004614fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004615rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4616if test "$ac_cv_search_opendir" = no; then
4617 for ac_lib in dir; do
4618 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4619 cat >conftest.$ac_ext <<_ACEOF
4620#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004621/* confdefs.h. */
4622_ACEOF
4623cat confdefs.h >>conftest.$ac_ext
4624cat >>conftest.$ac_ext <<_ACEOF
4625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004627/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004628#ifdef __cplusplus
4629extern "C"
4630#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004631/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004632 builtin and then its argument prototype would still apply. */
4633char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004634int
4635main ()
4636{
4637opendir ();
4638 ;
4639 return 0;
4640}
4641_ACEOF
4642rm -f conftest.$ac_objext conftest$ac_exeext
4643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4644 (eval $ac_link) 2>&5
4645 ac_status=$?
4646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4647 (exit $ac_status); } &&
4648 { ac_try='test -s conftest$ac_exeext'
4649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4650 (eval $ac_try) 2>&5
4651 ac_status=$?
4652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4653 (exit $ac_status); }; }; then
4654 ac_cv_search_opendir="-l$ac_lib"
4655break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004656else
Martin v. Löwis11437992002-04-12 09:54:03 +00004657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004658sed 's/^/| /' conftest.$ac_ext >&5
4659
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004660fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004661rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4662 done
4663fi
4664LIBS=$ac_func_search_save_LIBS
4665fi
4666echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4667echo "${ECHO_T}$ac_cv_search_opendir" >&6
4668if test "$ac_cv_search_opendir" != no; then
4669 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004670
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004671fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004672
Michael W. Hudson54241132001-12-07 15:38:26 +00004673else
Martin v. Löwis11437992002-04-12 09:54:03 +00004674 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4675echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4676if test "${ac_cv_search_opendir+set}" = set; then
4677 echo $ECHO_N "(cached) $ECHO_C" >&6
4678else
4679 ac_func_search_save_LIBS=$LIBS
4680ac_cv_search_opendir=no
4681cat >conftest.$ac_ext <<_ACEOF
4682#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004683/* confdefs.h. */
4684_ACEOF
4685cat confdefs.h >>conftest.$ac_ext
4686cat >>conftest.$ac_ext <<_ACEOF
4687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004688
4689/* Override any gcc2 internal prototype to avoid an error. */
4690#ifdef __cplusplus
4691extern "C"
4692#endif
4693/* We use char because int might match the return type of a gcc2
4694 builtin and then its argument prototype would still apply. */
4695char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004696int
4697main ()
4698{
4699opendir ();
4700 ;
4701 return 0;
4702}
4703_ACEOF
4704rm -f conftest.$ac_objext conftest$ac_exeext
4705if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4706 (eval $ac_link) 2>&5
4707 ac_status=$?
4708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4709 (exit $ac_status); } &&
4710 { ac_try='test -s conftest$ac_exeext'
4711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4712 (eval $ac_try) 2>&5
4713 ac_status=$?
4714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4715 (exit $ac_status); }; }; then
4716 ac_cv_search_opendir="none required"
4717else
4718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004719sed 's/^/| /' conftest.$ac_ext >&5
4720
Martin v. Löwis11437992002-04-12 09:54:03 +00004721fi
4722rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4723if test "$ac_cv_search_opendir" = no; then
4724 for ac_lib in x; do
4725 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4726 cat >conftest.$ac_ext <<_ACEOF
4727#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004728/* confdefs.h. */
4729_ACEOF
4730cat confdefs.h >>conftest.$ac_ext
4731cat >>conftest.$ac_ext <<_ACEOF
4732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004733
4734/* Override any gcc2 internal prototype to avoid an error. */
4735#ifdef __cplusplus
4736extern "C"
4737#endif
4738/* We use char because int might match the return type of a gcc2
4739 builtin and then its argument prototype would still apply. */
4740char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004741int
4742main ()
4743{
4744opendir ();
4745 ;
4746 return 0;
4747}
4748_ACEOF
4749rm -f conftest.$ac_objext conftest$ac_exeext
4750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4751 (eval $ac_link) 2>&5
4752 ac_status=$?
4753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4754 (exit $ac_status); } &&
4755 { ac_try='test -s conftest$ac_exeext'
4756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4757 (eval $ac_try) 2>&5
4758 ac_status=$?
4759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4760 (exit $ac_status); }; }; then
4761 ac_cv_search_opendir="-l$ac_lib"
4762break
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 +00004767fi
4768rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4769 done
4770fi
4771LIBS=$ac_func_search_save_LIBS
4772fi
4773echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4774echo "${ECHO_T}$ac_cv_search_opendir" >&6
4775if test "$ac_cv_search_opendir" != no; then
4776 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4777
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004778fi
4779
4780fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004781
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004782echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4783echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4784if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4785 echo $ECHO_N "(cached) $ECHO_C" >&6
4786else
4787 cat >conftest.$ac_ext <<_ACEOF
4788#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004789/* confdefs.h. */
4790_ACEOF
4791cat confdefs.h >>conftest.$ac_ext
4792cat >>conftest.$ac_ext <<_ACEOF
4793/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004794#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004795int
4796main ()
4797{
4798return makedev(0, 0);
4799 ;
4800 return 0;
4801}
4802_ACEOF
4803rm -f conftest.$ac_objext conftest$ac_exeext
4804if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4805 (eval $ac_link) 2>&5
4806 ac_status=$?
4807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808 (exit $ac_status); } &&
4809 { ac_try='test -s conftest$ac_exeext'
4810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4811 (eval $ac_try) 2>&5
4812 ac_status=$?
4813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4814 (exit $ac_status); }; }; then
4815 ac_cv_header_sys_types_h_makedev=yes
4816else
4817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004818sed 's/^/| /' conftest.$ac_ext >&5
4819
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004820ac_cv_header_sys_types_h_makedev=no
4821fi
4822rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4823
4824fi
4825echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4826echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4827
4828if test $ac_cv_header_sys_types_h_makedev = no; then
4829if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4830 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4831echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4832if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4833 echo $ECHO_N "(cached) $ECHO_C" >&6
4834fi
4835echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4836echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4837else
4838 # Is the header compilable?
4839echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4840echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4841cat >conftest.$ac_ext <<_ACEOF
4842#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004843/* confdefs.h. */
4844_ACEOF
4845cat confdefs.h >>conftest.$ac_ext
4846cat >>conftest.$ac_ext <<_ACEOF
4847/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004848$ac_includes_default
4849#include <sys/mkdev.h>
4850_ACEOF
4851rm -f conftest.$ac_objext
4852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4853 (eval $ac_compile) 2>&5
4854 ac_status=$?
4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4856 (exit $ac_status); } &&
4857 { ac_try='test -s conftest.$ac_objext'
4858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4859 (eval $ac_try) 2>&5
4860 ac_status=$?
4861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862 (exit $ac_status); }; }; then
4863 ac_header_compiler=yes
4864else
4865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004866sed 's/^/| /' conftest.$ac_ext >&5
4867
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004868ac_header_compiler=no
4869fi
4870rm -f conftest.$ac_objext conftest.$ac_ext
4871echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4872echo "${ECHO_T}$ac_header_compiler" >&6
4873
4874# Is the header present?
4875echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4876echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4877cat >conftest.$ac_ext <<_ACEOF
4878#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004879/* confdefs.h. */
4880_ACEOF
4881cat confdefs.h >>conftest.$ac_ext
4882cat >>conftest.$ac_ext <<_ACEOF
4883/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004884#include <sys/mkdev.h>
4885_ACEOF
4886if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4887 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4888 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004889 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004890 rm -f conftest.er1
4891 cat conftest.err >&5
4892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4893 (exit $ac_status); } >/dev/null; then
4894 if test -s conftest.err; then
4895 ac_cpp_err=$ac_c_preproc_warn_flag
4896 else
4897 ac_cpp_err=
4898 fi
4899else
4900 ac_cpp_err=yes
4901fi
4902if test -z "$ac_cpp_err"; then
4903 ac_header_preproc=yes
4904else
4905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004906sed 's/^/| /' conftest.$ac_ext >&5
4907
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004908 ac_header_preproc=no
4909fi
4910rm -f conftest.err conftest.$ac_ext
4911echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4912echo "${ECHO_T}$ac_header_preproc" >&6
4913
4914# So? What about this header?
4915case $ac_header_compiler:$ac_header_preproc in
4916 yes:no )
4917 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4918echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4919 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004920echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4921 (
4922 cat <<\_ASBOX
4923## ------------------------------------ ##
4924## Report this to bug-autoconf@gnu.org. ##
4925## ------------------------------------ ##
4926_ASBOX
4927 ) |
4928 sed "s/^/$as_me: WARNING: /" >&2
4929 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004930 no:yes )
4931 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4932echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4933 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4934echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4935 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004936echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4937 (
4938 cat <<\_ASBOX
4939## ------------------------------------ ##
4940## Report this to bug-autoconf@gnu.org. ##
4941## ------------------------------------ ##
4942_ASBOX
4943 ) |
4944 sed "s/^/$as_me: WARNING: /" >&2
4945 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004946esac
4947echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4948echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4949if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4950 echo $ECHO_N "(cached) $ECHO_C" >&6
4951else
4952 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4953fi
4954echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4955echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4956
4957fi
4958if test $ac_cv_header_sys_mkdev_h = yes; then
4959
4960cat >>confdefs.h <<\_ACEOF
4961#define MAJOR_IN_MKDEV 1
4962_ACEOF
4963
4964fi
4965
4966
4967
4968 if test $ac_cv_header_sys_mkdev_h = no; then
4969 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4970 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4971echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4972if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4973 echo $ECHO_N "(cached) $ECHO_C" >&6
4974fi
4975echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4976echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4977else
4978 # Is the header compilable?
4979echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4980echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4981cat >conftest.$ac_ext <<_ACEOF
4982#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004983/* confdefs.h. */
4984_ACEOF
4985cat confdefs.h >>conftest.$ac_ext
4986cat >>conftest.$ac_ext <<_ACEOF
4987/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004988$ac_includes_default
4989#include <sys/sysmacros.h>
4990_ACEOF
4991rm -f conftest.$ac_objext
4992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4993 (eval $ac_compile) 2>&5
4994 ac_status=$?
4995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4996 (exit $ac_status); } &&
4997 { ac_try='test -s conftest.$ac_objext'
4998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4999 (eval $ac_try) 2>&5
5000 ac_status=$?
5001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5002 (exit $ac_status); }; }; then
5003 ac_header_compiler=yes
5004else
5005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005006sed 's/^/| /' conftest.$ac_ext >&5
5007
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005008ac_header_compiler=no
5009fi
5010rm -f conftest.$ac_objext conftest.$ac_ext
5011echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5012echo "${ECHO_T}$ac_header_compiler" >&6
5013
5014# Is the header present?
5015echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5016echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5017cat >conftest.$ac_ext <<_ACEOF
5018#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005019/* confdefs.h. */
5020_ACEOF
5021cat confdefs.h >>conftest.$ac_ext
5022cat >>conftest.$ac_ext <<_ACEOF
5023/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005024#include <sys/sysmacros.h>
5025_ACEOF
5026if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5027 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5028 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005029 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005030 rm -f conftest.er1
5031 cat conftest.err >&5
5032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5033 (exit $ac_status); } >/dev/null; then
5034 if test -s conftest.err; then
5035 ac_cpp_err=$ac_c_preproc_warn_flag
5036 else
5037 ac_cpp_err=
5038 fi
5039else
5040 ac_cpp_err=yes
5041fi
5042if test -z "$ac_cpp_err"; then
5043 ac_header_preproc=yes
5044else
5045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005046sed 's/^/| /' conftest.$ac_ext >&5
5047
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005048 ac_header_preproc=no
5049fi
5050rm -f conftest.err conftest.$ac_ext
5051echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5052echo "${ECHO_T}$ac_header_preproc" >&6
5053
5054# So? What about this header?
5055case $ac_header_compiler:$ac_header_preproc in
5056 yes:no )
5057 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5058echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5059 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005060echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5061 (
5062 cat <<\_ASBOX
5063## ------------------------------------ ##
5064## Report this to bug-autoconf@gnu.org. ##
5065## ------------------------------------ ##
5066_ASBOX
5067 ) |
5068 sed "s/^/$as_me: WARNING: /" >&2
5069 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005070 no:yes )
5071 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5072echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5073 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5074echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5075 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005076echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5077 (
5078 cat <<\_ASBOX
5079## ------------------------------------ ##
5080## Report this to bug-autoconf@gnu.org. ##
5081## ------------------------------------ ##
5082_ASBOX
5083 ) |
5084 sed "s/^/$as_me: WARNING: /" >&2
5085 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005086esac
5087echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5088echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5089if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5090 echo $ECHO_N "(cached) $ECHO_C" >&6
5091else
5092 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5093fi
5094echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5095echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5096
5097fi
5098if test $ac_cv_header_sys_sysmacros_h = yes; then
5099
5100cat >>confdefs.h <<\_ACEOF
5101#define MAJOR_IN_SYSMACROS 1
5102_ACEOF
5103
5104fi
5105
5106
5107 fi
5108fi
5109
Michael W. Hudson54241132001-12-07 15:38:26 +00005110
Guido van Rossum627b2d71993-12-24 10:39:16 +00005111# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005112was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005113echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5114echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5115cat >conftest.$ac_ext <<_ACEOF
5116#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005117/* confdefs.h. */
5118_ACEOF
5119cat confdefs.h >>conftest.$ac_ext
5120cat >>conftest.$ac_ext <<_ACEOF
5121/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005122#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005123
5124_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005126 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005127 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005128else
Martin v. Löwis11437992002-04-12 09:54:03 +00005129
5130
5131cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005132#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005133_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005134
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005135
Guido van Rossum627b2d71993-12-24 10:39:16 +00005136fi
5137rm -f conftest*
5138
Martin v. Löwis11437992002-04-12 09:54:03 +00005139echo "$as_me:$LINENO: result: $was_it_defined" >&5
5140echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005141
Neal Norwitz11690112002-07-30 01:08:28 +00005142# Check whether using makedev requires defining _OSF_SOURCE
5143echo "$as_me:$LINENO: checking for makedev" >&5
5144echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5145cat >conftest.$ac_ext <<_ACEOF
5146#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005147/* confdefs.h. */
5148_ACEOF
5149cat confdefs.h >>conftest.$ac_ext
5150cat >>conftest.$ac_ext <<_ACEOF
5151/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005152#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005153int
5154main ()
5155{
5156 makedev(0, 0)
5157 ;
5158 return 0;
5159}
5160_ACEOF
5161rm -f conftest.$ac_objext conftest$ac_exeext
5162if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5163 (eval $ac_link) 2>&5
5164 ac_status=$?
5165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166 (exit $ac_status); } &&
5167 { ac_try='test -s conftest$ac_exeext'
5168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5169 (eval $ac_try) 2>&5
5170 ac_status=$?
5171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5172 (exit $ac_status); }; }; then
5173 ac_cv_has_makedev=yes
5174else
5175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005176sed 's/^/| /' conftest.$ac_ext >&5
5177
Neal Norwitz11690112002-07-30 01:08:28 +00005178ac_cv_has_makedev=no
5179fi
5180rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5181if test "$ac_cv_has_makedev" = "no"; then
5182 # we didn't link, try if _OSF_SOURCE will allow us to link
5183 cat >conftest.$ac_ext <<_ACEOF
5184#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005185/* confdefs.h. */
5186_ACEOF
5187cat confdefs.h >>conftest.$ac_ext
5188cat >>conftest.$ac_ext <<_ACEOF
5189/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005190
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005191#define _OSF_SOURCE 1
5192#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005193
Neal Norwitz11690112002-07-30 01:08:28 +00005194int
5195main ()
5196{
5197 makedev(0, 0)
5198 ;
5199 return 0;
5200}
5201_ACEOF
5202rm -f conftest.$ac_objext conftest$ac_exeext
5203if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5204 (eval $ac_link) 2>&5
5205 ac_status=$?
5206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5207 (exit $ac_status); } &&
5208 { ac_try='test -s conftest$ac_exeext'
5209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5210 (eval $ac_try) 2>&5
5211 ac_status=$?
5212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5213 (exit $ac_status); }; }; then
5214 ac_cv_has_makedev=yes
5215else
5216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005217sed 's/^/| /' conftest.$ac_ext >&5
5218
Neal Norwitz11690112002-07-30 01:08:28 +00005219ac_cv_has_makedev=no
5220fi
5221rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5222 if test "$ac_cv_has_makedev" = "yes"; then
5223
5224cat >>confdefs.h <<\_ACEOF
5225#define _OSF_SOURCE 1
5226_ACEOF
5227
5228 fi
5229fi
5230echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5231echo "${ECHO_T}$ac_cv_has_makedev" >&6
5232if test "$ac_cv_has_makedev" = "yes"; then
5233
5234cat >>confdefs.h <<\_ACEOF
5235#define HAVE_MAKEDEV 1
5236_ACEOF
5237
5238fi
5239
Martin v. Löwis399a6892002-10-04 10:22:02 +00005240# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5241# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5242# defined, but the compiler does not support pragma redefine_extname,
5243# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5244# structures (such as rlimit64) without declaring them. As a
5245# work-around, disable LFS on such configurations
5246
5247use_lfs=yes
5248echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5249echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5250cat >conftest.$ac_ext <<_ACEOF
5251#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005252/* confdefs.h. */
5253_ACEOF
5254cat confdefs.h >>conftest.$ac_ext
5255cat >>conftest.$ac_ext <<_ACEOF
5256/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005257
5258#define _LARGEFILE_SOURCE 1
5259#define _FILE_OFFSET_BITS 64
5260#include <sys/resource.h>
5261
Martin v. Löwis399a6892002-10-04 10:22:02 +00005262int
5263main ()
5264{
5265struct rlimit foo;
5266 ;
5267 return 0;
5268}
5269_ACEOF
5270rm -f conftest.$ac_objext
5271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5272 (eval $ac_compile) 2>&5
5273 ac_status=$?
5274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5275 (exit $ac_status); } &&
5276 { ac_try='test -s conftest.$ac_objext'
5277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5278 (eval $ac_try) 2>&5
5279 ac_status=$?
5280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5281 (exit $ac_status); }; }; then
5282 sol_lfs_bug=no
5283else
5284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005285sed 's/^/| /' conftest.$ac_ext >&5
5286
Martin v. Löwis399a6892002-10-04 10:22:02 +00005287sol_lfs_bug=yes
5288fi
5289rm -f conftest.$ac_objext conftest.$ac_ext
5290echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5291echo "${ECHO_T}$sol_lfs_bug" >&6
5292if test "$sol_lfs_bug" = "yes"; then
5293 use_lfs=no
5294fi
5295
5296if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005297# Two defines needed to enable largefile support on various platforms
5298# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005299
Martin v. Löwis11437992002-04-12 09:54:03 +00005300cat >>confdefs.h <<\_ACEOF
5301#define _LARGEFILE_SOURCE 1
5302_ACEOF
5303
5304
5305cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005306#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005307_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005308
Martin v. Löwis399a6892002-10-04 10:22:02 +00005309fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005310
Guido van Rossum84e7b241996-08-19 21:59:00 +00005311# Add some code to confdefs.h so that the test for off_t works on SCO
5312cat >> confdefs.h <<\EOF
5313#if defined(SCO_DS)
5314#undef _OFF_T
5315#endif
5316EOF
5317
Guido van Rossumef2255b2000-03-10 22:30:29 +00005318# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005319echo "$as_me:$LINENO: checking for mode_t" >&5
5320echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5321if test "${ac_cv_type_mode_t+set}" = set; then
5322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005323else
Martin v. Löwis11437992002-04-12 09:54:03 +00005324 cat >conftest.$ac_ext <<_ACEOF
5325#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005326/* confdefs.h. */
5327_ACEOF
5328cat confdefs.h >>conftest.$ac_ext
5329cat >>conftest.$ac_ext <<_ACEOF
5330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005331$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005332int
5333main ()
5334{
5335if ((mode_t *) 0)
5336 return 0;
5337if (sizeof (mode_t))
5338 return 0;
5339 ;
5340 return 0;
5341}
5342_ACEOF
5343rm -f conftest.$ac_objext
5344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5345 (eval $ac_compile) 2>&5
5346 ac_status=$?
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5348 (exit $ac_status); } &&
5349 { ac_try='test -s conftest.$ac_objext'
5350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5351 (eval $ac_try) 2>&5
5352 ac_status=$?
5353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5354 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005355 ac_cv_type_mode_t=yes
5356else
Martin v. Löwis11437992002-04-12 09:54:03 +00005357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005358sed 's/^/| /' conftest.$ac_ext >&5
5359
Martin v. Löwis11437992002-04-12 09:54:03 +00005360ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005361fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005362rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005364echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5365echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5366if test $ac_cv_type_mode_t = yes; then
5367 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005368else
Martin v. Löwis11437992002-04-12 09:54:03 +00005369
5370cat >>confdefs.h <<_ACEOF
5371#define mode_t int
5372_ACEOF
5373
5374fi
5375
5376echo "$as_me:$LINENO: checking for off_t" >&5
5377echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5378if test "${ac_cv_type_off_t+set}" = set; then
5379 echo $ECHO_N "(cached) $ECHO_C" >&6
5380else
5381 cat >conftest.$ac_ext <<_ACEOF
5382#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005383/* confdefs.h. */
5384_ACEOF
5385cat confdefs.h >>conftest.$ac_ext
5386cat >>conftest.$ac_ext <<_ACEOF
5387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005388$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005389int
5390main ()
5391{
5392if ((off_t *) 0)
5393 return 0;
5394if (sizeof (off_t))
5395 return 0;
5396 ;
5397 return 0;
5398}
5399_ACEOF
5400rm -f conftest.$ac_objext
5401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5402 (eval $ac_compile) 2>&5
5403 ac_status=$?
5404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405 (exit $ac_status); } &&
5406 { ac_try='test -s conftest.$ac_objext'
5407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5408 (eval $ac_try) 2>&5
5409 ac_status=$?
5410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5411 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005412 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005413else
Martin v. Löwis11437992002-04-12 09:54:03 +00005414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005415sed 's/^/| /' conftest.$ac_ext >&5
5416
Martin v. Löwis11437992002-04-12 09:54:03 +00005417ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005419rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005421echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5422echo "${ECHO_T}$ac_cv_type_off_t" >&6
5423if test $ac_cv_type_off_t = yes; then
5424 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005425else
Martin v. Löwis11437992002-04-12 09:54:03 +00005426
5427cat >>confdefs.h <<_ACEOF
5428#define off_t long
5429_ACEOF
5430
5431fi
5432
5433echo "$as_me:$LINENO: checking for pid_t" >&5
5434echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5435if test "${ac_cv_type_pid_t+set}" = set; then
5436 echo $ECHO_N "(cached) $ECHO_C" >&6
5437else
5438 cat >conftest.$ac_ext <<_ACEOF
5439#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005440/* confdefs.h. */
5441_ACEOF
5442cat confdefs.h >>conftest.$ac_ext
5443cat >>conftest.$ac_ext <<_ACEOF
5444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005445$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005446int
5447main ()
5448{
5449if ((pid_t *) 0)
5450 return 0;
5451if (sizeof (pid_t))
5452 return 0;
5453 ;
5454 return 0;
5455}
5456_ACEOF
5457rm -f conftest.$ac_objext
5458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5459 (eval $ac_compile) 2>&5
5460 ac_status=$?
5461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5462 (exit $ac_status); } &&
5463 { ac_try='test -s conftest.$ac_objext'
5464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5465 (eval $ac_try) 2>&5
5466 ac_status=$?
5467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5468 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005469 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005470else
Martin v. Löwis11437992002-04-12 09:54:03 +00005471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005472sed 's/^/| /' conftest.$ac_ext >&5
5473
Martin v. Löwis11437992002-04-12 09:54:03 +00005474ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005475fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005476rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005478echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5479echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5480if test $ac_cv_type_pid_t = yes; then
5481 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005482else
Martin v. Löwis11437992002-04-12 09:54:03 +00005483
5484cat >>confdefs.h <<_ACEOF
5485#define pid_t int
5486_ACEOF
5487
5488fi
5489
5490echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5491echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5492if test "${ac_cv_type_signal+set}" = set; then
5493 echo $ECHO_N "(cached) $ECHO_C" >&6
5494else
5495 cat >conftest.$ac_ext <<_ACEOF
5496#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005497/* confdefs.h. */
5498_ACEOF
5499cat confdefs.h >>conftest.$ac_ext
5500cat >>conftest.$ac_ext <<_ACEOF
5501/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005502#include <sys/types.h>
5503#include <signal.h>
5504#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005505# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005506#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005507#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005508extern "C" void (*signal (int, void (*)(int)))(int);
5509#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005510void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005511#endif
5512
Martin v. Löwis11437992002-04-12 09:54:03 +00005513int
5514main ()
5515{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005516int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005517 ;
5518 return 0;
5519}
5520_ACEOF
5521rm -f conftest.$ac_objext
5522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5523 (eval $ac_compile) 2>&5
5524 ac_status=$?
5525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5526 (exit $ac_status); } &&
5527 { ac_try='test -s conftest.$ac_objext'
5528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5529 (eval $ac_try) 2>&5
5530 ac_status=$?
5531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5532 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005533 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005534else
Martin v. Löwis11437992002-04-12 09:54:03 +00005535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005536sed 's/^/| /' conftest.$ac_ext >&5
5537
Martin v. Löwis11437992002-04-12 09:54:03 +00005538ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005539fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005540rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005542echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5543echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005544
Martin v. Löwis11437992002-04-12 09:54:03 +00005545cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005546#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005547_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005548
Michael W. Hudson54241132001-12-07 15:38:26 +00005549
Martin v. Löwis11437992002-04-12 09:54:03 +00005550echo "$as_me:$LINENO: checking for size_t" >&5
5551echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5552if test "${ac_cv_type_size_t+set}" = set; then
5553 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005554else
Martin v. Löwis11437992002-04-12 09:54:03 +00005555 cat >conftest.$ac_ext <<_ACEOF
5556#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005557/* confdefs.h. */
5558_ACEOF
5559cat confdefs.h >>conftest.$ac_ext
5560cat >>conftest.$ac_ext <<_ACEOF
5561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005562$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005563int
5564main ()
5565{
5566if ((size_t *) 0)
5567 return 0;
5568if (sizeof (size_t))
5569 return 0;
5570 ;
5571 return 0;
5572}
5573_ACEOF
5574rm -f conftest.$ac_objext
5575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5576 (eval $ac_compile) 2>&5
5577 ac_status=$?
5578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5579 (exit $ac_status); } &&
5580 { ac_try='test -s conftest.$ac_objext'
5581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5582 (eval $ac_try) 2>&5
5583 ac_status=$?
5584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5585 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005586 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005587else
Martin v. Löwis11437992002-04-12 09:54:03 +00005588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005589sed 's/^/| /' conftest.$ac_ext >&5
5590
Martin v. Löwis11437992002-04-12 09:54:03 +00005591ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005592fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005593rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005595echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5596echo "${ECHO_T}$ac_cv_type_size_t" >&6
5597if test $ac_cv_type_size_t = yes; then
5598 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005599else
Martin v. Löwis11437992002-04-12 09:54:03 +00005600
5601cat >>confdefs.h <<_ACEOF
5602#define size_t unsigned
5603_ACEOF
5604
5605fi
5606
5607echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5608echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5609if test "${ac_cv_type_uid_t+set}" = set; then
5610 echo $ECHO_N "(cached) $ECHO_C" >&6
5611else
5612 cat >conftest.$ac_ext <<_ACEOF
5613#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005614/* confdefs.h. */
5615_ACEOF
5616cat confdefs.h >>conftest.$ac_ext
5617cat >>conftest.$ac_ext <<_ACEOF
5618/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005619#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005620
5621_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005623 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005624 ac_cv_type_uid_t=yes
5625else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005626 ac_cv_type_uid_t=no
5627fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005628rm -f conftest*
5629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005630fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005631echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5632echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005633if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005634
Martin v. Löwis11437992002-04-12 09:54:03 +00005635cat >>confdefs.h <<\_ACEOF
5636#define uid_t int
5637_ACEOF
5638
5639
5640cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005641#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005642_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005643
5644fi
5645
Jack Jansendd19cf82001-12-06 22:36:17 +00005646
Michael W. Hudson54241132001-12-07 15:38:26 +00005647# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005648# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005649echo "$as_me:$LINENO: checking for int" >&5
5650echo $ECHO_N "checking for int... $ECHO_C" >&6
5651if test "${ac_cv_type_int+set}" = set; then
5652 echo $ECHO_N "(cached) $ECHO_C" >&6
5653else
5654 cat >conftest.$ac_ext <<_ACEOF
5655#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005656/* confdefs.h. */
5657_ACEOF
5658cat confdefs.h >>conftest.$ac_ext
5659cat >>conftest.$ac_ext <<_ACEOF
5660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005661$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005662int
5663main ()
5664{
5665if ((int *) 0)
5666 return 0;
5667if (sizeof (int))
5668 return 0;
5669 ;
5670 return 0;
5671}
5672_ACEOF
5673rm -f conftest.$ac_objext
5674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5675 (eval $ac_compile) 2>&5
5676 ac_status=$?
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678 (exit $ac_status); } &&
5679 { ac_try='test -s conftest.$ac_objext'
5680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5681 (eval $ac_try) 2>&5
5682 ac_status=$?
5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684 (exit $ac_status); }; }; then
5685 ac_cv_type_int=yes
5686else
5687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005688sed 's/^/| /' conftest.$ac_ext >&5
5689
Martin v. Löwis11437992002-04-12 09:54:03 +00005690ac_cv_type_int=no
5691fi
5692rm -f conftest.$ac_objext conftest.$ac_ext
5693fi
5694echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5695echo "${ECHO_T}$ac_cv_type_int" >&6
5696
5697echo "$as_me:$LINENO: checking size of int" >&5
5698echo $ECHO_N "checking size of int... $ECHO_C" >&6
5699if test "${ac_cv_sizeof_int+set}" = set; then
5700 echo $ECHO_N "(cached) $ECHO_C" >&6
5701else
5702 if test "$ac_cv_type_int" = yes; then
5703 # The cast to unsigned long works around a bug in the HP C Compiler
5704 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5705 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5706 # This bug is HP SR number 8606223364.
5707 if test "$cross_compiling" = yes; then
5708 # Depending upon the size, compute the lo and hi bounds.
5709cat >conftest.$ac_ext <<_ACEOF
5710#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005711/* confdefs.h. */
5712_ACEOF
5713cat confdefs.h >>conftest.$ac_ext
5714cat >>conftest.$ac_ext <<_ACEOF
5715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005716$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005717int
5718main ()
5719{
5720static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5721test_array [0] = 0
5722
5723 ;
5724 return 0;
5725}
5726_ACEOF
5727rm -f conftest.$ac_objext
5728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5729 (eval $ac_compile) 2>&5
5730 ac_status=$?
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); } &&
5733 { ac_try='test -s conftest.$ac_objext'
5734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5735 (eval $ac_try) 2>&5
5736 ac_status=$?
5737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5738 (exit $ac_status); }; }; then
5739 ac_lo=0 ac_mid=0
5740 while :; do
5741 cat >conftest.$ac_ext <<_ACEOF
5742#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005743/* confdefs.h. */
5744_ACEOF
5745cat confdefs.h >>conftest.$ac_ext
5746cat >>conftest.$ac_ext <<_ACEOF
5747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005748$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005749int
5750main ()
5751{
5752static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5753test_array [0] = 0
5754
5755 ;
5756 return 0;
5757}
5758_ACEOF
5759rm -f conftest.$ac_objext
5760if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5761 (eval $ac_compile) 2>&5
5762 ac_status=$?
5763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764 (exit $ac_status); } &&
5765 { ac_try='test -s conftest.$ac_objext'
5766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5767 (eval $ac_try) 2>&5
5768 ac_status=$?
5769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5770 (exit $ac_status); }; }; then
5771 ac_hi=$ac_mid; break
5772else
5773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005774sed 's/^/| /' conftest.$ac_ext >&5
5775
Martin v. Löwis11437992002-04-12 09:54:03 +00005776ac_lo=`expr $ac_mid + 1`
5777 if test $ac_lo -le $ac_mid; then
5778 ac_lo= ac_hi=
5779 break
5780 fi
5781 ac_mid=`expr 2 '*' $ac_mid + 1`
5782fi
5783rm -f conftest.$ac_objext conftest.$ac_ext
5784 done
5785else
5786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005787sed 's/^/| /' conftest.$ac_ext >&5
5788
Martin v. Löwis11437992002-04-12 09:54:03 +00005789cat >conftest.$ac_ext <<_ACEOF
5790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005791/* confdefs.h. */
5792_ACEOF
5793cat confdefs.h >>conftest.$ac_ext
5794cat >>conftest.$ac_ext <<_ACEOF
5795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005796$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005797int
5798main ()
5799{
5800static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5801test_array [0] = 0
5802
5803 ;
5804 return 0;
5805}
5806_ACEOF
5807rm -f conftest.$ac_objext
5808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5809 (eval $ac_compile) 2>&5
5810 ac_status=$?
5811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5812 (exit $ac_status); } &&
5813 { ac_try='test -s conftest.$ac_objext'
5814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5815 (eval $ac_try) 2>&5
5816 ac_status=$?
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); }; }; then
5819 ac_hi=-1 ac_mid=-1
5820 while :; do
5821 cat >conftest.$ac_ext <<_ACEOF
5822#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005823/* confdefs.h. */
5824_ACEOF
5825cat confdefs.h >>conftest.$ac_ext
5826cat >>conftest.$ac_ext <<_ACEOF
5827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005828$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005829int
5830main ()
5831{
5832static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5833test_array [0] = 0
5834
5835 ;
5836 return 0;
5837}
5838_ACEOF
5839rm -f conftest.$ac_objext
5840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5841 (eval $ac_compile) 2>&5
5842 ac_status=$?
5843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5844 (exit $ac_status); } &&
5845 { ac_try='test -s conftest.$ac_objext'
5846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5847 (eval $ac_try) 2>&5
5848 ac_status=$?
5849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5850 (exit $ac_status); }; }; then
5851 ac_lo=$ac_mid; break
5852else
5853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005854sed 's/^/| /' conftest.$ac_ext >&5
5855
Martin v. Löwis11437992002-04-12 09:54:03 +00005856ac_hi=`expr '(' $ac_mid ')' - 1`
5857 if test $ac_mid -le $ac_hi; then
5858 ac_lo= ac_hi=
5859 break
5860 fi
5861 ac_mid=`expr 2 '*' $ac_mid`
5862fi
5863rm -f conftest.$ac_objext conftest.$ac_ext
5864 done
5865else
5866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005867sed 's/^/| /' conftest.$ac_ext >&5
5868
Martin v. Löwis11437992002-04-12 09:54:03 +00005869ac_lo= ac_hi=
5870fi
5871rm -f conftest.$ac_objext conftest.$ac_ext
5872fi
5873rm -f conftest.$ac_objext conftest.$ac_ext
5874# Binary search between lo and hi bounds.
5875while test "x$ac_lo" != "x$ac_hi"; do
5876 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5877 cat >conftest.$ac_ext <<_ACEOF
5878#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005879/* confdefs.h. */
5880_ACEOF
5881cat confdefs.h >>conftest.$ac_ext
5882cat >>conftest.$ac_ext <<_ACEOF
5883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005884$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005885int
5886main ()
5887{
5888static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5889test_array [0] = 0
5890
5891 ;
5892 return 0;
5893}
5894_ACEOF
5895rm -f conftest.$ac_objext
5896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5897 (eval $ac_compile) 2>&5
5898 ac_status=$?
5899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5900 (exit $ac_status); } &&
5901 { ac_try='test -s conftest.$ac_objext'
5902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5903 (eval $ac_try) 2>&5
5904 ac_status=$?
5905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5906 (exit $ac_status); }; }; then
5907 ac_hi=$ac_mid
5908else
5909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005910sed 's/^/| /' conftest.$ac_ext >&5
5911
Martin v. Löwis11437992002-04-12 09:54:03 +00005912ac_lo=`expr '(' $ac_mid ')' + 1`
5913fi
5914rm -f conftest.$ac_objext conftest.$ac_ext
5915done
5916case $ac_lo in
5917?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005918'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5919See \`config.log' for more details." >&5
5920echo "$as_me: error: cannot compute sizeof (int), 77
5921See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005922 { (exit 1); exit 1; }; } ;;
5923esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005924else
5925 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005926 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5927See \`config.log' for more details." >&5
5928echo "$as_me: error: cannot run test program while cross compiling
5929See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005930 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005931else
Martin v. Löwis11437992002-04-12 09:54:03 +00005932 cat >conftest.$ac_ext <<_ACEOF
5933#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005934/* confdefs.h. */
5935_ACEOF
5936cat confdefs.h >>conftest.$ac_ext
5937cat >>conftest.$ac_ext <<_ACEOF
5938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005939$ac_includes_default
5940long longval () { return (long) (sizeof (int)); }
5941unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005942#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005943#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005944int
5945main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005946{
Martin v. Löwis11437992002-04-12 09:54:03 +00005947
5948 FILE *f = fopen ("conftest.val", "w");
5949 if (! f)
5950 exit (1);
5951 if (((long) (sizeof (int))) < 0)
5952 {
5953 long i = longval ();
5954 if (i != ((long) (sizeof (int))))
5955 exit (1);
5956 fprintf (f, "%ld\n", i);
5957 }
5958 else
5959 {
5960 unsigned long i = ulongval ();
5961 if (i != ((long) (sizeof (int))))
5962 exit (1);
5963 fprintf (f, "%lu\n", i);
5964 }
5965 exit (ferror (f) || fclose (f) != 0);
5966
5967 ;
5968 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005969}
Martin v. Löwis11437992002-04-12 09:54:03 +00005970_ACEOF
5971rm -f conftest$ac_exeext
5972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5973 (eval $ac_link) 2>&5
5974 ac_status=$?
5975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5976 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5978 (eval $ac_try) 2>&5
5979 ac_status=$?
5980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5981 (exit $ac_status); }; }; then
5982 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005983else
Martin v. Löwis11437992002-04-12 09:54:03 +00005984 echo "$as_me: program exited with status $ac_status" >&5
5985echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005986sed 's/^/| /' conftest.$ac_ext >&5
5987
Martin v. Löwis11437992002-04-12 09:54:03 +00005988( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00005989{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5990See \`config.log' for more details." >&5
5991echo "$as_me: error: cannot compute sizeof (int), 77
5992See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005993 { (exit 1); exit 1; }; }
5994fi
Skip Montanaro6dead952003-09-25 14:50:04 +00005995rm -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 +00005996fi
5997fi
5998rm -f conftest.val
5999else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006000 ac_cv_sizeof_int=0
6001fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006003echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6004echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6005cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006006#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006007_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006008
6009
Martin v. Löwis11437992002-04-12 09:54:03 +00006010echo "$as_me:$LINENO: checking for long" >&5
6011echo $ECHO_N "checking for long... $ECHO_C" >&6
6012if test "${ac_cv_type_long+set}" = set; then
6013 echo $ECHO_N "(cached) $ECHO_C" >&6
6014else
6015 cat >conftest.$ac_ext <<_ACEOF
6016#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006017/* confdefs.h. */
6018_ACEOF
6019cat confdefs.h >>conftest.$ac_ext
6020cat >>conftest.$ac_ext <<_ACEOF
6021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006022$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006023int
6024main ()
6025{
6026if ((long *) 0)
6027 return 0;
6028if (sizeof (long))
6029 return 0;
6030 ;
6031 return 0;
6032}
6033_ACEOF
6034rm -f conftest.$ac_objext
6035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6036 (eval $ac_compile) 2>&5
6037 ac_status=$?
6038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6039 (exit $ac_status); } &&
6040 { ac_try='test -s conftest.$ac_objext'
6041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6042 (eval $ac_try) 2>&5
6043 ac_status=$?
6044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6045 (exit $ac_status); }; }; then
6046 ac_cv_type_long=yes
6047else
6048 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006049sed 's/^/| /' conftest.$ac_ext >&5
6050
Martin v. Löwis11437992002-04-12 09:54:03 +00006051ac_cv_type_long=no
6052fi
6053rm -f conftest.$ac_objext conftest.$ac_ext
6054fi
6055echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6056echo "${ECHO_T}$ac_cv_type_long" >&6
6057
6058echo "$as_me:$LINENO: checking size of long" >&5
6059echo $ECHO_N "checking size of long... $ECHO_C" >&6
6060if test "${ac_cv_sizeof_long+set}" = set; then
6061 echo $ECHO_N "(cached) $ECHO_C" >&6
6062else
6063 if test "$ac_cv_type_long" = yes; then
6064 # The cast to unsigned long works around a bug in the HP C Compiler
6065 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6066 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6067 # This bug is HP SR number 8606223364.
6068 if test "$cross_compiling" = yes; then
6069 # Depending upon the size, compute the lo and hi bounds.
6070cat >conftest.$ac_ext <<_ACEOF
6071#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006072/* confdefs.h. */
6073_ACEOF
6074cat confdefs.h >>conftest.$ac_ext
6075cat >>conftest.$ac_ext <<_ACEOF
6076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006077$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006078int
6079main ()
6080{
6081static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6082test_array [0] = 0
6083
6084 ;
6085 return 0;
6086}
6087_ACEOF
6088rm -f conftest.$ac_objext
6089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6090 (eval $ac_compile) 2>&5
6091 ac_status=$?
6092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093 (exit $ac_status); } &&
6094 { ac_try='test -s conftest.$ac_objext'
6095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6096 (eval $ac_try) 2>&5
6097 ac_status=$?
6098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099 (exit $ac_status); }; }; then
6100 ac_lo=0 ac_mid=0
6101 while :; do
6102 cat >conftest.$ac_ext <<_ACEOF
6103#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006104/* confdefs.h. */
6105_ACEOF
6106cat confdefs.h >>conftest.$ac_ext
6107cat >>conftest.$ac_ext <<_ACEOF
6108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006109$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006110int
6111main ()
6112{
6113static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6114test_array [0] = 0
6115
6116 ;
6117 return 0;
6118}
6119_ACEOF
6120rm -f conftest.$ac_objext
6121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6122 (eval $ac_compile) 2>&5
6123 ac_status=$?
6124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6125 (exit $ac_status); } &&
6126 { ac_try='test -s conftest.$ac_objext'
6127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6128 (eval $ac_try) 2>&5
6129 ac_status=$?
6130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6131 (exit $ac_status); }; }; then
6132 ac_hi=$ac_mid; break
6133else
6134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006135sed 's/^/| /' conftest.$ac_ext >&5
6136
Martin v. Löwis11437992002-04-12 09:54:03 +00006137ac_lo=`expr $ac_mid + 1`
6138 if test $ac_lo -le $ac_mid; then
6139 ac_lo= ac_hi=
6140 break
6141 fi
6142 ac_mid=`expr 2 '*' $ac_mid + 1`
6143fi
6144rm -f conftest.$ac_objext conftest.$ac_ext
6145 done
6146else
6147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006148sed 's/^/| /' conftest.$ac_ext >&5
6149
Martin v. Löwis11437992002-04-12 09:54:03 +00006150cat >conftest.$ac_ext <<_ACEOF
6151#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006152/* confdefs.h. */
6153_ACEOF
6154cat confdefs.h >>conftest.$ac_ext
6155cat >>conftest.$ac_ext <<_ACEOF
6156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006157$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006158int
6159main ()
6160{
6161static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6162test_array [0] = 0
6163
6164 ;
6165 return 0;
6166}
6167_ACEOF
6168rm -f conftest.$ac_objext
6169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6170 (eval $ac_compile) 2>&5
6171 ac_status=$?
6172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173 (exit $ac_status); } &&
6174 { ac_try='test -s conftest.$ac_objext'
6175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6176 (eval $ac_try) 2>&5
6177 ac_status=$?
6178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6179 (exit $ac_status); }; }; then
6180 ac_hi=-1 ac_mid=-1
6181 while :; do
6182 cat >conftest.$ac_ext <<_ACEOF
6183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006184/* confdefs.h. */
6185_ACEOF
6186cat confdefs.h >>conftest.$ac_ext
6187cat >>conftest.$ac_ext <<_ACEOF
6188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006189$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006190int
6191main ()
6192{
6193static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6194test_array [0] = 0
6195
6196 ;
6197 return 0;
6198}
6199_ACEOF
6200rm -f conftest.$ac_objext
6201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6202 (eval $ac_compile) 2>&5
6203 ac_status=$?
6204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6205 (exit $ac_status); } &&
6206 { ac_try='test -s conftest.$ac_objext'
6207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6208 (eval $ac_try) 2>&5
6209 ac_status=$?
6210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6211 (exit $ac_status); }; }; then
6212 ac_lo=$ac_mid; break
6213else
6214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006215sed 's/^/| /' conftest.$ac_ext >&5
6216
Martin v. Löwis11437992002-04-12 09:54:03 +00006217ac_hi=`expr '(' $ac_mid ')' - 1`
6218 if test $ac_mid -le $ac_hi; then
6219 ac_lo= ac_hi=
6220 break
6221 fi
6222 ac_mid=`expr 2 '*' $ac_mid`
6223fi
6224rm -f conftest.$ac_objext conftest.$ac_ext
6225 done
6226else
6227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006228sed 's/^/| /' conftest.$ac_ext >&5
6229
Martin v. Löwis11437992002-04-12 09:54:03 +00006230ac_lo= ac_hi=
6231fi
6232rm -f conftest.$ac_objext conftest.$ac_ext
6233fi
6234rm -f conftest.$ac_objext conftest.$ac_ext
6235# Binary search between lo and hi bounds.
6236while test "x$ac_lo" != "x$ac_hi"; do
6237 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6238 cat >conftest.$ac_ext <<_ACEOF
6239#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006240/* confdefs.h. */
6241_ACEOF
6242cat confdefs.h >>conftest.$ac_ext
6243cat >>conftest.$ac_ext <<_ACEOF
6244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006245$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006246int
6247main ()
6248{
6249static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6250test_array [0] = 0
6251
6252 ;
6253 return 0;
6254}
6255_ACEOF
6256rm -f conftest.$ac_objext
6257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6258 (eval $ac_compile) 2>&5
6259 ac_status=$?
6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); } &&
6262 { ac_try='test -s conftest.$ac_objext'
6263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6264 (eval $ac_try) 2>&5
6265 ac_status=$?
6266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6267 (exit $ac_status); }; }; then
6268 ac_hi=$ac_mid
6269else
6270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006271sed 's/^/| /' conftest.$ac_ext >&5
6272
Martin v. Löwis11437992002-04-12 09:54:03 +00006273ac_lo=`expr '(' $ac_mid ')' + 1`
6274fi
6275rm -f conftest.$ac_objext conftest.$ac_ext
6276done
6277case $ac_lo in
6278?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006279'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6280See \`config.log' for more details." >&5
6281echo "$as_me: error: cannot compute sizeof (long), 77
6282See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006283 { (exit 1); exit 1; }; } ;;
6284esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006285else
6286 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006287 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6288See \`config.log' for more details." >&5
6289echo "$as_me: error: cannot run test program while cross compiling
6290See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006291 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006292else
Martin v. Löwis11437992002-04-12 09:54:03 +00006293 cat >conftest.$ac_ext <<_ACEOF
6294#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006295/* confdefs.h. */
6296_ACEOF
6297cat confdefs.h >>conftest.$ac_ext
6298cat >>conftest.$ac_ext <<_ACEOF
6299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006300$ac_includes_default
6301long longval () { return (long) (sizeof (long)); }
6302unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006303#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006304#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006305int
6306main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006307{
Martin v. Löwis11437992002-04-12 09:54:03 +00006308
6309 FILE *f = fopen ("conftest.val", "w");
6310 if (! f)
6311 exit (1);
6312 if (((long) (sizeof (long))) < 0)
6313 {
6314 long i = longval ();
6315 if (i != ((long) (sizeof (long))))
6316 exit (1);
6317 fprintf (f, "%ld\n", i);
6318 }
6319 else
6320 {
6321 unsigned long i = ulongval ();
6322 if (i != ((long) (sizeof (long))))
6323 exit (1);
6324 fprintf (f, "%lu\n", i);
6325 }
6326 exit (ferror (f) || fclose (f) != 0);
6327
6328 ;
6329 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006330}
Martin v. Löwis11437992002-04-12 09:54:03 +00006331_ACEOF
6332rm -f conftest$ac_exeext
6333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6334 (eval $ac_link) 2>&5
6335 ac_status=$?
6336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6339 (eval $ac_try) 2>&5
6340 ac_status=$?
6341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6342 (exit $ac_status); }; }; then
6343 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006344else
Martin v. Löwis11437992002-04-12 09:54:03 +00006345 echo "$as_me: program exited with status $ac_status" >&5
6346echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006347sed 's/^/| /' conftest.$ac_ext >&5
6348
Martin v. Löwis11437992002-04-12 09:54:03 +00006349( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006350{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6351See \`config.log' for more details." >&5
6352echo "$as_me: error: cannot compute sizeof (long), 77
6353See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006354 { (exit 1); exit 1; }; }
6355fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006356rm -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 +00006357fi
6358fi
6359rm -f conftest.val
6360else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006361 ac_cv_sizeof_long=0
6362fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006364echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6365echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6366cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006367#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006368_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006369
6370
Martin v. Löwis11437992002-04-12 09:54:03 +00006371echo "$as_me:$LINENO: checking for void *" >&5
6372echo $ECHO_N "checking for void *... $ECHO_C" >&6
6373if test "${ac_cv_type_void_p+set}" = set; then
6374 echo $ECHO_N "(cached) $ECHO_C" >&6
6375else
6376 cat >conftest.$ac_ext <<_ACEOF
6377#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006378/* confdefs.h. */
6379_ACEOF
6380cat confdefs.h >>conftest.$ac_ext
6381cat >>conftest.$ac_ext <<_ACEOF
6382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006383$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006384int
6385main ()
6386{
6387if ((void * *) 0)
6388 return 0;
6389if (sizeof (void *))
6390 return 0;
6391 ;
6392 return 0;
6393}
6394_ACEOF
6395rm -f conftest.$ac_objext
6396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6397 (eval $ac_compile) 2>&5
6398 ac_status=$?
6399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6400 (exit $ac_status); } &&
6401 { ac_try='test -s conftest.$ac_objext'
6402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6403 (eval $ac_try) 2>&5
6404 ac_status=$?
6405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6406 (exit $ac_status); }; }; then
6407 ac_cv_type_void_p=yes
6408else
6409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006410sed 's/^/| /' conftest.$ac_ext >&5
6411
Martin v. Löwis11437992002-04-12 09:54:03 +00006412ac_cv_type_void_p=no
6413fi
6414rm -f conftest.$ac_objext conftest.$ac_ext
6415fi
6416echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6417echo "${ECHO_T}$ac_cv_type_void_p" >&6
6418
6419echo "$as_me:$LINENO: checking size of void *" >&5
6420echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6421if test "${ac_cv_sizeof_void_p+set}" = set; then
6422 echo $ECHO_N "(cached) $ECHO_C" >&6
6423else
6424 if test "$ac_cv_type_void_p" = yes; then
6425 # The cast to unsigned long works around a bug in the HP C Compiler
6426 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6427 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6428 # This bug is HP SR number 8606223364.
6429 if test "$cross_compiling" = yes; then
6430 # Depending upon the size, compute the lo and hi bounds.
6431cat >conftest.$ac_ext <<_ACEOF
6432#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006433/* confdefs.h. */
6434_ACEOF
6435cat confdefs.h >>conftest.$ac_ext
6436cat >>conftest.$ac_ext <<_ACEOF
6437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006438$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006439int
6440main ()
6441{
6442static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6443test_array [0] = 0
6444
6445 ;
6446 return 0;
6447}
6448_ACEOF
6449rm -f conftest.$ac_objext
6450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6451 (eval $ac_compile) 2>&5
6452 ac_status=$?
6453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6454 (exit $ac_status); } &&
6455 { ac_try='test -s conftest.$ac_objext'
6456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6457 (eval $ac_try) 2>&5
6458 ac_status=$?
6459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6460 (exit $ac_status); }; }; then
6461 ac_lo=0 ac_mid=0
6462 while :; do
6463 cat >conftest.$ac_ext <<_ACEOF
6464#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006465/* confdefs.h. */
6466_ACEOF
6467cat confdefs.h >>conftest.$ac_ext
6468cat >>conftest.$ac_ext <<_ACEOF
6469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006470$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006471int
6472main ()
6473{
6474static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6475test_array [0] = 0
6476
6477 ;
6478 return 0;
6479}
6480_ACEOF
6481rm -f conftest.$ac_objext
6482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6483 (eval $ac_compile) 2>&5
6484 ac_status=$?
6485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6486 (exit $ac_status); } &&
6487 { ac_try='test -s conftest.$ac_objext'
6488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6489 (eval $ac_try) 2>&5
6490 ac_status=$?
6491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6492 (exit $ac_status); }; }; then
6493 ac_hi=$ac_mid; break
6494else
6495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006496sed 's/^/| /' conftest.$ac_ext >&5
6497
Martin v. Löwis11437992002-04-12 09:54:03 +00006498ac_lo=`expr $ac_mid + 1`
6499 if test $ac_lo -le $ac_mid; then
6500 ac_lo= ac_hi=
6501 break
6502 fi
6503 ac_mid=`expr 2 '*' $ac_mid + 1`
6504fi
6505rm -f conftest.$ac_objext conftest.$ac_ext
6506 done
6507else
6508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006509sed 's/^/| /' conftest.$ac_ext >&5
6510
Martin v. Löwis11437992002-04-12 09:54:03 +00006511cat >conftest.$ac_ext <<_ACEOF
6512#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006513/* confdefs.h. */
6514_ACEOF
6515cat confdefs.h >>conftest.$ac_ext
6516cat >>conftest.$ac_ext <<_ACEOF
6517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006518$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006519int
6520main ()
6521{
6522static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6523test_array [0] = 0
6524
6525 ;
6526 return 0;
6527}
6528_ACEOF
6529rm -f conftest.$ac_objext
6530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6531 (eval $ac_compile) 2>&5
6532 ac_status=$?
6533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6534 (exit $ac_status); } &&
6535 { ac_try='test -s conftest.$ac_objext'
6536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6537 (eval $ac_try) 2>&5
6538 ac_status=$?
6539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6540 (exit $ac_status); }; }; then
6541 ac_hi=-1 ac_mid=-1
6542 while :; do
6543 cat >conftest.$ac_ext <<_ACEOF
6544#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006545/* confdefs.h. */
6546_ACEOF
6547cat confdefs.h >>conftest.$ac_ext
6548cat >>conftest.$ac_ext <<_ACEOF
6549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006550$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006551int
6552main ()
6553{
6554static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6555test_array [0] = 0
6556
6557 ;
6558 return 0;
6559}
6560_ACEOF
6561rm -f conftest.$ac_objext
6562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6563 (eval $ac_compile) 2>&5
6564 ac_status=$?
6565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6566 (exit $ac_status); } &&
6567 { ac_try='test -s conftest.$ac_objext'
6568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6569 (eval $ac_try) 2>&5
6570 ac_status=$?
6571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6572 (exit $ac_status); }; }; then
6573 ac_lo=$ac_mid; break
6574else
6575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006576sed 's/^/| /' conftest.$ac_ext >&5
6577
Martin v. Löwis11437992002-04-12 09:54:03 +00006578ac_hi=`expr '(' $ac_mid ')' - 1`
6579 if test $ac_mid -le $ac_hi; then
6580 ac_lo= ac_hi=
6581 break
6582 fi
6583 ac_mid=`expr 2 '*' $ac_mid`
6584fi
6585rm -f conftest.$ac_objext conftest.$ac_ext
6586 done
6587else
6588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006589sed 's/^/| /' conftest.$ac_ext >&5
6590
Martin v. Löwis11437992002-04-12 09:54:03 +00006591ac_lo= ac_hi=
6592fi
6593rm -f conftest.$ac_objext conftest.$ac_ext
6594fi
6595rm -f conftest.$ac_objext conftest.$ac_ext
6596# Binary search between lo and hi bounds.
6597while test "x$ac_lo" != "x$ac_hi"; do
6598 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6599 cat >conftest.$ac_ext <<_ACEOF
6600#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006601/* confdefs.h. */
6602_ACEOF
6603cat confdefs.h >>conftest.$ac_ext
6604cat >>conftest.$ac_ext <<_ACEOF
6605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006606$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006607int
6608main ()
6609{
6610static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6611test_array [0] = 0
6612
6613 ;
6614 return 0;
6615}
6616_ACEOF
6617rm -f conftest.$ac_objext
6618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6619 (eval $ac_compile) 2>&5
6620 ac_status=$?
6621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6622 (exit $ac_status); } &&
6623 { ac_try='test -s conftest.$ac_objext'
6624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6625 (eval $ac_try) 2>&5
6626 ac_status=$?
6627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6628 (exit $ac_status); }; }; then
6629 ac_hi=$ac_mid
6630else
6631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006632sed 's/^/| /' conftest.$ac_ext >&5
6633
Martin v. Löwis11437992002-04-12 09:54:03 +00006634ac_lo=`expr '(' $ac_mid ')' + 1`
6635fi
6636rm -f conftest.$ac_objext conftest.$ac_ext
6637done
6638case $ac_lo in
6639?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006640'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6641See \`config.log' for more details." >&5
6642echo "$as_me: error: cannot compute sizeof (void *), 77
6643See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006644 { (exit 1); exit 1; }; } ;;
6645esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006646else
6647 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006648 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6649See \`config.log' for more details." >&5
6650echo "$as_me: error: cannot run test program while cross compiling
6651See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006652 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006653else
Martin v. Löwis11437992002-04-12 09:54:03 +00006654 cat >conftest.$ac_ext <<_ACEOF
6655#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006656/* confdefs.h. */
6657_ACEOF
6658cat confdefs.h >>conftest.$ac_ext
6659cat >>conftest.$ac_ext <<_ACEOF
6660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006661$ac_includes_default
6662long longval () { return (long) (sizeof (void *)); }
6663unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006664#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006665#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006666int
6667main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006668{
Martin v. Löwis11437992002-04-12 09:54:03 +00006669
6670 FILE *f = fopen ("conftest.val", "w");
6671 if (! f)
6672 exit (1);
6673 if (((long) (sizeof (void *))) < 0)
6674 {
6675 long i = longval ();
6676 if (i != ((long) (sizeof (void *))))
6677 exit (1);
6678 fprintf (f, "%ld\n", i);
6679 }
6680 else
6681 {
6682 unsigned long i = ulongval ();
6683 if (i != ((long) (sizeof (void *))))
6684 exit (1);
6685 fprintf (f, "%lu\n", i);
6686 }
6687 exit (ferror (f) || fclose (f) != 0);
6688
6689 ;
6690 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006691}
Martin v. Löwis11437992002-04-12 09:54:03 +00006692_ACEOF
6693rm -f conftest$ac_exeext
6694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6695 (eval $ac_link) 2>&5
6696 ac_status=$?
6697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6698 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6700 (eval $ac_try) 2>&5
6701 ac_status=$?
6702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6703 (exit $ac_status); }; }; then
6704 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006705else
Martin v. Löwis11437992002-04-12 09:54:03 +00006706 echo "$as_me: program exited with status $ac_status" >&5
6707echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006708sed 's/^/| /' conftest.$ac_ext >&5
6709
Martin v. Löwis11437992002-04-12 09:54:03 +00006710( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006711{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6712See \`config.log' for more details." >&5
6713echo "$as_me: error: cannot compute sizeof (void *), 77
6714See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 { (exit 1); exit 1; }; }
6716fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006717rm -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 +00006718fi
6719fi
6720rm -f conftest.val
6721else
Guido van Rossumad678af1998-10-02 14:42:15 +00006722 ac_cv_sizeof_void_p=0
6723fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006724fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006725echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6726echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6727cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006728#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006729_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006730
6731
Martin v. Löwis11437992002-04-12 09:54:03 +00006732echo "$as_me:$LINENO: checking for short" >&5
6733echo $ECHO_N "checking for short... $ECHO_C" >&6
6734if test "${ac_cv_type_short+set}" = set; then
6735 echo $ECHO_N "(cached) $ECHO_C" >&6
6736else
6737 cat >conftest.$ac_ext <<_ACEOF
6738#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006739/* confdefs.h. */
6740_ACEOF
6741cat confdefs.h >>conftest.$ac_ext
6742cat >>conftest.$ac_ext <<_ACEOF
6743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006744$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006745int
6746main ()
6747{
6748if ((short *) 0)
6749 return 0;
6750if (sizeof (short))
6751 return 0;
6752 ;
6753 return 0;
6754}
6755_ACEOF
6756rm -f conftest.$ac_objext
6757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6758 (eval $ac_compile) 2>&5
6759 ac_status=$?
6760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761 (exit $ac_status); } &&
6762 { ac_try='test -s conftest.$ac_objext'
6763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6764 (eval $ac_try) 2>&5
6765 ac_status=$?
6766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6767 (exit $ac_status); }; }; then
6768 ac_cv_type_short=yes
6769else
6770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006771sed 's/^/| /' conftest.$ac_ext >&5
6772
Martin v. Löwis11437992002-04-12 09:54:03 +00006773ac_cv_type_short=no
6774fi
6775rm -f conftest.$ac_objext conftest.$ac_ext
6776fi
6777echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6778echo "${ECHO_T}$ac_cv_type_short" >&6
6779
6780echo "$as_me:$LINENO: checking size of short" >&5
6781echo $ECHO_N "checking size of short... $ECHO_C" >&6
6782if test "${ac_cv_sizeof_short+set}" = set; then
6783 echo $ECHO_N "(cached) $ECHO_C" >&6
6784else
6785 if test "$ac_cv_type_short" = yes; then
6786 # The cast to unsigned long works around a bug in the HP C Compiler
6787 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6788 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6789 # This bug is HP SR number 8606223364.
6790 if test "$cross_compiling" = yes; then
6791 # Depending upon the size, compute the lo and hi bounds.
6792cat >conftest.$ac_ext <<_ACEOF
6793#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006794/* confdefs.h. */
6795_ACEOF
6796cat confdefs.h >>conftest.$ac_ext
6797cat >>conftest.$ac_ext <<_ACEOF
6798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006799$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006800int
6801main ()
6802{
6803static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6804test_array [0] = 0
6805
6806 ;
6807 return 0;
6808}
6809_ACEOF
6810rm -f conftest.$ac_objext
6811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6812 (eval $ac_compile) 2>&5
6813 ac_status=$?
6814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6815 (exit $ac_status); } &&
6816 { ac_try='test -s conftest.$ac_objext'
6817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6818 (eval $ac_try) 2>&5
6819 ac_status=$?
6820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6821 (exit $ac_status); }; }; then
6822 ac_lo=0 ac_mid=0
6823 while :; do
6824 cat >conftest.$ac_ext <<_ACEOF
6825#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006826/* confdefs.h. */
6827_ACEOF
6828cat confdefs.h >>conftest.$ac_ext
6829cat >>conftest.$ac_ext <<_ACEOF
6830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006831$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006832int
6833main ()
6834{
6835static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6836test_array [0] = 0
6837
6838 ;
6839 return 0;
6840}
6841_ACEOF
6842rm -f conftest.$ac_objext
6843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6844 (eval $ac_compile) 2>&5
6845 ac_status=$?
6846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6847 (exit $ac_status); } &&
6848 { ac_try='test -s conftest.$ac_objext'
6849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6850 (eval $ac_try) 2>&5
6851 ac_status=$?
6852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6853 (exit $ac_status); }; }; then
6854 ac_hi=$ac_mid; break
6855else
6856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006857sed 's/^/| /' conftest.$ac_ext >&5
6858
Martin v. Löwis11437992002-04-12 09:54:03 +00006859ac_lo=`expr $ac_mid + 1`
6860 if test $ac_lo -le $ac_mid; then
6861 ac_lo= ac_hi=
6862 break
6863 fi
6864 ac_mid=`expr 2 '*' $ac_mid + 1`
6865fi
6866rm -f conftest.$ac_objext conftest.$ac_ext
6867 done
6868else
6869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006870sed 's/^/| /' conftest.$ac_ext >&5
6871
Martin v. Löwis11437992002-04-12 09:54:03 +00006872cat >conftest.$ac_ext <<_ACEOF
6873#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006874/* confdefs.h. */
6875_ACEOF
6876cat confdefs.h >>conftest.$ac_ext
6877cat >>conftest.$ac_ext <<_ACEOF
6878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006879$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006880int
6881main ()
6882{
6883static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6884test_array [0] = 0
6885
6886 ;
6887 return 0;
6888}
6889_ACEOF
6890rm -f conftest.$ac_objext
6891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6892 (eval $ac_compile) 2>&5
6893 ac_status=$?
6894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6895 (exit $ac_status); } &&
6896 { ac_try='test -s conftest.$ac_objext'
6897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6898 (eval $ac_try) 2>&5
6899 ac_status=$?
6900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6901 (exit $ac_status); }; }; then
6902 ac_hi=-1 ac_mid=-1
6903 while :; do
6904 cat >conftest.$ac_ext <<_ACEOF
6905#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006906/* confdefs.h. */
6907_ACEOF
6908cat confdefs.h >>conftest.$ac_ext
6909cat >>conftest.$ac_ext <<_ACEOF
6910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006911$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006912int
6913main ()
6914{
6915static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6916test_array [0] = 0
6917
6918 ;
6919 return 0;
6920}
6921_ACEOF
6922rm -f conftest.$ac_objext
6923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6924 (eval $ac_compile) 2>&5
6925 ac_status=$?
6926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6927 (exit $ac_status); } &&
6928 { ac_try='test -s conftest.$ac_objext'
6929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6930 (eval $ac_try) 2>&5
6931 ac_status=$?
6932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6933 (exit $ac_status); }; }; then
6934 ac_lo=$ac_mid; break
6935else
6936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006937sed 's/^/| /' conftest.$ac_ext >&5
6938
Martin v. Löwis11437992002-04-12 09:54:03 +00006939ac_hi=`expr '(' $ac_mid ')' - 1`
6940 if test $ac_mid -le $ac_hi; then
6941 ac_lo= ac_hi=
6942 break
6943 fi
6944 ac_mid=`expr 2 '*' $ac_mid`
6945fi
6946rm -f conftest.$ac_objext conftest.$ac_ext
6947 done
6948else
6949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006950sed 's/^/| /' conftest.$ac_ext >&5
6951
Martin v. Löwis11437992002-04-12 09:54:03 +00006952ac_lo= ac_hi=
6953fi
6954rm -f conftest.$ac_objext conftest.$ac_ext
6955fi
6956rm -f conftest.$ac_objext conftest.$ac_ext
6957# Binary search between lo and hi bounds.
6958while test "x$ac_lo" != "x$ac_hi"; do
6959 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6960 cat >conftest.$ac_ext <<_ACEOF
6961#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006962/* confdefs.h. */
6963_ACEOF
6964cat confdefs.h >>conftest.$ac_ext
6965cat >>conftest.$ac_ext <<_ACEOF
6966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006967$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006968int
6969main ()
6970{
6971static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6972test_array [0] = 0
6973
6974 ;
6975 return 0;
6976}
6977_ACEOF
6978rm -f conftest.$ac_objext
6979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6980 (eval $ac_compile) 2>&5
6981 ac_status=$?
6982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6983 (exit $ac_status); } &&
6984 { ac_try='test -s conftest.$ac_objext'
6985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6986 (eval $ac_try) 2>&5
6987 ac_status=$?
6988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6989 (exit $ac_status); }; }; then
6990 ac_hi=$ac_mid
6991else
6992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006993sed 's/^/| /' conftest.$ac_ext >&5
6994
Martin v. Löwis11437992002-04-12 09:54:03 +00006995ac_lo=`expr '(' $ac_mid ')' + 1`
6996fi
6997rm -f conftest.$ac_objext conftest.$ac_ext
6998done
6999case $ac_lo in
7000?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007001'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7002See \`config.log' for more details." >&5
7003echo "$as_me: error: cannot compute sizeof (short), 77
7004See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007005 { (exit 1); exit 1; }; } ;;
7006esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007007else
7008 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007009 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7010See \`config.log' for more details." >&5
7011echo "$as_me: error: cannot run test program while cross compiling
7012See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007013 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007014else
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 cat >conftest.$ac_ext <<_ACEOF
7016#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007017/* confdefs.h. */
7018_ACEOF
7019cat confdefs.h >>conftest.$ac_ext
7020cat >>conftest.$ac_ext <<_ACEOF
7021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007022$ac_includes_default
7023long longval () { return (long) (sizeof (short)); }
7024unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007025#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007026#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007027int
7028main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007029{
Martin v. Löwis11437992002-04-12 09:54:03 +00007030
7031 FILE *f = fopen ("conftest.val", "w");
7032 if (! f)
7033 exit (1);
7034 if (((long) (sizeof (short))) < 0)
7035 {
7036 long i = longval ();
7037 if (i != ((long) (sizeof (short))))
7038 exit (1);
7039 fprintf (f, "%ld\n", i);
7040 }
7041 else
7042 {
7043 unsigned long i = ulongval ();
7044 if (i != ((long) (sizeof (short))))
7045 exit (1);
7046 fprintf (f, "%lu\n", i);
7047 }
7048 exit (ferror (f) || fclose (f) != 0);
7049
7050 ;
7051 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007052}
Martin v. Löwis11437992002-04-12 09:54:03 +00007053_ACEOF
7054rm -f conftest$ac_exeext
7055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7056 (eval $ac_link) 2>&5
7057 ac_status=$?
7058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7059 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7061 (eval $ac_try) 2>&5
7062 ac_status=$?
7063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7064 (exit $ac_status); }; }; then
7065 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007066else
Martin v. Löwis11437992002-04-12 09:54:03 +00007067 echo "$as_me: program exited with status $ac_status" >&5
7068echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007069sed 's/^/| /' conftest.$ac_ext >&5
7070
Martin v. Löwis11437992002-04-12 09:54:03 +00007071( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007072{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7073See \`config.log' for more details." >&5
7074echo "$as_me: error: cannot compute sizeof (short), 77
7075See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007076 { (exit 1); exit 1; }; }
7077fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007078rm -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 +00007079fi
7080fi
7081rm -f conftest.val
7082else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007083 ac_cv_sizeof_short=0
7084fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007085fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007086echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7087echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7088cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007089#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007090_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007091
7092
Martin v. Löwis11437992002-04-12 09:54:03 +00007093echo "$as_me:$LINENO: checking for float" >&5
7094echo $ECHO_N "checking for float... $ECHO_C" >&6
7095if test "${ac_cv_type_float+set}" = set; then
7096 echo $ECHO_N "(cached) $ECHO_C" >&6
7097else
7098 cat >conftest.$ac_ext <<_ACEOF
7099#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007100/* confdefs.h. */
7101_ACEOF
7102cat confdefs.h >>conftest.$ac_ext
7103cat >>conftest.$ac_ext <<_ACEOF
7104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007105$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007106int
7107main ()
7108{
7109if ((float *) 0)
7110 return 0;
7111if (sizeof (float))
7112 return 0;
7113 ;
7114 return 0;
7115}
7116_ACEOF
7117rm -f conftest.$ac_objext
7118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7119 (eval $ac_compile) 2>&5
7120 ac_status=$?
7121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7122 (exit $ac_status); } &&
7123 { ac_try='test -s conftest.$ac_objext'
7124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7125 (eval $ac_try) 2>&5
7126 ac_status=$?
7127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7128 (exit $ac_status); }; }; then
7129 ac_cv_type_float=yes
7130else
7131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007132sed 's/^/| /' conftest.$ac_ext >&5
7133
Martin v. Löwis11437992002-04-12 09:54:03 +00007134ac_cv_type_float=no
7135fi
7136rm -f conftest.$ac_objext conftest.$ac_ext
7137fi
7138echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7139echo "${ECHO_T}$ac_cv_type_float" >&6
7140
7141echo "$as_me:$LINENO: checking size of float" >&5
7142echo $ECHO_N "checking size of float... $ECHO_C" >&6
7143if test "${ac_cv_sizeof_float+set}" = set; then
7144 echo $ECHO_N "(cached) $ECHO_C" >&6
7145else
7146 if test "$ac_cv_type_float" = yes; then
7147 # The cast to unsigned long works around a bug in the HP C Compiler
7148 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7149 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7150 # This bug is HP SR number 8606223364.
7151 if test "$cross_compiling" = yes; then
7152 # Depending upon the size, compute the lo and hi bounds.
7153cat >conftest.$ac_ext <<_ACEOF
7154#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007155/* confdefs.h. */
7156_ACEOF
7157cat confdefs.h >>conftest.$ac_ext
7158cat >>conftest.$ac_ext <<_ACEOF
7159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007160$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007161int
7162main ()
7163{
7164static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7165test_array [0] = 0
7166
7167 ;
7168 return 0;
7169}
7170_ACEOF
7171rm -f conftest.$ac_objext
7172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7173 (eval $ac_compile) 2>&5
7174 ac_status=$?
7175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7176 (exit $ac_status); } &&
7177 { ac_try='test -s conftest.$ac_objext'
7178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7179 (eval $ac_try) 2>&5
7180 ac_status=$?
7181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7182 (exit $ac_status); }; }; then
7183 ac_lo=0 ac_mid=0
7184 while :; do
7185 cat >conftest.$ac_ext <<_ACEOF
7186#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007187/* confdefs.h. */
7188_ACEOF
7189cat confdefs.h >>conftest.$ac_ext
7190cat >>conftest.$ac_ext <<_ACEOF
7191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007192$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007193int
7194main ()
7195{
7196static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7197test_array [0] = 0
7198
7199 ;
7200 return 0;
7201}
7202_ACEOF
7203rm -f conftest.$ac_objext
7204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7205 (eval $ac_compile) 2>&5
7206 ac_status=$?
7207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7208 (exit $ac_status); } &&
7209 { ac_try='test -s conftest.$ac_objext'
7210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7211 (eval $ac_try) 2>&5
7212 ac_status=$?
7213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7214 (exit $ac_status); }; }; then
7215 ac_hi=$ac_mid; break
7216else
7217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007218sed 's/^/| /' conftest.$ac_ext >&5
7219
Martin v. Löwis11437992002-04-12 09:54:03 +00007220ac_lo=`expr $ac_mid + 1`
7221 if test $ac_lo -le $ac_mid; then
7222 ac_lo= ac_hi=
7223 break
7224 fi
7225 ac_mid=`expr 2 '*' $ac_mid + 1`
7226fi
7227rm -f conftest.$ac_objext conftest.$ac_ext
7228 done
7229else
7230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007231sed 's/^/| /' conftest.$ac_ext >&5
7232
Martin v. Löwis11437992002-04-12 09:54:03 +00007233cat >conftest.$ac_ext <<_ACEOF
7234#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007235/* confdefs.h. */
7236_ACEOF
7237cat confdefs.h >>conftest.$ac_ext
7238cat >>conftest.$ac_ext <<_ACEOF
7239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007240$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007241int
7242main ()
7243{
7244static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7245test_array [0] = 0
7246
7247 ;
7248 return 0;
7249}
7250_ACEOF
7251rm -f conftest.$ac_objext
7252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7253 (eval $ac_compile) 2>&5
7254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); } &&
7257 { ac_try='test -s conftest.$ac_objext'
7258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7259 (eval $ac_try) 2>&5
7260 ac_status=$?
7261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7262 (exit $ac_status); }; }; then
7263 ac_hi=-1 ac_mid=-1
7264 while :; do
7265 cat >conftest.$ac_ext <<_ACEOF
7266#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007267/* confdefs.h. */
7268_ACEOF
7269cat confdefs.h >>conftest.$ac_ext
7270cat >>conftest.$ac_ext <<_ACEOF
7271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007272$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007273int
7274main ()
7275{
7276static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7277test_array [0] = 0
7278
7279 ;
7280 return 0;
7281}
7282_ACEOF
7283rm -f conftest.$ac_objext
7284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7285 (eval $ac_compile) 2>&5
7286 ac_status=$?
7287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7288 (exit $ac_status); } &&
7289 { ac_try='test -s conftest.$ac_objext'
7290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7291 (eval $ac_try) 2>&5
7292 ac_status=$?
7293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7294 (exit $ac_status); }; }; then
7295 ac_lo=$ac_mid; break
7296else
7297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007298sed 's/^/| /' conftest.$ac_ext >&5
7299
Martin v. Löwis11437992002-04-12 09:54:03 +00007300ac_hi=`expr '(' $ac_mid ')' - 1`
7301 if test $ac_mid -le $ac_hi; then
7302 ac_lo= ac_hi=
7303 break
7304 fi
7305 ac_mid=`expr 2 '*' $ac_mid`
7306fi
7307rm -f conftest.$ac_objext conftest.$ac_ext
7308 done
7309else
7310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007311sed 's/^/| /' conftest.$ac_ext >&5
7312
Martin v. Löwis11437992002-04-12 09:54:03 +00007313ac_lo= ac_hi=
7314fi
7315rm -f conftest.$ac_objext conftest.$ac_ext
7316fi
7317rm -f conftest.$ac_objext conftest.$ac_ext
7318# Binary search between lo and hi bounds.
7319while test "x$ac_lo" != "x$ac_hi"; do
7320 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7321 cat >conftest.$ac_ext <<_ACEOF
7322#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007323/* confdefs.h. */
7324_ACEOF
7325cat confdefs.h >>conftest.$ac_ext
7326cat >>conftest.$ac_ext <<_ACEOF
7327/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007328$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007329int
7330main ()
7331{
7332static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7333test_array [0] = 0
7334
7335 ;
7336 return 0;
7337}
7338_ACEOF
7339rm -f conftest.$ac_objext
7340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7341 (eval $ac_compile) 2>&5
7342 ac_status=$?
7343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7344 (exit $ac_status); } &&
7345 { ac_try='test -s conftest.$ac_objext'
7346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7347 (eval $ac_try) 2>&5
7348 ac_status=$?
7349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7350 (exit $ac_status); }; }; then
7351 ac_hi=$ac_mid
7352else
7353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007354sed 's/^/| /' conftest.$ac_ext >&5
7355
Martin v. Löwis11437992002-04-12 09:54:03 +00007356ac_lo=`expr '(' $ac_mid ')' + 1`
7357fi
7358rm -f conftest.$ac_objext conftest.$ac_ext
7359done
7360case $ac_lo in
7361?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007362'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7363See \`config.log' for more details." >&5
7364echo "$as_me: error: cannot compute sizeof (float), 77
7365See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007366 { (exit 1); exit 1; }; } ;;
7367esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007368else
7369 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007370 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7371See \`config.log' for more details." >&5
7372echo "$as_me: error: cannot run test program while cross compiling
7373See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007374 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007375else
Martin v. Löwis11437992002-04-12 09:54:03 +00007376 cat >conftest.$ac_ext <<_ACEOF
7377#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007378/* confdefs.h. */
7379_ACEOF
7380cat confdefs.h >>conftest.$ac_ext
7381cat >>conftest.$ac_ext <<_ACEOF
7382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007383$ac_includes_default
7384long longval () { return (long) (sizeof (float)); }
7385unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007386#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007387#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007388int
7389main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007390{
Martin v. Löwis11437992002-04-12 09:54:03 +00007391
7392 FILE *f = fopen ("conftest.val", "w");
7393 if (! f)
7394 exit (1);
7395 if (((long) (sizeof (float))) < 0)
7396 {
7397 long i = longval ();
7398 if (i != ((long) (sizeof (float))))
7399 exit (1);
7400 fprintf (f, "%ld\n", i);
7401 }
7402 else
7403 {
7404 unsigned long i = ulongval ();
7405 if (i != ((long) (sizeof (float))))
7406 exit (1);
7407 fprintf (f, "%lu\n", i);
7408 }
7409 exit (ferror (f) || fclose (f) != 0);
7410
7411 ;
7412 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007413}
Martin v. Löwis11437992002-04-12 09:54:03 +00007414_ACEOF
7415rm -f conftest$ac_exeext
7416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7417 (eval $ac_link) 2>&5
7418 ac_status=$?
7419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7420 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7422 (eval $ac_try) 2>&5
7423 ac_status=$?
7424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7425 (exit $ac_status); }; }; then
7426 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007427else
Martin v. Löwis11437992002-04-12 09:54:03 +00007428 echo "$as_me: program exited with status $ac_status" >&5
7429echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007430sed 's/^/| /' conftest.$ac_ext >&5
7431
Martin v. Löwis11437992002-04-12 09:54:03 +00007432( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007433{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7434See \`config.log' for more details." >&5
7435echo "$as_me: error: cannot compute sizeof (float), 77
7436See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007437 { (exit 1); exit 1; }; }
7438fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007439rm -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 +00007440fi
7441fi
7442rm -f conftest.val
7443else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007444 ac_cv_sizeof_float=0
7445fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007446fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007447echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7448echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7449cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007450#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007451_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007452
7453
Martin v. Löwis11437992002-04-12 09:54:03 +00007454echo "$as_me:$LINENO: checking for double" >&5
7455echo $ECHO_N "checking for double... $ECHO_C" >&6
7456if test "${ac_cv_type_double+set}" = set; then
7457 echo $ECHO_N "(cached) $ECHO_C" >&6
7458else
7459 cat >conftest.$ac_ext <<_ACEOF
7460#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007461/* confdefs.h. */
7462_ACEOF
7463cat confdefs.h >>conftest.$ac_ext
7464cat >>conftest.$ac_ext <<_ACEOF
7465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007466$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007467int
7468main ()
7469{
7470if ((double *) 0)
7471 return 0;
7472if (sizeof (double))
7473 return 0;
7474 ;
7475 return 0;
7476}
7477_ACEOF
7478rm -f conftest.$ac_objext
7479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7480 (eval $ac_compile) 2>&5
7481 ac_status=$?
7482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483 (exit $ac_status); } &&
7484 { ac_try='test -s conftest.$ac_objext'
7485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7486 (eval $ac_try) 2>&5
7487 ac_status=$?
7488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7489 (exit $ac_status); }; }; then
7490 ac_cv_type_double=yes
7491else
7492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007493sed 's/^/| /' conftest.$ac_ext >&5
7494
Martin v. Löwis11437992002-04-12 09:54:03 +00007495ac_cv_type_double=no
7496fi
7497rm -f conftest.$ac_objext conftest.$ac_ext
7498fi
7499echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7500echo "${ECHO_T}$ac_cv_type_double" >&6
7501
7502echo "$as_me:$LINENO: checking size of double" >&5
7503echo $ECHO_N "checking size of double... $ECHO_C" >&6
7504if test "${ac_cv_sizeof_double+set}" = set; then
7505 echo $ECHO_N "(cached) $ECHO_C" >&6
7506else
7507 if test "$ac_cv_type_double" = yes; then
7508 # The cast to unsigned long works around a bug in the HP C Compiler
7509 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7510 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7511 # This bug is HP SR number 8606223364.
7512 if test "$cross_compiling" = yes; then
7513 # Depending upon the size, compute the lo and hi bounds.
7514cat >conftest.$ac_ext <<_ACEOF
7515#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007516/* confdefs.h. */
7517_ACEOF
7518cat confdefs.h >>conftest.$ac_ext
7519cat >>conftest.$ac_ext <<_ACEOF
7520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007521$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007522int
7523main ()
7524{
7525static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7526test_array [0] = 0
7527
7528 ;
7529 return 0;
7530}
7531_ACEOF
7532rm -f conftest.$ac_objext
7533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7534 (eval $ac_compile) 2>&5
7535 ac_status=$?
7536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7537 (exit $ac_status); } &&
7538 { ac_try='test -s conftest.$ac_objext'
7539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7540 (eval $ac_try) 2>&5
7541 ac_status=$?
7542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543 (exit $ac_status); }; }; then
7544 ac_lo=0 ac_mid=0
7545 while :; do
7546 cat >conftest.$ac_ext <<_ACEOF
7547#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007548/* confdefs.h. */
7549_ACEOF
7550cat confdefs.h >>conftest.$ac_ext
7551cat >>conftest.$ac_ext <<_ACEOF
7552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007553$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007554int
7555main ()
7556{
7557static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7558test_array [0] = 0
7559
7560 ;
7561 return 0;
7562}
7563_ACEOF
7564rm -f conftest.$ac_objext
7565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7566 (eval $ac_compile) 2>&5
7567 ac_status=$?
7568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7569 (exit $ac_status); } &&
7570 { ac_try='test -s conftest.$ac_objext'
7571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7572 (eval $ac_try) 2>&5
7573 ac_status=$?
7574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7575 (exit $ac_status); }; }; then
7576 ac_hi=$ac_mid; break
7577else
7578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007579sed 's/^/| /' conftest.$ac_ext >&5
7580
Martin v. Löwis11437992002-04-12 09:54:03 +00007581ac_lo=`expr $ac_mid + 1`
7582 if test $ac_lo -le $ac_mid; then
7583 ac_lo= ac_hi=
7584 break
7585 fi
7586 ac_mid=`expr 2 '*' $ac_mid + 1`
7587fi
7588rm -f conftest.$ac_objext conftest.$ac_ext
7589 done
7590else
7591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007592sed 's/^/| /' conftest.$ac_ext >&5
7593
Martin v. Löwis11437992002-04-12 09:54:03 +00007594cat >conftest.$ac_ext <<_ACEOF
7595#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007596/* confdefs.h. */
7597_ACEOF
7598cat confdefs.h >>conftest.$ac_ext
7599cat >>conftest.$ac_ext <<_ACEOF
7600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007601$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007602int
7603main ()
7604{
7605static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7606test_array [0] = 0
7607
7608 ;
7609 return 0;
7610}
7611_ACEOF
7612rm -f conftest.$ac_objext
7613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7614 (eval $ac_compile) 2>&5
7615 ac_status=$?
7616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617 (exit $ac_status); } &&
7618 { ac_try='test -s conftest.$ac_objext'
7619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7620 (eval $ac_try) 2>&5
7621 ac_status=$?
7622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7623 (exit $ac_status); }; }; then
7624 ac_hi=-1 ac_mid=-1
7625 while :; do
7626 cat >conftest.$ac_ext <<_ACEOF
7627#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007628/* confdefs.h. */
7629_ACEOF
7630cat confdefs.h >>conftest.$ac_ext
7631cat >>conftest.$ac_ext <<_ACEOF
7632/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007633$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007634int
7635main ()
7636{
7637static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7638test_array [0] = 0
7639
7640 ;
7641 return 0;
7642}
7643_ACEOF
7644rm -f conftest.$ac_objext
7645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7646 (eval $ac_compile) 2>&5
7647 ac_status=$?
7648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7649 (exit $ac_status); } &&
7650 { ac_try='test -s conftest.$ac_objext'
7651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7652 (eval $ac_try) 2>&5
7653 ac_status=$?
7654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7655 (exit $ac_status); }; }; then
7656 ac_lo=$ac_mid; break
7657else
7658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007659sed 's/^/| /' conftest.$ac_ext >&5
7660
Martin v. Löwis11437992002-04-12 09:54:03 +00007661ac_hi=`expr '(' $ac_mid ')' - 1`
7662 if test $ac_mid -le $ac_hi; then
7663 ac_lo= ac_hi=
7664 break
7665 fi
7666 ac_mid=`expr 2 '*' $ac_mid`
7667fi
7668rm -f conftest.$ac_objext conftest.$ac_ext
7669 done
7670else
7671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007672sed 's/^/| /' conftest.$ac_ext >&5
7673
Martin v. Löwis11437992002-04-12 09:54:03 +00007674ac_lo= ac_hi=
7675fi
7676rm -f conftest.$ac_objext conftest.$ac_ext
7677fi
7678rm -f conftest.$ac_objext conftest.$ac_ext
7679# Binary search between lo and hi bounds.
7680while test "x$ac_lo" != "x$ac_hi"; do
7681 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7682 cat >conftest.$ac_ext <<_ACEOF
7683#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007684/* confdefs.h. */
7685_ACEOF
7686cat confdefs.h >>conftest.$ac_ext
7687cat >>conftest.$ac_ext <<_ACEOF
7688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007689$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007690int
7691main ()
7692{
7693static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7694test_array [0] = 0
7695
7696 ;
7697 return 0;
7698}
7699_ACEOF
7700rm -f conftest.$ac_objext
7701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7702 (eval $ac_compile) 2>&5
7703 ac_status=$?
7704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7705 (exit $ac_status); } &&
7706 { ac_try='test -s conftest.$ac_objext'
7707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7708 (eval $ac_try) 2>&5
7709 ac_status=$?
7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711 (exit $ac_status); }; }; then
7712 ac_hi=$ac_mid
7713else
7714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007715sed 's/^/| /' conftest.$ac_ext >&5
7716
Martin v. Löwis11437992002-04-12 09:54:03 +00007717ac_lo=`expr '(' $ac_mid ')' + 1`
7718fi
7719rm -f conftest.$ac_objext conftest.$ac_ext
7720done
7721case $ac_lo in
7722?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007723'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7724See \`config.log' for more details." >&5
7725echo "$as_me: error: cannot compute sizeof (double), 77
7726See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 { (exit 1); exit 1; }; } ;;
7728esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007729else
7730 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007731 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7732See \`config.log' for more details." >&5
7733echo "$as_me: error: cannot run test program while cross compiling
7734See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007735 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007736else
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 cat >conftest.$ac_ext <<_ACEOF
7738#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007739/* confdefs.h. */
7740_ACEOF
7741cat confdefs.h >>conftest.$ac_ext
7742cat >>conftest.$ac_ext <<_ACEOF
7743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007744$ac_includes_default
7745long longval () { return (long) (sizeof (double)); }
7746unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007747#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007748#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007749int
7750main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007751{
Martin v. Löwis11437992002-04-12 09:54:03 +00007752
7753 FILE *f = fopen ("conftest.val", "w");
7754 if (! f)
7755 exit (1);
7756 if (((long) (sizeof (double))) < 0)
7757 {
7758 long i = longval ();
7759 if (i != ((long) (sizeof (double))))
7760 exit (1);
7761 fprintf (f, "%ld\n", i);
7762 }
7763 else
7764 {
7765 unsigned long i = ulongval ();
7766 if (i != ((long) (sizeof (double))))
7767 exit (1);
7768 fprintf (f, "%lu\n", i);
7769 }
7770 exit (ferror (f) || fclose (f) != 0);
7771
7772 ;
7773 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007774}
Martin v. Löwis11437992002-04-12 09:54:03 +00007775_ACEOF
7776rm -f conftest$ac_exeext
7777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7778 (eval $ac_link) 2>&5
7779 ac_status=$?
7780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7781 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7783 (eval $ac_try) 2>&5
7784 ac_status=$?
7785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7786 (exit $ac_status); }; }; then
7787 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007788else
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 echo "$as_me: program exited with status $ac_status" >&5
7790echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007791sed 's/^/| /' conftest.$ac_ext >&5
7792
Martin v. Löwis11437992002-04-12 09:54:03 +00007793( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007794{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7795See \`config.log' for more details." >&5
7796echo "$as_me: error: cannot compute sizeof (double), 77
7797See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 { (exit 1); exit 1; }; }
7799fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007800rm -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 +00007801fi
7802fi
7803rm -f conftest.val
7804else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007805 ac_cv_sizeof_double=0
7806fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007808echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7809echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7810cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007811#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007812_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007813
7814
Martin v. Löwis11437992002-04-12 09:54:03 +00007815echo "$as_me:$LINENO: checking for fpos_t" >&5
7816echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7817if test "${ac_cv_type_fpos_t+set}" = set; then
7818 echo $ECHO_N "(cached) $ECHO_C" >&6
7819else
7820 cat >conftest.$ac_ext <<_ACEOF
7821#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007822/* confdefs.h. */
7823_ACEOF
7824cat confdefs.h >>conftest.$ac_ext
7825cat >>conftest.$ac_ext <<_ACEOF
7826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007827$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007828int
7829main ()
7830{
7831if ((fpos_t *) 0)
7832 return 0;
7833if (sizeof (fpos_t))
7834 return 0;
7835 ;
7836 return 0;
7837}
7838_ACEOF
7839rm -f conftest.$ac_objext
7840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7841 (eval $ac_compile) 2>&5
7842 ac_status=$?
7843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7844 (exit $ac_status); } &&
7845 { ac_try='test -s conftest.$ac_objext'
7846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7847 (eval $ac_try) 2>&5
7848 ac_status=$?
7849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7850 (exit $ac_status); }; }; then
7851 ac_cv_type_fpos_t=yes
7852else
7853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007854sed 's/^/| /' conftest.$ac_ext >&5
7855
Martin v. Löwis11437992002-04-12 09:54:03 +00007856ac_cv_type_fpos_t=no
7857fi
7858rm -f conftest.$ac_objext conftest.$ac_ext
7859fi
7860echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7861echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7862
7863echo "$as_me:$LINENO: checking size of fpos_t" >&5
7864echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7865if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7866 echo $ECHO_N "(cached) $ECHO_C" >&6
7867else
7868 if test "$ac_cv_type_fpos_t" = yes; then
7869 # The cast to unsigned long works around a bug in the HP C Compiler
7870 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7871 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7872 # This bug is HP SR number 8606223364.
7873 if test "$cross_compiling" = yes; then
7874 # Depending upon the size, compute the lo and hi bounds.
7875cat >conftest.$ac_ext <<_ACEOF
7876#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007877/* confdefs.h. */
7878_ACEOF
7879cat confdefs.h >>conftest.$ac_ext
7880cat >>conftest.$ac_ext <<_ACEOF
7881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007882$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007883int
7884main ()
7885{
7886static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7887test_array [0] = 0
7888
7889 ;
7890 return 0;
7891}
7892_ACEOF
7893rm -f conftest.$ac_objext
7894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7895 (eval $ac_compile) 2>&5
7896 ac_status=$?
7897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898 (exit $ac_status); } &&
7899 { ac_try='test -s conftest.$ac_objext'
7900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7901 (eval $ac_try) 2>&5
7902 ac_status=$?
7903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904 (exit $ac_status); }; }; then
7905 ac_lo=0 ac_mid=0
7906 while :; do
7907 cat >conftest.$ac_ext <<_ACEOF
7908#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007909/* confdefs.h. */
7910_ACEOF
7911cat confdefs.h >>conftest.$ac_ext
7912cat >>conftest.$ac_ext <<_ACEOF
7913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007914$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007915int
7916main ()
7917{
7918static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7919test_array [0] = 0
7920
7921 ;
7922 return 0;
7923}
7924_ACEOF
7925rm -f conftest.$ac_objext
7926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7927 (eval $ac_compile) 2>&5
7928 ac_status=$?
7929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7930 (exit $ac_status); } &&
7931 { ac_try='test -s conftest.$ac_objext'
7932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7933 (eval $ac_try) 2>&5
7934 ac_status=$?
7935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7936 (exit $ac_status); }; }; then
7937 ac_hi=$ac_mid; break
7938else
7939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007940sed 's/^/| /' conftest.$ac_ext >&5
7941
Martin v. Löwis11437992002-04-12 09:54:03 +00007942ac_lo=`expr $ac_mid + 1`
7943 if test $ac_lo -le $ac_mid; then
7944 ac_lo= ac_hi=
7945 break
7946 fi
7947 ac_mid=`expr 2 '*' $ac_mid + 1`
7948fi
7949rm -f conftest.$ac_objext conftest.$ac_ext
7950 done
7951else
7952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007953sed 's/^/| /' conftest.$ac_ext >&5
7954
Martin v. Löwis11437992002-04-12 09:54:03 +00007955cat >conftest.$ac_ext <<_ACEOF
7956#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007957/* confdefs.h. */
7958_ACEOF
7959cat confdefs.h >>conftest.$ac_ext
7960cat >>conftest.$ac_ext <<_ACEOF
7961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007963int
7964main ()
7965{
7966static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7967test_array [0] = 0
7968
7969 ;
7970 return 0;
7971}
7972_ACEOF
7973rm -f conftest.$ac_objext
7974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7975 (eval $ac_compile) 2>&5
7976 ac_status=$?
7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978 (exit $ac_status); } &&
7979 { ac_try='test -s conftest.$ac_objext'
7980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7981 (eval $ac_try) 2>&5
7982 ac_status=$?
7983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7984 (exit $ac_status); }; }; then
7985 ac_hi=-1 ac_mid=-1
7986 while :; do
7987 cat >conftest.$ac_ext <<_ACEOF
7988#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007989/* confdefs.h. */
7990_ACEOF
7991cat confdefs.h >>conftest.$ac_ext
7992cat >>conftest.$ac_ext <<_ACEOF
7993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007994$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007995int
7996main ()
7997{
7998static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7999test_array [0] = 0
8000
8001 ;
8002 return 0;
8003}
8004_ACEOF
8005rm -f conftest.$ac_objext
8006if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8007 (eval $ac_compile) 2>&5
8008 ac_status=$?
8009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8010 (exit $ac_status); } &&
8011 { ac_try='test -s conftest.$ac_objext'
8012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8013 (eval $ac_try) 2>&5
8014 ac_status=$?
8015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8016 (exit $ac_status); }; }; then
8017 ac_lo=$ac_mid; break
8018else
8019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008020sed 's/^/| /' conftest.$ac_ext >&5
8021
Martin v. Löwis11437992002-04-12 09:54:03 +00008022ac_hi=`expr '(' $ac_mid ')' - 1`
8023 if test $ac_mid -le $ac_hi; then
8024 ac_lo= ac_hi=
8025 break
8026 fi
8027 ac_mid=`expr 2 '*' $ac_mid`
8028fi
8029rm -f conftest.$ac_objext conftest.$ac_ext
8030 done
8031else
8032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008033sed 's/^/| /' conftest.$ac_ext >&5
8034
Martin v. Löwis11437992002-04-12 09:54:03 +00008035ac_lo= ac_hi=
8036fi
8037rm -f conftest.$ac_objext conftest.$ac_ext
8038fi
8039rm -f conftest.$ac_objext conftest.$ac_ext
8040# Binary search between lo and hi bounds.
8041while test "x$ac_lo" != "x$ac_hi"; do
8042 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8043 cat >conftest.$ac_ext <<_ACEOF
8044#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008045/* confdefs.h. */
8046_ACEOF
8047cat confdefs.h >>conftest.$ac_ext
8048cat >>conftest.$ac_ext <<_ACEOF
8049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008050$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008051int
8052main ()
8053{
8054static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8055test_array [0] = 0
8056
8057 ;
8058 return 0;
8059}
8060_ACEOF
8061rm -f conftest.$ac_objext
8062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8063 (eval $ac_compile) 2>&5
8064 ac_status=$?
8065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8066 (exit $ac_status); } &&
8067 { ac_try='test -s conftest.$ac_objext'
8068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8069 (eval $ac_try) 2>&5
8070 ac_status=$?
8071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8072 (exit $ac_status); }; }; then
8073 ac_hi=$ac_mid
8074else
8075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008076sed 's/^/| /' conftest.$ac_ext >&5
8077
Martin v. Löwis11437992002-04-12 09:54:03 +00008078ac_lo=`expr '(' $ac_mid ')' + 1`
8079fi
8080rm -f conftest.$ac_objext conftest.$ac_ext
8081done
8082case $ac_lo in
8083?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008084'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8085See \`config.log' for more details." >&5
8086echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8087See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 { (exit 1); exit 1; }; } ;;
8089esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008090else
8091 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008092 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8093See \`config.log' for more details." >&5
8094echo "$as_me: error: cannot run test program while cross compiling
8095See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008096 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008097else
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 cat >conftest.$ac_ext <<_ACEOF
8099#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008100/* confdefs.h. */
8101_ACEOF
8102cat confdefs.h >>conftest.$ac_ext
8103cat >>conftest.$ac_ext <<_ACEOF
8104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008105$ac_includes_default
8106long longval () { return (long) (sizeof (fpos_t)); }
8107unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008108#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008109#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008110int
8111main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008112{
Martin v. Löwis11437992002-04-12 09:54:03 +00008113
8114 FILE *f = fopen ("conftest.val", "w");
8115 if (! f)
8116 exit (1);
8117 if (((long) (sizeof (fpos_t))) < 0)
8118 {
8119 long i = longval ();
8120 if (i != ((long) (sizeof (fpos_t))))
8121 exit (1);
8122 fprintf (f, "%ld\n", i);
8123 }
8124 else
8125 {
8126 unsigned long i = ulongval ();
8127 if (i != ((long) (sizeof (fpos_t))))
8128 exit (1);
8129 fprintf (f, "%lu\n", i);
8130 }
8131 exit (ferror (f) || fclose (f) != 0);
8132
8133 ;
8134 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008135}
Martin v. Löwis11437992002-04-12 09:54:03 +00008136_ACEOF
8137rm -f conftest$ac_exeext
8138if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8139 (eval $ac_link) 2>&5
8140 ac_status=$?
8141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8144 (eval $ac_try) 2>&5
8145 ac_status=$?
8146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8147 (exit $ac_status); }; }; then
8148 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008149else
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 echo "$as_me: program exited with status $ac_status" >&5
8151echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008152sed 's/^/| /' conftest.$ac_ext >&5
8153
Martin v. Löwis11437992002-04-12 09:54:03 +00008154( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008155{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8156See \`config.log' for more details." >&5
8157echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8158See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 { (exit 1); exit 1; }; }
8160fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008161rm -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 +00008162fi
8163fi
8164rm -f conftest.val
8165else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008166 ac_cv_sizeof_fpos_t=0
8167fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008169echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8170echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8171cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008172#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008173_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008174
Michael W. Hudson54241132001-12-07 15:38:26 +00008175
8176
Martin v. Löwis11437992002-04-12 09:54:03 +00008177echo "$as_me:$LINENO: checking for long long support" >&5
8178echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008179have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008180cat >conftest.$ac_ext <<_ACEOF
8181#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008182/* confdefs.h. */
8183_ACEOF
8184cat confdefs.h >>conftest.$ac_ext
8185cat >>conftest.$ac_ext <<_ACEOF
8186/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008187
Martin v. Löwis11437992002-04-12 09:54:03 +00008188int
8189main ()
8190{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008191long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008192 ;
8193 return 0;
8194}
8195_ACEOF
8196rm -f conftest.$ac_objext
8197if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8198 (eval $ac_compile) 2>&5
8199 ac_status=$?
8200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8201 (exit $ac_status); } &&
8202 { ac_try='test -s conftest.$ac_objext'
8203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8204 (eval $ac_try) 2>&5
8205 ac_status=$?
8206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8207 (exit $ac_status); }; }; then
8208
8209
8210cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008211#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008212_ACEOF
8213
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008214 have_long_long=yes
8215
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008216else
Martin v. Löwis11437992002-04-12 09:54:03 +00008217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008218sed 's/^/| /' conftest.$ac_ext >&5
8219
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008220fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008221rm -f conftest.$ac_objext conftest.$ac_ext
8222echo "$as_me:$LINENO: result: $have_long_long" >&5
8223echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008224if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008225echo "$as_me:$LINENO: checking for long long" >&5
8226echo $ECHO_N "checking for long long... $ECHO_C" >&6
8227if test "${ac_cv_type_long_long+set}" = set; then
8228 echo $ECHO_N "(cached) $ECHO_C" >&6
8229else
8230 cat >conftest.$ac_ext <<_ACEOF
8231#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008232/* confdefs.h. */
8233_ACEOF
8234cat confdefs.h >>conftest.$ac_ext
8235cat >>conftest.$ac_ext <<_ACEOF
8236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008237$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008238int
8239main ()
8240{
8241if ((long long *) 0)
8242 return 0;
8243if (sizeof (long long))
8244 return 0;
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_cv_type_long_long=yes
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_cv_type_long_long=no
8267fi
8268rm -f conftest.$ac_objext conftest.$ac_ext
8269fi
8270echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8271echo "${ECHO_T}$ac_cv_type_long_long" >&6
8272
8273echo "$as_me:$LINENO: checking size of long long" >&5
8274echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8275if test "${ac_cv_sizeof_long_long+set}" = set; then
8276 echo $ECHO_N "(cached) $ECHO_C" >&6
8277else
8278 if test "$ac_cv_type_long_long" = yes; then
8279 # The cast to unsigned long works around a bug in the HP C Compiler
8280 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8281 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8282 # This bug is HP SR number 8606223364.
8283 if test "$cross_compiling" = yes; then
8284 # Depending upon the size, compute the lo and hi bounds.
8285cat >conftest.$ac_ext <<_ACEOF
8286#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008287/* confdefs.h. */
8288_ACEOF
8289cat confdefs.h >>conftest.$ac_ext
8290cat >>conftest.$ac_ext <<_ACEOF
8291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008292$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008293int
8294main ()
8295{
8296static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8297test_array [0] = 0
8298
8299 ;
8300 return 0;
8301}
8302_ACEOF
8303rm -f conftest.$ac_objext
8304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8305 (eval $ac_compile) 2>&5
8306 ac_status=$?
8307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8308 (exit $ac_status); } &&
8309 { ac_try='test -s conftest.$ac_objext'
8310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8311 (eval $ac_try) 2>&5
8312 ac_status=$?
8313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8314 (exit $ac_status); }; }; then
8315 ac_lo=0 ac_mid=0
8316 while :; do
8317 cat >conftest.$ac_ext <<_ACEOF
8318#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008319/* confdefs.h. */
8320_ACEOF
8321cat confdefs.h >>conftest.$ac_ext
8322cat >>conftest.$ac_ext <<_ACEOF
8323/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008324$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008325int
8326main ()
8327{
8328static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8329test_array [0] = 0
8330
8331 ;
8332 return 0;
8333}
8334_ACEOF
8335rm -f conftest.$ac_objext
8336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8337 (eval $ac_compile) 2>&5
8338 ac_status=$?
8339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8340 (exit $ac_status); } &&
8341 { ac_try='test -s conftest.$ac_objext'
8342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8343 (eval $ac_try) 2>&5
8344 ac_status=$?
8345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8346 (exit $ac_status); }; }; then
8347 ac_hi=$ac_mid; break
8348else
8349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008350sed 's/^/| /' conftest.$ac_ext >&5
8351
Martin v. Löwis11437992002-04-12 09:54:03 +00008352ac_lo=`expr $ac_mid + 1`
8353 if test $ac_lo -le $ac_mid; then
8354 ac_lo= ac_hi=
8355 break
8356 fi
8357 ac_mid=`expr 2 '*' $ac_mid + 1`
8358fi
8359rm -f conftest.$ac_objext conftest.$ac_ext
8360 done
8361else
8362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008363sed 's/^/| /' conftest.$ac_ext >&5
8364
Martin v. Löwis11437992002-04-12 09:54:03 +00008365cat >conftest.$ac_ext <<_ACEOF
8366#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008367/* confdefs.h. */
8368_ACEOF
8369cat confdefs.h >>conftest.$ac_ext
8370cat >>conftest.$ac_ext <<_ACEOF
8371/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008372$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008373int
8374main ()
8375{
8376static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8377test_array [0] = 0
8378
8379 ;
8380 return 0;
8381}
8382_ACEOF
8383rm -f conftest.$ac_objext
8384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8385 (eval $ac_compile) 2>&5
8386 ac_status=$?
8387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388 (exit $ac_status); } &&
8389 { ac_try='test -s conftest.$ac_objext'
8390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8391 (eval $ac_try) 2>&5
8392 ac_status=$?
8393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8394 (exit $ac_status); }; }; then
8395 ac_hi=-1 ac_mid=-1
8396 while :; do
8397 cat >conftest.$ac_ext <<_ACEOF
8398#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008399/* confdefs.h. */
8400_ACEOF
8401cat confdefs.h >>conftest.$ac_ext
8402cat >>conftest.$ac_ext <<_ACEOF
8403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008404$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008405int
8406main ()
8407{
8408static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8409test_array [0] = 0
8410
8411 ;
8412 return 0;
8413}
8414_ACEOF
8415rm -f conftest.$ac_objext
8416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8417 (eval $ac_compile) 2>&5
8418 ac_status=$?
8419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420 (exit $ac_status); } &&
8421 { ac_try='test -s conftest.$ac_objext'
8422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8423 (eval $ac_try) 2>&5
8424 ac_status=$?
8425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8426 (exit $ac_status); }; }; then
8427 ac_lo=$ac_mid; break
8428else
8429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008430sed 's/^/| /' conftest.$ac_ext >&5
8431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432ac_hi=`expr '(' $ac_mid ')' - 1`
8433 if test $ac_mid -le $ac_hi; then
8434 ac_lo= ac_hi=
8435 break
8436 fi
8437 ac_mid=`expr 2 '*' $ac_mid`
8438fi
8439rm -f conftest.$ac_objext conftest.$ac_ext
8440 done
8441else
8442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008443sed 's/^/| /' conftest.$ac_ext >&5
8444
Martin v. Löwis11437992002-04-12 09:54:03 +00008445ac_lo= ac_hi=
8446fi
8447rm -f conftest.$ac_objext conftest.$ac_ext
8448fi
8449rm -f conftest.$ac_objext conftest.$ac_ext
8450# Binary search between lo and hi bounds.
8451while test "x$ac_lo" != "x$ac_hi"; do
8452 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8453 cat >conftest.$ac_ext <<_ACEOF
8454#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008455/* confdefs.h. */
8456_ACEOF
8457cat confdefs.h >>conftest.$ac_ext
8458cat >>conftest.$ac_ext <<_ACEOF
8459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008460$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008461int
8462main ()
8463{
8464static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8465test_array [0] = 0
8466
8467 ;
8468 return 0;
8469}
8470_ACEOF
8471rm -f conftest.$ac_objext
8472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8473 (eval $ac_compile) 2>&5
8474 ac_status=$?
8475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8476 (exit $ac_status); } &&
8477 { ac_try='test -s conftest.$ac_objext'
8478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8479 (eval $ac_try) 2>&5
8480 ac_status=$?
8481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8482 (exit $ac_status); }; }; then
8483 ac_hi=$ac_mid
8484else
8485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008486sed 's/^/| /' conftest.$ac_ext >&5
8487
Martin v. Löwis11437992002-04-12 09:54:03 +00008488ac_lo=`expr '(' $ac_mid ')' + 1`
8489fi
8490rm -f conftest.$ac_objext conftest.$ac_ext
8491done
8492case $ac_lo in
8493?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008494'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8495See \`config.log' for more details." >&5
8496echo "$as_me: error: cannot compute sizeof (long long), 77
8497See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 { (exit 1); exit 1; }; } ;;
8499esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008500else
8501 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008502 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8503See \`config.log' for more details." >&5
8504echo "$as_me: error: cannot run test program while cross compiling
8505See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008506 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008507else
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 cat >conftest.$ac_ext <<_ACEOF
8509#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008510/* confdefs.h. */
8511_ACEOF
8512cat confdefs.h >>conftest.$ac_ext
8513cat >>conftest.$ac_ext <<_ACEOF
8514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008515$ac_includes_default
8516long longval () { return (long) (sizeof (long long)); }
8517unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008518#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008519#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008520int
8521main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008522{
Martin v. Löwis11437992002-04-12 09:54:03 +00008523
8524 FILE *f = fopen ("conftest.val", "w");
8525 if (! f)
8526 exit (1);
8527 if (((long) (sizeof (long long))) < 0)
8528 {
8529 long i = longval ();
8530 if (i != ((long) (sizeof (long long))))
8531 exit (1);
8532 fprintf (f, "%ld\n", i);
8533 }
8534 else
8535 {
8536 unsigned long i = ulongval ();
8537 if (i != ((long) (sizeof (long long))))
8538 exit (1);
8539 fprintf (f, "%lu\n", i);
8540 }
8541 exit (ferror (f) || fclose (f) != 0);
8542
8543 ;
8544 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008545}
Martin v. Löwis11437992002-04-12 09:54:03 +00008546_ACEOF
8547rm -f conftest$ac_exeext
8548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8549 (eval $ac_link) 2>&5
8550 ac_status=$?
8551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8552 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8554 (eval $ac_try) 2>&5
8555 ac_status=$?
8556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8557 (exit $ac_status); }; }; then
8558 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008559else
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 echo "$as_me: program exited with status $ac_status" >&5
8561echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008562sed 's/^/| /' conftest.$ac_ext >&5
8563
Martin v. Löwis11437992002-04-12 09:54:03 +00008564( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008565{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8566See \`config.log' for more details." >&5
8567echo "$as_me: error: cannot compute sizeof (long long), 77
8568See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008569 { (exit 1); exit 1; }; }
8570fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008571rm -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 +00008572fi
8573fi
8574rm -f conftest.val
8575else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008576 ac_cv_sizeof_long_long=0
8577fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008578fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008579echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8580echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8581cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008582#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008583_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008584
Michael W. Hudson54241132001-12-07 15:38:26 +00008585
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008586fi
8587
Martin v. Löwis11437992002-04-12 09:54:03 +00008588echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8589echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008590have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008591cat >conftest.$ac_ext <<_ACEOF
8592#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008593/* confdefs.h. */
8594_ACEOF
8595cat confdefs.h >>conftest.$ac_ext
8596cat >>conftest.$ac_ext <<_ACEOF
8597/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599int
8600main ()
8601{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008602uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 ;
8604 return 0;
8605}
8606_ACEOF
8607rm -f conftest.$ac_objext
8608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8609 (eval $ac_compile) 2>&5
8610 ac_status=$?
8611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8612 (exit $ac_status); } &&
8613 { ac_try='test -s conftest.$ac_objext'
8614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8615 (eval $ac_try) 2>&5
8616 ac_status=$?
8617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8618 (exit $ac_status); }; }; then
8619
8620
8621cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008622#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008623_ACEOF
8624
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008625 have_uintptr_t=yes
8626
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008627else
Martin v. Löwis11437992002-04-12 09:54:03 +00008628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008629sed 's/^/| /' conftest.$ac_ext >&5
8630
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008631fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008632rm -f conftest.$ac_objext conftest.$ac_ext
8633echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8634echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008635if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008636echo "$as_me:$LINENO: checking for uintptr_t" >&5
8637echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8638if test "${ac_cv_type_uintptr_t+set}" = set; then
8639 echo $ECHO_N "(cached) $ECHO_C" >&6
8640else
8641 cat >conftest.$ac_ext <<_ACEOF
8642#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008643/* confdefs.h. */
8644_ACEOF
8645cat confdefs.h >>conftest.$ac_ext
8646cat >>conftest.$ac_ext <<_ACEOF
8647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008648$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008649int
8650main ()
8651{
8652if ((uintptr_t *) 0)
8653 return 0;
8654if (sizeof (uintptr_t))
8655 return 0;
8656 ;
8657 return 0;
8658}
8659_ACEOF
8660rm -f conftest.$ac_objext
8661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8662 (eval $ac_compile) 2>&5
8663 ac_status=$?
8664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8665 (exit $ac_status); } &&
8666 { ac_try='test -s conftest.$ac_objext'
8667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8668 (eval $ac_try) 2>&5
8669 ac_status=$?
8670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8671 (exit $ac_status); }; }; then
8672 ac_cv_type_uintptr_t=yes
8673else
8674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008675sed 's/^/| /' conftest.$ac_ext >&5
8676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677ac_cv_type_uintptr_t=no
8678fi
8679rm -f conftest.$ac_objext conftest.$ac_ext
8680fi
8681echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8682echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8683
8684echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8685echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8686if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8687 echo $ECHO_N "(cached) $ECHO_C" >&6
8688else
8689 if test "$ac_cv_type_uintptr_t" = yes; then
8690 # The cast to unsigned long works around a bug in the HP C Compiler
8691 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8692 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8693 # This bug is HP SR number 8606223364.
8694 if test "$cross_compiling" = yes; then
8695 # Depending upon the size, compute the lo and hi bounds.
8696cat >conftest.$ac_ext <<_ACEOF
8697#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008698/* confdefs.h. */
8699_ACEOF
8700cat confdefs.h >>conftest.$ac_ext
8701cat >>conftest.$ac_ext <<_ACEOF
8702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008703$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008704int
8705main ()
8706{
8707static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8708test_array [0] = 0
8709
8710 ;
8711 return 0;
8712}
8713_ACEOF
8714rm -f conftest.$ac_objext
8715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8716 (eval $ac_compile) 2>&5
8717 ac_status=$?
8718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8719 (exit $ac_status); } &&
8720 { ac_try='test -s conftest.$ac_objext'
8721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8722 (eval $ac_try) 2>&5
8723 ac_status=$?
8724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8725 (exit $ac_status); }; }; then
8726 ac_lo=0 ac_mid=0
8727 while :; do
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 (uintptr_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; break
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`
8764 if test $ac_lo -le $ac_mid; then
8765 ac_lo= ac_hi=
8766 break
8767 fi
8768 ac_mid=`expr 2 '*' $ac_mid + 1`
8769fi
8770rm -f conftest.$ac_objext conftest.$ac_ext
8771 done
8772else
8773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008774sed 's/^/| /' conftest.$ac_ext >&5
8775
Martin v. Löwis11437992002-04-12 09:54:03 +00008776cat >conftest.$ac_ext <<_ACEOF
8777#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008778/* confdefs.h. */
8779_ACEOF
8780cat confdefs.h >>conftest.$ac_ext
8781cat >>conftest.$ac_ext <<_ACEOF
8782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008783$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008784int
8785main ()
8786{
8787static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8788test_array [0] = 0
8789
8790 ;
8791 return 0;
8792}
8793_ACEOF
8794rm -f conftest.$ac_objext
8795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8796 (eval $ac_compile) 2>&5
8797 ac_status=$?
8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799 (exit $ac_status); } &&
8800 { ac_try='test -s conftest.$ac_objext'
8801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8802 (eval $ac_try) 2>&5
8803 ac_status=$?
8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805 (exit $ac_status); }; }; then
8806 ac_hi=-1 ac_mid=-1
8807 while :; do
8808 cat >conftest.$ac_ext <<_ACEOF
8809#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008810/* confdefs.h. */
8811_ACEOF
8812cat confdefs.h >>conftest.$ac_ext
8813cat >>conftest.$ac_ext <<_ACEOF
8814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008815$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008816int
8817main ()
8818{
8819static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8820test_array [0] = 0
8821
8822 ;
8823 return 0;
8824}
8825_ACEOF
8826rm -f conftest.$ac_objext
8827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8828 (eval $ac_compile) 2>&5
8829 ac_status=$?
8830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8831 (exit $ac_status); } &&
8832 { ac_try='test -s conftest.$ac_objext'
8833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8834 (eval $ac_try) 2>&5
8835 ac_status=$?
8836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8837 (exit $ac_status); }; }; then
8838 ac_lo=$ac_mid; break
8839else
8840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008841sed 's/^/| /' conftest.$ac_ext >&5
8842
Martin v. Löwis11437992002-04-12 09:54:03 +00008843ac_hi=`expr '(' $ac_mid ')' - 1`
8844 if test $ac_mid -le $ac_hi; then
8845 ac_lo= ac_hi=
8846 break
8847 fi
8848 ac_mid=`expr 2 '*' $ac_mid`
8849fi
8850rm -f conftest.$ac_objext conftest.$ac_ext
8851 done
8852else
8853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008854sed 's/^/| /' conftest.$ac_ext >&5
8855
Martin v. Löwis11437992002-04-12 09:54:03 +00008856ac_lo= ac_hi=
8857fi
8858rm -f conftest.$ac_objext conftest.$ac_ext
8859fi
8860rm -f conftest.$ac_objext conftest.$ac_ext
8861# Binary search between lo and hi bounds.
8862while test "x$ac_lo" != "x$ac_hi"; do
8863 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8864 cat >conftest.$ac_ext <<_ACEOF
8865#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008866/* confdefs.h. */
8867_ACEOF
8868cat confdefs.h >>conftest.$ac_ext
8869cat >>conftest.$ac_ext <<_ACEOF
8870/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008871$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008872int
8873main ()
8874{
8875static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8876test_array [0] = 0
8877
8878 ;
8879 return 0;
8880}
8881_ACEOF
8882rm -f conftest.$ac_objext
8883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8884 (eval $ac_compile) 2>&5
8885 ac_status=$?
8886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8887 (exit $ac_status); } &&
8888 { ac_try='test -s conftest.$ac_objext'
8889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8890 (eval $ac_try) 2>&5
8891 ac_status=$?
8892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8893 (exit $ac_status); }; }; then
8894 ac_hi=$ac_mid
8895else
8896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008897sed 's/^/| /' conftest.$ac_ext >&5
8898
Martin v. Löwis11437992002-04-12 09:54:03 +00008899ac_lo=`expr '(' $ac_mid ')' + 1`
8900fi
8901rm -f conftest.$ac_objext conftest.$ac_ext
8902done
8903case $ac_lo in
8904?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008905'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8906See \`config.log' for more details." >&5
8907echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8908See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 { (exit 1); exit 1; }; } ;;
8910esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008911else
8912 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008913 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8914See \`config.log' for more details." >&5
8915echo "$as_me: error: cannot run test program while cross compiling
8916See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008918else
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 cat >conftest.$ac_ext <<_ACEOF
8920#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008921/* confdefs.h. */
8922_ACEOF
8923cat confdefs.h >>conftest.$ac_ext
8924cat >>conftest.$ac_ext <<_ACEOF
8925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008926$ac_includes_default
8927long longval () { return (long) (sizeof (uintptr_t)); }
8928unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008929#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008930#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008931int
8932main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008933{
Martin v. Löwis11437992002-04-12 09:54:03 +00008934
8935 FILE *f = fopen ("conftest.val", "w");
8936 if (! f)
8937 exit (1);
8938 if (((long) (sizeof (uintptr_t))) < 0)
8939 {
8940 long i = longval ();
8941 if (i != ((long) (sizeof (uintptr_t))))
8942 exit (1);
8943 fprintf (f, "%ld\n", i);
8944 }
8945 else
8946 {
8947 unsigned long i = ulongval ();
8948 if (i != ((long) (sizeof (uintptr_t))))
8949 exit (1);
8950 fprintf (f, "%lu\n", i);
8951 }
8952 exit (ferror (f) || fclose (f) != 0);
8953
8954 ;
8955 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008956}
Martin v. Löwis11437992002-04-12 09:54:03 +00008957_ACEOF
8958rm -f conftest$ac_exeext
8959if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8960 (eval $ac_link) 2>&5
8961 ac_status=$?
8962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8963 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8965 (eval $ac_try) 2>&5
8966 ac_status=$?
8967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968 (exit $ac_status); }; }; then
8969 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008970else
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 echo "$as_me: program exited with status $ac_status" >&5
8972echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008973sed 's/^/| /' conftest.$ac_ext >&5
8974
Martin v. Löwis11437992002-04-12 09:54:03 +00008975( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008976{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8977See \`config.log' for more details." >&5
8978echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8979See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 { (exit 1); exit 1; }; }
8981fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008982rm -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 +00008983fi
8984fi
8985rm -f conftest.val
8986else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008987 ac_cv_sizeof_uintptr_t=0
8988fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008989fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008990echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8991echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8992cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008993#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008994_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008995
Michael W. Hudson54241132001-12-07 15:38:26 +00008996
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008997fi
8998
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008999# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009000echo "$as_me:$LINENO: checking size of off_t" >&5
9001echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9002if test "${ac_cv_sizeof_off_t+set}" = set; then
9003 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009004else
9005 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009006 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009007else
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 cat >conftest.$ac_ext <<_ACEOF
9009#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009010/* confdefs.h. */
9011_ACEOF
9012cat confdefs.h >>conftest.$ac_ext
9013cat >>conftest.$ac_ext <<_ACEOF
9014/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009015#include <stdio.h>
9016#include <sys/types.h>
9017main()
9018{
9019 FILE *f=fopen("conftestval", "w");
9020 if (!f) exit(1);
9021 fprintf(f, "%d\n", sizeof(off_t));
9022 exit(0);
9023}
Martin v. Löwis11437992002-04-12 09:54:03 +00009024_ACEOF
9025rm -f conftest$ac_exeext
9026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9027 (eval $ac_link) 2>&5
9028 ac_status=$?
9029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9032 (eval $ac_try) 2>&5
9033 ac_status=$?
9034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9035 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009036 ac_cv_sizeof_off_t=`cat conftestval`
9037else
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 echo "$as_me: program exited with status $ac_status" >&5
9039echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009040sed 's/^/| /' conftest.$ac_ext >&5
9041
Martin v. Löwis11437992002-04-12 09:54:03 +00009042( exit $ac_status )
9043ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009044fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009045rm -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 +00009046fi
9047
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009048fi
9049
Martin v. Löwis11437992002-04-12 09:54:03 +00009050echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9051echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9052
9053cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009054#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009055_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009056
Michael W. Hudson54241132001-12-07 15:38:26 +00009057
Martin v. Löwis11437992002-04-12 09:54:03 +00009058echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9059echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009060if test "$have_long_long" = yes -a \
9061 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9062 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009063
Martin v. Löwis11437992002-04-12 09:54:03 +00009064cat >>confdefs.h <<\_ACEOF
9065#define HAVE_LARGEFILE_SUPPORT 1
9066_ACEOF
9067
9068 echo "$as_me:$LINENO: result: yes" >&5
9069echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009070else
Martin v. Löwis11437992002-04-12 09:54:03 +00009071 echo "$as_me:$LINENO: result: no" >&5
9072echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009073fi
9074
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009075# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009076echo "$as_me:$LINENO: checking size of time_t" >&5
9077echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9078if test "${ac_cv_sizeof_time_t+set}" = set; then
9079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009080else
9081 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009082 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009083else
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 cat >conftest.$ac_ext <<_ACEOF
9085#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009086/* confdefs.h. */
9087_ACEOF
9088cat confdefs.h >>conftest.$ac_ext
9089cat >>conftest.$ac_ext <<_ACEOF
9090/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009091#include <stdio.h>
9092#include <time.h>
9093main()
9094{
9095 FILE *f=fopen("conftestval", "w");
9096 if (!f) exit(1);
9097 fprintf(f, "%d\n", sizeof(time_t));
9098 exit(0);
9099}
Martin v. Löwis11437992002-04-12 09:54:03 +00009100_ACEOF
9101rm -f conftest$ac_exeext
9102if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9103 (eval $ac_link) 2>&5
9104 ac_status=$?
9105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9106 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009112 ac_cv_sizeof_time_t=`cat conftestval`
9113else
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 echo "$as_me: program exited with status $ac_status" >&5
9115echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009116sed 's/^/| /' conftest.$ac_ext >&5
9117
Martin v. Löwis11437992002-04-12 09:54:03 +00009118( exit $ac_status )
9119ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009120fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009121rm -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 +00009122fi
9123
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009124fi
9125
Martin v. Löwis11437992002-04-12 09:54:03 +00009126echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9127echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9128
9129cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009130#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009131_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009132
Michael W. Hudson54241132001-12-07 15:38:26 +00009133
9134
Trent Mick635f6fb2000-08-23 21:33:05 +00009135# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009136ac_save_cc="$CC"
9137if test "$ac_cv_kpthread" = "yes"
9138then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009139elif test "$ac_cv_kthread" = "yes"
9140then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009141elif test "$ac_cv_pthread" = "yes"
9142then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009143fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009144echo "$as_me:$LINENO: checking for pthread_t" >&5
9145echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009146have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009147cat >conftest.$ac_ext <<_ACEOF
9148#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009149/* confdefs.h. */
9150_ACEOF
9151cat confdefs.h >>conftest.$ac_ext
9152cat >>conftest.$ac_ext <<_ACEOF
9153/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009154#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009155int
9156main ()
9157{
Guido van Rossum12580492000-09-24 16:47:19 +00009158pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009159 ;
9160 return 0;
9161}
9162_ACEOF
9163rm -f conftest.$ac_objext
9164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9165 (eval $ac_compile) 2>&5
9166 ac_status=$?
9167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9168 (exit $ac_status); } &&
9169 { ac_try='test -s conftest.$ac_objext'
9170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9171 (eval $ac_try) 2>&5
9172 ac_status=$?
9173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9174 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009175 have_pthread_t=yes
9176else
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009178sed 's/^/| /' conftest.$ac_ext >&5
9179
Trent Mick635f6fb2000-08-23 21:33:05 +00009180fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009181rm -f conftest.$ac_objext conftest.$ac_ext
9182echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9183echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009184if test "$have_pthread_t" = yes ; then
9185 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009186 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9187echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9188 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9189 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009190else
9191 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009192 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009193else
Martin v. Löwis11437992002-04-12 09:54:03 +00009194 cat >conftest.$ac_ext <<_ACEOF
9195#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009196/* confdefs.h. */
9197_ACEOF
9198cat confdefs.h >>conftest.$ac_ext
9199cat >>conftest.$ac_ext <<_ACEOF
9200/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009201#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009202#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009203 main()
9204 {
9205 FILE *f=fopen("conftestval", "w");
9206 if (!f) exit(1);
9207 fprintf(f, "%d\n", sizeof(pthread_t));
9208 exit(0);
9209 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009210_ACEOF
9211rm -f conftest$ac_exeext
9212if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9213 (eval $ac_link) 2>&5
9214 ac_status=$?
9215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9216 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9218 (eval $ac_try) 2>&5
9219 ac_status=$?
9220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9221 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009222 ac_cv_sizeof_pthread_t=`cat conftestval`
9223else
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 echo "$as_me: program exited with status $ac_status" >&5
9225echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009226sed 's/^/| /' conftest.$ac_ext >&5
9227
Martin v. Löwis11437992002-04-12 09:54:03 +00009228( exit $ac_status )
9229ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009230fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009231rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009232fi
9233
Trent Mick635f6fb2000-08-23 21:33:05 +00009234fi
9235
Martin v. Löwis11437992002-04-12 09:54:03 +00009236 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9237echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9238
9239cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009240#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009241_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009242
9243fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009244CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009245
Martin v. Löwis11437992002-04-12 09:54:03 +00009246echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9247echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009248# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9249if test "${enable_toolbox_glue+set}" = set; then
9250 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009251
Martin v. Löwis11437992002-04-12 09:54:03 +00009252fi;
Jack Jansene578a632001-08-15 01:27:14 +00009253
9254if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009255then
Jack Jansene578a632001-08-15 01:27:14 +00009256 case $ac_sys_system/$ac_sys_release in
9257 Darwin/*)
9258 enable_toolbox_glue="yes";;
9259 *)
9260 enable_toolbox_glue="no";;
9261 esac
9262fi
9263case "$enable_toolbox_glue" in
9264yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009265 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009266 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009267 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009268
9269cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009270#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009271_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009272
9273 ;;
9274*)
9275 extra_frameworks=""
9276 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009277 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009278 ;;
9279esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009280echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9281echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009282
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009283
9284case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009285 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009286 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009287 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009288 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009289 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009290 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009291 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009292 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009293 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009294 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009295esac
9296
Martin v. Löwis11437992002-04-12 09:54:03 +00009297echo "$as_me:$LINENO: checking for --enable-framework" >&5
9298echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009299if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009300then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009301 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009302 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009303 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009304
Martin v. Löwis11437992002-04-12 09:54:03 +00009305cat >>confdefs.h <<\_ACEOF
9306#define WITH_NEXT_FRAMEWORK 1
9307_ACEOF
9308
9309 echo "$as_me:$LINENO: result: yes" >&5
9310echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009311else
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 echo "$as_me:$LINENO: result: no" >&5
9313echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009314fi
9315
Martin v. Löwis11437992002-04-12 09:54:03 +00009316echo "$as_me:$LINENO: checking for dyld" >&5
9317echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009318case $ac_sys_system/$ac_sys_release in
9319 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009320
Martin v. Löwis11437992002-04-12 09:54:03 +00009321cat >>confdefs.h <<\_ACEOF
9322#define WITH_DYLD 1
9323_ACEOF
9324
9325 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9326echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009327 ;;
9328 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 echo "$as_me:$LINENO: result: no" >&5
9330echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009331 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009332esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009333
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009335
Michael W. Hudson54241132001-12-07 15:38:26 +00009336
9337
9338
9339
Guido van Rossum0a516c91994-09-12 10:58:40 +00009340# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009341# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009342echo "$as_me:$LINENO: checking SO" >&5
9343echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009344if test -z "$SO"
9345then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009346 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009347 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009348 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009349 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009350 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009351else
9352 # this might also be a termcap variable, see #610332
9353 echo
9354 echo '====================================================================='
9355 echo '+ +'
9356 echo '+ WARNING: You have set SO in your environment. +'
9357 echo '+ Do you really mean to change the extension for shared libraries? +'
9358 echo '+ Continuing in 10 seconds to let you to ponder. +'
9359 echo '+ +'
9360 echo '====================================================================='
9361 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009363echo "$as_me:$LINENO: result: $SO" >&5
9364echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009365# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009366# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009367# (Shared libraries in this instance are shared modules to be loaded into
9368# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009369echo "$as_me:$LINENO: checking LDSHARED" >&5
9370echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009371if test -z "$LDSHARED"
9372then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009373 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009374 AIX*)
9375 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009376 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009377 ;;
9378 BeOS*)
9379 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009380 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009381 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009382 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009383 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009385 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009386 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009387 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009388 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009389 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009390 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009391 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009392 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9393 if test "$enable_framework" ; then
9394 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009395 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9396 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009397 else
9398 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009399 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009400 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009401 Darwin/*)
9402 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9403 if test "$enable_framework" ; then
9404 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009405 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9406 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009407 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009408 # No framework, use the Python app as bundle-loader
9409 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009410 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009411 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009412 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009413 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009414 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009415 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009416 then
9417 LDSHARED="cc -shared ${LDFLAGS}"
9418 else
9419 LDSHARED="ld -Bshareable ${LDFLAGS}"
9420 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009421 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009422 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009423 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009424 then LDSHARED='$(CC) -shared'
9425 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009426 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009427 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009428 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009429 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009430 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009431 *) LDSHARED="ld";;
9432 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009434echo "$as_me:$LINENO: result: $LDSHARED" >&5
9435echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009436BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009437# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009438# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009439echo "$as_me:$LINENO: checking CCSHARED" >&5
9440echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009441if test -z "$CCSHARED"
9442then
Guido van Rossum07397971997-04-29 21:49:50 +00009443 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009444 SunOS*) if test "$GCC" = yes;
9445 then CCSHARED="-fPIC";
9446 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009447 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009448 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009449 else CCSHARED="+z";
9450 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009451 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009452 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009453 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009454 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009455 if test "$GCC" = "yes"
9456 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009457 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009458 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009459 SCO_SV*)
9460 if test "$GCC" = "yes"
9461 then CCSHARED="-fPIC"
9462 else CCSHARED="-Kpic -belf"
9463 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009464 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009465 IRIX*/6*) case $CC in
9466 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009467 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009468 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009469 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009470 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009471fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009472echo "$as_me:$LINENO: result: $CCSHARED" >&5
9473echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009474# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009475# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009476echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9477echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009478if test -z "$LINKFORSHARED"
9479then
Guido van Rossum07397971997-04-29 21:49:50 +00009480 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009481 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009482 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009483 LINKFORSHARED="-Wl,-E -Wl,+s";;
9484# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009485 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009486 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009487 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009489 # -u __dummy makes the linker aware of the objc runtime
9490 # in System.framework; otherwise, __objcInit (referenced in
9491 # crt1.o) gets erroneously defined as common, which breaks dynamic
9492 # loading of any modules which reference it in System.framework.
9493 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9494 # not used by the core itself but which needs to be in the core so
9495 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009496 # -prebind is no longer used, because it actually seems to give a
9497 # slowdown in stead of a speedup, maybe due to the large number of
9498 # dynamic loads Python does.
9499 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009500 if test "$enable_framework"
9501 then
Jack Jansenc8607b72003-12-08 01:10:12 +00009502 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework Python"
Jack Jansene578a632001-08-15 01:27:14 +00009503 fi
9504 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009505 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009506 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009507 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009509 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9510 then
9511 LINKFORSHARED="-Wl,--export-dynamic"
9512 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009513 SunOS/5*) case $CC in
9514 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009515 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009516 then
9517 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009518 fi;;
9519 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009520 CYGWIN*)
9521 if test $enable_shared = "no"
9522 then
9523 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9524 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009525 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009526fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009527echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9528echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009529
Michael W. Hudson54241132001-12-07 15:38:26 +00009530
Martin v. Löwis11437992002-04-12 09:54:03 +00009531echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9532echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009533if test ! "$LIBRARY" = "$LDLIBRARY"
9534then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009535 case $ac_sys_system in
9536 CYGWIN*)
9537 # Cygwin needs CCSHARED when building extension DLLs
9538 # but not when building the interpreter DLL.
9539 CFLAGSFORSHARED='';;
9540 *)
9541 CFLAGSFORSHARED='$(CCSHARED)'
9542 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009544echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9545echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009546
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009547# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9548# library (with --enable-shared).
9549# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009550# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9551# if it is not required, since it creates a dependency of the shared library
9552# to LIBS. This, in turn, means that applications linking the shared libpython
9553# don't need to link LIBS explicitly. The default should be only changed
9554# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009555
9556echo "$as_me:$LINENO: checking SHLIBS" >&5
9557echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9558case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009559 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009560 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009561esac
9562echo "$as_me:$LINENO: result: $SHLIBS" >&5
9563echo "${ECHO_T}$SHLIBS" >&6
9564
9565
Guido van Rossum627b2d71993-12-24 10:39:16 +00009566# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009567
9568echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9569echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9570if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9571 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009572else
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009574LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009575cat >conftest.$ac_ext <<_ACEOF
9576#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009577/* confdefs.h. */
9578_ACEOF
9579cat confdefs.h >>conftest.$ac_ext
9580cat >>conftest.$ac_ext <<_ACEOF
9581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009582
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009583/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009584#ifdef __cplusplus
9585extern "C"
9586#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009587/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 builtin and then its argument prototype would still apply. */
9589char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009590int
9591main ()
9592{
9593dlopen ();
9594 ;
9595 return 0;
9596}
9597_ACEOF
9598rm -f conftest.$ac_objext conftest$ac_exeext
9599if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9600 (eval $ac_link) 2>&5
9601 ac_status=$?
9602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9603 (exit $ac_status); } &&
9604 { ac_try='test -s conftest$ac_exeext'
9605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9606 (eval $ac_try) 2>&5
9607 ac_status=$?
9608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9609 (exit $ac_status); }; }; then
9610 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009611else
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009613sed 's/^/| /' conftest.$ac_ext >&5
9614
Martin v. Löwis11437992002-04-12 09:54:03 +00009615ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009617rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9618LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009619fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009620echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9621echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9622if test $ac_cv_lib_dl_dlopen = yes; then
9623 cat >>confdefs.h <<_ACEOF
9624#define HAVE_LIBDL 1
9625_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009626
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009627 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009628
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009629fi
9630 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009631
9632echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9633echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9634if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9635 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009636else
Martin v. Löwis11437992002-04-12 09:54:03 +00009637 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009638LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009639cat >conftest.$ac_ext <<_ACEOF
9640#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009641/* confdefs.h. */
9642_ACEOF
9643cat confdefs.h >>conftest.$ac_ext
9644cat >>conftest.$ac_ext <<_ACEOF
9645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009646
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009647/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009648#ifdef __cplusplus
9649extern "C"
9650#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009651/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 builtin and then its argument prototype would still apply. */
9653char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009654int
9655main ()
9656{
9657shl_load ();
9658 ;
9659 return 0;
9660}
9661_ACEOF
9662rm -f conftest.$ac_objext conftest$ac_exeext
9663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9664 (eval $ac_link) 2>&5
9665 ac_status=$?
9666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9667 (exit $ac_status); } &&
9668 { ac_try='test -s conftest$ac_exeext'
9669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9670 (eval $ac_try) 2>&5
9671 ac_status=$?
9672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9673 (exit $ac_status); }; }; then
9674 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009675else
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009677sed 's/^/| /' conftest.$ac_ext >&5
9678
Martin v. Löwis11437992002-04-12 09:54:03 +00009679ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009680fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009681rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9682LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009683fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009684echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9685echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9686if test $ac_cv_lib_dld_shl_load = yes; then
9687 cat >>confdefs.h <<_ACEOF
9688#define HAVE_LIBDLD 1
9689_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009690
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009691 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009692
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009693fi
9694 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009695
9696# only check for sem_ini if thread support is requested
9697if test "$with_threads" = "yes" -o -z "$with_threads"; then
9698 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009699echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9700if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009702else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009703 ac_func_search_save_LIBS=$LIBS
9704ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009705cat >conftest.$ac_ext <<_ACEOF
9706#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009707/* confdefs.h. */
9708_ACEOF
9709cat confdefs.h >>conftest.$ac_ext
9710cat >>conftest.$ac_ext <<_ACEOF
9711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009712
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009713/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009714#ifdef __cplusplus
9715extern "C"
9716#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009717/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 builtin and then its argument prototype would still apply. */
9719char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009720int
9721main ()
9722{
9723sem_init ();
9724 ;
9725 return 0;
9726}
9727_ACEOF
9728rm -f conftest.$ac_objext conftest$ac_exeext
9729if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9730 (eval $ac_link) 2>&5
9731 ac_status=$?
9732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9733 (exit $ac_status); } &&
9734 { ac_try='test -s conftest$ac_exeext'
9735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9736 (eval $ac_try) 2>&5
9737 ac_status=$?
9738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9739 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009740 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009741else
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009743sed 's/^/| /' conftest.$ac_ext >&5
9744
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009745fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009746rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009747if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009748 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009749 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9750 cat >conftest.$ac_ext <<_ACEOF
9751#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009752/* confdefs.h. */
9753_ACEOF
9754cat confdefs.h >>conftest.$ac_ext
9755cat >>conftest.$ac_ext <<_ACEOF
9756/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009757
9758/* Override any gcc2 internal prototype to avoid an error. */
9759#ifdef __cplusplus
9760extern "C"
9761#endif
9762/* We use char because int might match the return type of a gcc2
9763 builtin and then its argument prototype would still apply. */
9764char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009765int
9766main ()
9767{
9768sem_init ();
9769 ;
9770 return 0;
9771}
Martin v. Löwis11437992002-04-12 09:54:03 +00009772_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009773rm -f conftest.$ac_objext conftest$ac_exeext
9774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9775 (eval $ac_link) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); } &&
9779 { ac_try='test -s conftest$ac_exeext'
9780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9781 (eval $ac_try) 2>&5
9782 ac_status=$?
9783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9784 (exit $ac_status); }; }; then
9785 ac_cv_search_sem_init="-l$ac_lib"
9786break
9787else
9788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009789sed 's/^/| /' conftest.$ac_ext >&5
9790
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009791fi
9792rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9793 done
9794fi
9795LIBS=$ac_func_search_save_LIBS
9796fi
9797echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9798echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9799if test "$ac_cv_search_sem_init" != no; then
9800 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009801
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009802fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009803 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009804 # posix4 on Solaris 2.6
9805 # pthread (first!) on Linux
9806fi
9807
Martin v. Löwis19d17342003-06-14 21:03:05 +00009808# check if we need libintl for locale functions
9809echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9810echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9811if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9812 echo $ECHO_N "(cached) $ECHO_C" >&6
9813else
9814 ac_check_lib_save_LIBS=$LIBS
9815LIBS="-lintl $LIBS"
9816cat >conftest.$ac_ext <<_ACEOF
9817#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009818/* confdefs.h. */
9819_ACEOF
9820cat confdefs.h >>conftest.$ac_ext
9821cat >>conftest.$ac_ext <<_ACEOF
9822/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009823
9824/* Override any gcc2 internal prototype to avoid an error. */
9825#ifdef __cplusplus
9826extern "C"
9827#endif
9828/* We use char because int might match the return type of a gcc2
9829 builtin and then its argument prototype would still apply. */
9830char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009831int
9832main ()
9833{
9834textdomain ();
9835 ;
9836 return 0;
9837}
9838_ACEOF
9839rm -f conftest.$ac_objext conftest$ac_exeext
9840if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9841 (eval $ac_link) 2>&5
9842 ac_status=$?
9843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9844 (exit $ac_status); } &&
9845 { ac_try='test -s conftest$ac_exeext'
9846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9847 (eval $ac_try) 2>&5
9848 ac_status=$?
9849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9850 (exit $ac_status); }; }; then
9851 ac_cv_lib_intl_textdomain=yes
9852else
9853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009854sed 's/^/| /' conftest.$ac_ext >&5
9855
Martin v. Löwis19d17342003-06-14 21:03:05 +00009856ac_cv_lib_intl_textdomain=no
9857fi
9858rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9859LIBS=$ac_check_lib_save_LIBS
9860fi
9861echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9862echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9863if test $ac_cv_lib_intl_textdomain = yes; then
9864
9865cat >>confdefs.h <<\_ACEOF
9866#define WITH_LIBINTL 1
9867_ACEOF
9868
9869fi
9870
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009871
9872# checks for system dependent C++ extensions support
9873case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9875echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9876 cat >conftest.$ac_ext <<_ACEOF
9877#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009878/* confdefs.h. */
9879_ACEOF
9880cat confdefs.h >>conftest.$ac_ext
9881cat >>conftest.$ac_ext <<_ACEOF
9882/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009883#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009884int
9885main ()
9886{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009887loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 ;
9889 return 0;
9890}
9891_ACEOF
9892rm -f conftest.$ac_objext conftest$ac_exeext
9893if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9894 (eval $ac_link) 2>&5
9895 ac_status=$?
9896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9897 (exit $ac_status); } &&
9898 { ac_try='test -s conftest$ac_exeext'
9899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9900 (eval $ac_try) 2>&5
9901 ac_status=$?
9902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9903 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009904
Martin v. Löwis11437992002-04-12 09:54:03 +00009905cat >>confdefs.h <<\_ACEOF
9906#define AIX_GENUINE_CPLUSPLUS 1
9907_ACEOF
9908
9909 echo "$as_me:$LINENO: result: yes" >&5
9910echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009911else
Martin v. Löwis11437992002-04-12 09:54:03 +00009912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009913sed 's/^/| /' conftest.$ac_ext >&5
9914
Martin v. Löwis11437992002-04-12 09:54:03 +00009915echo "$as_me:$LINENO: result: no" >&5
9916echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009917fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009918rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009919 *) ;;
9920esac
9921
Guido van Rossum70c7f481998-03-26 18:44:10 +00009922# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009923# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +00009924echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9925echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9926if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9927 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009928else
Martin v. Löwis11437992002-04-12 09:54:03 +00009929 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009930LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009931cat >conftest.$ac_ext <<_ACEOF
9932#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009933/* confdefs.h. */
9934_ACEOF
9935cat confdefs.h >>conftest.$ac_ext
9936cat >>conftest.$ac_ext <<_ACEOF
9937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009938
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009939/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009940#ifdef __cplusplus
9941extern "C"
9942#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009943/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 builtin and then its argument prototype would still apply. */
9945char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009946int
9947main ()
9948{
9949t_open ();
9950 ;
9951 return 0;
9952}
9953_ACEOF
9954rm -f conftest.$ac_objext conftest$ac_exeext
9955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9956 (eval $ac_link) 2>&5
9957 ac_status=$?
9958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9959 (exit $ac_status); } &&
9960 { ac_try='test -s conftest$ac_exeext'
9961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9962 (eval $ac_try) 2>&5
9963 ac_status=$?
9964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9965 (exit $ac_status); }; }; then
9966 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009967else
Martin v. Löwis11437992002-04-12 09:54:03 +00009968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009969sed 's/^/| /' conftest.$ac_ext >&5
9970
Martin v. Löwis11437992002-04-12 09:54:03 +00009971ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009973rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9974LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009975fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009976echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9977echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9978if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009979 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009980fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009981 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009982echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9983echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9984if test "${ac_cv_lib_socket_socket+set}" = set; then
9985 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009986else
Martin v. Löwis11437992002-04-12 09:54:03 +00009987 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009988LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009989cat >conftest.$ac_ext <<_ACEOF
9990#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009991/* confdefs.h. */
9992_ACEOF
9993cat confdefs.h >>conftest.$ac_ext
9994cat >>conftest.$ac_ext <<_ACEOF
9995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009996
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009997/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009998#ifdef __cplusplus
9999extern "C"
10000#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010001/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 builtin and then its argument prototype would still apply. */
10003char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010004int
10005main ()
10006{
10007socket ();
10008 ;
10009 return 0;
10010}
10011_ACEOF
10012rm -f conftest.$ac_objext conftest$ac_exeext
10013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10014 (eval $ac_link) 2>&5
10015 ac_status=$?
10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017 (exit $ac_status); } &&
10018 { ac_try='test -s conftest$ac_exeext'
10019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10020 (eval $ac_try) 2>&5
10021 ac_status=$?
10022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023 (exit $ac_status); }; }; then
10024 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010025else
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010027sed 's/^/| /' conftest.$ac_ext >&5
10028
Martin v. Löwis11437992002-04-12 09:54:03 +000010029ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010030fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010031rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10032LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010034echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10035echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10036if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010037 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010038fi
10039 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010040
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010041case "$ac_sys_system" in
10042BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010043echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10044echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10045if test "${ac_cv_lib_net_socket+set}" = set; then
10046 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010047else
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010049LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010050cat >conftest.$ac_ext <<_ACEOF
10051#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010052/* confdefs.h. */
10053_ACEOF
10054cat confdefs.h >>conftest.$ac_ext
10055cat >>conftest.$ac_ext <<_ACEOF
10056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010057
Guido van Rossumad678af1998-10-02 14:42:15 +000010058/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010059#ifdef __cplusplus
10060extern "C"
10061#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010062/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 builtin and then its argument prototype would still apply. */
10064char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010065int
10066main ()
10067{
10068socket ();
10069 ;
10070 return 0;
10071}
10072_ACEOF
10073rm -f conftest.$ac_objext conftest$ac_exeext
10074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10075 (eval $ac_link) 2>&5
10076 ac_status=$?
10077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10078 (exit $ac_status); } &&
10079 { ac_try='test -s conftest$ac_exeext'
10080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10081 (eval $ac_try) 2>&5
10082 ac_status=$?
10083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10084 (exit $ac_status); }; }; then
10085 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010086else
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010088sed 's/^/| /' conftest.$ac_ext >&5
10089
Martin v. Löwis11437992002-04-12 09:54:03 +000010090ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10093LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010095echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10096echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10097if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010098 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010099fi
10100 # BeOS
10101;;
10102esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010103
Martin v. Löwis11437992002-04-12 09:54:03 +000010104echo "$as_me:$LINENO: checking for --with-libs" >&5
10105echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10106
Guido van Rossuma68acba1996-07-31 17:36:39 +000010107# Check whether --with-libs or --without-libs was given.
10108if test "${with_libs+set}" = set; then
10109 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010110
10111echo "$as_me:$LINENO: result: $withval" >&5
10112echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010113LIBS="$withval $LIBS"
10114
10115else
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 echo "$as_me:$LINENO: result: no" >&5
10117echo "${ECHO_T}no" >&6
10118fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010119
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010120# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010121
10122
Martin v. Löwis11437992002-04-12 09:54:03 +000010123echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10124echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10125
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010126# Check whether --with-signal-module or --without-signal-module was given.
10127if test "${with_signal_module+set}" = set; then
10128 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010129
Martin v. Löwis11437992002-04-12 09:54:03 +000010130fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010131
10132if test -z "$with_signal_module"
10133then with_signal_module="yes"
10134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010135echo "$as_me:$LINENO: result: $with_signal_module" >&5
10136echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010137
10138if test "${with_signal_module}" = "yes"; then
10139 USE_SIGNAL_MODULE=""
10140 SIGNAL_OBJS=""
10141else
10142 USE_SIGNAL_MODULE="#"
10143 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10144fi
10145
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010146# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010147
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010148USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010149
Martin v. Löwis11437992002-04-12 09:54:03 +000010150echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10151echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10152
Guido van Rossumec2f0731997-01-22 20:54:01 +000010153
10154# Check whether --with-dec-threads or --without-dec-threads was given.
10155if test "${with_dec_threads+set}" = set; then
10156 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010157
10158echo "$as_me:$LINENO: result: $withval" >&5
10159echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010160LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010161if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010162 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010163fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010164else
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 echo "$as_me:$LINENO: result: no" >&5
10166echo "${ECHO_T}no" >&6
10167fi;
10168
10169# Templates for things AC_DEFINEd more than once.
10170# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010171
10172
Martin v. Löwis11437992002-04-12 09:54:03 +000010173
10174
10175
10176
10177
10178echo "$as_me:$LINENO: checking for --with-threads" >&5
10179echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10180
Guido van Rossumec2f0731997-01-22 20:54:01 +000010181# Check whether --with-threads or --without-threads was given.
10182if test "${with_threads+set}" = set; then
10183 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010184
Martin v. Löwis11437992002-04-12 09:54:03 +000010185fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010186
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010187# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010188
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010189# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010190if test "${with_thread+set}" = set; then
10191 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010192 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010193fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010194
10195if test -z "$with_threads"
10196then with_threads="yes"
10197fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010198echo "$as_me:$LINENO: result: $with_threads" >&5
10199echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010200
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010201
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010202if test "$with_threads" = "no"
10203then
10204 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010205elif test "$ac_cv_pthread_is_default" = yes
10206then
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010208#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010209_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010210
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010211 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010213#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010214_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010215
10216 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010218elif test "$ac_cv_kpthread" = "yes"
10219then
10220 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010221 if test "$ac_cv_cxx_thread" = "yes"; then
10222 CXX="$CXX -Kpthread"
10223 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010225#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010226_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010227
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010228 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010229 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010230elif test "$ac_cv_kthread" = "yes"
10231then
10232 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010233 if test "$ac_cv_cxx_thread" = "yes"; then
10234 CXX="$CXX -Kthread"
10235 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010236 cat >>confdefs.h <<\_ACEOF
10237#define WITH_THREAD 1
10238_ACEOF
10239
10240 posix_threads=yes
10241 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010242elif test "$ac_cv_pthread" = "yes"
10243then
10244 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010245 if test "$ac_cv_cxx_thread" = "yes"; then
10246 CXX="$CXX -pthread"
10247 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010248 cat >>confdefs.h <<\_ACEOF
10249#define WITH_THREAD 1
10250_ACEOF
10251
10252 posix_threads=yes
10253 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010254else
10255 if test ! -z "$with_threads" -a -d "$with_threads"
10256 then LDFLAGS="$LDFLAGS -L$with_threads"
10257 fi
10258 if test ! -z "$withval" -a -d "$withval"
10259 then LDFLAGS="$LDFLAGS -L$withval"
10260 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010261
10262 # According to the POSIX spec, a pthreads implementation must
10263 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10265echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10266 cat >conftest.$ac_ext <<_ACEOF
10267#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* confdefs.h. */
10269_ACEOF
10270cat confdefs.h >>conftest.$ac_ext
10271cat >>conftest.$ac_ext <<_ACEOF
10272/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010273
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010274#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010275#ifdef _POSIX_THREADS
10276yes
10277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010278
10279_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010281 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010282 unistd_defines_pthreads=yes
10283else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010284 unistd_defines_pthreads=no
10285fi
10286rm -f conftest*
10287
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10289echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010290
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010292#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010293_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010294
Martin v. Löwis11437992002-04-12 09:54:03 +000010295 if test "${ac_cv_header_cthreads_h+set}" = set; then
10296 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10297echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10298if test "${ac_cv_header_cthreads_h+set}" = set; then
10299 echo $ECHO_N "(cached) $ECHO_C" >&6
10300fi
10301echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10302echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010303else
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 # Is the header compilable?
10305echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10306echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10307cat >conftest.$ac_ext <<_ACEOF
10308#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* confdefs.h. */
10310_ACEOF
10311cat confdefs.h >>conftest.$ac_ext
10312cat >>conftest.$ac_ext <<_ACEOF
10313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010314$ac_includes_default
10315#include <cthreads.h>
10316_ACEOF
10317rm -f conftest.$ac_objext
10318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10319 (eval $ac_compile) 2>&5
10320 ac_status=$?
10321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10322 (exit $ac_status); } &&
10323 { ac_try='test -s conftest.$ac_objext'
10324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10325 (eval $ac_try) 2>&5
10326 ac_status=$?
10327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10328 (exit $ac_status); }; }; then
10329 ac_header_compiler=yes
10330else
10331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010332sed 's/^/| /' conftest.$ac_ext >&5
10333
Martin v. Löwis11437992002-04-12 09:54:03 +000010334ac_header_compiler=no
10335fi
10336rm -f conftest.$ac_objext conftest.$ac_ext
10337echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10338echo "${ECHO_T}$ac_header_compiler" >&6
10339
10340# Is the header present?
10341echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10342echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10343cat >conftest.$ac_ext <<_ACEOF
10344#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010345/* confdefs.h. */
10346_ACEOF
10347cat confdefs.h >>conftest.$ac_ext
10348cat >>conftest.$ac_ext <<_ACEOF
10349/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010350#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010351_ACEOF
10352if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10353 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10354 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010355 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 rm -f conftest.er1
10357 cat conftest.err >&5
10358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10359 (exit $ac_status); } >/dev/null; then
10360 if test -s conftest.err; then
10361 ac_cpp_err=$ac_c_preproc_warn_flag
10362 else
10363 ac_cpp_err=
10364 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010365else
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 ac_cpp_err=yes
10367fi
10368if test -z "$ac_cpp_err"; then
10369 ac_header_preproc=yes
10370else
10371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010372sed 's/^/| /' conftest.$ac_ext >&5
10373
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010376rm -f conftest.err conftest.$ac_ext
10377echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10378echo "${ECHO_T}$ac_header_preproc" >&6
10379
10380# So? What about this header?
10381case $ac_header_compiler:$ac_header_preproc in
10382 yes:no )
10383 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10384echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10385 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010386echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10387 (
10388 cat <<\_ASBOX
10389## ------------------------------------ ##
10390## Report this to bug-autoconf@gnu.org. ##
10391## ------------------------------------ ##
10392_ASBOX
10393 ) |
10394 sed "s/^/$as_me: WARNING: /" >&2
10395 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 no:yes )
10397 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10398echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10399 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10400echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10401 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010402echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10403 (
10404 cat <<\_ASBOX
10405## ------------------------------------ ##
10406## Report this to bug-autoconf@gnu.org. ##
10407## ------------------------------------ ##
10408_ASBOX
10409 ) |
10410 sed "s/^/$as_me: WARNING: /" >&2
10411 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010412esac
10413echo "$as_me:$LINENO: checking for cthreads.h" >&5
10414echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10415if test "${ac_cv_header_cthreads_h+set}" = set; then
10416 echo $ECHO_N "(cached) $ECHO_C" >&6
10417else
10418 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010420echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10421echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10422
10423fi
10424if test $ac_cv_header_cthreads_h = yes; then
10425 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010426#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010427_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010428
Martin v. Löwis11437992002-04-12 09:54:03 +000010429 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010430#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010431_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010432
Martin v. Löwis11437992002-04-12 09:54:03 +000010433
10434cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010435#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010436_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010437
10438 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010439 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010440else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010441
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10443 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10444echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10445if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10446 echo $ECHO_N "(cached) $ECHO_C" >&6
10447fi
10448echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10449echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010450else
Martin v. Löwis11437992002-04-12 09:54:03 +000010451 # Is the header compilable?
10452echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10453echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10454cat >conftest.$ac_ext <<_ACEOF
10455#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010456/* confdefs.h. */
10457_ACEOF
10458cat confdefs.h >>conftest.$ac_ext
10459cat >>conftest.$ac_ext <<_ACEOF
10460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010461$ac_includes_default
10462#include <mach/cthreads.h>
10463_ACEOF
10464rm -f conftest.$ac_objext
10465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10466 (eval $ac_compile) 2>&5
10467 ac_status=$?
10468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10469 (exit $ac_status); } &&
10470 { ac_try='test -s conftest.$ac_objext'
10471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10472 (eval $ac_try) 2>&5
10473 ac_status=$?
10474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10475 (exit $ac_status); }; }; then
10476 ac_header_compiler=yes
10477else
10478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010479sed 's/^/| /' conftest.$ac_ext >&5
10480
Martin v. Löwis11437992002-04-12 09:54:03 +000010481ac_header_compiler=no
10482fi
10483rm -f conftest.$ac_objext conftest.$ac_ext
10484echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10485echo "${ECHO_T}$ac_header_compiler" >&6
10486
10487# Is the header present?
10488echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10489echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10490cat >conftest.$ac_ext <<_ACEOF
10491#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010492/* confdefs.h. */
10493_ACEOF
10494cat confdefs.h >>conftest.$ac_ext
10495cat >>conftest.$ac_ext <<_ACEOF
10496/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010497#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010498_ACEOF
10499if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10500 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10501 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010502 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 rm -f conftest.er1
10504 cat conftest.err >&5
10505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10506 (exit $ac_status); } >/dev/null; then
10507 if test -s conftest.err; then
10508 ac_cpp_err=$ac_c_preproc_warn_flag
10509 else
10510 ac_cpp_err=
10511 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010512else
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 ac_cpp_err=yes
10514fi
10515if test -z "$ac_cpp_err"; then
10516 ac_header_preproc=yes
10517else
10518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010519sed 's/^/| /' conftest.$ac_ext >&5
10520
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010522fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010523rm -f conftest.err conftest.$ac_ext
10524echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10525echo "${ECHO_T}$ac_header_preproc" >&6
10526
10527# So? What about this header?
10528case $ac_header_compiler:$ac_header_preproc in
10529 yes:no )
10530 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10531echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10532 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010533echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10534 (
10535 cat <<\_ASBOX
10536## ------------------------------------ ##
10537## Report this to bug-autoconf@gnu.org. ##
10538## ------------------------------------ ##
10539_ASBOX
10540 ) |
10541 sed "s/^/$as_me: WARNING: /" >&2
10542 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 no:yes )
10544 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10545echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10546 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10547echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10548 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010549echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10550 (
10551 cat <<\_ASBOX
10552## ------------------------------------ ##
10553## Report this to bug-autoconf@gnu.org. ##
10554## ------------------------------------ ##
10555_ASBOX
10556 ) |
10557 sed "s/^/$as_me: WARNING: /" >&2
10558 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010559esac
10560echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10561echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10562if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10563 echo $ECHO_N "(cached) $ECHO_C" >&6
10564else
10565 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010567echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10568echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10569
10570fi
10571if test $ac_cv_header_mach_cthreads_h = yes; then
10572 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010573#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010574_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010575
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010577#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010578_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010579
Martin v. Löwis11437992002-04-12 09:54:03 +000010580
10581cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010582#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010583_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010584
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010585 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010586else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010587
Martin v. Löwis11437992002-04-12 09:54:03 +000010588 echo "$as_me:$LINENO: checking for --with-pth" >&5
10589echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10590
10591# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010592if test "${with_pth+set}" = set; then
10593 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010594 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010595echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010596 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010597#define WITH_THREAD 1
10598_ACEOF
10599
10600
10601cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010602#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010603_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010604
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010605 LIBS="-lpth $LIBS"
10606 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010607else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010608 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010609echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010610
10611 # Just looking for pthread_create in libpthread is not enough:
10612 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10613 # So we really have to include pthread.h, and then link.
10614 _libs=$LIBS
10615 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010616 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10617echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10618 cat >conftest.$ac_ext <<_ACEOF
10619#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010620/* confdefs.h. */
10621_ACEOF
10622cat confdefs.h >>conftest.$ac_ext
10623cat >>conftest.$ac_ext <<_ACEOF
10624/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010625#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010626
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010627void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010628int
10629main ()
10630{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010631
10632pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010633 ;
10634 return 0;
10635}
10636_ACEOF
10637rm -f conftest.$ac_objext conftest$ac_exeext
10638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10639 (eval $ac_link) 2>&5
10640 ac_status=$?
10641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10642 (exit $ac_status); } &&
10643 { ac_try='test -s conftest$ac_exeext'
10644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10645 (eval $ac_try) 2>&5
10646 ac_status=$?
10647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10648 (exit $ac_status); }; }; then
10649
10650 echo "$as_me:$LINENO: result: yes" >&5
10651echo "${ECHO_T}yes" >&6
10652 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010653#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010654_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010655
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010656 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010657 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +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 +000010662
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010663 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010664 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10665echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10666if test "${ac_cv_func_pthread_detach+set}" = set; then
10667 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010668else
Martin v. Löwis11437992002-04-12 09:54:03 +000010669 cat >conftest.$ac_ext <<_ACEOF
10670#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010671/* confdefs.h. */
10672_ACEOF
10673cat confdefs.h >>conftest.$ac_ext
10674cat >>conftest.$ac_ext <<_ACEOF
10675/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010676/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010677 which can conflict with char pthread_detach (); below.
10678 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010679 <limits.h> exists even on freestanding compilers. Under hpux,
10680 including <limits.h> includes <sys/time.h> and causes problems
10681 checking for functions defined therein. */
10682#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010683# include <limits.h>
10684#else
10685# include <assert.h>
10686#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010687/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010688#ifdef __cplusplus
10689extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010690{
Martin v. Löwis11437992002-04-12 09:54:03 +000010691#endif
Guido van Rossumad678af1998-10-02 14:42:15 +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 pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010695/* The GNU C library defines this for functions which it implements
10696 to always fail with ENOSYS. Some functions are actually named
10697 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010698#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010699choke me
10700#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010701char (*f) () = pthread_detach;
10702#endif
10703#ifdef __cplusplus
10704}
Guido van Rossumad678af1998-10-02 14:42:15 +000010705#endif
10706
Skip Montanaro6dead952003-09-25 14:50:04 +000010707int
10708main ()
10709{
10710return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 ;
10712 return 0;
10713}
10714_ACEOF
10715rm -f conftest.$ac_objext conftest$ac_exeext
10716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10717 (eval $ac_link) 2>&5
10718 ac_status=$?
10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720 (exit $ac_status); } &&
10721 { ac_try='test -s conftest$ac_exeext'
10722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10723 (eval $ac_try) 2>&5
10724 ac_status=$?
10725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726 (exit $ac_status); }; }; then
10727 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010728else
Martin v. Löwis11437992002-04-12 09:54:03 +000010729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010730sed 's/^/| /' conftest.$ac_ext >&5
10731
Martin v. Löwis11437992002-04-12 09:54:03 +000010732ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010733fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010734rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010736echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10737echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10738if test $ac_cv_func_pthread_detach = yes; then
10739 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010740#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010741_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010742
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010743 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010744 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010745else
Guido van Rossumad678af1998-10-02 14:42:15 +000010746
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010747 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10748 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10749echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10750if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10751 echo $ECHO_N "(cached) $ECHO_C" >&6
10752fi
10753echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10754echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10755else
10756 # Is the header compilable?
10757echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10758echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10759cat >conftest.$ac_ext <<_ACEOF
10760#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010761/* confdefs.h. */
10762_ACEOF
10763cat confdefs.h >>conftest.$ac_ext
10764cat >>conftest.$ac_ext <<_ACEOF
10765/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010766$ac_includes_default
10767#include <atheos/threads.h>
10768_ACEOF
10769rm -f conftest.$ac_objext
10770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10771 (eval $ac_compile) 2>&5
10772 ac_status=$?
10773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10774 (exit $ac_status); } &&
10775 { ac_try='test -s conftest.$ac_objext'
10776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10777 (eval $ac_try) 2>&5
10778 ac_status=$?
10779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10780 (exit $ac_status); }; }; then
10781 ac_header_compiler=yes
10782else
10783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010784sed 's/^/| /' conftest.$ac_ext >&5
10785
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010786ac_header_compiler=no
10787fi
10788rm -f conftest.$ac_objext conftest.$ac_ext
10789echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10790echo "${ECHO_T}$ac_header_compiler" >&6
10791
10792# Is the header present?
10793echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10794echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10795cat >conftest.$ac_ext <<_ACEOF
10796#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010797/* confdefs.h. */
10798_ACEOF
10799cat confdefs.h >>conftest.$ac_ext
10800cat >>conftest.$ac_ext <<_ACEOF
10801/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010802#include <atheos/threads.h>
10803_ACEOF
10804if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10805 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10806 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010807 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010808 rm -f conftest.er1
10809 cat conftest.err >&5
10810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10811 (exit $ac_status); } >/dev/null; then
10812 if test -s conftest.err; then
10813 ac_cpp_err=$ac_c_preproc_warn_flag
10814 else
10815 ac_cpp_err=
10816 fi
10817else
10818 ac_cpp_err=yes
10819fi
10820if test -z "$ac_cpp_err"; then
10821 ac_header_preproc=yes
10822else
10823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010824sed 's/^/| /' conftest.$ac_ext >&5
10825
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010826 ac_header_preproc=no
10827fi
10828rm -f conftest.err conftest.$ac_ext
10829echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10830echo "${ECHO_T}$ac_header_preproc" >&6
10831
10832# So? What about this header?
10833case $ac_header_compiler:$ac_header_preproc in
10834 yes:no )
10835 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10836echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10837 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010838echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10839 (
10840 cat <<\_ASBOX
10841## ------------------------------------ ##
10842## Report this to bug-autoconf@gnu.org. ##
10843## ------------------------------------ ##
10844_ASBOX
10845 ) |
10846 sed "s/^/$as_me: WARNING: /" >&2
10847 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010848 no:yes )
10849 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10850echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10851 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10852echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10853 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010854echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10855 (
10856 cat <<\_ASBOX
10857## ------------------------------------ ##
10858## Report this to bug-autoconf@gnu.org. ##
10859## ------------------------------------ ##
10860_ASBOX
10861 ) |
10862 sed "s/^/$as_me: WARNING: /" >&2
10863 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010864esac
10865echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10866echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10867if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10868 echo $ECHO_N "(cached) $ECHO_C" >&6
10869else
10870 ac_cv_header_atheos_threads_h=$ac_header_preproc
10871fi
10872echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10873echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10874
10875fi
10876if test $ac_cv_header_atheos_threads_h = yes; then
10877 cat >>confdefs.h <<\_ACEOF
10878#define WITH_THREAD 1
10879_ACEOF
10880
10881
10882cat >>confdefs.h <<\_ACEOF
10883#define ATHEOS_THREADS 1
10884_ACEOF
10885
10886 THREADOBJ="Python/thread.o"
10887else
10888
Martin v. Löwis11437992002-04-12 09:54:03 +000010889 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10890 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10891echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10892if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10893 echo $ECHO_N "(cached) $ECHO_C" >&6
10894fi
10895echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10896echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010897else
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 # Is the header compilable?
10899echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10900echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10901cat >conftest.$ac_ext <<_ACEOF
10902#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* confdefs.h. */
10904_ACEOF
10905cat confdefs.h >>conftest.$ac_ext
10906cat >>conftest.$ac_ext <<_ACEOF
10907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010908$ac_includes_default
10909#include <kernel/OS.h>
10910_ACEOF
10911rm -f conftest.$ac_objext
10912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10913 (eval $ac_compile) 2>&5
10914 ac_status=$?
10915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10916 (exit $ac_status); } &&
10917 { ac_try='test -s conftest.$ac_objext'
10918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10919 (eval $ac_try) 2>&5
10920 ac_status=$?
10921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10922 (exit $ac_status); }; }; then
10923 ac_header_compiler=yes
10924else
10925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010926sed 's/^/| /' conftest.$ac_ext >&5
10927
Martin v. Löwis11437992002-04-12 09:54:03 +000010928ac_header_compiler=no
10929fi
10930rm -f conftest.$ac_objext conftest.$ac_ext
10931echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10932echo "${ECHO_T}$ac_header_compiler" >&6
10933
10934# Is the header present?
10935echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10936echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10937cat >conftest.$ac_ext <<_ACEOF
10938#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010939/* confdefs.h. */
10940_ACEOF
10941cat confdefs.h >>conftest.$ac_ext
10942cat >>conftest.$ac_ext <<_ACEOF
10943/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010944#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010945_ACEOF
10946if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10947 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10948 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010949 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010950 rm -f conftest.er1
10951 cat conftest.err >&5
10952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10953 (exit $ac_status); } >/dev/null; then
10954 if test -s conftest.err; then
10955 ac_cpp_err=$ac_c_preproc_warn_flag
10956 else
10957 ac_cpp_err=
10958 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010959else
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 ac_cpp_err=yes
10961fi
10962if test -z "$ac_cpp_err"; then
10963 ac_header_preproc=yes
10964else
10965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010966sed 's/^/| /' conftest.$ac_ext >&5
10967
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010969fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010970rm -f conftest.err conftest.$ac_ext
10971echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10972echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010973
Martin v. Löwis11437992002-04-12 09:54:03 +000010974# So? What about this header?
10975case $ac_header_compiler:$ac_header_preproc in
10976 yes:no )
10977 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10978echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10979 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010980echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10981 (
10982 cat <<\_ASBOX
10983## ------------------------------------ ##
10984## Report this to bug-autoconf@gnu.org. ##
10985## ------------------------------------ ##
10986_ASBOX
10987 ) |
10988 sed "s/^/$as_me: WARNING: /" >&2
10989 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010990 no:yes )
10991 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10992echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10993 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10994echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10995 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010996echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10997 (
10998 cat <<\_ASBOX
10999## ------------------------------------ ##
11000## Report this to bug-autoconf@gnu.org. ##
11001## ------------------------------------ ##
11002_ASBOX
11003 ) |
11004 sed "s/^/$as_me: WARNING: /" >&2
11005 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011006esac
11007echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11008echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11009if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11010 echo $ECHO_N "(cached) $ECHO_C" >&6
11011else
11012 ac_cv_header_kernel_OS_h=$ac_header_preproc
11013fi
11014echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11015echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11016
11017fi
11018if test $ac_cv_header_kernel_OS_h = yes; then
11019 cat >>confdefs.h <<\_ACEOF
11020#define WITH_THREAD 1
11021_ACEOF
11022
11023
11024cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011025#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011026_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011027
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011028 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011029else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011030
Martin v. Löwis11437992002-04-12 09:54:03 +000011031 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11032echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11033if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11034 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011035else
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011037LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011038cat >conftest.$ac_ext <<_ACEOF
11039#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011040/* confdefs.h. */
11041_ACEOF
11042cat confdefs.h >>conftest.$ac_ext
11043cat >>conftest.$ac_ext <<_ACEOF
11044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011045
Greg Steinadf63d62000-07-05 10:38:09 +000011046/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011047#ifdef __cplusplus
11048extern "C"
11049#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011050/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 builtin and then its argument prototype would still apply. */
11052char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011053int
11054main ()
11055{
11056pthread_create ();
11057 ;
11058 return 0;
11059}
11060_ACEOF
11061rm -f conftest.$ac_objext conftest$ac_exeext
11062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11063 (eval $ac_link) 2>&5
11064 ac_status=$?
11065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11066 (exit $ac_status); } &&
11067 { ac_try='test -s conftest$ac_exeext'
11068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11069 (eval $ac_try) 2>&5
11070 ac_status=$?
11071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11072 (exit $ac_status); }; }; then
11073 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011074else
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011076sed 's/^/| /' conftest.$ac_ext >&5
11077
Martin v. Löwis11437992002-04-12 09:54:03 +000011078ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11081LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011083echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11084echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11085if test $ac_cv_lib_pthreads_pthread_create = yes; then
11086 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011087#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011088_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011089
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011090 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011091 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011092 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011093else
Greg Steinadf63d62000-07-05 10:38:09 +000011094
Martin v. Löwis11437992002-04-12 09:54:03 +000011095 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11096echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11097if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11098 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011099else
Martin v. Löwis11437992002-04-12 09:54:03 +000011100 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011101LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011102cat >conftest.$ac_ext <<_ACEOF
11103#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011104/* confdefs.h. */
11105_ACEOF
11106cat confdefs.h >>conftest.$ac_ext
11107cat >>conftest.$ac_ext <<_ACEOF
11108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011109
Guido van Rossum49545951997-12-02 19:28:29 +000011110/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011111#ifdef __cplusplus
11112extern "C"
11113#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011114/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 builtin and then its argument prototype would still apply. */
11116char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011117int
11118main ()
11119{
11120pthread_create ();
11121 ;
11122 return 0;
11123}
11124_ACEOF
11125rm -f conftest.$ac_objext conftest$ac_exeext
11126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11127 (eval $ac_link) 2>&5
11128 ac_status=$?
11129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11130 (exit $ac_status); } &&
11131 { ac_try='test -s conftest$ac_exeext'
11132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11133 (eval $ac_try) 2>&5
11134 ac_status=$?
11135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11136 (exit $ac_status); }; }; then
11137 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011138else
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011140sed 's/^/| /' conftest.$ac_ext >&5
11141
Martin v. Löwis11437992002-04-12 09:54:03 +000011142ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011144rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11145LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011146fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011147echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11148echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11149if test $ac_cv_lib_c_r_pthread_create = yes; then
11150 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011151#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011152_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011153
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011154 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011155 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011156 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011157else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011158
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11160echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11161if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11162 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011163else
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011165LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011166cat >conftest.$ac_ext <<_ACEOF
11167#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011168/* confdefs.h. */
11169_ACEOF
11170cat confdefs.h >>conftest.$ac_ext
11171cat >>conftest.$ac_ext <<_ACEOF
11172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011173
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011174/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011175#ifdef __cplusplus
11176extern "C"
11177#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011178/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011179 builtin and then its argument prototype would still apply. */
11180char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011181int
11182main ()
11183{
11184__pthread_create_system ();
11185 ;
11186 return 0;
11187}
11188_ACEOF
11189rm -f conftest.$ac_objext conftest$ac_exeext
11190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11191 (eval $ac_link) 2>&5
11192 ac_status=$?
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); } &&
11195 { ac_try='test -s conftest$ac_exeext'
11196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11197 (eval $ac_try) 2>&5
11198 ac_status=$?
11199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11200 (exit $ac_status); }; }; then
11201 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011202else
Martin v. Löwis11437992002-04-12 09:54:03 +000011203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011204sed 's/^/| /' conftest.$ac_ext >&5
11205
Martin v. Löwis11437992002-04-12 09:54:03 +000011206ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011207fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011208rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11209LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011211echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11212echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11213if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11214 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011215#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011216_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011217
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011218 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011219 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011220 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011221else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011222
Martin v. Löwis11437992002-04-12 09:54:03 +000011223 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11224echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11225if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11226 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011227else
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011229LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011230cat >conftest.$ac_ext <<_ACEOF
11231#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011232/* confdefs.h. */
11233_ACEOF
11234cat confdefs.h >>conftest.$ac_ext
11235cat >>conftest.$ac_ext <<_ACEOF
11236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011237
Guido van Rossumb93a8621998-05-07 13:27:32 +000011238/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011239#ifdef __cplusplus
11240extern "C"
11241#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011242/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 builtin and then its argument prototype would still apply. */
11244char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011245int
11246main ()
11247{
11248pthread_create ();
11249 ;
11250 return 0;
11251}
11252_ACEOF
11253rm -f conftest.$ac_objext conftest$ac_exeext
11254if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11255 (eval $ac_link) 2>&5
11256 ac_status=$?
11257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258 (exit $ac_status); } &&
11259 { ac_try='test -s conftest$ac_exeext'
11260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11261 (eval $ac_try) 2>&5
11262 ac_status=$?
11263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264 (exit $ac_status); }; }; then
11265 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011266else
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011268sed 's/^/| /' conftest.$ac_ext >&5
11269
Martin v. Löwis11437992002-04-12 09:54:03 +000011270ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011271fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011272rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11273LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011274fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011275echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11276echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11277if test $ac_cv_lib_cma_pthread_create = yes; then
11278 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011279#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011280_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011281
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011282 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011283 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011284 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011285else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011286
Martin v. Löwis130fb172001-07-19 11:00:41 +000011287 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011288fi
11289
Guido van Rossum627b2d71993-12-24 10:39:16 +000011290
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011291fi
11292
Guido van Rossum0be3e491997-05-22 20:33:33 +000011293fi
11294
Guido van Rossum49545951997-12-02 19:28:29 +000011295fi
11296
Guido van Rossumb93a8621998-05-07 13:27:32 +000011297fi
11298
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011299
Michael W. Hudson54241132001-12-07 15:38:26 +000011300fi
11301
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011302
11303fi
11304
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011305fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011306rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11307fi;
11308fi
11309
11310
11311fi
11312
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011313
Michael W. Hudson54241132001-12-07 15:38:26 +000011314
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11316echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11317if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11318 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011319else
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011321LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011322cat >conftest.$ac_ext <<_ACEOF
11323#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* confdefs.h. */
11325_ACEOF
11326cat confdefs.h >>conftest.$ac_ext
11327cat >>conftest.$ac_ext <<_ACEOF
11328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011329
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011330/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011331#ifdef __cplusplus
11332extern "C"
11333#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011334/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 builtin and then its argument prototype would still apply. */
11336char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011337int
11338main ()
11339{
11340usconfig ();
11341 ;
11342 return 0;
11343}
11344_ACEOF
11345rm -f conftest.$ac_objext conftest$ac_exeext
11346if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11347 (eval $ac_link) 2>&5
11348 ac_status=$?
11349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11350 (exit $ac_status); } &&
11351 { ac_try='test -s conftest$ac_exeext'
11352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11353 (eval $ac_try) 2>&5
11354 ac_status=$?
11355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11356 (exit $ac_status); }; }; then
11357 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011358else
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011360sed 's/^/| /' conftest.$ac_ext >&5
11361
Martin v. Löwis11437992002-04-12 09:54:03 +000011362ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011364rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11365LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011367echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11368echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11369if test $ac_cv_lib_mpc_usconfig = yes; then
11370 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011372_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011373
Martin v. Löwis130fb172001-07-19 11:00:41 +000011374 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011375 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011376 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011377fi
11378
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011379
Neal Norwitza978ab02002-11-02 16:58:05 +000011380 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11382echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11383if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011385else
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011387LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011388cat >conftest.$ac_ext <<_ACEOF
11389#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011390/* confdefs.h. */
11391_ACEOF
11392cat confdefs.h >>conftest.$ac_ext
11393cat >>conftest.$ac_ext <<_ACEOF
11394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011395
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011396/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011397#ifdef __cplusplus
11398extern "C"
11399#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011400/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011401 builtin and then its argument prototype would still apply. */
11402char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011403int
11404main ()
11405{
11406thr_create ();
11407 ;
11408 return 0;
11409}
11410_ACEOF
11411rm -f conftest.$ac_objext conftest$ac_exeext
11412if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11413 (eval $ac_link) 2>&5
11414 ac_status=$?
11415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11416 (exit $ac_status); } &&
11417 { ac_try='test -s conftest$ac_exeext'
11418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11419 (eval $ac_try) 2>&5
11420 ac_status=$?
11421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11422 (exit $ac_status); }; }; then
11423 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011424else
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011426sed 's/^/| /' conftest.$ac_ext >&5
11427
Martin v. Löwis11437992002-04-12 09:54:03 +000011428ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011429fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011430rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11431LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011433echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11434echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11435if test $ac_cv_lib_thread_thr_create = yes; then
11436 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011437#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011438_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011439
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011440 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011441 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011442 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011443fi
11444
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011445 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011446
Martin v. Löwis130fb172001-07-19 11:00:41 +000011447 if test "$USE_THREAD_MODULE" != "#"
11448 then
11449 # If the above checks didn't disable threads, (at least) OSF1
11450 # needs this '-threads' argument during linking.
11451 case $ac_sys_system in
11452 OSF1) LDLAST=-threads;;
11453 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011454 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011455fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011456
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011457if test "$posix_threads" = "yes"; then
11458 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011459
11460cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011461#define _POSIX_THREADS 1
11462_ACEOF
11463
11464 fi
11465
11466 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11467 case $ac_sys_system/$ac_sys_release in
11468 SunOS/5.6)
11469cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011470#define HAVE_PTHREAD_DESTRUCTOR 1
11471_ACEOF
11472
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011473 ;;
11474 SunOS/5.8)
11475cat >>confdefs.h <<\_ACEOF
11476#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11477_ACEOF
11478
11479 ;;
11480 esac
11481
11482 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11483echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11484 if test "${ac_cv_pthread_system_supported+set}" = set; then
11485 echo $ECHO_N "(cached) $ECHO_C" >&6
11486else
11487 if test "$cross_compiling" = yes; then
11488 ac_cv_pthread_system_supported=no
11489else
11490 cat >conftest.$ac_ext <<_ACEOF
11491#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011492/* confdefs.h. */
11493_ACEOF
11494cat confdefs.h >>conftest.$ac_ext
11495cat >>conftest.$ac_ext <<_ACEOF
11496/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011497#include <pthread.h>
11498 void *foo(void *parm) {
11499 return NULL;
11500 }
11501 main() {
11502 pthread_attr_t attr;
11503 pthread_t id;
11504 if (pthread_attr_init(&attr)) exit(-1);
11505 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11506 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11507 exit(0);
11508 }
11509_ACEOF
11510rm -f conftest$ac_exeext
11511if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11512 (eval $ac_link) 2>&5
11513 ac_status=$?
11514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11517 (eval $ac_try) 2>&5
11518 ac_status=$?
11519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11520 (exit $ac_status); }; }; then
11521 ac_cv_pthread_system_supported=yes
11522else
11523 echo "$as_me: program exited with status $ac_status" >&5
11524echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011525sed 's/^/| /' conftest.$ac_ext >&5
11526
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011527( exit $ac_status )
11528ac_cv_pthread_system_supported=no
11529fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011530rm -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 +000011531fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011532
Guido van Rossum627b2d71993-12-24 10:39:16 +000011533fi
11534
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011535 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11536echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11537 if test "$ac_cv_pthread_system_supported" = "yes"; then
11538
11539cat >>confdefs.h <<\_ACEOF
11540#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11541_ACEOF
11542
11543 fi
11544
11545for ac_func in pthread_sigmask
11546do
11547as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11548echo "$as_me:$LINENO: checking for $ac_func" >&5
11549echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11550if eval "test \"\${$as_ac_var+set}\" = set"; then
11551 echo $ECHO_N "(cached) $ECHO_C" >&6
11552else
11553 cat >conftest.$ac_ext <<_ACEOF
11554#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011555/* confdefs.h. */
11556_ACEOF
11557cat confdefs.h >>conftest.$ac_ext
11558cat >>conftest.$ac_ext <<_ACEOF
11559/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011560/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011561 which can conflict with char $ac_func (); below.
11562 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011563 <limits.h> exists even on freestanding compilers. Under hpux,
11564 including <limits.h> includes <sys/time.h> and causes problems
11565 checking for functions defined therein. */
11566#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011567# include <limits.h>
11568#else
11569# include <assert.h>
11570#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011571/* Override any gcc2 internal prototype to avoid an error. */
11572#ifdef __cplusplus
11573extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011574{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011575#endif
11576/* We use char because int might match the return type of a gcc2
11577 builtin and then its argument prototype would still apply. */
11578char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011579/* The GNU C library defines this for functions which it implements
11580 to always fail with ENOSYS. Some functions are actually named
11581 something starting with __ and the normal name is an alias. */
11582#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11583choke me
11584#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011585char (*f) () = $ac_func;
11586#endif
11587#ifdef __cplusplus
11588}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011589#endif
11590
Skip Montanaro6dead952003-09-25 14:50:04 +000011591int
11592main ()
11593{
11594return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011595 ;
11596 return 0;
11597}
11598_ACEOF
11599rm -f conftest.$ac_objext conftest$ac_exeext
11600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11601 (eval $ac_link) 2>&5
11602 ac_status=$?
11603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604 (exit $ac_status); } &&
11605 { ac_try='test -s conftest$ac_exeext'
11606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11607 (eval $ac_try) 2>&5
11608 ac_status=$?
11609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11610 (exit $ac_status); }; }; then
11611 eval "$as_ac_var=yes"
11612else
11613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011614sed 's/^/| /' conftest.$ac_ext >&5
11615
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011616eval "$as_ac_var=no"
11617fi
11618rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11619fi
11620echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11621echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11622if test `eval echo '${'$as_ac_var'}'` = yes; then
11623 cat >>confdefs.h <<_ACEOF
11624#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11625_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011626 case $ac_sys_system in
11627 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011628
Jason Tishlerfac083d2003-07-22 15:20:49 +000011629cat >>confdefs.h <<\_ACEOF
11630#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11631_ACEOF
11632
11633 ;;
11634 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011635fi
11636done
11637
11638fi
11639
11640
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011641# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011642
11643
11644echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11645echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011646# Check whether --enable-ipv6 or --disable-ipv6 was given.
11647if test "${enable_ipv6+set}" = set; then
11648 enableval="$enable_ipv6"
11649 case "$enableval" in
11650 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 echo "$as_me:$LINENO: result: no" >&5
11652echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011653 ipv6=no
11654 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011655 *) echo "$as_me:$LINENO: result: yes" >&5
11656echo "${ECHO_T}yes" >&6
11657 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011658#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011659_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011660
11661 ipv6=yes
11662 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011663 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011664else
Martin v. Löwis11437992002-04-12 09:54:03 +000011665
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011666 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 echo "$as_me:$LINENO: result: no" >&5
11668echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011669 ipv6=no
11670
11671else
Martin v. Löwis11437992002-04-12 09:54:03 +000011672 cat >conftest.$ac_ext <<_ACEOF
11673#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011674/* confdefs.h. */
11675_ACEOF
11676cat confdefs.h >>conftest.$ac_ext
11677cat >>conftest.$ac_ext <<_ACEOF
11678/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011679 /* AF_INET6 available check */
11680#include <sys/types.h>
11681#include <sys/socket.h>
11682main()
11683{
11684 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11685 exit(1);
11686 else
11687 exit(0);
11688}
11689
Martin v. Löwis11437992002-04-12 09:54:03 +000011690_ACEOF
11691rm -f conftest$ac_exeext
11692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11693 (eval $ac_link) 2>&5
11694 ac_status=$?
11695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11698 (eval $ac_try) 2>&5
11699 ac_status=$?
11700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11701 (exit $ac_status); }; }; then
11702 echo "$as_me:$LINENO: result: yes" >&5
11703echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011704 ipv6=yes
11705else
Martin v. Löwis11437992002-04-12 09:54:03 +000011706 echo "$as_me: program exited with status $ac_status" >&5
11707echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011708sed 's/^/| /' conftest.$ac_ext >&5
11709
Martin v. Löwis11437992002-04-12 09:54:03 +000011710( exit $ac_status )
11711echo "$as_me:$LINENO: result: no" >&5
11712echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011713 ipv6=no
11714fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011715rm -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 +000011716fi
11717
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011718if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011719 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11720echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11721 cat >conftest.$ac_ext <<_ACEOF
11722#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011723/* confdefs.h. */
11724_ACEOF
11725cat confdefs.h >>conftest.$ac_ext
11726cat >>conftest.$ac_ext <<_ACEOF
11727/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011728#include <sys/types.h>
11729#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011730int
11731main ()
11732{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011733struct sockaddr_in6 x;
11734x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011735 ;
11736 return 0;
11737}
11738_ACEOF
11739rm -f conftest.$ac_objext
11740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11741 (eval $ac_compile) 2>&5
11742 ac_status=$?
11743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11744 (exit $ac_status); } &&
11745 { ac_try='test -s conftest.$ac_objext'
11746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11747 (eval $ac_try) 2>&5
11748 ac_status=$?
11749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11750 (exit $ac_status); }; }; then
11751 echo "$as_me:$LINENO: result: yes" >&5
11752echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011753 ipv6=yes
11754else
Martin v. Löwis11437992002-04-12 09:54:03 +000011755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011756sed 's/^/| /' conftest.$ac_ext >&5
11757
Martin v. Löwis11437992002-04-12 09:54:03 +000011758echo "$as_me:$LINENO: result: no" >&5
11759echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011760 ipv6=no
11761fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011762rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011763fi
11764
11765if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011767#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011768_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011769
11770fi
11771
Martin v. Löwis11437992002-04-12 09:54:03 +000011772fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011773
11774ipv6type=unknown
11775ipv6lib=none
11776ipv6trylibc=no
11777
11778if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11780echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011781 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11782 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011783 case $i in
11784 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 cat >conftest.$ac_ext <<_ACEOF
11786#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011787/* confdefs.h. */
11788_ACEOF
11789cat confdefs.h >>conftest.$ac_ext
11790cat >>conftest.$ac_ext <<_ACEOF
11791/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011792
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011793#include <netinet/in.h>
11794#ifdef IPV6_INRIA_VERSION
11795yes
11796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011797_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011798if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011799 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011800 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011801fi
11802rm -f conftest*
11803
11804 ;;
11805 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011806 cat >conftest.$ac_ext <<_ACEOF
11807#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011808/* confdefs.h. */
11809_ACEOF
11810cat confdefs.h >>conftest.$ac_ext
11811cat >>conftest.$ac_ext <<_ACEOF
11812/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011813
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011814#include <netinet/in.h>
11815#ifdef __KAME__
11816yes
11817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011818_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011820 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011821 ipv6type=$i;
11822 ipv6lib=inet6
11823 ipv6libdir=/usr/local/v6/lib
11824 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011825fi
11826rm -f conftest*
11827
11828 ;;
11829 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011830 cat >conftest.$ac_ext <<_ACEOF
11831#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011832/* confdefs.h. */
11833_ACEOF
11834cat confdefs.h >>conftest.$ac_ext
11835cat >>conftest.$ac_ext <<_ACEOF
11836/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011837
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011838#include <features.h>
11839#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11840yes
11841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011842_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011844 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011845 ipv6type=$i;
11846 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011847fi
11848rm -f conftest*
11849
11850 ;;
11851 linux-inet6)
11852 if test -d /usr/inet6; then
11853 ipv6type=$i
11854 ipv6lib=inet6
11855 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011856 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011857 fi
11858 ;;
11859 solaris)
11860 if test -f /etc/netconfig; then
11861 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11862 ipv6type=$i
11863 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011864 fi
11865 fi
11866 ;;
11867 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011868 cat >conftest.$ac_ext <<_ACEOF
11869#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011870/* confdefs.h. */
11871_ACEOF
11872cat confdefs.h >>conftest.$ac_ext
11873cat >>conftest.$ac_ext <<_ACEOF
11874/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011875
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011876#include <sys/param.h>
11877#ifdef _TOSHIBA_INET6
11878yes
11879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011880_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011882 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011883 ipv6type=$i;
11884 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011885 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011886fi
11887rm -f conftest*
11888
11889 ;;
11890 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011891 cat >conftest.$ac_ext <<_ACEOF
11892#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011893/* confdefs.h. */
11894_ACEOF
11895cat confdefs.h >>conftest.$ac_ext
11896cat >>conftest.$ac_ext <<_ACEOF
11897/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011899#include </usr/local/v6/include/sys/v6config.h>
11900#ifdef __V6D__
11901yes
11902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011903_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011905 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011906 ipv6type=$i;
11907 ipv6lib=v6;
11908 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011909 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011910fi
11911rm -f conftest*
11912
11913 ;;
11914 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011915 cat >conftest.$ac_ext <<_ACEOF
11916#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011917/* confdefs.h. */
11918_ACEOF
11919cat confdefs.h >>conftest.$ac_ext
11920cat >>conftest.$ac_ext <<_ACEOF
11921/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011922
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011923#include <sys/param.h>
11924#ifdef _ZETA_MINAMI_INET6
11925yes
11926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011927_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011929 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011930 ipv6type=$i;
11931 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011932 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011933fi
11934rm -f conftest*
11935
11936 ;;
11937 esac
11938 if test "$ipv6type" != "unknown"; then
11939 break
11940 fi
11941 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011942 echo "$as_me:$LINENO: result: $ipv6type" >&5
11943echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011944fi
11945
11946if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11947 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11948 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11949 echo "using lib$ipv6lib"
11950 else
11951 if test $ipv6trylibc = "yes"; then
11952 echo "using libc"
11953 else
11954 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11955 echo "You need to fetch lib$ipv6lib.a from appropriate"
11956 echo 'ipv6 kit and compile beforehand.'
11957 exit 1
11958 fi
11959 fi
11960fi
11961
Jack Jansen7b8c7542002-04-14 20:12:41 +000011962# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011963echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11964echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011965
11966# Check whether --with-universal-newlines or --without-universal-newlines was given.
11967if test "${with_universal_newlines+set}" = set; then
11968 withval="$with_universal_newlines"
11969
11970fi;
11971
11972if test -z "$with_universal_newlines"
11973then with_universal_newlines="yes"
11974fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011975if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011976then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011977 echo --without-universal-newlines is unsupported, see README
11978 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011979else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011980
11981cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011982#define WITH_UNIVERSAL_NEWLINES 1
11983_ACEOF
11984
11985fi
11986echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11987echo "${ECHO_T}$with_universal_newlines" >&6
11988
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011989# Check for --with-doc-strings
11990echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11991echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11992
11993# Check whether --with-doc-strings or --without-doc-strings was given.
11994if test "${with_doc_strings+set}" = set; then
11995 withval="$with_doc_strings"
11996
11997fi;
11998
11999if test -z "$with_doc_strings"
12000then with_doc_strings="yes"
12001fi
12002if test "$with_doc_strings" != "no"
12003then
12004
12005cat >>confdefs.h <<\_ACEOF
12006#define WITH_DOC_STRINGS 1
12007_ACEOF
12008
12009fi
12010echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12011echo "${ECHO_T}$with_doc_strings" >&6
12012
Neil Schemenauera35c6882001-02-27 04:45:05 +000012013# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012014echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12015echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12016
Neil Schemenauera35c6882001-02-27 04:45:05 +000012017# Check whether --with-pymalloc or --without-pymalloc was given.
12018if test "${with_pymalloc+set}" = set; then
12019 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012020
Martin v. Löwis11437992002-04-12 09:54:03 +000012021fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012022
Neil Schemenauer16c22972002-03-22 15:34:49 +000012023if test -z "$with_pymalloc"
12024then with_pymalloc="yes"
12025fi
12026if test "$with_pymalloc" != "no"
12027then
Martin v. Löwis11437992002-04-12 09:54:03 +000012028
12029cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012030#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012031_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012032
12033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012034echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12035echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012036
Barry Warsawef82cd72000-06-30 16:21:01 +000012037# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012038echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12039echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12040
Barry Warsawef82cd72000-06-30 16:21:01 +000012041# Check whether --with-wctype-functions or --without-wctype-functions was given.
12042if test "${with_wctype_functions+set}" = set; then
12043 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012044
Barry Warsawef82cd72000-06-30 16:21:01 +000012045if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012046then
12047
12048cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012049#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012050_ACEOF
12051
12052 echo "$as_me:$LINENO: result: yes" >&5
12053echo "${ECHO_T}yes" >&6
12054else echo "$as_me:$LINENO: result: no" >&5
12055echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012056fi
12057else
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 echo "$as_me:$LINENO: result: no" >&5
12059echo "${ECHO_T}no" >&6
12060fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012062# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012063
Guido van Rossum98935bf2001-09-05 19:13:16 +000012064DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012065
Guido van Rossume97ee181999-12-20 21:27:22 +000012066# the dlopen() function means we might want to use dynload_shlib.o. some
12067# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012068
Thomas Wouters3a584202000-08-05 23:28:51 +000012069for ac_func in dlopen
12070do
Martin v. Löwis11437992002-04-12 09:54:03 +000012071as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12072echo "$as_me:$LINENO: checking for $ac_func" >&5
12073echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12074if eval "test \"\${$as_ac_var+set}\" = set"; then
12075 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012076else
Martin v. Löwis11437992002-04-12 09:54:03 +000012077 cat >conftest.$ac_ext <<_ACEOF
12078#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012079/* confdefs.h. */
12080_ACEOF
12081cat confdefs.h >>conftest.$ac_ext
12082cat >>conftest.$ac_ext <<_ACEOF
12083/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012084/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012085 which can conflict with char $ac_func (); below.
12086 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012087 <limits.h> exists even on freestanding compilers. Under hpux,
12088 including <limits.h> includes <sys/time.h> and causes problems
12089 checking for functions defined therein. */
12090#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012091# include <limits.h>
12092#else
12093# include <assert.h>
12094#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012095/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012096#ifdef __cplusplus
12097extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012098{
Martin v. Löwis11437992002-04-12 09:54:03 +000012099#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012100/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 builtin and then its argument prototype would still apply. */
12102char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012103/* The GNU C library defines this for functions which it implements
12104 to always fail with ENOSYS. Some functions are actually named
12105 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012106#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012107choke me
12108#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012109char (*f) () = $ac_func;
12110#endif
12111#ifdef __cplusplus
12112}
Guido van Rossume97ee181999-12-20 21:27:22 +000012113#endif
12114
Skip Montanaro6dead952003-09-25 14:50:04 +000012115int
12116main ()
12117{
12118return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012119 ;
12120 return 0;
12121}
12122_ACEOF
12123rm -f conftest.$ac_objext conftest$ac_exeext
12124if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12125 (eval $ac_link) 2>&5
12126 ac_status=$?
12127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12128 (exit $ac_status); } &&
12129 { ac_try='test -s conftest$ac_exeext'
12130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12131 (eval $ac_try) 2>&5
12132 ac_status=$?
12133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12134 (exit $ac_status); }; }; then
12135 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012136else
Martin v. Löwis11437992002-04-12 09:54:03 +000012137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012138sed 's/^/| /' conftest.$ac_ext >&5
12139
Martin v. Löwis11437992002-04-12 09:54:03 +000012140eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012142rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012144echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12145echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12146if test `eval echo '${'$as_ac_var'}'` = yes; then
12147 cat >>confdefs.h <<_ACEOF
12148#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12149_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012150
Guido van Rossume97ee181999-12-20 21:27:22 +000012151fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012152done
Guido van Rossume97ee181999-12-20 21:27:22 +000012153
Michael W. Hudson54241132001-12-07 15:38:26 +000012154
Guido van Rossume97ee181999-12-20 21:27:22 +000012155# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12156# loading of modules.
12157
Martin v. Löwis11437992002-04-12 09:54:03 +000012158echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12159echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012160if test -z "$DYNLOADFILE"
12161then
12162 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012163 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12164 if test "$ac_cv_func_dlopen" = yes
12165 then DYNLOADFILE="dynload_shlib.o"
12166 else DYNLOADFILE="dynload_aix.o"
12167 fi
12168 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012169 BeOS*) DYNLOADFILE="dynload_beos.o";;
12170 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012171 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012172 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012173 *)
12174 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12175 # out any dynamic loading
12176 if test "$ac_cv_func_dlopen" = yes
12177 then DYNLOADFILE="dynload_shlib.o"
12178 else DYNLOADFILE="dynload_stub.o"
12179 fi
12180 ;;
12181 esac
12182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012183echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12184echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012185if test "$DYNLOADFILE" != "dynload_stub.o"
12186then
Martin v. Löwis11437992002-04-12 09:54:03 +000012187
12188cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012189#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012190_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012191
12192fi
12193
Neil Schemenauer4e425612001-06-19 15:44:15 +000012194# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12195
Michael W. Hudson54241132001-12-07 15:38:26 +000012196
Martin v. Löwis11437992002-04-12 09:54:03 +000012197echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12198echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012199if test -z "$MACHDEP_OBJS"
12200then
Jack Jansene578a632001-08-15 01:27:14 +000012201 MACHDEP_OBJS=$extra_machdep_objs
12202else
12203 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012204fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012205echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12206echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012207
Guido van Rossum627b2d71993-12-24 10:39:16 +000012208# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012280
Martin v. Löwisd5843682002-11-21 20:41:28 +000012281for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012282 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012283 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012284 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012285 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012286 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012287 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012288 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012289 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012290 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012291 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012292 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012293do
Martin v. Löwis11437992002-04-12 09:54:03 +000012294as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12295echo "$as_me:$LINENO: checking for $ac_func" >&5
12296echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12297if eval "test \"\${$as_ac_var+set}\" = set"; then
12298 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012299else
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 cat >conftest.$ac_ext <<_ACEOF
12301#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012302/* confdefs.h. */
12303_ACEOF
12304cat confdefs.h >>conftest.$ac_ext
12305cat >>conftest.$ac_ext <<_ACEOF
12306/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012307/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012308 which can conflict with char $ac_func (); below.
12309 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012310 <limits.h> exists even on freestanding compilers. Under hpux,
12311 including <limits.h> includes <sys/time.h> and causes problems
12312 checking for functions defined therein. */
12313#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012314# include <limits.h>
12315#else
12316# include <assert.h>
12317#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012318/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012319#ifdef __cplusplus
12320extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012321{
Martin v. Löwis11437992002-04-12 09:54:03 +000012322#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012323/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012324 builtin and then its argument prototype would still apply. */
12325char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012326/* The GNU C library defines this for functions which it implements
12327 to always fail with ENOSYS. Some functions are actually named
12328 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012329#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012330choke me
12331#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012332char (*f) () = $ac_func;
12333#endif
12334#ifdef __cplusplus
12335}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012336#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012337
Skip Montanaro6dead952003-09-25 14:50:04 +000012338int
12339main ()
12340{
12341return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012342 ;
12343 return 0;
12344}
12345_ACEOF
12346rm -f conftest.$ac_objext conftest$ac_exeext
12347if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12348 (eval $ac_link) 2>&5
12349 ac_status=$?
12350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12351 (exit $ac_status); } &&
12352 { ac_try='test -s conftest$ac_exeext'
12353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12354 (eval $ac_try) 2>&5
12355 ac_status=$?
12356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12357 (exit $ac_status); }; }; then
12358 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012359else
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012361sed 's/^/| /' conftest.$ac_ext >&5
12362
Martin v. Löwis11437992002-04-12 09:54:03 +000012363eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012365rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012367echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12368echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12369if test `eval echo '${'$as_ac_var'}'` = yes; then
12370 cat >>confdefs.h <<_ACEOF
12371#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12372_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012373
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012374fi
12375done
12376
Michael W. Hudson54241132001-12-07 15:38:26 +000012377
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012378# For some functions, having a definition is not sufficient, since
12379# we want to take their address.
12380echo "$as_me:$LINENO: checking for chroot" >&5
12381echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12382cat >conftest.$ac_ext <<_ACEOF
12383#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012384/* confdefs.h. */
12385_ACEOF
12386cat confdefs.h >>conftest.$ac_ext
12387cat >>conftest.$ac_ext <<_ACEOF
12388/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012389#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012390int
12391main ()
12392{
12393void *x=chroot
12394 ;
12395 return 0;
12396}
12397_ACEOF
12398rm -f conftest.$ac_objext
12399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12400 (eval $ac_compile) 2>&5
12401 ac_status=$?
12402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12403 (exit $ac_status); } &&
12404 { ac_try='test -s conftest.$ac_objext'
12405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12406 (eval $ac_try) 2>&5
12407 ac_status=$?
12408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12409 (exit $ac_status); }; }; then
12410
12411cat >>confdefs.h <<\_ACEOF
12412#define HAVE_CHROOT 1
12413_ACEOF
12414
12415 echo "$as_me:$LINENO: result: yes" >&5
12416echo "${ECHO_T}yes" >&6
12417else
12418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012419sed 's/^/| /' conftest.$ac_ext >&5
12420
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012421echo "$as_me:$LINENO: result: no" >&5
12422echo "${ECHO_T}no" >&6
12423
12424fi
12425rm -f conftest.$ac_objext conftest.$ac_ext
12426echo "$as_me:$LINENO: checking for link" >&5
12427echo $ECHO_N "checking for link... $ECHO_C" >&6
12428cat >conftest.$ac_ext <<_ACEOF
12429#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012430/* confdefs.h. */
12431_ACEOF
12432cat confdefs.h >>conftest.$ac_ext
12433cat >>conftest.$ac_ext <<_ACEOF
12434/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012435#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012436int
12437main ()
12438{
12439void *x=link
12440 ;
12441 return 0;
12442}
12443_ACEOF
12444rm -f conftest.$ac_objext
12445if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12446 (eval $ac_compile) 2>&5
12447 ac_status=$?
12448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12449 (exit $ac_status); } &&
12450 { ac_try='test -s conftest.$ac_objext'
12451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12452 (eval $ac_try) 2>&5
12453 ac_status=$?
12454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12455 (exit $ac_status); }; }; then
12456
12457cat >>confdefs.h <<\_ACEOF
12458#define HAVE_LINK 1
12459_ACEOF
12460
12461 echo "$as_me:$LINENO: result: yes" >&5
12462echo "${ECHO_T}yes" >&6
12463else
12464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012465sed 's/^/| /' conftest.$ac_ext >&5
12466
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012467echo "$as_me:$LINENO: result: no" >&5
12468echo "${ECHO_T}no" >&6
12469
12470fi
12471rm -f conftest.$ac_objext conftest.$ac_ext
12472echo "$as_me:$LINENO: checking for symlink" >&5
12473echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12474cat >conftest.$ac_ext <<_ACEOF
12475#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012476/* confdefs.h. */
12477_ACEOF
12478cat confdefs.h >>conftest.$ac_ext
12479cat >>conftest.$ac_ext <<_ACEOF
12480/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012481#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012482int
12483main ()
12484{
12485void *x=symlink
12486 ;
12487 return 0;
12488}
12489_ACEOF
12490rm -f conftest.$ac_objext
12491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12492 (eval $ac_compile) 2>&5
12493 ac_status=$?
12494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12495 (exit $ac_status); } &&
12496 { ac_try='test -s conftest.$ac_objext'
12497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12498 (eval $ac_try) 2>&5
12499 ac_status=$?
12500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12501 (exit $ac_status); }; }; then
12502
12503cat >>confdefs.h <<\_ACEOF
12504#define HAVE_SYMLINK 1
12505_ACEOF
12506
12507 echo "$as_me:$LINENO: result: yes" >&5
12508echo "${ECHO_T}yes" >&6
12509else
12510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012511sed 's/^/| /' conftest.$ac_ext >&5
12512
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012513echo "$as_me:$LINENO: result: no" >&5
12514echo "${ECHO_T}no" >&6
12515
12516fi
12517rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012518echo "$as_me:$LINENO: checking for fchdir" >&5
12519echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12520cat >conftest.$ac_ext <<_ACEOF
12521#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012522/* confdefs.h. */
12523_ACEOF
12524cat confdefs.h >>conftest.$ac_ext
12525cat >>conftest.$ac_ext <<_ACEOF
12526/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012527#include <unistd.h>
12528int
12529main ()
12530{
12531void *x=fchdir
12532 ;
12533 return 0;
12534}
12535_ACEOF
12536rm -f conftest.$ac_objext
12537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12538 (eval $ac_compile) 2>&5
12539 ac_status=$?
12540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12541 (exit $ac_status); } &&
12542 { ac_try='test -s conftest.$ac_objext'
12543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12544 (eval $ac_try) 2>&5
12545 ac_status=$?
12546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12547 (exit $ac_status); }; }; then
12548
12549cat >>confdefs.h <<\_ACEOF
12550#define HAVE_FCHDIR 1
12551_ACEOF
12552
12553 echo "$as_me:$LINENO: result: yes" >&5
12554echo "${ECHO_T}yes" >&6
12555else
12556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012557sed 's/^/| /' conftest.$ac_ext >&5
12558
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012559echo "$as_me:$LINENO: result: no" >&5
12560echo "${ECHO_T}no" >&6
12561
12562fi
12563rm -f conftest.$ac_objext conftest.$ac_ext
12564echo "$as_me:$LINENO: checking for fsync" >&5
12565echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12566cat >conftest.$ac_ext <<_ACEOF
12567#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012568/* confdefs.h. */
12569_ACEOF
12570cat confdefs.h >>conftest.$ac_ext
12571cat >>conftest.$ac_ext <<_ACEOF
12572/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012573#include <unistd.h>
12574int
12575main ()
12576{
12577void *x=fsync
12578 ;
12579 return 0;
12580}
12581_ACEOF
12582rm -f conftest.$ac_objext
12583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12584 (eval $ac_compile) 2>&5
12585 ac_status=$?
12586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12587 (exit $ac_status); } &&
12588 { ac_try='test -s conftest.$ac_objext'
12589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12590 (eval $ac_try) 2>&5
12591 ac_status=$?
12592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12593 (exit $ac_status); }; }; then
12594
12595cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012596#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012597_ACEOF
12598
12599 echo "$as_me:$LINENO: result: yes" >&5
12600echo "${ECHO_T}yes" >&6
12601else
12602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012603sed 's/^/| /' conftest.$ac_ext >&5
12604
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012605echo "$as_me:$LINENO: result: no" >&5
12606echo "${ECHO_T}no" >&6
12607
12608fi
12609rm -f conftest.$ac_objext conftest.$ac_ext
12610echo "$as_me:$LINENO: checking for fdatasync" >&5
12611echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12612cat >conftest.$ac_ext <<_ACEOF
12613#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012614/* confdefs.h. */
12615_ACEOF
12616cat confdefs.h >>conftest.$ac_ext
12617cat >>conftest.$ac_ext <<_ACEOF
12618/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012619#include <unistd.h>
12620int
12621main ()
12622{
12623void *x=fdatasync
12624 ;
12625 return 0;
12626}
12627_ACEOF
12628rm -f conftest.$ac_objext
12629if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12630 (eval $ac_compile) 2>&5
12631 ac_status=$?
12632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633 (exit $ac_status); } &&
12634 { ac_try='test -s conftest.$ac_objext'
12635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12636 (eval $ac_try) 2>&5
12637 ac_status=$?
12638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12639 (exit $ac_status); }; }; then
12640
12641cat >>confdefs.h <<\_ACEOF
12642#define HAVE_FDATASYNC 1
12643_ACEOF
12644
12645 echo "$as_me:$LINENO: result: yes" >&5
12646echo "${ECHO_T}yes" >&6
12647else
12648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012649sed 's/^/| /' conftest.$ac_ext >&5
12650
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012651echo "$as_me:$LINENO: result: no" >&5
12652echo "${ECHO_T}no" >&6
12653
12654fi
12655rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012656
Martin v. Löwisd5843682002-11-21 20:41:28 +000012657# On some systems (eg. FreeBSD 5), we would find a definition of the
12658# functions ctermid_r, setgroups in the library, but no prototype
12659# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12660# address to avoid compiler warnings and potential miscompilations
12661# because of the missing prototypes.
12662
12663echo "$as_me:$LINENO: checking for ctermid_r" >&5
12664echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12665cat >conftest.$ac_ext <<_ACEOF
12666#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012667/* confdefs.h. */
12668_ACEOF
12669cat confdefs.h >>conftest.$ac_ext
12670cat >>conftest.$ac_ext <<_ACEOF
12671/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012672
12673#include "confdefs.h"
12674#include <stdio.h>
12675
Martin v. Löwisd5843682002-11-21 20:41:28 +000012676int
12677main ()
12678{
12679void* p = ctermid_r
12680 ;
12681 return 0;
12682}
12683_ACEOF
12684rm -f conftest.$ac_objext
12685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12686 (eval $ac_compile) 2>&5
12687 ac_status=$?
12688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12689 (exit $ac_status); } &&
12690 { ac_try='test -s conftest.$ac_objext'
12691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12692 (eval $ac_try) 2>&5
12693 ac_status=$?
12694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12695 (exit $ac_status); }; }; then
12696
12697cat >>confdefs.h <<\_ACEOF
12698#define HAVE_CTERMID_R 1
12699_ACEOF
12700
12701 echo "$as_me:$LINENO: result: yes" >&5
12702echo "${ECHO_T}yes" >&6
12703else
12704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012705sed 's/^/| /' conftest.$ac_ext >&5
12706
Martin v. Löwisd5843682002-11-21 20:41:28 +000012707echo "$as_me:$LINENO: result: no" >&5
12708echo "${ECHO_T}no" >&6
12709
12710fi
12711rm -f conftest.$ac_objext conftest.$ac_ext
12712
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012713echo "$as_me:$LINENO: checking for flock" >&5
12714echo $ECHO_N "checking for flock... $ECHO_C" >&6
12715cat >conftest.$ac_ext <<_ACEOF
12716#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012717/* confdefs.h. */
12718_ACEOF
12719cat confdefs.h >>conftest.$ac_ext
12720cat >>conftest.$ac_ext <<_ACEOF
12721/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012722
12723#include "confdefs.h"
12724#include <sys/file.h>
12725
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012726int
12727main ()
12728{
12729void* p = flock
12730 ;
12731 return 0;
12732}
12733_ACEOF
12734rm -f conftest.$ac_objext
12735if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12736 (eval $ac_compile) 2>&5
12737 ac_status=$?
12738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12739 (exit $ac_status); } &&
12740 { ac_try='test -s conftest.$ac_objext'
12741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12742 (eval $ac_try) 2>&5
12743 ac_status=$?
12744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12745 (exit $ac_status); }; }; then
12746
12747cat >>confdefs.h <<\_ACEOF
12748#define HAVE_FLOCK 1
12749_ACEOF
12750
12751 echo "$as_me:$LINENO: result: yes" >&5
12752echo "${ECHO_T}yes" >&6
12753else
12754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012755sed 's/^/| /' conftest.$ac_ext >&5
12756
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012757echo "$as_me:$LINENO: result: no" >&5
12758echo "${ECHO_T}no" >&6
12759
12760fi
12761rm -f conftest.$ac_objext conftest.$ac_ext
12762
12763echo "$as_me:$LINENO: checking for getpagesize" >&5
12764echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12765cat >conftest.$ac_ext <<_ACEOF
12766#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012767/* confdefs.h. */
12768_ACEOF
12769cat confdefs.h >>conftest.$ac_ext
12770cat >>conftest.$ac_ext <<_ACEOF
12771/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012772
12773#include "confdefs.h"
12774#include <unistd.h>
12775
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012776int
12777main ()
12778{
12779void* p = getpagesize
12780 ;
12781 return 0;
12782}
12783_ACEOF
12784rm -f conftest.$ac_objext
12785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12786 (eval $ac_compile) 2>&5
12787 ac_status=$?
12788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12789 (exit $ac_status); } &&
12790 { ac_try='test -s conftest.$ac_objext'
12791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12792 (eval $ac_try) 2>&5
12793 ac_status=$?
12794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12795 (exit $ac_status); }; }; then
12796
12797cat >>confdefs.h <<\_ACEOF
12798#define HAVE_GETPAGESIZE 1
12799_ACEOF
12800
12801 echo "$as_me:$LINENO: result: yes" >&5
12802echo "${ECHO_T}yes" >&6
12803else
12804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012805sed 's/^/| /' conftest.$ac_ext >&5
12806
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012807echo "$as_me:$LINENO: result: no" >&5
12808echo "${ECHO_T}no" >&6
12809
12810fi
12811rm -f conftest.$ac_objext conftest.$ac_ext
12812
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012813for ac_prog in true
12814do
12815 # Extract the first word of "$ac_prog", so it can be a program name with args.
12816set dummy $ac_prog; ac_word=$2
12817echo "$as_me:$LINENO: checking for $ac_word" >&5
12818echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12819if test "${ac_cv_prog_TRUE+set}" = set; then
12820 echo $ECHO_N "(cached) $ECHO_C" >&6
12821else
12822 if test -n "$TRUE"; then
12823 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12824else
12825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12826for as_dir in $PATH
12827do
12828 IFS=$as_save_IFS
12829 test -z "$as_dir" && as_dir=.
12830 for ac_exec_ext in '' $ac_executable_extensions; do
12831 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12832 ac_cv_prog_TRUE="$ac_prog"
12833 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12834 break 2
12835 fi
12836done
12837done
12838
12839fi
12840fi
12841TRUE=$ac_cv_prog_TRUE
12842if test -n "$TRUE"; then
12843 echo "$as_me:$LINENO: result: $TRUE" >&5
12844echo "${ECHO_T}$TRUE" >&6
12845else
12846 echo "$as_me:$LINENO: result: no" >&5
12847echo "${ECHO_T}no" >&6
12848fi
12849
12850 test -n "$TRUE" && break
12851done
12852test -n "$TRUE" || TRUE="/bin/true"
12853
12854
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012855echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12856echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12857if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12858 echo $ECHO_N "(cached) $ECHO_C" >&6
12859else
12860 ac_check_lib_save_LIBS=$LIBS
12861LIBS="-lc $LIBS"
12862cat >conftest.$ac_ext <<_ACEOF
12863#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012864/* confdefs.h. */
12865_ACEOF
12866cat confdefs.h >>conftest.$ac_ext
12867cat >>conftest.$ac_ext <<_ACEOF
12868/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012869
12870/* Override any gcc2 internal prototype to avoid an error. */
12871#ifdef __cplusplus
12872extern "C"
12873#endif
12874/* We use char because int might match the return type of a gcc2
12875 builtin and then its argument prototype would still apply. */
12876char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012877int
12878main ()
12879{
12880inet_aton ();
12881 ;
12882 return 0;
12883}
12884_ACEOF
12885rm -f conftest.$ac_objext conftest$ac_exeext
12886if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12887 (eval $ac_link) 2>&5
12888 ac_status=$?
12889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12890 (exit $ac_status); } &&
12891 { ac_try='test -s conftest$ac_exeext'
12892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12893 (eval $ac_try) 2>&5
12894 ac_status=$?
12895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12896 (exit $ac_status); }; }; then
12897 ac_cv_lib_c_inet_aton=yes
12898else
12899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012900sed 's/^/| /' conftest.$ac_ext >&5
12901
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012902ac_cv_lib_c_inet_aton=no
12903fi
12904rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12905LIBS=$ac_check_lib_save_LIBS
12906fi
12907echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12908echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12909if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012910 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012911else
12912
12913echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12914echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12915if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12916 echo $ECHO_N "(cached) $ECHO_C" >&6
12917else
12918 ac_check_lib_save_LIBS=$LIBS
12919LIBS="-lresolv $LIBS"
12920cat >conftest.$ac_ext <<_ACEOF
12921#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012922/* confdefs.h. */
12923_ACEOF
12924cat confdefs.h >>conftest.$ac_ext
12925cat >>conftest.$ac_ext <<_ACEOF
12926/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012927
12928/* Override any gcc2 internal prototype to avoid an error. */
12929#ifdef __cplusplus
12930extern "C"
12931#endif
12932/* We use char because int might match the return type of a gcc2
12933 builtin and then its argument prototype would still apply. */
12934char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012935int
12936main ()
12937{
12938inet_aton ();
12939 ;
12940 return 0;
12941}
12942_ACEOF
12943rm -f conftest.$ac_objext conftest$ac_exeext
12944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12945 (eval $ac_link) 2>&5
12946 ac_status=$?
12947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12948 (exit $ac_status); } &&
12949 { ac_try='test -s conftest$ac_exeext'
12950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12951 (eval $ac_try) 2>&5
12952 ac_status=$?
12953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12954 (exit $ac_status); }; }; then
12955 ac_cv_lib_resolv_inet_aton=yes
12956else
12957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012958sed 's/^/| /' conftest.$ac_ext >&5
12959
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012960ac_cv_lib_resolv_inet_aton=no
12961fi
12962rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12963LIBS=$ac_check_lib_save_LIBS
12964fi
12965echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12966echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12967if test $ac_cv_lib_resolv_inet_aton = yes; then
12968 cat >>confdefs.h <<_ACEOF
12969#define HAVE_LIBRESOLV 1
12970_ACEOF
12971
12972 LIBS="-lresolv $LIBS"
12973
12974fi
12975
12976
12977fi
12978
12979
Martin v. Löwise9416172003-05-03 10:12:45 +000012980echo "$as_me:$LINENO: checking for hstrerror" >&5
12981echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12982cat >conftest.$ac_ext <<_ACEOF
12983#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012984/* confdefs.h. */
12985_ACEOF
12986cat confdefs.h >>conftest.$ac_ext
12987cat >>conftest.$ac_ext <<_ACEOF
12988/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012989
12990#include "confdefs.h"
12991#include <netdb.h>
12992
Martin v. Löwise9416172003-05-03 10:12:45 +000012993int
12994main ()
12995{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012996void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012997 ;
12998 return 0;
12999}
13000_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013001rm -f conftest.$ac_objext conftest$ac_exeext
13002if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13003 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013004 ac_status=$?
13005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13006 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013007 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13009 (eval $ac_try) 2>&5
13010 ac_status=$?
13011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13012 (exit $ac_status); }; }; then
13013
13014cat >>confdefs.h <<\_ACEOF
13015#define HAVE_HSTRERROR 1
13016_ACEOF
13017
13018 echo "$as_me:$LINENO: result: yes" >&5
13019echo "${ECHO_T}yes" >&6
13020else
13021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013022sed 's/^/| /' conftest.$ac_ext >&5
13023
Martin v. Löwise9416172003-05-03 10:12:45 +000013024echo "$as_me:$LINENO: result: no" >&5
13025echo "${ECHO_T}no" >&6
13026
13027fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013028rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013029
13030echo "$as_me:$LINENO: checking for inet_aton" >&5
13031echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13032cat >conftest.$ac_ext <<_ACEOF
13033#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013034/* confdefs.h. */
13035_ACEOF
13036cat confdefs.h >>conftest.$ac_ext
13037cat >>conftest.$ac_ext <<_ACEOF
13038/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013039
13040#include "confdefs.h"
13041#include <sys/socket.h>
13042#include <netinet/in.h>
13043#include <arpa/inet.h>
13044
Martin v. Löwise9416172003-05-03 10:12:45 +000013045int
13046main ()
13047{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013048void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013049 ;
13050 return 0;
13051}
13052_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013053rm -f conftest.$ac_objext conftest$ac_exeext
13054if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13055 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013056 ac_status=$?
13057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13058 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013059 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13061 (eval $ac_try) 2>&5
13062 ac_status=$?
13063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13064 (exit $ac_status); }; }; then
13065
13066cat >>confdefs.h <<\_ACEOF
13067#define HAVE_INET_ATON 1
13068_ACEOF
13069
13070 echo "$as_me:$LINENO: result: yes" >&5
13071echo "${ECHO_T}yes" >&6
13072else
13073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013074sed 's/^/| /' conftest.$ac_ext >&5
13075
Martin v. Löwise9416172003-05-03 10:12:45 +000013076echo "$as_me:$LINENO: result: no" >&5
13077echo "${ECHO_T}no" >&6
13078
13079fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013081
13082echo "$as_me:$LINENO: checking for inet_pton" >&5
13083echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13084cat >conftest.$ac_ext <<_ACEOF
13085#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013086/* confdefs.h. */
13087_ACEOF
13088cat confdefs.h >>conftest.$ac_ext
13089cat >>conftest.$ac_ext <<_ACEOF
13090/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013091
13092#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013093#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013094#include <sys/socket.h>
13095#include <netinet/in.h>
13096#include <arpa/inet.h>
13097
Martin v. Löwise9416172003-05-03 10:12:45 +000013098int
13099main ()
13100{
13101void* p = inet_pton
13102 ;
13103 return 0;
13104}
13105_ACEOF
13106rm -f conftest.$ac_objext
13107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13108 (eval $ac_compile) 2>&5
13109 ac_status=$?
13110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13111 (exit $ac_status); } &&
13112 { ac_try='test -s conftest.$ac_objext'
13113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13114 (eval $ac_try) 2>&5
13115 ac_status=$?
13116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13117 (exit $ac_status); }; }; then
13118
13119cat >>confdefs.h <<\_ACEOF
13120#define HAVE_INET_PTON 1
13121_ACEOF
13122
13123 echo "$as_me:$LINENO: result: yes" >&5
13124echo "${ECHO_T}yes" >&6
13125else
13126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013127sed 's/^/| /' conftest.$ac_ext >&5
13128
Martin v. Löwise9416172003-05-03 10:12:45 +000013129echo "$as_me:$LINENO: result: no" >&5
13130echo "${ECHO_T}no" >&6
13131
13132fi
13133rm -f conftest.$ac_objext conftest.$ac_ext
13134
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013135# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013136echo "$as_me:$LINENO: checking for setgroups" >&5
13137echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13138cat >conftest.$ac_ext <<_ACEOF
13139#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013140/* confdefs.h. */
13141_ACEOF
13142cat confdefs.h >>conftest.$ac_ext
13143cat >>conftest.$ac_ext <<_ACEOF
13144/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013145
13146#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013147#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013148#ifdef HAVE_GRP_H
13149#include <grp.h>
13150#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013151
Martin v. Löwisd5843682002-11-21 20:41:28 +000013152int
13153main ()
13154{
13155void* p = setgroups
13156 ;
13157 return 0;
13158}
13159_ACEOF
13160rm -f conftest.$ac_objext
13161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13162 (eval $ac_compile) 2>&5
13163 ac_status=$?
13164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13165 (exit $ac_status); } &&
13166 { ac_try='test -s conftest.$ac_objext'
13167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13168 (eval $ac_try) 2>&5
13169 ac_status=$?
13170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13171 (exit $ac_status); }; }; then
13172
13173cat >>confdefs.h <<\_ACEOF
13174#define HAVE_SETGROUPS 1
13175_ACEOF
13176
13177 echo "$as_me:$LINENO: result: yes" >&5
13178echo "${ECHO_T}yes" >&6
13179else
13180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013181sed 's/^/| /' conftest.$ac_ext >&5
13182
Martin v. Löwisd5843682002-11-21 20:41:28 +000013183echo "$as_me:$LINENO: result: no" >&5
13184echo "${ECHO_T}no" >&6
13185
13186fi
13187rm -f conftest.$ac_objext conftest.$ac_ext
13188
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013189# check for openpty and forkpty
13190
Martin v. Löwis11437992002-04-12 09:54:03 +000013191
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013192for ac_func in openpty
13193do
Martin v. Löwis11437992002-04-12 09:54:03 +000013194as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13195echo "$as_me:$LINENO: checking for $ac_func" >&5
13196echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13197if eval "test \"\${$as_ac_var+set}\" = set"; then
13198 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013199else
Martin v. Löwis11437992002-04-12 09:54:03 +000013200 cat >conftest.$ac_ext <<_ACEOF
13201#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013202/* confdefs.h. */
13203_ACEOF
13204cat confdefs.h >>conftest.$ac_ext
13205cat >>conftest.$ac_ext <<_ACEOF
13206/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013207/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013208 which can conflict with char $ac_func (); below.
13209 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013210 <limits.h> exists even on freestanding compilers. Under hpux,
13211 including <limits.h> includes <sys/time.h> and causes problems
13212 checking for functions defined therein. */
13213#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013214# include <limits.h>
13215#else
13216# include <assert.h>
13217#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013218/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013219#ifdef __cplusplus
13220extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013221{
Martin v. Löwis11437992002-04-12 09:54:03 +000013222#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013223/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 builtin and then its argument prototype would still apply. */
13225char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013226/* The GNU C library defines this for functions which it implements
13227 to always fail with ENOSYS. Some functions are actually named
13228 something starting with __ and the normal name is an alias. */
13229#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13230choke me
13231#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013232char (*f) () = $ac_func;
13233#endif
13234#ifdef __cplusplus
13235}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013236#endif
13237
Skip Montanaro6dead952003-09-25 14:50:04 +000013238int
13239main ()
13240{
13241return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013242 ;
13243 return 0;
13244}
13245_ACEOF
13246rm -f conftest.$ac_objext conftest$ac_exeext
13247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13248 (eval $ac_link) 2>&5
13249 ac_status=$?
13250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13251 (exit $ac_status); } &&
13252 { ac_try='test -s conftest$ac_exeext'
13253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13254 (eval $ac_try) 2>&5
13255 ac_status=$?
13256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13257 (exit $ac_status); }; }; then
13258 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013259else
Martin v. Löwis11437992002-04-12 09:54:03 +000013260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013261sed 's/^/| /' conftest.$ac_ext >&5
13262
Martin v. Löwis11437992002-04-12 09:54:03 +000013263eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013264fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013265rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013266fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013267echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13268echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13269if test `eval echo '${'$as_ac_var'}'` = yes; then
13270 cat >>confdefs.h <<_ACEOF
13271#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13272_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013273
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013274else
Martin v. Löwis11437992002-04-12 09:54:03 +000013275 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13276echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13277if test "${ac_cv_lib_util_openpty+set}" = set; then
13278 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013279else
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013281LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013282cat >conftest.$ac_ext <<_ACEOF
13283#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013284/* confdefs.h. */
13285_ACEOF
13286cat confdefs.h >>conftest.$ac_ext
13287cat >>conftest.$ac_ext <<_ACEOF
13288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013289
Fred Drake8cef4cf2000-06-28 16:40:38 +000013290/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013291#ifdef __cplusplus
13292extern "C"
13293#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013294/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 builtin and then its argument prototype would still apply. */
13296char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013297int
13298main ()
13299{
13300openpty ();
13301 ;
13302 return 0;
13303}
13304_ACEOF
13305rm -f conftest.$ac_objext conftest$ac_exeext
13306if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13307 (eval $ac_link) 2>&5
13308 ac_status=$?
13309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13310 (exit $ac_status); } &&
13311 { ac_try='test -s conftest$ac_exeext'
13312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13313 (eval $ac_try) 2>&5
13314 ac_status=$?
13315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13316 (exit $ac_status); }; }; then
13317 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013318else
Martin v. Löwis11437992002-04-12 09:54:03 +000013319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013320sed 's/^/| /' conftest.$ac_ext >&5
13321
Martin v. Löwis11437992002-04-12 09:54:03 +000013322ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013324rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13325LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013327echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13328echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13329if test $ac_cv_lib_util_openpty = yes; then
13330 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013331#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013332_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013333 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013334fi
13335
13336fi
13337done
13338
Martin v. Löwis11437992002-04-12 09:54:03 +000013339
Fred Drake8cef4cf2000-06-28 16:40:38 +000013340for ac_func in forkpty
13341do
Martin v. Löwis11437992002-04-12 09:54:03 +000013342as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13343echo "$as_me:$LINENO: checking for $ac_func" >&5
13344echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13345if eval "test \"\${$as_ac_var+set}\" = set"; then
13346 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013347else
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 cat >conftest.$ac_ext <<_ACEOF
13349#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013350/* confdefs.h. */
13351_ACEOF
13352cat confdefs.h >>conftest.$ac_ext
13353cat >>conftest.$ac_ext <<_ACEOF
13354/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013355/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013356 which can conflict with char $ac_func (); below.
13357 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013358 <limits.h> exists even on freestanding compilers. Under hpux,
13359 including <limits.h> includes <sys/time.h> and causes problems
13360 checking for functions defined therein. */
13361#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013362# include <limits.h>
13363#else
13364# include <assert.h>
13365#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013366/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013367#ifdef __cplusplus
13368extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013369{
Martin v. Löwis11437992002-04-12 09:54:03 +000013370#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013371/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013372 builtin and then its argument prototype would still apply. */
13373char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013374/* The GNU C library defines this for functions which it implements
13375 to always fail with ENOSYS. Some functions are actually named
13376 something starting with __ and the normal name is an alias. */
13377#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13378choke me
13379#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013380char (*f) () = $ac_func;
13381#endif
13382#ifdef __cplusplus
13383}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013384#endif
13385
Skip Montanaro6dead952003-09-25 14:50:04 +000013386int
13387main ()
13388{
13389return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 ;
13391 return 0;
13392}
13393_ACEOF
13394rm -f conftest.$ac_objext conftest$ac_exeext
13395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13396 (eval $ac_link) 2>&5
13397 ac_status=$?
13398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399 (exit $ac_status); } &&
13400 { ac_try='test -s conftest$ac_exeext'
13401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13402 (eval $ac_try) 2>&5
13403 ac_status=$?
13404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13405 (exit $ac_status); }; }; then
13406 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013407else
Martin v. Löwis11437992002-04-12 09:54:03 +000013408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013409sed 's/^/| /' conftest.$ac_ext >&5
13410
Martin v. Löwis11437992002-04-12 09:54:03 +000013411eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013413rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013415echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13416echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13417if test `eval echo '${'$as_ac_var'}'` = yes; then
13418 cat >>confdefs.h <<_ACEOF
13419#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13420_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013421
Fred Drake8cef4cf2000-06-28 16:40:38 +000013422else
Martin v. Löwis11437992002-04-12 09:54:03 +000013423 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13424echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13425if test "${ac_cv_lib_util_forkpty+set}" = set; then
13426 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013427else
Martin v. Löwis11437992002-04-12 09:54:03 +000013428 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013429LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013430cat >conftest.$ac_ext <<_ACEOF
13431#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013432/* confdefs.h. */
13433_ACEOF
13434cat confdefs.h >>conftest.$ac_ext
13435cat >>conftest.$ac_ext <<_ACEOF
13436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013437
Fred Drake8cef4cf2000-06-28 16:40:38 +000013438/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013439#ifdef __cplusplus
13440extern "C"
13441#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013442/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 builtin and then its argument prototype would still apply. */
13444char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013445int
13446main ()
13447{
13448forkpty ();
13449 ;
13450 return 0;
13451}
13452_ACEOF
13453rm -f conftest.$ac_objext conftest$ac_exeext
13454if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13455 (eval $ac_link) 2>&5
13456 ac_status=$?
13457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13458 (exit $ac_status); } &&
13459 { ac_try='test -s conftest$ac_exeext'
13460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13461 (eval $ac_try) 2>&5
13462 ac_status=$?
13463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13464 (exit $ac_status); }; }; then
13465 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013466else
Martin v. Löwis11437992002-04-12 09:54:03 +000013467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013468sed 's/^/| /' conftest.$ac_ext >&5
13469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13473LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013474fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013475echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13476echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13477if test $ac_cv_lib_util_forkpty = yes; then
13478 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013479#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013480_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013481 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013482fi
13483
13484fi
13485done
13486
Jack Jansendd19cf82001-12-06 22:36:17 +000013487
Michael W. Hudson54241132001-12-07 15:38:26 +000013488# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
13490
13491
13492
13493
13494
Fred Drake8cef4cf2000-06-28 16:40:38 +000013495for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13496do
Martin v. Löwis11437992002-04-12 09:54:03 +000013497as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13498echo "$as_me:$LINENO: checking for $ac_func" >&5
13499echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13500if eval "test \"\${$as_ac_var+set}\" = set"; then
13501 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013502else
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 cat >conftest.$ac_ext <<_ACEOF
13504#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013505/* confdefs.h. */
13506_ACEOF
13507cat confdefs.h >>conftest.$ac_ext
13508cat >>conftest.$ac_ext <<_ACEOF
13509/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013510/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013511 which can conflict with char $ac_func (); below.
13512 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013513 <limits.h> exists even on freestanding compilers. Under hpux,
13514 including <limits.h> includes <sys/time.h> and causes problems
13515 checking for functions defined therein. */
13516#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013517# include <limits.h>
13518#else
13519# include <assert.h>
13520#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013521/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013522#ifdef __cplusplus
13523extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013524{
Martin v. Löwis11437992002-04-12 09:54:03 +000013525#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013526/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013527 builtin and then its argument prototype would still apply. */
13528char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013529/* The GNU C library defines this for functions which it implements
13530 to always fail with ENOSYS. Some functions are actually named
13531 something starting with __ and the normal name is an alias. */
13532#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13533choke me
13534#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013535char (*f) () = $ac_func;
13536#endif
13537#ifdef __cplusplus
13538}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013539#endif
13540
Skip Montanaro6dead952003-09-25 14:50:04 +000013541int
13542main ()
13543{
13544return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013545 ;
13546 return 0;
13547}
13548_ACEOF
13549rm -f conftest.$ac_objext conftest$ac_exeext
13550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13551 (eval $ac_link) 2>&5
13552 ac_status=$?
13553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13554 (exit $ac_status); } &&
13555 { ac_try='test -s conftest$ac_exeext'
13556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13557 (eval $ac_try) 2>&5
13558 ac_status=$?
13559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13560 (exit $ac_status); }; }; then
13561 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013562else
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013564sed 's/^/| /' conftest.$ac_ext >&5
13565
Martin v. Löwis11437992002-04-12 09:54:03 +000013566eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013568rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013569fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013570echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13571echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13572if test `eval echo '${'$as_ac_var'}'` = yes; then
13573 cat >>confdefs.h <<_ACEOF
13574#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13575_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013576
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013577fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013578done
13579
Michael W. Hudson54241132001-12-07 15:38:26 +000013580
Martin v. Löwis11437992002-04-12 09:54:03 +000013581
13582
13583
13584
13585
Martin v. Löwis1142de32002-03-29 16:28:31 +000013586for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013587do
Martin v. Löwis11437992002-04-12 09:54:03 +000013588as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13589echo "$as_me:$LINENO: checking for $ac_func" >&5
13590echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13591if eval "test \"\${$as_ac_var+set}\" = set"; then
13592 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013593else
Martin v. Löwis11437992002-04-12 09:54:03 +000013594 cat >conftest.$ac_ext <<_ACEOF
13595#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013596/* confdefs.h. */
13597_ACEOF
13598cat confdefs.h >>conftest.$ac_ext
13599cat >>conftest.$ac_ext <<_ACEOF
13600/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013601/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013602 which can conflict with char $ac_func (); below.
13603 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013604 <limits.h> exists even on freestanding compilers. Under hpux,
13605 including <limits.h> includes <sys/time.h> and causes problems
13606 checking for functions defined therein. */
13607#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013608# include <limits.h>
13609#else
13610# include <assert.h>
13611#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013612/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013613#ifdef __cplusplus
13614extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013615{
Martin v. Löwis11437992002-04-12 09:54:03 +000013616#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013617/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013618 builtin and then its argument prototype would still apply. */
13619char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013620/* The GNU C library defines this for functions which it implements
13621 to always fail with ENOSYS. Some functions are actually named
13622 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013623#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013624choke me
13625#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013626char (*f) () = $ac_func;
13627#endif
13628#ifdef __cplusplus
13629}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013630#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013631
Skip Montanaro6dead952003-09-25 14:50:04 +000013632int
13633main ()
13634{
13635return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 ;
13637 return 0;
13638}
13639_ACEOF
13640rm -f conftest.$ac_objext conftest$ac_exeext
13641if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13642 (eval $ac_link) 2>&5
13643 ac_status=$?
13644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645 (exit $ac_status); } &&
13646 { ac_try='test -s conftest$ac_exeext'
13647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13648 (eval $ac_try) 2>&5
13649 ac_status=$?
13650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13651 (exit $ac_status); }; }; then
13652 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013653else
Martin v. Löwis11437992002-04-12 09:54:03 +000013654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013655sed 's/^/| /' conftest.$ac_ext >&5
13656
Martin v. Löwis11437992002-04-12 09:54:03 +000013657eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013658fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013659rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013660fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013661echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13662echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13663if test `eval echo '${'$as_ac_var'}'` = yes; then
13664 cat >>confdefs.h <<_ACEOF
13665#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13666_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013667
Martin v. Löwis1142de32002-03-29 16:28:31 +000013668else
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013670fi
13671done
13672
13673
Martin v. Löwis11437992002-04-12 09:54:03 +000013674
Martin v. Löwis1142de32002-03-29 16:28:31 +000013675for ac_func in getpgrp
13676do
Martin v. Löwis11437992002-04-12 09:54:03 +000013677as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13678echo "$as_me:$LINENO: checking for $ac_func" >&5
13679echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13680if eval "test \"\${$as_ac_var+set}\" = set"; then
13681 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013682else
Martin v. Löwis11437992002-04-12 09:54:03 +000013683 cat >conftest.$ac_ext <<_ACEOF
13684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013685/* confdefs.h. */
13686_ACEOF
13687cat confdefs.h >>conftest.$ac_ext
13688cat >>conftest.$ac_ext <<_ACEOF
13689/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013690/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013691 which can conflict with char $ac_func (); below.
13692 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013693 <limits.h> exists even on freestanding compilers. Under hpux,
13694 including <limits.h> includes <sys/time.h> and causes problems
13695 checking for functions defined therein. */
13696#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013697# include <limits.h>
13698#else
13699# include <assert.h>
13700#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013701/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013702#ifdef __cplusplus
13703extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013704{
Martin v. Löwis11437992002-04-12 09:54:03 +000013705#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013706/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 builtin and then its argument prototype would still apply. */
13708char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013709/* The GNU C library defines this for functions which it implements
13710 to always fail with ENOSYS. Some functions are actually named
13711 something starting with __ and the normal name is an alias. */
13712#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13713choke me
13714#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013715char (*f) () = $ac_func;
13716#endif
13717#ifdef __cplusplus
13718}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013719#endif
13720
Skip Montanaro6dead952003-09-25 14:50:04 +000013721int
13722main ()
13723{
13724return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 ;
13726 return 0;
13727}
13728_ACEOF
13729rm -f conftest.$ac_objext conftest$ac_exeext
13730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13731 (eval $ac_link) 2>&5
13732 ac_status=$?
13733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13734 (exit $ac_status); } &&
13735 { ac_try='test -s conftest$ac_exeext'
13736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13737 (eval $ac_try) 2>&5
13738 ac_status=$?
13739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13740 (exit $ac_status); }; }; then
13741 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013742else
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013744sed 's/^/| /' conftest.$ac_ext >&5
13745
Martin v. Löwis11437992002-04-12 09:54:03 +000013746eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013748rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013749fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013750echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13751echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13752if test `eval echo '${'$as_ac_var'}'` = yes; then
13753 cat >>confdefs.h <<_ACEOF
13754#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13755_ACEOF
13756 cat >conftest.$ac_ext <<_ACEOF
13757#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013758/* confdefs.h. */
13759_ACEOF
13760cat confdefs.h >>conftest.$ac_ext
13761cat >>conftest.$ac_ext <<_ACEOF
13762/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013763#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013764int
13765main ()
13766{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013767getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013768 ;
13769 return 0;
13770}
13771_ACEOF
13772rm -f conftest.$ac_objext
13773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13774 (eval $ac_compile) 2>&5
13775 ac_status=$?
13776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13777 (exit $ac_status); } &&
13778 { ac_try='test -s conftest.$ac_objext'
13779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13780 (eval $ac_try) 2>&5
13781 ac_status=$?
13782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13783 (exit $ac_status); }; }; then
13784
13785cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013787_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013788
Martin v. Löwis11437992002-04-12 09:54:03 +000013789
Guido van Rossumf78abae1997-01-21 22:02:36 +000013790else
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013792sed 's/^/| /' conftest.$ac_ext >&5
13793
Guido van Rossum627b2d71993-12-24 10:39:16 +000013794fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013795rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013796
Guido van Rossum627b2d71993-12-24 10:39:16 +000013797fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013798done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013799
Jack Jansen150753c2003-03-29 22:07:47 +000013800
13801for ac_func in setpgrp
13802do
13803as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13804echo "$as_me:$LINENO: checking for $ac_func" >&5
13805echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13806if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013808else
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 cat >conftest.$ac_ext <<_ACEOF
13810#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013811/* confdefs.h. */
13812_ACEOF
13813cat confdefs.h >>conftest.$ac_ext
13814cat >>conftest.$ac_ext <<_ACEOF
13815/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013816/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013817 which can conflict with char $ac_func (); below.
13818 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013819 <limits.h> exists even on freestanding compilers. Under hpux,
13820 including <limits.h> includes <sys/time.h> and causes problems
13821 checking for functions defined therein. */
13822#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013823# include <limits.h>
13824#else
13825# include <assert.h>
13826#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013827/* Override any gcc2 internal prototype to avoid an error. */
13828#ifdef __cplusplus
13829extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013830{
Martin v. Löwis11437992002-04-12 09:54:03 +000013831#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013832/* We use char because int might match the return type of a gcc2
13833 builtin and then its argument prototype would still apply. */
13834char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013835/* The GNU C library defines this for functions which it implements
13836 to always fail with ENOSYS. Some functions are actually named
13837 something starting with __ and the normal name is an alias. */
13838#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13839choke me
13840#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013841char (*f) () = $ac_func;
13842#endif
13843#ifdef __cplusplus
13844}
Jack Jansen150753c2003-03-29 22:07:47 +000013845#endif
13846
Skip Montanaro6dead952003-09-25 14:50:04 +000013847int
13848main ()
13849{
13850return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 ;
13852 return 0;
13853}
13854_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013855rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13857 (eval $ac_link) 2>&5
13858 ac_status=$?
13859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013860 (exit $ac_status); } &&
13861 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13863 (eval $ac_try) 2>&5
13864 ac_status=$?
13865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13866 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013867 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013868else
Jack Jansen150753c2003-03-29 22:07:47 +000013869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013870sed 's/^/| /' conftest.$ac_ext >&5
13871
Jack Jansen150753c2003-03-29 22:07:47 +000013872eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013873fi
Jack Jansen150753c2003-03-29 22:07:47 +000013874rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013875fi
Jack Jansen150753c2003-03-29 22:07:47 +000013876echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13877echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13878if test `eval echo '${'$as_ac_var'}'` = yes; then
13879 cat >>confdefs.h <<_ACEOF
13880#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13881_ACEOF
13882 cat >conftest.$ac_ext <<_ACEOF
13883#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013884/* confdefs.h. */
13885_ACEOF
13886cat confdefs.h >>conftest.$ac_ext
13887cat >>conftest.$ac_ext <<_ACEOF
13888/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013889#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013890int
13891main ()
13892{
13893setpgrp(0,0);
13894 ;
13895 return 0;
13896}
13897_ACEOF
13898rm -f conftest.$ac_objext
13899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13900 (eval $ac_compile) 2>&5
13901 ac_status=$?
13902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13903 (exit $ac_status); } &&
13904 { ac_try='test -s conftest.$ac_objext'
13905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13906 (eval $ac_try) 2>&5
13907 ac_status=$?
13908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13909 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013910
13911cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013912#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013913_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013914
Jack Jansen150753c2003-03-29 22:07:47 +000013915
13916else
13917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013918sed 's/^/| /' conftest.$ac_ext >&5
13919
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013920fi
Jack Jansen150753c2003-03-29 22:07:47 +000013921rm -f conftest.$ac_objext conftest.$ac_ext
13922
13923fi
13924done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013925
Martin v. Löwis11437992002-04-12 09:54:03 +000013926
Thomas Wouters3a584202000-08-05 23:28:51 +000013927for ac_func in gettimeofday
13928do
Martin v. Löwis11437992002-04-12 09:54:03 +000013929as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13930echo "$as_me:$LINENO: checking for $ac_func" >&5
13931echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13932if eval "test \"\${$as_ac_var+set}\" = set"; then
13933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013934else
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 cat >conftest.$ac_ext <<_ACEOF
13936#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013937/* confdefs.h. */
13938_ACEOF
13939cat confdefs.h >>conftest.$ac_ext
13940cat >>conftest.$ac_ext <<_ACEOF
13941/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013942/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013943 which can conflict with char $ac_func (); below.
13944 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013945 <limits.h> exists even on freestanding compilers. Under hpux,
13946 including <limits.h> includes <sys/time.h> and causes problems
13947 checking for functions defined therein. */
13948#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013949# include <limits.h>
13950#else
13951# include <assert.h>
13952#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013953/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013954#ifdef __cplusplus
13955extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013956{
Martin v. Löwis11437992002-04-12 09:54:03 +000013957#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013958/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 builtin and then its argument prototype would still apply. */
13960char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013961/* The GNU C library defines this for functions which it implements
13962 to always fail with ENOSYS. Some functions are actually named
13963 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013964#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013965choke me
13966#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013967char (*f) () = $ac_func;
13968#endif
13969#ifdef __cplusplus
13970}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013971#endif
13972
Skip Montanaro6dead952003-09-25 14:50:04 +000013973int
13974main ()
13975{
13976return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013977 ;
13978 return 0;
13979}
13980_ACEOF
13981rm -f conftest.$ac_objext conftest$ac_exeext
13982if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13983 (eval $ac_link) 2>&5
13984 ac_status=$?
13985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13986 (exit $ac_status); } &&
13987 { ac_try='test -s conftest$ac_exeext'
13988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13989 (eval $ac_try) 2>&5
13990 ac_status=$?
13991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13992 (exit $ac_status); }; }; then
13993 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013994else
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013996sed 's/^/| /' conftest.$ac_ext >&5
13997
Martin v. Löwis11437992002-04-12 09:54:03 +000013998eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013999fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014000rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014001fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014002echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14003echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14004if test `eval echo '${'$as_ac_var'}'` = yes; then
14005 cat >>confdefs.h <<_ACEOF
14006#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14007_ACEOF
14008 cat >conftest.$ac_ext <<_ACEOF
14009#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014010/* confdefs.h. */
14011_ACEOF
14012cat confdefs.h >>conftest.$ac_ext
14013cat >>conftest.$ac_ext <<_ACEOF
14014/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014015#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014016int
14017main ()
14018{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014019gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014020 ;
14021 return 0;
14022}
14023_ACEOF
14024rm -f conftest.$ac_objext
14025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14026 (eval $ac_compile) 2>&5
14027 ac_status=$?
14028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14029 (exit $ac_status); } &&
14030 { ac_try='test -s conftest.$ac_objext'
14031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14032 (eval $ac_try) 2>&5
14033 ac_status=$?
14034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14035 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014036 :
14037else
Martin v. Löwis11437992002-04-12 09:54:03 +000014038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014039sed 's/^/| /' conftest.$ac_ext >&5
14040
Martin v. Löwis11437992002-04-12 09:54:03 +000014041
14042cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014043#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014044_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014045
Martin v. Löwis11437992002-04-12 09:54:03 +000014046
Guido van Rossum627b2d71993-12-24 10:39:16 +000014047fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014048rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014049
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014050fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014051done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014052
Michael W. Hudson54241132001-12-07 15:38:26 +000014053
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014054echo "$as_me:$LINENO: checking for major" >&5
14055echo $ECHO_N "checking for major... $ECHO_C" >&6
14056cat >conftest.$ac_ext <<_ACEOF
14057#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014058/* confdefs.h. */
14059_ACEOF
14060cat confdefs.h >>conftest.$ac_ext
14061cat >>conftest.$ac_ext <<_ACEOF
14062/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014063
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014064#if defined(MAJOR_IN_MKDEV)
14065#include <sys/mkdev.h>
14066#elif defined(MAJOR_IN_SYSMACROS)
14067#include <sys/sysmacros.h>
14068#else
14069#include <sys/types.h>
14070#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014071
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014072int
14073main ()
14074{
14075
14076 makedev(major(0),minor(0));
14077
14078 ;
14079 return 0;
14080}
14081_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014082rm -f conftest.$ac_objext conftest$ac_exeext
14083if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14084 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014085 ac_status=$?
14086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14087 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014088 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14090 (eval $ac_try) 2>&5
14091 ac_status=$?
14092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14093 (exit $ac_status); }; }; then
14094
14095
14096cat >>confdefs.h <<\_ACEOF
14097#define HAVE_DEVICE_MACROS 1
14098_ACEOF
14099
14100 echo "$as_me:$LINENO: result: yes" >&5
14101echo "${ECHO_T}yes" >&6
14102
14103else
14104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014105sed 's/^/| /' conftest.$ac_ext >&5
14106
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014107
14108 echo "$as_me:$LINENO: result: no" >&5
14109echo "${ECHO_T}no" >&6
14110
14111fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014112rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014113
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014114# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014115# for [no]getaddrinfo in netdb.h.
14116echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14117echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14118cat >conftest.$ac_ext <<_ACEOF
14119#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014120/* confdefs.h. */
14121_ACEOF
14122cat confdefs.h >>conftest.$ac_ext
14123cat >>conftest.$ac_ext <<_ACEOF
14124/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014125
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014126#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014127#include <sys/socket.h>
14128#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014129#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014130
Martin v. Löwis11437992002-04-12 09:54:03 +000014131int
14132main ()
14133{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014134
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014135getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014136
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 ;
14138 return 0;
14139}
14140_ACEOF
14141rm -f conftest.$ac_objext conftest$ac_exeext
14142if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14143 (eval $ac_link) 2>&5
14144 ac_status=$?
14145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14146 (exit $ac_status); } &&
14147 { ac_try='test -s conftest$ac_exeext'
14148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14149 (eval $ac_try) 2>&5
14150 ac_status=$?
14151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14152 (exit $ac_status); }; }; then
14153
14154echo "$as_me:$LINENO: result: yes" >&5
14155echo "${ECHO_T}yes" >&6
14156echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14157echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014158if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 echo "$as_me:$LINENO: result: buggy" >&5
14160echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014161buggygetaddrinfo=yes
14162else
Martin v. Löwis11437992002-04-12 09:54:03 +000014163 cat >conftest.$ac_ext <<_ACEOF
14164#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014165/* confdefs.h. */
14166_ACEOF
14167cat confdefs.h >>conftest.$ac_ext
14168cat >>conftest.$ac_ext <<_ACEOF
14169/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014170
14171#include <sys/types.h>
14172#include <netdb.h>
14173#include <string.h>
14174#include <sys/socket.h>
14175#include <netinet/in.h>
14176
14177main()
14178{
14179 int passive, gaierr, inet4 = 0, inet6 = 0;
14180 struct addrinfo hints, *ai, *aitop;
14181 char straddr[INET6_ADDRSTRLEN], strport[16];
14182
14183 for (passive = 0; passive <= 1; passive++) {
14184 memset(&hints, 0, sizeof(hints));
14185 hints.ai_family = AF_UNSPEC;
14186 hints.ai_flags = passive ? AI_PASSIVE : 0;
14187 hints.ai_socktype = SOCK_STREAM;
14188 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14189 (void)gai_strerror(gaierr);
14190 goto bad;
14191 }
14192 for (ai = aitop; ai; ai = ai->ai_next) {
14193 if (ai->ai_addr == NULL ||
14194 ai->ai_addrlen == 0 ||
14195 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14196 straddr, sizeof(straddr), strport, sizeof(strport),
14197 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14198 goto bad;
14199 }
14200 switch (ai->ai_family) {
14201 case AF_INET:
14202 if (strcmp(strport, "54321") != 0) {
14203 goto bad;
14204 }
14205 if (passive) {
14206 if (strcmp(straddr, "0.0.0.0") != 0) {
14207 goto bad;
14208 }
14209 } else {
14210 if (strcmp(straddr, "127.0.0.1") != 0) {
14211 goto bad;
14212 }
14213 }
14214 inet4++;
14215 break;
14216 case AF_INET6:
14217 if (strcmp(strport, "54321") != 0) {
14218 goto bad;
14219 }
14220 if (passive) {
14221 if (strcmp(straddr, "::") != 0) {
14222 goto bad;
14223 }
14224 } else {
14225 if (strcmp(straddr, "::1") != 0) {
14226 goto bad;
14227 }
14228 }
14229 inet6++;
14230 break;
14231 case AF_UNSPEC:
14232 goto bad;
14233 break;
14234 default:
14235 /* another family support? */
14236 break;
14237 }
14238 }
14239 }
14240
14241 if (!(inet4 == 0 || inet4 == 2))
14242 goto bad;
14243 if (!(inet6 == 0 || inet6 == 2))
14244 goto bad;
14245
14246 if (aitop)
14247 freeaddrinfo(aitop);
14248 exit(0);
14249
14250 bad:
14251 if (aitop)
14252 freeaddrinfo(aitop);
14253 exit(1);
14254}
14255
Martin v. Löwis11437992002-04-12 09:54:03 +000014256_ACEOF
14257rm -f conftest$ac_exeext
14258if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14259 (eval $ac_link) 2>&5
14260 ac_status=$?
14261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14262 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14264 (eval $ac_try) 2>&5
14265 ac_status=$?
14266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14267 (exit $ac_status); }; }; then
14268 echo "$as_me:$LINENO: result: good" >&5
14269echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014270buggygetaddrinfo=no
14271else
Martin v. Löwis11437992002-04-12 09:54:03 +000014272 echo "$as_me: program exited with status $ac_status" >&5
14273echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014274sed 's/^/| /' conftest.$ac_ext >&5
14275
Martin v. Löwis11437992002-04-12 09:54:03 +000014276( exit $ac_status )
14277echo "$as_me:$LINENO: result: buggy" >&5
14278echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014279buggygetaddrinfo=yes
14280fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014281rm -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 +000014282fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014283else
Martin v. Löwis11437992002-04-12 09:54:03 +000014284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014285sed 's/^/| /' conftest.$ac_ext >&5
14286
Martin v. Löwis11437992002-04-12 09:54:03 +000014287
14288echo "$as_me:$LINENO: result: no" >&5
14289echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014290buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014291
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014293rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014294
14295if test "$buggygetaddrinfo" = "yes"; then
14296 if test "$ipv6" = "yes"; then
14297 echo 'Fatal: You must get working getaddrinfo() function.'
14298 echo ' or you can specify "--disable-ipv6"'.
14299 exit 1
14300 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014301else
Martin v. Löwis11437992002-04-12 09:54:03 +000014302
14303cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014304#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014305_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014306
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014307fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014309for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014310do
Martin v. Löwis11437992002-04-12 09:54:03 +000014311as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14312echo "$as_me:$LINENO: checking for $ac_func" >&5
14313echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14314if eval "test \"\${$as_ac_var+set}\" = set"; then
14315 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014316else
Martin v. Löwis11437992002-04-12 09:54:03 +000014317 cat >conftest.$ac_ext <<_ACEOF
14318#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014319/* confdefs.h. */
14320_ACEOF
14321cat confdefs.h >>conftest.$ac_ext
14322cat >>conftest.$ac_ext <<_ACEOF
14323/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014324/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014325 which can conflict with char $ac_func (); below.
14326 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014327 <limits.h> exists even on freestanding compilers. Under hpux,
14328 including <limits.h> includes <sys/time.h> and causes problems
14329 checking for functions defined therein. */
14330#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014331# include <limits.h>
14332#else
14333# include <assert.h>
14334#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014335/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014336#ifdef __cplusplus
14337extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014338{
Martin v. Löwis11437992002-04-12 09:54:03 +000014339#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014340/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014341 builtin and then its argument prototype would still apply. */
14342char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014343/* The GNU C library defines this for functions which it implements
14344 to always fail with ENOSYS. Some functions are actually named
14345 something starting with __ and the normal name is an alias. */
14346#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14347choke me
14348#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014349char (*f) () = $ac_func;
14350#endif
14351#ifdef __cplusplus
14352}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014353#endif
14354
Skip Montanaro6dead952003-09-25 14:50:04 +000014355int
14356main ()
14357{
14358return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014359 ;
14360 return 0;
14361}
14362_ACEOF
14363rm -f conftest.$ac_objext conftest$ac_exeext
14364if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14365 (eval $ac_link) 2>&5
14366 ac_status=$?
14367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14368 (exit $ac_status); } &&
14369 { ac_try='test -s conftest$ac_exeext'
14370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14371 (eval $ac_try) 2>&5
14372 ac_status=$?
14373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14374 (exit $ac_status); }; }; then
14375 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014376else
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014378sed 's/^/| /' conftest.$ac_ext >&5
14379
Martin v. Löwis11437992002-04-12 09:54:03 +000014380eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014381fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014382rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014384echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14385echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14386if test `eval echo '${'$as_ac_var'}'` = yes; then
14387 cat >>confdefs.h <<_ACEOF
14388#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14389_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014390
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014391fi
14392done
14393
Michael W. Hudson54241132001-12-07 15:38:26 +000014394
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014395# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014396echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14397echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14398if test "${ac_cv_header_time+set}" = set; then
14399 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014400else
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 cat >conftest.$ac_ext <<_ACEOF
14402#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014403/* confdefs.h. */
14404_ACEOF
14405cat confdefs.h >>conftest.$ac_ext
14406cat >>conftest.$ac_ext <<_ACEOF
14407/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014408#include <sys/types.h>
14409#include <sys/time.h>
14410#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014411
Martin v. Löwis11437992002-04-12 09:54:03 +000014412int
14413main ()
14414{
14415if ((struct tm *) 0)
14416return 0;
14417 ;
14418 return 0;
14419}
14420_ACEOF
14421rm -f conftest.$ac_objext
14422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14423 (eval $ac_compile) 2>&5
14424 ac_status=$?
14425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14426 (exit $ac_status); } &&
14427 { ac_try='test -s conftest.$ac_objext'
14428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14429 (eval $ac_try) 2>&5
14430 ac_status=$?
14431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14432 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014433 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014434else
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014436sed 's/^/| /' conftest.$ac_ext >&5
14437
Martin v. Löwis11437992002-04-12 09:54:03 +000014438ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014440rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014442echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14443echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014444if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
14446cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014447#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014448_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014449
14450fi
14451
Martin v. Löwis11437992002-04-12 09:54:03 +000014452echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14453echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14454if test "${ac_cv_struct_tm+set}" = set; then
14455 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014456else
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 cat >conftest.$ac_ext <<_ACEOF
14458#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014459/* confdefs.h. */
14460_ACEOF
14461cat confdefs.h >>conftest.$ac_ext
14462cat >>conftest.$ac_ext <<_ACEOF
14463/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014464#include <sys/types.h>
14465#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
Martin v. Löwis11437992002-04-12 09:54:03 +000014467int
14468main ()
14469{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014470struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014471 ;
14472 return 0;
14473}
14474_ACEOF
14475rm -f conftest.$ac_objext
14476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14477 (eval $ac_compile) 2>&5
14478 ac_status=$?
14479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14480 (exit $ac_status); } &&
14481 { ac_try='test -s conftest.$ac_objext'
14482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14483 (eval $ac_try) 2>&5
14484 ac_status=$?
14485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14486 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014487 ac_cv_struct_tm=time.h
14488else
Martin v. Löwis11437992002-04-12 09:54:03 +000014489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014490sed 's/^/| /' conftest.$ac_ext >&5
14491
Martin v. Löwis11437992002-04-12 09:54:03 +000014492ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014493fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014494rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014495fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014496echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14497echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014498if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014499
14500cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014501#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014503
14504fi
14505
Martin v. Löwis11437992002-04-12 09:54:03 +000014506echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14507echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14508if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14509 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014510else
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 cat >conftest.$ac_ext <<_ACEOF
14512#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014513/* confdefs.h. */
14514_ACEOF
14515cat confdefs.h >>conftest.$ac_ext
14516cat >>conftest.$ac_ext <<_ACEOF
14517/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014518#include <sys/types.h>
14519#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014520
14521
Martin v. Löwis11437992002-04-12 09:54:03 +000014522int
14523main ()
14524{
14525static struct tm ac_aggr;
14526if (ac_aggr.tm_zone)
14527return 0;
14528 ;
14529 return 0;
14530}
14531_ACEOF
14532rm -f conftest.$ac_objext
14533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14534 (eval $ac_compile) 2>&5
14535 ac_status=$?
14536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14537 (exit $ac_status); } &&
14538 { ac_try='test -s conftest.$ac_objext'
14539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14540 (eval $ac_try) 2>&5
14541 ac_status=$?
14542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14543 (exit $ac_status); }; }; then
14544 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014545else
Martin v. Löwis11437992002-04-12 09:54:03 +000014546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014547sed 's/^/| /' conftest.$ac_ext >&5
14548
14549cat >conftest.$ac_ext <<_ACEOF
14550#line $LINENO "configure"
14551/* confdefs.h. */
14552_ACEOF
14553cat confdefs.h >>conftest.$ac_ext
14554cat >>conftest.$ac_ext <<_ACEOF
14555/* end confdefs.h. */
14556#include <sys/types.h>
14557#include <$ac_cv_struct_tm>
14558
14559
14560int
14561main ()
14562{
14563static struct tm ac_aggr;
14564if (sizeof ac_aggr.tm_zone)
14565return 0;
14566 ;
14567 return 0;
14568}
14569_ACEOF
14570rm -f conftest.$ac_objext
14571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14572 (eval $ac_compile) 2>&5
14573 ac_status=$?
14574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14575 (exit $ac_status); } &&
14576 { ac_try='test -s conftest.$ac_objext'
14577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14578 (eval $ac_try) 2>&5
14579 ac_status=$?
14580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14581 (exit $ac_status); }; }; then
14582 ac_cv_member_struct_tm_tm_zone=yes
14583else
14584 echo "$as_me: failed program was:" >&5
14585sed 's/^/| /' conftest.$ac_ext >&5
14586
Martin v. Löwis11437992002-04-12 09:54:03 +000014587ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014588fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014589rm -f conftest.$ac_objext conftest.$ac_ext
14590fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014591rm -f conftest.$ac_objext conftest.$ac_ext
14592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014593echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14594echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14595if test $ac_cv_member_struct_tm_tm_zone = yes; then
14596
14597cat >>confdefs.h <<_ACEOF
14598#define HAVE_STRUCT_TM_TM_ZONE 1
14599_ACEOF
14600
14601
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014602fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014603
Martin v. Löwis11437992002-04-12 09:54:03 +000014604if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14605
14606cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014607#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014608_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014609
14610else
Martin v. Löwis11437992002-04-12 09:54:03 +000014611 echo "$as_me:$LINENO: checking for tzname" >&5
14612echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14613if test "${ac_cv_var_tzname+set}" = set; then
14614 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014615else
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 cat >conftest.$ac_ext <<_ACEOF
14617#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014618/* confdefs.h. */
14619_ACEOF
14620cat confdefs.h >>conftest.$ac_ext
14621cat >>conftest.$ac_ext <<_ACEOF
14622/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014623#include <time.h>
14624#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014625extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014627
Martin v. Löwis11437992002-04-12 09:54:03 +000014628int
14629main ()
14630{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014631atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 ;
14633 return 0;
14634}
14635_ACEOF
14636rm -f conftest.$ac_objext conftest$ac_exeext
14637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14638 (eval $ac_link) 2>&5
14639 ac_status=$?
14640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14641 (exit $ac_status); } &&
14642 { ac_try='test -s conftest$ac_exeext'
14643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14644 (eval $ac_try) 2>&5
14645 ac_status=$?
14646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14647 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014648 ac_cv_var_tzname=yes
14649else
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014651sed 's/^/| /' conftest.$ac_ext >&5
14652
Martin v. Löwis11437992002-04-12 09:54:03 +000014653ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014655rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014656fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014657echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14658echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014659 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014660
14661cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014662#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014663_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014664
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014665 fi
14666fi
14667
Martin v. Löwis11437992002-04-12 09:54:03 +000014668echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14669echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14670if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14671 echo $ECHO_N "(cached) $ECHO_C" >&6
14672else
14673 cat >conftest.$ac_ext <<_ACEOF
14674#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014675/* confdefs.h. */
14676_ACEOF
14677cat confdefs.h >>conftest.$ac_ext
14678cat >>conftest.$ac_ext <<_ACEOF
14679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014680$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014681int
14682main ()
14683{
14684static struct stat ac_aggr;
14685if (ac_aggr.st_rdev)
14686return 0;
14687 ;
14688 return 0;
14689}
14690_ACEOF
14691rm -f conftest.$ac_objext
14692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14693 (eval $ac_compile) 2>&5
14694 ac_status=$?
14695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14696 (exit $ac_status); } &&
14697 { ac_try='test -s conftest.$ac_objext'
14698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14699 (eval $ac_try) 2>&5
14700 ac_status=$?
14701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14702 (exit $ac_status); }; }; then
14703 ac_cv_member_struct_stat_st_rdev=yes
14704else
14705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014706sed 's/^/| /' conftest.$ac_ext >&5
14707
14708cat >conftest.$ac_ext <<_ACEOF
14709#line $LINENO "configure"
14710/* confdefs.h. */
14711_ACEOF
14712cat confdefs.h >>conftest.$ac_ext
14713cat >>conftest.$ac_ext <<_ACEOF
14714/* end confdefs.h. */
14715$ac_includes_default
14716int
14717main ()
14718{
14719static struct stat ac_aggr;
14720if (sizeof ac_aggr.st_rdev)
14721return 0;
14722 ;
14723 return 0;
14724}
14725_ACEOF
14726rm -f conftest.$ac_objext
14727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14728 (eval $ac_compile) 2>&5
14729 ac_status=$?
14730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14731 (exit $ac_status); } &&
14732 { ac_try='test -s conftest.$ac_objext'
14733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14734 (eval $ac_try) 2>&5
14735 ac_status=$?
14736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14737 (exit $ac_status); }; }; then
14738 ac_cv_member_struct_stat_st_rdev=yes
14739else
14740 echo "$as_me: failed program was:" >&5
14741sed 's/^/| /' conftest.$ac_ext >&5
14742
Martin v. Löwis11437992002-04-12 09:54:03 +000014743ac_cv_member_struct_stat_st_rdev=no
14744fi
14745rm -f conftest.$ac_objext conftest.$ac_ext
14746fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014747rm -f conftest.$ac_objext conftest.$ac_ext
14748fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014749echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14750echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14751if test $ac_cv_member_struct_stat_st_rdev = yes; then
14752
14753cat >>confdefs.h <<_ACEOF
14754#define HAVE_STRUCT_STAT_ST_RDEV 1
14755_ACEOF
14756
14757
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014758fi
14759
Martin v. Löwis11437992002-04-12 09:54:03 +000014760echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14761echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14762if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14763 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014764else
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 cat >conftest.$ac_ext <<_ACEOF
14766#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014767/* confdefs.h. */
14768_ACEOF
14769cat confdefs.h >>conftest.$ac_ext
14770cat >>conftest.$ac_ext <<_ACEOF
14771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014772$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014773int
14774main ()
14775{
14776static struct stat ac_aggr;
14777if (ac_aggr.st_blksize)
14778return 0;
14779 ;
14780 return 0;
14781}
14782_ACEOF
14783rm -f conftest.$ac_objext
14784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14785 (eval $ac_compile) 2>&5
14786 ac_status=$?
14787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14788 (exit $ac_status); } &&
14789 { ac_try='test -s conftest.$ac_objext'
14790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14791 (eval $ac_try) 2>&5
14792 ac_status=$?
14793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14794 (exit $ac_status); }; }; then
14795 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014796else
Martin v. Löwis11437992002-04-12 09:54:03 +000014797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014798sed 's/^/| /' conftest.$ac_ext >&5
14799
14800cat >conftest.$ac_ext <<_ACEOF
14801#line $LINENO "configure"
14802/* confdefs.h. */
14803_ACEOF
14804cat confdefs.h >>conftest.$ac_ext
14805cat >>conftest.$ac_ext <<_ACEOF
14806/* end confdefs.h. */
14807$ac_includes_default
14808int
14809main ()
14810{
14811static struct stat ac_aggr;
14812if (sizeof ac_aggr.st_blksize)
14813return 0;
14814 ;
14815 return 0;
14816}
14817_ACEOF
14818rm -f conftest.$ac_objext
14819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14820 (eval $ac_compile) 2>&5
14821 ac_status=$?
14822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14823 (exit $ac_status); } &&
14824 { ac_try='test -s conftest.$ac_objext'
14825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14826 (eval $ac_try) 2>&5
14827 ac_status=$?
14828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14829 (exit $ac_status); }; }; then
14830 ac_cv_member_struct_stat_st_blksize=yes
14831else
14832 echo "$as_me: failed program was:" >&5
14833sed 's/^/| /' conftest.$ac_ext >&5
14834
Martin v. Löwis11437992002-04-12 09:54:03 +000014835ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014837rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014838fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014839rm -f conftest.$ac_objext conftest.$ac_ext
14840fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014841echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14842echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14843if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014844
Martin v. Löwis11437992002-04-12 09:54:03 +000014845cat >>confdefs.h <<_ACEOF
14846#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14847_ACEOF
14848
14849
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014850fi
14851
Martin v. Löwis11437992002-04-12 09:54:03 +000014852echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14853echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14854if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014856else
Martin v. Löwis11437992002-04-12 09:54:03 +000014857 cat >conftest.$ac_ext <<_ACEOF
14858#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014859/* confdefs.h. */
14860_ACEOF
14861cat confdefs.h >>conftest.$ac_ext
14862cat >>conftest.$ac_ext <<_ACEOF
14863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014864$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014865int
14866main ()
14867{
14868static struct stat ac_aggr;
14869if (ac_aggr.st_blocks)
14870return 0;
14871 ;
14872 return 0;
14873}
14874_ACEOF
14875rm -f conftest.$ac_objext
14876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14877 (eval $ac_compile) 2>&5
14878 ac_status=$?
14879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14880 (exit $ac_status); } &&
14881 { ac_try='test -s conftest.$ac_objext'
14882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14883 (eval $ac_try) 2>&5
14884 ac_status=$?
14885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14886 (exit $ac_status); }; }; then
14887 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014888else
Martin v. Löwis11437992002-04-12 09:54:03 +000014889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014890sed 's/^/| /' conftest.$ac_ext >&5
14891
14892cat >conftest.$ac_ext <<_ACEOF
14893#line $LINENO "configure"
14894/* confdefs.h. */
14895_ACEOF
14896cat confdefs.h >>conftest.$ac_ext
14897cat >>conftest.$ac_ext <<_ACEOF
14898/* end confdefs.h. */
14899$ac_includes_default
14900int
14901main ()
14902{
14903static struct stat ac_aggr;
14904if (sizeof ac_aggr.st_blocks)
14905return 0;
14906 ;
14907 return 0;
14908}
14909_ACEOF
14910rm -f conftest.$ac_objext
14911if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14912 (eval $ac_compile) 2>&5
14913 ac_status=$?
14914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14915 (exit $ac_status); } &&
14916 { ac_try='test -s conftest.$ac_objext'
14917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14918 (eval $ac_try) 2>&5
14919 ac_status=$?
14920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14921 (exit $ac_status); }; }; then
14922 ac_cv_member_struct_stat_st_blocks=yes
14923else
14924 echo "$as_me: failed program was:" >&5
14925sed 's/^/| /' conftest.$ac_ext >&5
14926
Martin v. Löwis11437992002-04-12 09:54:03 +000014927ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014928fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014929rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014930fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014931rm -f conftest.$ac_objext conftest.$ac_ext
14932fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014933echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14934echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14935if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014936
Martin v. Löwis11437992002-04-12 09:54:03 +000014937cat >>confdefs.h <<_ACEOF
14938#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14939_ACEOF
14940
14941
14942cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014943#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014944_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014945
14946else
Martin v. Löwis11437992002-04-12 09:54:03 +000014947 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014948fi
14949
Michael W. Hudson54241132001-12-07 15:38:26 +000014950
Martin v. Löwis11437992002-04-12 09:54:03 +000014951
14952echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14953echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14954if test "${ac_cv_header_time_altzone+set}" = set; then
14955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014956else
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 cat >conftest.$ac_ext <<_ACEOF
14958#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014959/* confdefs.h. */
14960_ACEOF
14961cat confdefs.h >>conftest.$ac_ext
14962cat >>conftest.$ac_ext <<_ACEOF
14963/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014964#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014965int
14966main ()
14967{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014968return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 ;
14970 return 0;
14971}
14972_ACEOF
14973rm -f conftest.$ac_objext
14974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14975 (eval $ac_compile) 2>&5
14976 ac_status=$?
14977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14978 (exit $ac_status); } &&
14979 { ac_try='test -s conftest.$ac_objext'
14980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14981 (eval $ac_try) 2>&5
14982 ac_status=$?
14983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14984 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014985 ac_cv_header_time_altzone=yes
14986else
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014988sed 's/^/| /' conftest.$ac_ext >&5
14989
Martin v. Löwis11437992002-04-12 09:54:03 +000014990ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014991fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014992rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014993fi
14994
Martin v. Löwis11437992002-04-12 09:54:03 +000014995echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14996echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014997if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014998
14999cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015000#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015001_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015002
15003fi
15004
Guido van Rossumda88dad1995-01-26 00:46:29 +000015005was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015006echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15007echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15008cat >conftest.$ac_ext <<_ACEOF
15009#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015010/* confdefs.h. */
15011_ACEOF
15012cat confdefs.h >>conftest.$ac_ext
15013cat >>conftest.$ac_ext <<_ACEOF
15014/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015015
15016#include <sys/types.h>
15017#include <sys/select.h>
15018#include <sys/time.h>
15019
Martin v. Löwis11437992002-04-12 09:54:03 +000015020int
15021main ()
15022{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015023;
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 ;
15025 return 0;
15026}
15027_ACEOF
15028rm -f conftest.$ac_objext
15029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15030 (eval $ac_compile) 2>&5
15031 ac_status=$?
15032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15033 (exit $ac_status); } &&
15034 { ac_try='test -s conftest.$ac_objext'
15035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15036 (eval $ac_try) 2>&5
15037 ac_status=$?
15038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15039 (exit $ac_status); }; }; then
15040
15041
15042cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015043#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015044_ACEOF
15045
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015046 was_it_defined=yes
15047
Guido van Rossumf78abae1997-01-21 22:02:36 +000015048else
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015050sed 's/^/| /' conftest.$ac_ext >&5
15051
Guido van Rossum7f43da71994-08-01 12:15:30 +000015052fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015053rm -f conftest.$ac_objext conftest.$ac_ext
15054echo "$as_me:$LINENO: result: $was_it_defined" >&5
15055echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015056
Martin v. Löwis11437992002-04-12 09:54:03 +000015057echo "$as_me:$LINENO: checking for addrinfo" >&5
15058echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15059if test "${ac_cv_struct_addrinfo+set}" = set; then
15060 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015061else
Martin v. Löwis11437992002-04-12 09:54:03 +000015062 cat >conftest.$ac_ext <<_ACEOF
15063#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015064/* confdefs.h. */
15065_ACEOF
15066cat confdefs.h >>conftest.$ac_ext
15067cat >>conftest.$ac_ext <<_ACEOF
15068/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015069
15070# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015071int
15072main ()
15073{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015074struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015075 ;
15076 return 0;
15077}
15078_ACEOF
15079rm -f conftest.$ac_objext
15080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15081 (eval $ac_compile) 2>&5
15082 ac_status=$?
15083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15084 (exit $ac_status); } &&
15085 { ac_try='test -s conftest.$ac_objext'
15086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15087 (eval $ac_try) 2>&5
15088 ac_status=$?
15089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15090 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015091 ac_cv_struct_addrinfo=yes
15092else
Martin v. Löwis11437992002-04-12 09:54:03 +000015093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015094sed 's/^/| /' conftest.$ac_ext >&5
15095
Martin v. Löwis11437992002-04-12 09:54:03 +000015096ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015097fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015098rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015099fi
15100
Martin v. Löwis11437992002-04-12 09:54:03 +000015101echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15102echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015103if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015104
15105cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015106#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015107_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015108
15109fi
15110
Martin v. Löwis11437992002-04-12 09:54:03 +000015111echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15112echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15113if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15114 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015115else
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 cat >conftest.$ac_ext <<_ACEOF
15117#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015118/* confdefs.h. */
15119_ACEOF
15120cat confdefs.h >>conftest.$ac_ext
15121cat >>conftest.$ac_ext <<_ACEOF
15122/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015123
15124# include <sys/types.h>
15125# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015126int
15127main ()
15128{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015129struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 ;
15131 return 0;
15132}
15133_ACEOF
15134rm -f conftest.$ac_objext
15135if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15136 (eval $ac_compile) 2>&5
15137 ac_status=$?
15138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15139 (exit $ac_status); } &&
15140 { ac_try='test -s conftest.$ac_objext'
15141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15142 (eval $ac_try) 2>&5
15143 ac_status=$?
15144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15145 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015146 ac_cv_struct_sockaddr_storage=yes
15147else
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015149sed 's/^/| /' conftest.$ac_ext >&5
15150
Martin v. Löwis11437992002-04-12 09:54:03 +000015151ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015153rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015154fi
15155
Martin v. Löwis11437992002-04-12 09:54:03 +000015156echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15157echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015158if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015159
15160cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015161#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015162_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015163
15164fi
15165
Guido van Rossum627b2d71993-12-24 10:39:16 +000015166# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015167
Michael W. Hudson54241132001-12-07 15:38:26 +000015168
Martin v. Löwis11437992002-04-12 09:54:03 +000015169echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15170echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15171if test "${ac_cv_c_char_unsigned+set}" = set; then
15172 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015173else
Martin v. Löwis11437992002-04-12 09:54:03 +000015174 cat >conftest.$ac_ext <<_ACEOF
15175#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015176/* confdefs.h. */
15177_ACEOF
15178cat confdefs.h >>conftest.$ac_ext
15179cat >>conftest.$ac_ext <<_ACEOF
15180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015181$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015182int
15183main ()
15184{
15185static int test_array [1 - 2 * !(((char) -1) < 0)];
15186test_array [0] = 0
15187
15188 ;
15189 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015190}
Martin v. Löwis11437992002-04-12 09:54:03 +000015191_ACEOF
15192rm -f conftest.$ac_objext
15193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15194 (eval $ac_compile) 2>&5
15195 ac_status=$?
15196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15197 (exit $ac_status); } &&
15198 { ac_try='test -s conftest.$ac_objext'
15199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15200 (eval $ac_try) 2>&5
15201 ac_status=$?
15202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15203 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015204 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015205else
15206 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015207sed 's/^/| /' conftest.$ac_ext >&5
15208
Martin v. Löwis11437992002-04-12 09:54:03 +000015209ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015211rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015212fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015213echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15214echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015215if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015217#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015218_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015219
15220fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015221
Martin v. Löwis11437992002-04-12 09:54:03 +000015222echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15223echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15224if test "${ac_cv_c_const+set}" = set; then
15225 echo $ECHO_N "(cached) $ECHO_C" >&6
15226else
15227 cat >conftest.$ac_ext <<_ACEOF
15228#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015229/* confdefs.h. */
15230_ACEOF
15231cat confdefs.h >>conftest.$ac_ext
15232cat >>conftest.$ac_ext <<_ACEOF
15233/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015234
Martin v. Löwis11437992002-04-12 09:54:03 +000015235int
15236main ()
15237{
15238/* FIXME: Include the comments suggested by Paul. */
15239#ifndef __cplusplus
15240 /* Ultrix mips cc rejects this. */
15241 typedef int charset[2];
15242 const charset x;
15243 /* SunOS 4.1.1 cc rejects this. */
15244 char const *const *ccp;
15245 char **p;
15246 /* NEC SVR4.0.2 mips cc rejects this. */
15247 struct point {int x, y;};
15248 static struct point const zero = {0,0};
15249 /* AIX XL C 1.02.0.0 rejects this.
15250 It does not let you subtract one const X* pointer from another in
15251 an arm of an if-expression whose if-part is not a constant
15252 expression */
15253 const char *g = "string";
15254 ccp = &g + (g ? g-g : 0);
15255 /* HPUX 7.0 cc rejects these. */
15256 ++ccp;
15257 p = (char**) ccp;
15258 ccp = (char const *const *) p;
15259 { /* SCO 3.2v4 cc rejects this. */
15260 char *t;
15261 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015262
Martin v. Löwis11437992002-04-12 09:54:03 +000015263 *t++ = 0;
15264 }
15265 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15266 int x[] = {25, 17};
15267 const int *foo = &x[0];
15268 ++foo;
15269 }
15270 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15271 typedef const int *iptr;
15272 iptr p = 0;
15273 ++p;
15274 }
15275 { /* AIX XL C 1.02.0.0 rejects this saying
15276 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15277 struct s { int j; const int *ap[3]; };
15278 struct s *b; b->j = 5;
15279 }
15280 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15281 const int foo = 10;
15282 }
15283#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015284
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 ;
15286 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015287}
Martin v. Löwis11437992002-04-12 09:54:03 +000015288_ACEOF
15289rm -f conftest.$ac_objext
15290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15291 (eval $ac_compile) 2>&5
15292 ac_status=$?
15293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15294 (exit $ac_status); } &&
15295 { ac_try='test -s conftest.$ac_objext'
15296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15297 (eval $ac_try) 2>&5
15298 ac_status=$?
15299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15300 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015301 ac_cv_c_const=yes
15302else
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015304sed 's/^/| /' conftest.$ac_ext >&5
15305
Martin v. Löwis11437992002-04-12 09:54:03 +000015306ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015307fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015308rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015310echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15311echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015312if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015313
15314cat >>confdefs.h <<\_ACEOF
15315#define const
15316_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015317
15318fi
15319
Michael W. Hudson54241132001-12-07 15:38:26 +000015320
Guido van Rossumda88dad1995-01-26 00:46:29 +000015321works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015322echo "$as_me:$LINENO: checking for working volatile" >&5
15323echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15324cat >conftest.$ac_ext <<_ACEOF
15325#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015326/* confdefs.h. */
15327_ACEOF
15328cat confdefs.h >>conftest.$ac_ext
15329cat >>conftest.$ac_ext <<_ACEOF
15330/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015331
Martin v. Löwis11437992002-04-12 09:54:03 +000015332int
15333main ()
15334{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015335volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 ;
15337 return 0;
15338}
15339_ACEOF
15340rm -f conftest.$ac_objext
15341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15342 (eval $ac_compile) 2>&5
15343 ac_status=$?
15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345 (exit $ac_status); } &&
15346 { ac_try='test -s conftest.$ac_objext'
15347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15348 (eval $ac_try) 2>&5
15349 ac_status=$?
15350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15351 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015352 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015353else
Martin v. Löwis11437992002-04-12 09:54:03 +000015354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015355sed 's/^/| /' conftest.$ac_ext >&5
15356
Martin v. Löwis11437992002-04-12 09:54:03 +000015357
15358cat >>confdefs.h <<\_ACEOF
15359#define volatile
15360_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015361
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015362
Guido van Rossum627b2d71993-12-24 10:39:16 +000015363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015364rm -f conftest.$ac_objext conftest.$ac_ext
15365echo "$as_me:$LINENO: result: $works" >&5
15366echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015367
Guido van Rossumda88dad1995-01-26 00:46:29 +000015368works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015369echo "$as_me:$LINENO: checking for working signed char" >&5
15370echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15371cat >conftest.$ac_ext <<_ACEOF
15372#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015373/* confdefs.h. */
15374_ACEOF
15375cat confdefs.h >>conftest.$ac_ext
15376cat >>conftest.$ac_ext <<_ACEOF
15377/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015378
Martin v. Löwis11437992002-04-12 09:54:03 +000015379int
15380main ()
15381{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015382signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015383 ;
15384 return 0;
15385}
15386_ACEOF
15387rm -f conftest.$ac_objext
15388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15389 (eval $ac_compile) 2>&5
15390 ac_status=$?
15391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15392 (exit $ac_status); } &&
15393 { ac_try='test -s conftest.$ac_objext'
15394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15395 (eval $ac_try) 2>&5
15396 ac_status=$?
15397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15398 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015399 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015400else
Martin v. Löwis11437992002-04-12 09:54:03 +000015401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015402sed 's/^/| /' conftest.$ac_ext >&5
15403
Martin v. Löwis11437992002-04-12 09:54:03 +000015404
15405cat >>confdefs.h <<\_ACEOF
15406#define signed
15407_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015408
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015409
Guido van Rossum7f43da71994-08-01 12:15:30 +000015410fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015411rm -f conftest.$ac_objext conftest.$ac_ext
15412echo "$as_me:$LINENO: result: $works" >&5
15413echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015414
Guido van Rossumda88dad1995-01-26 00:46:29 +000015415have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015416echo "$as_me:$LINENO: checking for prototypes" >&5
15417echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15418cat >conftest.$ac_ext <<_ACEOF
15419#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015420/* confdefs.h. */
15421_ACEOF
15422cat confdefs.h >>conftest.$ac_ext
15423cat >>conftest.$ac_ext <<_ACEOF
15424/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015425int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015426int
15427main ()
15428{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015429return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 ;
15431 return 0;
15432}
15433_ACEOF
15434rm -f conftest.$ac_objext
15435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15436 (eval $ac_compile) 2>&5
15437 ac_status=$?
15438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15439 (exit $ac_status); } &&
15440 { ac_try='test -s conftest.$ac_objext'
15441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15442 (eval $ac_try) 2>&5
15443 ac_status=$?
15444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15445 (exit $ac_status); }; }; then
15446
15447
15448cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015449#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015450_ACEOF
15451
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015452 have_prototypes=yes
15453
Guido van Rossumf78abae1997-01-21 22:02:36 +000015454else
Martin v. Löwis11437992002-04-12 09:54:03 +000015455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015456sed 's/^/| /' conftest.$ac_ext >&5
15457
Guido van Rossum7f43da71994-08-01 12:15:30 +000015458fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015459rm -f conftest.$ac_objext conftest.$ac_ext
15460echo "$as_me:$LINENO: result: $have_prototypes" >&5
15461echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015462
Guido van Rossumda88dad1995-01-26 00:46:29 +000015463works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015464echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15465echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15466cat >conftest.$ac_ext <<_ACEOF
15467#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015468/* confdefs.h. */
15469_ACEOF
15470cat confdefs.h >>conftest.$ac_ext
15471cat >>conftest.$ac_ext <<_ACEOF
15472/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015473
15474#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015475int foo(int x, ...) {
15476 va_list va;
15477 va_start(va, x);
15478 va_arg(va, int);
15479 va_arg(va, char *);
15480 va_arg(va, double);
15481 return 0;
15482}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015483
Martin v. Löwis11437992002-04-12 09:54:03 +000015484int
15485main ()
15486{
Guido van Rossum90eea071996-08-30 20:58:57 +000015487return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015488 ;
15489 return 0;
15490}
15491_ACEOF
15492rm -f conftest.$ac_objext
15493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15494 (eval $ac_compile) 2>&5
15495 ac_status=$?
15496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15497 (exit $ac_status); } &&
15498 { ac_try='test -s conftest.$ac_objext'
15499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15500 (eval $ac_try) 2>&5
15501 ac_status=$?
15502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15503 (exit $ac_status); }; }; then
15504
15505
15506cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015507#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015508_ACEOF
15509
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015510 works=yes
15511
Guido van Rossumf78abae1997-01-21 22:02:36 +000015512else
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015514sed 's/^/| /' conftest.$ac_ext >&5
15515
Guido van Rossum627b2d71993-12-24 10:39:16 +000015516fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015517rm -f conftest.$ac_objext conftest.$ac_ext
15518echo "$as_me:$LINENO: result: $works" >&5
15519echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015520
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015521# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015522echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15523echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15524cat >conftest.$ac_ext <<_ACEOF
15525#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015526/* confdefs.h. */
15527_ACEOF
15528cat confdefs.h >>conftest.$ac_ext
15529cat >>conftest.$ac_ext <<_ACEOF
15530/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015531#include <sys/types.h>
15532#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015533int
15534main ()
15535{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015536struct sockaddr x;
15537x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015538 ;
15539 return 0;
15540}
15541_ACEOF
15542rm -f conftest.$ac_objext
15543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15544 (eval $ac_compile) 2>&5
15545 ac_status=$?
15546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15547 (exit $ac_status); } &&
15548 { ac_try='test -s conftest.$ac_objext'
15549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15550 (eval $ac_try) 2>&5
15551 ac_status=$?
15552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15553 (exit $ac_status); }; }; then
15554 echo "$as_me:$LINENO: result: yes" >&5
15555echo "${ECHO_T}yes" >&6
15556
15557cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015558#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015559_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015560
15561else
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015563sed 's/^/| /' conftest.$ac_ext >&5
15564
Martin v. Löwis11437992002-04-12 09:54:03 +000015565echo "$as_me:$LINENO: result: no" >&5
15566echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015568rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015569
Guido van Rossumda88dad1995-01-26 00:46:29 +000015570va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015571echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15572echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15573cat >conftest.$ac_ext <<_ACEOF
15574#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015575/* confdefs.h. */
15576_ACEOF
15577cat confdefs.h >>conftest.$ac_ext
15578cat >>conftest.$ac_ext <<_ACEOF
15579/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015580
15581#ifdef HAVE_STDARG_PROTOTYPES
15582#include <stdarg.h>
15583#else
15584#include <varargs.h>
15585#endif
15586
Martin v. Löwis11437992002-04-12 09:54:03 +000015587int
15588main ()
15589{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015590va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 ;
15592 return 0;
15593}
15594_ACEOF
15595rm -f conftest.$ac_objext
15596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15597 (eval $ac_compile) 2>&5
15598 ac_status=$?
15599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15600 (exit $ac_status); } &&
15601 { ac_try='test -s conftest.$ac_objext'
15602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15603 (eval $ac_try) 2>&5
15604 ac_status=$?
15605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15606 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015607 :
15608else
Martin v. Löwis11437992002-04-12 09:54:03 +000015609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015610sed 's/^/| /' conftest.$ac_ext >&5
15611
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
15613
15614cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015615#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015616_ACEOF
15617
Guido van Rossumda88dad1995-01-26 00:46:29 +000015618 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015619
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015620fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015621rm -f conftest.$ac_objext conftest.$ac_ext
15622echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15623echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015624
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015625# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015626
15627
15628
15629echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15630echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15631if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15632 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015633else
Martin v. Löwis11437992002-04-12 09:54:03 +000015634 cat >conftest.$ac_ext <<_ACEOF
15635#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015636/* confdefs.h. */
15637_ACEOF
15638cat confdefs.h >>conftest.$ac_ext
15639cat >>conftest.$ac_ext <<_ACEOF
15640/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015641/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015642 which can conflict with char gethostbyname_r (); below.
15643 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015644 <limits.h> exists even on freestanding compilers. Under hpux,
15645 including <limits.h> includes <sys/time.h> and causes problems
15646 checking for functions defined therein. */
15647#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015648# include <limits.h>
15649#else
15650# include <assert.h>
15651#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015652/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015653#ifdef __cplusplus
15654extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015655{
Martin v. Löwis11437992002-04-12 09:54:03 +000015656#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015657/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015658 builtin and then its argument prototype would still apply. */
15659char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015660/* The GNU C library defines this for functions which it implements
15661 to always fail with ENOSYS. Some functions are actually named
15662 something starting with __ and the normal name is an alias. */
15663#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15664choke me
15665#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015666char (*f) () = gethostbyname_r;
15667#endif
15668#ifdef __cplusplus
15669}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015670#endif
15671
Skip Montanaro6dead952003-09-25 14:50:04 +000015672int
15673main ()
15674{
15675return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 ;
15677 return 0;
15678}
15679_ACEOF
15680rm -f conftest.$ac_objext conftest$ac_exeext
15681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15682 (eval $ac_link) 2>&5
15683 ac_status=$?
15684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15685 (exit $ac_status); } &&
15686 { ac_try='test -s conftest$ac_exeext'
15687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15688 (eval $ac_try) 2>&5
15689 ac_status=$?
15690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15691 (exit $ac_status); }; }; then
15692 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015693else
Martin v. Löwis11437992002-04-12 09:54:03 +000015694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015695sed 's/^/| /' conftest.$ac_ext >&5
15696
Martin v. Löwis11437992002-04-12 09:54:03 +000015697ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015698fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015699rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015700fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015701echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15702echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15703if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015704
Martin v. Löwis11437992002-04-12 09:54:03 +000015705 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015706#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015707_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015708
Martin v. Löwis11437992002-04-12 09:54:03 +000015709 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15710echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015711 OLD_CFLAGS=$CFLAGS
15712 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015713 cat >conftest.$ac_ext <<_ACEOF
15714#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015715/* confdefs.h. */
15716_ACEOF
15717cat confdefs.h >>conftest.$ac_ext
15718cat >>conftest.$ac_ext <<_ACEOF
15719/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015720
15721# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015722
Martin v. Löwis11437992002-04-12 09:54:03 +000015723int
15724main ()
15725{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015726
15727 char *name;
15728 struct hostent *he, *res;
15729 char buffer[2048];
15730 int buflen = 2048;
15731 int h_errnop;
15732
15733 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015734
15735 ;
15736 return 0;
15737}
15738_ACEOF
15739rm -f conftest.$ac_objext
15740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15741 (eval $ac_compile) 2>&5
15742 ac_status=$?
15743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15744 (exit $ac_status); } &&
15745 { ac_try='test -s conftest.$ac_objext'
15746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15747 (eval $ac_try) 2>&5
15748 ac_status=$?
15749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15750 (exit $ac_status); }; }; then
15751
15752 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015753#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015754_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015755
Martin v. Löwis11437992002-04-12 09:54:03 +000015756
15757cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015758#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015759_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015760
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 echo "$as_me:$LINENO: result: yes" >&5
15762echo "${ECHO_T}yes" >&6
15763
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015764else
Martin v. Löwis11437992002-04-12 09:54:03 +000015765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015766sed 's/^/| /' conftest.$ac_ext >&5
15767
Martin v. Löwis11437992002-04-12 09:54:03 +000015768
15769 echo "$as_me:$LINENO: result: no" >&5
15770echo "${ECHO_T}no" >&6
15771 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15772echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15773 cat >conftest.$ac_ext <<_ACEOF
15774#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015775/* confdefs.h. */
15776_ACEOF
15777cat confdefs.h >>conftest.$ac_ext
15778cat >>conftest.$ac_ext <<_ACEOF
15779/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015780
15781# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015782
Martin v. Löwis11437992002-04-12 09:54:03 +000015783int
15784main ()
15785{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015786
15787 char *name;
15788 struct hostent *he;
15789 char buffer[2048];
15790 int buflen = 2048;
15791 int h_errnop;
15792
15793 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015794
15795 ;
15796 return 0;
15797}
15798_ACEOF
15799rm -f conftest.$ac_objext
15800if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15801 (eval $ac_compile) 2>&5
15802 ac_status=$?
15803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15804 (exit $ac_status); } &&
15805 { ac_try='test -s conftest.$ac_objext'
15806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15807 (eval $ac_try) 2>&5
15808 ac_status=$?
15809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15810 (exit $ac_status); }; }; then
15811
15812 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015813#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015814_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816
15817cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015818#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015819_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015820
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 echo "$as_me:$LINENO: result: yes" >&5
15822echo "${ECHO_T}yes" >&6
15823
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015824else
Martin v. Löwis11437992002-04-12 09:54:03 +000015825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015826sed 's/^/| /' conftest.$ac_ext >&5
15827
Martin v. Löwis11437992002-04-12 09:54:03 +000015828
15829 echo "$as_me:$LINENO: result: no" >&5
15830echo "${ECHO_T}no" >&6
15831 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15832echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15833 cat >conftest.$ac_ext <<_ACEOF
15834#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015835/* confdefs.h. */
15836_ACEOF
15837cat confdefs.h >>conftest.$ac_ext
15838cat >>conftest.$ac_ext <<_ACEOF
15839/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015840
15841# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015842
Martin v. Löwis11437992002-04-12 09:54:03 +000015843int
15844main ()
15845{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015846
15847 char *name;
15848 struct hostent *he;
15849 struct hostent_data data;
15850
15851 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015852
15853 ;
15854 return 0;
15855}
15856_ACEOF
15857rm -f conftest.$ac_objext
15858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15859 (eval $ac_compile) 2>&5
15860 ac_status=$?
15861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15862 (exit $ac_status); } &&
15863 { ac_try='test -s conftest.$ac_objext'
15864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15865 (eval $ac_try) 2>&5
15866 ac_status=$?
15867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15868 (exit $ac_status); }; }; then
15869
15870 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015871#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015872_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015873
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
15875cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015876#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015877_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015878
Martin v. Löwis11437992002-04-12 09:54:03 +000015879 echo "$as_me:$LINENO: result: yes" >&5
15880echo "${ECHO_T}yes" >&6
15881
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015882else
Martin v. Löwis11437992002-04-12 09:54:03 +000015883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015884sed 's/^/| /' conftest.$ac_ext >&5
15885
Martin v. Löwis11437992002-04-12 09:54:03 +000015886
15887 echo "$as_me:$LINENO: result: no" >&5
15888echo "${ECHO_T}no" >&6
15889
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015890fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015891rm -f conftest.$ac_objext conftest.$ac_ext
15892
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015893fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015894rm -f conftest.$ac_objext conftest.$ac_ext
15895
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015896fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015897rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015898 CFLAGS=$OLD_CFLAGS
15899
15900else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015901
Martin v. Löwis11437992002-04-12 09:54:03 +000015902
15903for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015904do
Martin v. Löwis11437992002-04-12 09:54:03 +000015905as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15906echo "$as_me:$LINENO: checking for $ac_func" >&5
15907echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15908if eval "test \"\${$as_ac_var+set}\" = set"; then
15909 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015910else
Martin v. Löwis11437992002-04-12 09:54:03 +000015911 cat >conftest.$ac_ext <<_ACEOF
15912#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015913/* confdefs.h. */
15914_ACEOF
15915cat confdefs.h >>conftest.$ac_ext
15916cat >>conftest.$ac_ext <<_ACEOF
15917/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015918/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015919 which can conflict with char $ac_func (); below.
15920 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015921 <limits.h> exists even on freestanding compilers. Under hpux,
15922 including <limits.h> includes <sys/time.h> and causes problems
15923 checking for functions defined therein. */
15924#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015925# include <limits.h>
15926#else
15927# include <assert.h>
15928#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015929/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015930#ifdef __cplusplus
15931extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015932{
Martin v. Löwis11437992002-04-12 09:54:03 +000015933#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015934/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015935 builtin and then its argument prototype would still apply. */
15936char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015937/* The GNU C library defines this for functions which it implements
15938 to always fail with ENOSYS. Some functions are actually named
15939 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015940#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015941choke me
15942#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015943char (*f) () = $ac_func;
15944#endif
15945#ifdef __cplusplus
15946}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015947#endif
15948
Skip Montanaro6dead952003-09-25 14:50:04 +000015949int
15950main ()
15951{
15952return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 ;
15954 return 0;
15955}
15956_ACEOF
15957rm -f conftest.$ac_objext conftest$ac_exeext
15958if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15959 (eval $ac_link) 2>&5
15960 ac_status=$?
15961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15962 (exit $ac_status); } &&
15963 { ac_try='test -s conftest$ac_exeext'
15964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15965 (eval $ac_try) 2>&5
15966 ac_status=$?
15967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15968 (exit $ac_status); }; }; then
15969 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015970else
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015972sed 's/^/| /' conftest.$ac_ext >&5
15973
Martin v. Löwis11437992002-04-12 09:54:03 +000015974eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015975fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015976rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015977fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015978echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15979echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15980if test `eval echo '${'$as_ac_var'}'` = yes; then
15981 cat >>confdefs.h <<_ACEOF
15982#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15983_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015984
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015985fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015986done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015987
Michael W. Hudson54241132001-12-07 15:38:26 +000015988
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015989fi
15990
Michael W. Hudson54241132001-12-07 15:38:26 +000015991
15992
15993
15994
15995
15996
Guido van Rossum627b2d71993-12-24 10:39:16 +000015997# checks for system services
15998# (none yet)
15999
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016000# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016001echo "$as_me:$LINENO: checking for __fpu_control" >&5
16002echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16003if test "${ac_cv_func___fpu_control+set}" = set; then
16004 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016005else
Martin v. Löwis11437992002-04-12 09:54:03 +000016006 cat >conftest.$ac_ext <<_ACEOF
16007#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016008/* confdefs.h. */
16009_ACEOF
16010cat confdefs.h >>conftest.$ac_ext
16011cat >>conftest.$ac_ext <<_ACEOF
16012/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016013/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016014 which can conflict with char __fpu_control (); below.
16015 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016016 <limits.h> exists even on freestanding compilers. Under hpux,
16017 including <limits.h> includes <sys/time.h> and causes problems
16018 checking for functions defined therein. */
16019#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016020# include <limits.h>
16021#else
16022# include <assert.h>
16023#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016024/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016025#ifdef __cplusplus
16026extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016027{
Martin v. Löwis11437992002-04-12 09:54:03 +000016028#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016029/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 builtin and then its argument prototype would still apply. */
16031char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016032/* The GNU C library defines this for functions which it implements
16033 to always fail with ENOSYS. Some functions are actually named
16034 something starting with __ and the normal name is an alias. */
16035#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16036choke me
16037#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016038char (*f) () = __fpu_control;
16039#endif
16040#ifdef __cplusplus
16041}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016042#endif
16043
Skip Montanaro6dead952003-09-25 14:50:04 +000016044int
16045main ()
16046{
16047return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016048 ;
16049 return 0;
16050}
16051_ACEOF
16052rm -f conftest.$ac_objext conftest$ac_exeext
16053if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16054 (eval $ac_link) 2>&5
16055 ac_status=$?
16056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16057 (exit $ac_status); } &&
16058 { ac_try='test -s conftest$ac_exeext'
16059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16060 (eval $ac_try) 2>&5
16061 ac_status=$?
16062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16063 (exit $ac_status); }; }; then
16064 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016065else
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016067sed 's/^/| /' conftest.$ac_ext >&5
16068
Martin v. Löwis11437992002-04-12 09:54:03 +000016069ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016070fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016071rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016072fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016073echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16074echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16075if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016076 :
16077else
Martin v. Löwis11437992002-04-12 09:54:03 +000016078
16079echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16080echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16081if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016083else
Martin v. Löwis11437992002-04-12 09:54:03 +000016084 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016085LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016086cat >conftest.$ac_ext <<_ACEOF
16087#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016088/* confdefs.h. */
16089_ACEOF
16090cat confdefs.h >>conftest.$ac_ext
16091cat >>conftest.$ac_ext <<_ACEOF
16092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016094/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016095#ifdef __cplusplus
16096extern "C"
16097#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016098/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016099 builtin and then its argument prototype would still apply. */
16100char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016101int
16102main ()
16103{
16104__fpu_control ();
16105 ;
16106 return 0;
16107}
16108_ACEOF
16109rm -f conftest.$ac_objext conftest$ac_exeext
16110if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16111 (eval $ac_link) 2>&5
16112 ac_status=$?
16113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16114 (exit $ac_status); } &&
16115 { ac_try='test -s conftest$ac_exeext'
16116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16117 (eval $ac_try) 2>&5
16118 ac_status=$?
16119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16120 (exit $ac_status); }; }; then
16121 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016122else
Martin v. Löwis11437992002-04-12 09:54:03 +000016123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016124sed 's/^/| /' conftest.$ac_ext >&5
16125
Martin v. Löwis11437992002-04-12 09:54:03 +000016126ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016127fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016128rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16129LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016130fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016131echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16132echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16133if test $ac_cv_lib_ieee___fpu_control = yes; then
16134 cat >>confdefs.h <<_ACEOF
16135#define HAVE_LIBIEEE 1
16136_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016137
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016138 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016139
Guido van Rossum627b2d71993-12-24 10:39:16 +000016140fi
16141
Michael W. Hudson54241132001-12-07 15:38:26 +000016142
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016143fi
16144
Michael W. Hudson54241132001-12-07 15:38:26 +000016145
Guido van Rossum7f253911997-05-09 02:42:48 +000016146# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016147echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16148echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16149
Guido van Rossum7f253911997-05-09 02:42:48 +000016150# Check whether --with-fpectl or --without-fpectl was given.
16151if test "${with_fpectl+set}" = set; then
16152 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016153
Guido van Rossum7f253911997-05-09 02:42:48 +000016154if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016155then
16156
16157cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016158#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016159_ACEOF
16160
16161 echo "$as_me:$LINENO: result: yes" >&5
16162echo "${ECHO_T}yes" >&6
16163else echo "$as_me:$LINENO: result: no" >&5
16164echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016165fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016166else
Martin v. Löwis11437992002-04-12 09:54:03 +000016167 echo "$as_me:$LINENO: result: no" >&5
16168echo "${ECHO_T}no" >&6
16169fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016170
Guido van Rossum7f43da71994-08-01 12:15:30 +000016171# check for --with-libm=...
16172
Guido van Rossum563e7081996-09-10 18:20:48 +000016173case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016174Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016175BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016176*) LIBM=-lm
16177esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016178echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16179echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16180
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016181# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016182if test "${with_libm+set}" = set; then
16183 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016184
Guido van Rossum7f253911997-05-09 02:42:48 +000016185if test "$withval" = no
16186then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016187 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16188echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016189elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016190then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016191 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16192echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16193else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16194echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16195 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016196fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016197else
Martin v. Löwis11437992002-04-12 09:54:03 +000016198 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16199echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16200fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016201
16202# check for --with-libc=...
16203
Martin v. Löwis11437992002-04-12 09:54:03 +000016204echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16205echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16206
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016207# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016208if test "${with_libc+set}" = set; then
16209 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016210
Guido van Rossum7f253911997-05-09 02:42:48 +000016211if test "$withval" = no
16212then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16214echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016215elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016216then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016217 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16218echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16219else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16220echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16221 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016222fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016223else
Martin v. Löwis11437992002-04-12 09:54:03 +000016224 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16225echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16226fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016227
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016228# check for hypot() in math library
16229LIBS_SAVE=$LIBS
16230LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016231
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016232for ac_func in hypot
16233do
Martin v. Löwis11437992002-04-12 09:54:03 +000016234as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16235echo "$as_me:$LINENO: checking for $ac_func" >&5
16236echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16237if eval "test \"\${$as_ac_var+set}\" = set"; then
16238 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016239else
Martin v. Löwis11437992002-04-12 09:54:03 +000016240 cat >conftest.$ac_ext <<_ACEOF
16241#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016242/* confdefs.h. */
16243_ACEOF
16244cat confdefs.h >>conftest.$ac_ext
16245cat >>conftest.$ac_ext <<_ACEOF
16246/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016247/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016248 which can conflict with char $ac_func (); below.
16249 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016250 <limits.h> exists even on freestanding compilers. Under hpux,
16251 including <limits.h> includes <sys/time.h> and causes problems
16252 checking for functions defined therein. */
16253#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016254# include <limits.h>
16255#else
16256# include <assert.h>
16257#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016258/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016259#ifdef __cplusplus
16260extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016261{
Martin v. Löwis11437992002-04-12 09:54:03 +000016262#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016263/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016264 builtin and then its argument prototype would still apply. */
16265char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016266/* The GNU C library defines this for functions which it implements
16267 to always fail with ENOSYS. Some functions are actually named
16268 something starting with __ and the normal name is an alias. */
16269#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16270choke me
16271#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016272char (*f) () = $ac_func;
16273#endif
16274#ifdef __cplusplus
16275}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016276#endif
16277
Skip Montanaro6dead952003-09-25 14:50:04 +000016278int
16279main ()
16280{
16281return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016282 ;
16283 return 0;
16284}
16285_ACEOF
16286rm -f conftest.$ac_objext conftest$ac_exeext
16287if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16288 (eval $ac_link) 2>&5
16289 ac_status=$?
16290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16291 (exit $ac_status); } &&
16292 { ac_try='test -s conftest$ac_exeext'
16293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16294 (eval $ac_try) 2>&5
16295 ac_status=$?
16296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16297 (exit $ac_status); }; }; then
16298 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016299else
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016301sed 's/^/| /' conftest.$ac_ext >&5
16302
Martin v. Löwis11437992002-04-12 09:54:03 +000016303eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016304fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016305rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016306fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016307echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16308echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16309if test `eval echo '${'$as_ac_var'}'` = yes; then
16310 cat >>confdefs.h <<_ACEOF
16311#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16312_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016313
Michael W. Hudson54241132001-12-07 15:38:26 +000016314else
Martin v. Löwis11437992002-04-12 09:54:03 +000016315 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016316fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016317done
16318
Michael W. Hudson54241132001-12-07 15:38:26 +000016319
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016320LIBS=$LIBS_SAVE
16321
Guido van Rossumef2255b2000-03-10 22:30:29 +000016322# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016323if test "${ac_cv_header_wchar_h+set}" = set; then
16324 echo "$as_me:$LINENO: checking for wchar.h" >&5
16325echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16326if test "${ac_cv_header_wchar_h+set}" = set; then
16327 echo $ECHO_N "(cached) $ECHO_C" >&6
16328fi
16329echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16330echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016331else
Martin v. Löwis11437992002-04-12 09:54:03 +000016332 # Is the header compilable?
16333echo "$as_me:$LINENO: checking wchar.h usability" >&5
16334echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16335cat >conftest.$ac_ext <<_ACEOF
16336#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016337/* confdefs.h. */
16338_ACEOF
16339cat confdefs.h >>conftest.$ac_ext
16340cat >>conftest.$ac_ext <<_ACEOF
16341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016342$ac_includes_default
16343#include <wchar.h>
16344_ACEOF
16345rm -f conftest.$ac_objext
16346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16347 (eval $ac_compile) 2>&5
16348 ac_status=$?
16349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16350 (exit $ac_status); } &&
16351 { ac_try='test -s conftest.$ac_objext'
16352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16353 (eval $ac_try) 2>&5
16354 ac_status=$?
16355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16356 (exit $ac_status); }; }; then
16357 ac_header_compiler=yes
16358else
16359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016360sed 's/^/| /' conftest.$ac_ext >&5
16361
Martin v. Löwis11437992002-04-12 09:54:03 +000016362ac_header_compiler=no
16363fi
16364rm -f conftest.$ac_objext conftest.$ac_ext
16365echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16366echo "${ECHO_T}$ac_header_compiler" >&6
16367
16368# Is the header present?
16369echo "$as_me:$LINENO: checking wchar.h presence" >&5
16370echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16371cat >conftest.$ac_ext <<_ACEOF
16372#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016373/* confdefs.h. */
16374_ACEOF
16375cat confdefs.h >>conftest.$ac_ext
16376cat >>conftest.$ac_ext <<_ACEOF
16377/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016378#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016379_ACEOF
16380if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16381 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16382 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016383 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016384 rm -f conftest.er1
16385 cat conftest.err >&5
16386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16387 (exit $ac_status); } >/dev/null; then
16388 if test -s conftest.err; then
16389 ac_cpp_err=$ac_c_preproc_warn_flag
16390 else
16391 ac_cpp_err=
16392 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016393else
Martin v. Löwis11437992002-04-12 09:54:03 +000016394 ac_cpp_err=yes
16395fi
16396if test -z "$ac_cpp_err"; then
16397 ac_header_preproc=yes
16398else
16399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016400sed 's/^/| /' conftest.$ac_ext >&5
16401
Martin v. Löwis11437992002-04-12 09:54:03 +000016402 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016403fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016404rm -f conftest.err conftest.$ac_ext
16405echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16406echo "${ECHO_T}$ac_header_preproc" >&6
16407
16408# So? What about this header?
16409case $ac_header_compiler:$ac_header_preproc in
16410 yes:no )
16411 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16412echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16413 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016414echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16415 (
16416 cat <<\_ASBOX
16417## ------------------------------------ ##
16418## Report this to bug-autoconf@gnu.org. ##
16419## ------------------------------------ ##
16420_ASBOX
16421 ) |
16422 sed "s/^/$as_me: WARNING: /" >&2
16423 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 no:yes )
16425 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16426echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16427 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16428echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16429 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016430echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16431 (
16432 cat <<\_ASBOX
16433## ------------------------------------ ##
16434## Report this to bug-autoconf@gnu.org. ##
16435## ------------------------------------ ##
16436_ASBOX
16437 ) |
16438 sed "s/^/$as_me: WARNING: /" >&2
16439 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016440esac
16441echo "$as_me:$LINENO: checking for wchar.h" >&5
16442echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16443if test "${ac_cv_header_wchar_h+set}" = set; then
16444 echo $ECHO_N "(cached) $ECHO_C" >&6
16445else
16446 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016448echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16449echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16450
16451fi
16452if test $ac_cv_header_wchar_h = yes; then
16453
16454
16455cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016456#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016457_ACEOF
16458
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016459 wchar_h="yes"
16460
Guido van Rossumef2255b2000-03-10 22:30:29 +000016461else
Martin v. Löwis11437992002-04-12 09:54:03 +000016462 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016463
16464fi
16465
Michael W. Hudson54241132001-12-07 15:38:26 +000016466
Martin v. Löwis11437992002-04-12 09:54:03 +000016467
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016468# determine wchar_t size
16469if test "$wchar_h" = yes
16470then
Martin v. Löwis11437992002-04-12 09:54:03 +000016471 echo "$as_me:$LINENO: checking for wchar_t" >&5
16472echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16473if test "${ac_cv_type_wchar_t+set}" = set; then
16474 echo $ECHO_N "(cached) $ECHO_C" >&6
16475else
16476 cat >conftest.$ac_ext <<_ACEOF
16477#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016478/* confdefs.h. */
16479_ACEOF
16480cat confdefs.h >>conftest.$ac_ext
16481cat >>conftest.$ac_ext <<_ACEOF
16482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016483#include <wchar.h>
16484
Martin v. Löwis11437992002-04-12 09:54:03 +000016485int
16486main ()
16487{
16488if ((wchar_t *) 0)
16489 return 0;
16490if (sizeof (wchar_t))
16491 return 0;
16492 ;
16493 return 0;
16494}
16495_ACEOF
16496rm -f conftest.$ac_objext
16497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16498 (eval $ac_compile) 2>&5
16499 ac_status=$?
16500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16501 (exit $ac_status); } &&
16502 { ac_try='test -s conftest.$ac_objext'
16503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16504 (eval $ac_try) 2>&5
16505 ac_status=$?
16506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16507 (exit $ac_status); }; }; then
16508 ac_cv_type_wchar_t=yes
16509else
16510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016511sed 's/^/| /' conftest.$ac_ext >&5
16512
Martin v. Löwis11437992002-04-12 09:54:03 +000016513ac_cv_type_wchar_t=no
16514fi
16515rm -f conftest.$ac_objext conftest.$ac_ext
16516fi
16517echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16518echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16519
16520echo "$as_me:$LINENO: checking size of wchar_t" >&5
16521echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16522if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16523 echo $ECHO_N "(cached) $ECHO_C" >&6
16524else
16525 if test "$ac_cv_type_wchar_t" = yes; then
16526 # The cast to unsigned long works around a bug in the HP C Compiler
16527 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16528 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16529 # This bug is HP SR number 8606223364.
16530 if test "$cross_compiling" = yes; then
16531 # Depending upon the size, compute the lo and hi bounds.
16532cat >conftest.$ac_ext <<_ACEOF
16533#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016534/* confdefs.h. */
16535_ACEOF
16536cat confdefs.h >>conftest.$ac_ext
16537cat >>conftest.$ac_ext <<_ACEOF
16538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016539#include <wchar.h>
16540
Martin v. Löwis11437992002-04-12 09:54:03 +000016541int
16542main ()
16543{
16544static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16545test_array [0] = 0
16546
16547 ;
16548 return 0;
16549}
16550_ACEOF
16551rm -f conftest.$ac_objext
16552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16553 (eval $ac_compile) 2>&5
16554 ac_status=$?
16555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16556 (exit $ac_status); } &&
16557 { ac_try='test -s conftest.$ac_objext'
16558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16559 (eval $ac_try) 2>&5
16560 ac_status=$?
16561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16562 (exit $ac_status); }; }; then
16563 ac_lo=0 ac_mid=0
16564 while :; do
16565 cat >conftest.$ac_ext <<_ACEOF
16566#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016567/* confdefs.h. */
16568_ACEOF
16569cat confdefs.h >>conftest.$ac_ext
16570cat >>conftest.$ac_ext <<_ACEOF
16571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016572#include <wchar.h>
16573
Martin v. Löwis11437992002-04-12 09:54:03 +000016574int
16575main ()
16576{
16577static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16578test_array [0] = 0
16579
16580 ;
16581 return 0;
16582}
16583_ACEOF
16584rm -f conftest.$ac_objext
16585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16586 (eval $ac_compile) 2>&5
16587 ac_status=$?
16588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16589 (exit $ac_status); } &&
16590 { ac_try='test -s conftest.$ac_objext'
16591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16592 (eval $ac_try) 2>&5
16593 ac_status=$?
16594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16595 (exit $ac_status); }; }; then
16596 ac_hi=$ac_mid; break
16597else
16598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016599sed 's/^/| /' conftest.$ac_ext >&5
16600
Martin v. Löwis11437992002-04-12 09:54:03 +000016601ac_lo=`expr $ac_mid + 1`
16602 if test $ac_lo -le $ac_mid; then
16603 ac_lo= ac_hi=
16604 break
16605 fi
16606 ac_mid=`expr 2 '*' $ac_mid + 1`
16607fi
16608rm -f conftest.$ac_objext conftest.$ac_ext
16609 done
16610else
16611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016612sed 's/^/| /' conftest.$ac_ext >&5
16613
Martin v. Löwis11437992002-04-12 09:54:03 +000016614cat >conftest.$ac_ext <<_ACEOF
16615#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016616/* confdefs.h. */
16617_ACEOF
16618cat confdefs.h >>conftest.$ac_ext
16619cat >>conftest.$ac_ext <<_ACEOF
16620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016621#include <wchar.h>
16622
Martin v. Löwis11437992002-04-12 09:54:03 +000016623int
16624main ()
16625{
16626static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16627test_array [0] = 0
16628
16629 ;
16630 return 0;
16631}
16632_ACEOF
16633rm -f conftest.$ac_objext
16634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16635 (eval $ac_compile) 2>&5
16636 ac_status=$?
16637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16638 (exit $ac_status); } &&
16639 { ac_try='test -s conftest.$ac_objext'
16640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16641 (eval $ac_try) 2>&5
16642 ac_status=$?
16643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16644 (exit $ac_status); }; }; then
16645 ac_hi=-1 ac_mid=-1
16646 while :; do
16647 cat >conftest.$ac_ext <<_ACEOF
16648#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016649/* confdefs.h. */
16650_ACEOF
16651cat confdefs.h >>conftest.$ac_ext
16652cat >>conftest.$ac_ext <<_ACEOF
16653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016654#include <wchar.h>
16655
Martin v. Löwis11437992002-04-12 09:54:03 +000016656int
16657main ()
16658{
16659static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16660test_array [0] = 0
16661
16662 ;
16663 return 0;
16664}
16665_ACEOF
16666rm -f conftest.$ac_objext
16667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16668 (eval $ac_compile) 2>&5
16669 ac_status=$?
16670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16671 (exit $ac_status); } &&
16672 { ac_try='test -s conftest.$ac_objext'
16673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16674 (eval $ac_try) 2>&5
16675 ac_status=$?
16676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16677 (exit $ac_status); }; }; then
16678 ac_lo=$ac_mid; break
16679else
16680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016681sed 's/^/| /' conftest.$ac_ext >&5
16682
Martin v. Löwis11437992002-04-12 09:54:03 +000016683ac_hi=`expr '(' $ac_mid ')' - 1`
16684 if test $ac_mid -le $ac_hi; then
16685 ac_lo= ac_hi=
16686 break
16687 fi
16688 ac_mid=`expr 2 '*' $ac_mid`
16689fi
16690rm -f conftest.$ac_objext conftest.$ac_ext
16691 done
16692else
16693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016694sed 's/^/| /' conftest.$ac_ext >&5
16695
Martin v. Löwis11437992002-04-12 09:54:03 +000016696ac_lo= ac_hi=
16697fi
16698rm -f conftest.$ac_objext conftest.$ac_ext
16699fi
16700rm -f conftest.$ac_objext conftest.$ac_ext
16701# Binary search between lo and hi bounds.
16702while test "x$ac_lo" != "x$ac_hi"; do
16703 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16704 cat >conftest.$ac_ext <<_ACEOF
16705#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016706/* confdefs.h. */
16707_ACEOF
16708cat confdefs.h >>conftest.$ac_ext
16709cat >>conftest.$ac_ext <<_ACEOF
16710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016711#include <wchar.h>
16712
Martin v. Löwis11437992002-04-12 09:54:03 +000016713int
16714main ()
16715{
16716static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16717test_array [0] = 0
16718
16719 ;
16720 return 0;
16721}
16722_ACEOF
16723rm -f conftest.$ac_objext
16724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16725 (eval $ac_compile) 2>&5
16726 ac_status=$?
16727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16728 (exit $ac_status); } &&
16729 { ac_try='test -s conftest.$ac_objext'
16730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16731 (eval $ac_try) 2>&5
16732 ac_status=$?
16733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16734 (exit $ac_status); }; }; then
16735 ac_hi=$ac_mid
16736else
16737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016738sed 's/^/| /' conftest.$ac_ext >&5
16739
Martin v. Löwis11437992002-04-12 09:54:03 +000016740ac_lo=`expr '(' $ac_mid ')' + 1`
16741fi
16742rm -f conftest.$ac_objext conftest.$ac_ext
16743done
16744case $ac_lo in
16745?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016746'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16747See \`config.log' for more details." >&5
16748echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16749See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016750 { (exit 1); exit 1; }; } ;;
16751esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016752else
16753 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016754 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16755See \`config.log' for more details." >&5
16756echo "$as_me: error: cannot run test program while cross compiling
16757See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016758 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016759else
Martin v. Löwis11437992002-04-12 09:54:03 +000016760 cat >conftest.$ac_ext <<_ACEOF
16761#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016762/* confdefs.h. */
16763_ACEOF
16764cat confdefs.h >>conftest.$ac_ext
16765cat >>conftest.$ac_ext <<_ACEOF
16766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016767#include <wchar.h>
16768
16769long longval () { return (long) (sizeof (wchar_t)); }
16770unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016771#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016772#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016773int
16774main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016775{
Martin v. Löwis11437992002-04-12 09:54:03 +000016776
16777 FILE *f = fopen ("conftest.val", "w");
16778 if (! f)
16779 exit (1);
16780 if (((long) (sizeof (wchar_t))) < 0)
16781 {
16782 long i = longval ();
16783 if (i != ((long) (sizeof (wchar_t))))
16784 exit (1);
16785 fprintf (f, "%ld\n", i);
16786 }
16787 else
16788 {
16789 unsigned long i = ulongval ();
16790 if (i != ((long) (sizeof (wchar_t))))
16791 exit (1);
16792 fprintf (f, "%lu\n", i);
16793 }
16794 exit (ferror (f) || fclose (f) != 0);
16795
16796 ;
16797 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016798}
Martin v. Löwis11437992002-04-12 09:54:03 +000016799_ACEOF
16800rm -f conftest$ac_exeext
16801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16802 (eval $ac_link) 2>&5
16803 ac_status=$?
16804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16805 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16807 (eval $ac_try) 2>&5
16808 ac_status=$?
16809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16810 (exit $ac_status); }; }; then
16811 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016812else
Martin v. Löwis11437992002-04-12 09:54:03 +000016813 echo "$as_me: program exited with status $ac_status" >&5
16814echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016815sed 's/^/| /' conftest.$ac_ext >&5
16816
Martin v. Löwis11437992002-04-12 09:54:03 +000016817( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000016818{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16819See \`config.log' for more details." >&5
16820echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16821See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016822 { (exit 1); exit 1; }; }
16823fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016824rm -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 +000016825fi
16826fi
16827rm -f conftest.val
16828else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016829 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016830fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016832echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16833echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16834cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016835#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016836_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016837
Michael W. Hudson54241132001-12-07 15:38:26 +000016838
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016839fi
16840
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016841echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16842echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16843have_ucs4_tcl=no
16844cat >conftest.$ac_ext <<_ACEOF
16845#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016846/* confdefs.h. */
16847_ACEOF
16848cat confdefs.h >>conftest.$ac_ext
16849cat >>conftest.$ac_ext <<_ACEOF
16850/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016851
16852#include <tcl.h>
16853#if TCL_UTF_MAX != 6
16854# error "NOT UCS4_TCL"
16855#endif
16856int
16857main ()
16858{
16859
16860 ;
16861 return 0;
16862}
16863_ACEOF
16864rm -f conftest.$ac_objext
16865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16866 (eval $ac_compile) 2>&5
16867 ac_status=$?
16868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16869 (exit $ac_status); } &&
16870 { ac_try='test -s conftest.$ac_objext'
16871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16872 (eval $ac_try) 2>&5
16873 ac_status=$?
16874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16875 (exit $ac_status); }; }; then
16876
16877
16878cat >>confdefs.h <<\_ACEOF
16879#define HAVE_UCS4_TCL 1
16880_ACEOF
16881
16882 have_ucs4_tcl=yes
16883
16884else
16885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016886sed 's/^/| /' conftest.$ac_ext >&5
16887
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016888fi
16889rm -f conftest.$ac_objext conftest.$ac_ext
16890echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
16891echo "${ECHO_T}$have_ucs4_tcl" >&6
16892
Skip Montanaro6dead952003-09-25 14:50:04 +000016893# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016894if test "$wchar_h" = yes
16895then
16896 # check whether wchar_t is signed or not
16897 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
16898echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
16899 if test "${ac_cv_wchar_t_signed+set}" = set; then
16900 echo $ECHO_N "(cached) $ECHO_C" >&6
16901else
16902
16903 if test "$cross_compiling" = yes; then
16904 ac_cv_wchar_t_signed=yes
16905else
16906 cat >conftest.$ac_ext <<_ACEOF
16907#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016908/* confdefs.h. */
16909_ACEOF
16910cat confdefs.h >>conftest.$ac_ext
16911cat >>conftest.$ac_ext <<_ACEOF
16912/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016913
16914 #include <wchar.h>
16915 int main()
16916 {
16917 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
16918 }
16919
16920_ACEOF
16921rm -f 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); } && { ac_try='./conftest$ac_exeext'
16927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16928 (eval $ac_try) 2>&5
16929 ac_status=$?
16930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16931 (exit $ac_status); }; }; then
16932 ac_cv_wchar_t_signed=yes
16933else
16934 echo "$as_me: program exited with status $ac_status" >&5
16935echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016936sed 's/^/| /' conftest.$ac_ext >&5
16937
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016938( exit $ac_status )
16939ac_cv_wchar_t_signed=no
16940fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016941rm -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 +000016942fi
16943fi
16944
16945 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
16946echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
16947fi
16948
Martin v. Löwis11437992002-04-12 09:54:03 +000016949echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16950echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016951# Check whether --enable-unicode or --disable-unicode was given.
16952if test "${enable_unicode+set}" = set; then
16953 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016954
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016955else
16956 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016957fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016958
16959if test $enable_unicode = yes
16960then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016961 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016962 case "$have_ucs4_tcl" in
16963 yes) enable_unicode="ucs4"
16964 ;;
16965 *) enable_unicode="ucs2"
16966 ;;
16967 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016968fi
16969
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016970
16971
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016972case "$enable_unicode" in
16973ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016974 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016975#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016976_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016977
16978 ;;
16979ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016980 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016981#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016982_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016983
16984 ;;
16985esac
16986
Michael W. Hudson54241132001-12-07 15:38:26 +000016987
Martin v. Löwis11437992002-04-12 09:54:03 +000016988
16989
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016990
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016991if test "$enable_unicode" = "no"
16992then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016993 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016994 echo "$as_me:$LINENO: result: not used" >&5
16995echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016996else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016997 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016998
16999cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017000#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017001_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017002
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017003
17004 # wchar_t is only usable if it maps to an unsigned type
17005 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17006 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017007 then
17008 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017009
Martin v. Löwis11437992002-04-12 09:54:03 +000017010cat >>confdefs.h <<\_ACEOF
17011#define HAVE_USABLE_WCHAR_T 1
17012_ACEOF
17013
17014 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017015#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017016_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017017
17018 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17019 then
17020 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017021 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017022#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017023_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017024
17025 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17026 then
17027 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017028 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017029#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017030_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017031
17032 else
17033 PY_UNICODE_TYPE="no type found"
17034 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017035 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17036echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017037fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017038
17039# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017040echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17041echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17042if test "${ac_cv_c_bigendian+set}" = set; then
17043 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017044else
Martin v. Löwis11437992002-04-12 09:54:03 +000017045 # See if sys/param.h defines the BYTE_ORDER macro.
17046cat >conftest.$ac_ext <<_ACEOF
17047#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017048/* confdefs.h. */
17049_ACEOF
17050cat confdefs.h >>conftest.$ac_ext
17051cat >>conftest.$ac_ext <<_ACEOF
17052/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017053#include <sys/types.h>
17054#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017055
Martin v. Löwis11437992002-04-12 09:54:03 +000017056int
17057main ()
17058{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017059#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17060 bogus endian macros
17061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017062
17063 ;
17064 return 0;
17065}
17066_ACEOF
17067rm -f conftest.$ac_objext
17068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17069 (eval $ac_compile) 2>&5
17070 ac_status=$?
17071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17072 (exit $ac_status); } &&
17073 { ac_try='test -s conftest.$ac_objext'
17074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17075 (eval $ac_try) 2>&5
17076 ac_status=$?
17077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17078 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017079 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017080cat >conftest.$ac_ext <<_ACEOF
17081#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017082/* confdefs.h. */
17083_ACEOF
17084cat confdefs.h >>conftest.$ac_ext
17085cat >>conftest.$ac_ext <<_ACEOF
17086/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017087#include <sys/types.h>
17088#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017089
Martin v. Löwis11437992002-04-12 09:54:03 +000017090int
17091main ()
17092{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017093#if BYTE_ORDER != BIG_ENDIAN
17094 not big endian
17095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017096
17097 ;
17098 return 0;
17099}
17100_ACEOF
17101rm -f conftest.$ac_objext
17102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17103 (eval $ac_compile) 2>&5
17104 ac_status=$?
17105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17106 (exit $ac_status); } &&
17107 { ac_try='test -s conftest.$ac_objext'
17108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17109 (eval $ac_try) 2>&5
17110 ac_status=$?
17111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17112 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017113 ac_cv_c_bigendian=yes
17114else
Martin v. Löwis11437992002-04-12 09:54:03 +000017115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017116sed 's/^/| /' conftest.$ac_ext >&5
17117
Martin v. Löwis11437992002-04-12 09:54:03 +000017118ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017119fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017120rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017121else
Martin v. Löwis11437992002-04-12 09:54:03 +000017122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017123sed 's/^/| /' conftest.$ac_ext >&5
17124
Martin v. Löwis11437992002-04-12 09:54:03 +000017125# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017126if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017127 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017128 ac_cv_c_bigendian=unknown
17129 cat >conftest.$ac_ext <<_ACEOF
17130#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017131/* confdefs.h. */
17132_ACEOF
17133cat confdefs.h >>conftest.$ac_ext
17134cat >>conftest.$ac_ext <<_ACEOF
17135/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017136short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17137short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17138void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17139short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17140short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17141void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017142int
17143main ()
17144{
17145 _ascii (); _ebcdic ();
17146 ;
17147 return 0;
17148}
17149_ACEOF
17150rm -f conftest.$ac_objext
17151if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17152 (eval $ac_compile) 2>&5
17153 ac_status=$?
17154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17155 (exit $ac_status); } &&
17156 { ac_try='test -s conftest.$ac_objext'
17157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17158 (eval $ac_try) 2>&5
17159 ac_status=$?
17160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17161 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017162 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017163 ac_cv_c_bigendian=yes
17164fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017165if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017166 if test "$ac_cv_c_bigendian" = unknown; then
17167 ac_cv_c_bigendian=no
17168 else
17169 # finding both strings is unlikely to happen, but who knows?
17170 ac_cv_c_bigendian=unknown
17171 fi
17172fi
17173else
17174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017175sed 's/^/| /' conftest.$ac_ext >&5
17176
Martin v. Löwis11437992002-04-12 09:54:03 +000017177fi
17178rm -f conftest.$ac_objext conftest.$ac_ext
17179else
17180 cat >conftest.$ac_ext <<_ACEOF
17181#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017182/* confdefs.h. */
17183_ACEOF
17184cat confdefs.h >>conftest.$ac_ext
17185cat >>conftest.$ac_ext <<_ACEOF
17186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017187int
17188main ()
17189{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017190 /* Are we little or big endian? From Harbison&Steele. */
17191 union
17192 {
17193 long l;
17194 char c[sizeof (long)];
17195 } u;
17196 u.l = 1;
17197 exit (u.c[sizeof (long) - 1] == 1);
17198}
Martin v. Löwis11437992002-04-12 09:54:03 +000017199_ACEOF
17200rm -f conftest$ac_exeext
17201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17202 (eval $ac_link) 2>&5
17203 ac_status=$?
17204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17205 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17207 (eval $ac_try) 2>&5
17208 ac_status=$?
17209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17210 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017211 ac_cv_c_bigendian=no
17212else
Martin v. Löwis11437992002-04-12 09:54:03 +000017213 echo "$as_me: program exited with status $ac_status" >&5
17214echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017215sed 's/^/| /' conftest.$ac_ext >&5
17216
Martin v. Löwis11437992002-04-12 09:54:03 +000017217( exit $ac_status )
17218ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017219fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017220rm -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 +000017221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017222fi
17223rm -f conftest.$ac_objext conftest.$ac_ext
17224fi
17225echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17226echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17227case $ac_cv_c_bigendian in
17228 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017229
Martin v. Löwis11437992002-04-12 09:54:03 +000017230cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017231#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017232_ACEOF
17233 ;;
17234 no)
17235 ;;
17236 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017237 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017238presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017239echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017240presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17241 { (exit 1); exit 1; }; } ;;
17242esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017243
Michael W. Hudson54241132001-12-07 15:38:26 +000017244
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017245# Check whether right shifting a negative integer extends the sign bit
17246# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017247echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17248echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17249if test "${ac_cv_rshift_extends_sign+set}" = set; then
17250 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017251else
Martin v. Löwis11437992002-04-12 09:54:03 +000017252
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017253if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017254 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017255else
Martin v. Löwis11437992002-04-12 09:54:03 +000017256 cat >conftest.$ac_ext <<_ACEOF
17257#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017258/* confdefs.h. */
17259_ACEOF
17260cat confdefs.h >>conftest.$ac_ext
17261cat >>conftest.$ac_ext <<_ACEOF
17262/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017263
17264int main()
17265{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017266 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017267}
17268
Martin v. Löwis11437992002-04-12 09:54:03 +000017269_ACEOF
17270rm -f conftest$ac_exeext
17271if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17272 (eval $ac_link) 2>&5
17273 ac_status=$?
17274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17275 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17277 (eval $ac_try) 2>&5
17278 ac_status=$?
17279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17280 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017281 ac_cv_rshift_extends_sign=yes
17282else
Martin v. Löwis11437992002-04-12 09:54:03 +000017283 echo "$as_me: program exited with status $ac_status" >&5
17284echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017285sed 's/^/| /' conftest.$ac_ext >&5
17286
Martin v. Löwis11437992002-04-12 09:54:03 +000017287( exit $ac_status )
17288ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017289fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017290rm -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 +000017291fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017292fi
17293
Martin v. Löwis11437992002-04-12 09:54:03 +000017294echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17295echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017296if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017297then
Martin v. Löwis11437992002-04-12 09:54:03 +000017298
17299cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017300#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017301_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017302
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017303fi
17304
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017305# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017306echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17307echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17308if test "${ac_cv_have_getc_unlocked+set}" = set; then
17309 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017310else
Martin v. Löwis11437992002-04-12 09:54:03 +000017311
17312cat >conftest.$ac_ext <<_ACEOF
17313#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017314/* confdefs.h. */
17315_ACEOF
17316cat confdefs.h >>conftest.$ac_ext
17317cat >>conftest.$ac_ext <<_ACEOF
17318/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017319#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017320int
17321main ()
17322{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017323
17324 FILE *f = fopen("/dev/null", "r");
17325 flockfile(f);
17326 getc_unlocked(f);
17327 funlockfile(f);
17328
Martin v. Löwis11437992002-04-12 09:54:03 +000017329 ;
17330 return 0;
17331}
17332_ACEOF
17333rm -f conftest.$ac_objext conftest$ac_exeext
17334if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17335 (eval $ac_link) 2>&5
17336 ac_status=$?
17337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17338 (exit $ac_status); } &&
17339 { ac_try='test -s conftest$ac_exeext'
17340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17341 (eval $ac_try) 2>&5
17342 ac_status=$?
17343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17344 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017345 ac_cv_have_getc_unlocked=yes
17346else
Martin v. Löwis11437992002-04-12 09:54:03 +000017347 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017348sed 's/^/| /' conftest.$ac_ext >&5
17349
Martin v. Löwis11437992002-04-12 09:54:03 +000017350ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017352rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017353fi
17354
Martin v. Löwis11437992002-04-12 09:54:03 +000017355echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17356echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017357if test "$ac_cv_have_getc_unlocked" = yes
17358then
Martin v. Löwis11437992002-04-12 09:54:03 +000017359
17360cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017361#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017362_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017363
17364fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017365
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017366# check for readline 2.2
17367cat >conftest.$ac_ext <<_ACEOF
17368#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017369/* confdefs.h. */
17370_ACEOF
17371cat confdefs.h >>conftest.$ac_ext
17372cat >>conftest.$ac_ext <<_ACEOF
17373/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017374#include <readline/readline.h>
17375_ACEOF
17376if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17377 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17378 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017379 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017380 rm -f conftest.er1
17381 cat conftest.err >&5
17382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17383 (exit $ac_status); } >/dev/null; then
17384 if test -s conftest.err; then
17385 ac_cpp_err=$ac_c_preproc_warn_flag
17386 else
17387 ac_cpp_err=
17388 fi
17389else
17390 ac_cpp_err=yes
17391fi
17392if test -z "$ac_cpp_err"; then
17393 have_readline=yes
17394else
17395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017396sed 's/^/| /' conftest.$ac_ext >&5
17397
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017398 have_readline=no
17399fi
17400rm -f conftest.err conftest.$ac_ext
17401if test $have_readline = yes
17402then
17403 cat >conftest.$ac_ext <<_ACEOF
17404#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017405/* confdefs.h. */
17406_ACEOF
17407cat confdefs.h >>conftest.$ac_ext
17408cat >>conftest.$ac_ext <<_ACEOF
17409/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017410#include <readline/readline.h>
17411
17412_ACEOF
17413if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017414 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017415
17416cat >>confdefs.h <<\_ACEOF
17417#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17418_ACEOF
17419
17420fi
17421rm -f conftest*
17422
17423fi
17424
Martin v. Löwis0daad592001-09-30 21:09:59 +000017425# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017426echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17427echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17428if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17429 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017430else
Martin v. Löwis11437992002-04-12 09:54:03 +000017431 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017432LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017433cat >conftest.$ac_ext <<_ACEOF
17434#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017435/* confdefs.h. */
17436_ACEOF
17437cat confdefs.h >>conftest.$ac_ext
17438cat >>conftest.$ac_ext <<_ACEOF
17439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017440
Guido van Rossum353ae582001-07-10 16:45:32 +000017441/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017442#ifdef __cplusplus
17443extern "C"
17444#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017445/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017446 builtin and then its argument prototype would still apply. */
17447char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017448int
17449main ()
17450{
17451rl_pre_input_hook ();
17452 ;
17453 return 0;
17454}
17455_ACEOF
17456rm -f conftest.$ac_objext conftest$ac_exeext
17457if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17458 (eval $ac_link) 2>&5
17459 ac_status=$?
17460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17461 (exit $ac_status); } &&
17462 { ac_try='test -s conftest$ac_exeext'
17463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17464 (eval $ac_try) 2>&5
17465 ac_status=$?
17466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17467 (exit $ac_status); }; }; then
17468 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017469else
Martin v. Löwis11437992002-04-12 09:54:03 +000017470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017471sed 's/^/| /' conftest.$ac_ext >&5
17472
Martin v. Löwis11437992002-04-12 09:54:03 +000017473ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017474fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017475rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17476LIBS=$ac_check_lib_save_LIBS
17477fi
17478echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17479echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17480if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017481
Martin v. Löwis11437992002-04-12 09:54:03 +000017482cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017483#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017484_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017485
Martin v. Löwis0daad592001-09-30 21:09:59 +000017486fi
17487
Michael W. Hudson54241132001-12-07 15:38:26 +000017488
Martin v. Löwis0daad592001-09-30 21:09:59 +000017489# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017490echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17491echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17492if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17493 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017494else
Martin v. Löwis11437992002-04-12 09:54:03 +000017495 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017496LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017497cat >conftest.$ac_ext <<_ACEOF
17498#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017499/* confdefs.h. */
17500_ACEOF
17501cat confdefs.h >>conftest.$ac_ext
17502cat >>conftest.$ac_ext <<_ACEOF
17503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017504
Martin v. Löwis0daad592001-09-30 21:09:59 +000017505/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017506#ifdef __cplusplus
17507extern "C"
17508#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017509/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017510 builtin and then its argument prototype would still apply. */
17511char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017512int
17513main ()
17514{
17515rl_completion_matches ();
17516 ;
17517 return 0;
17518}
17519_ACEOF
17520rm -f conftest.$ac_objext conftest$ac_exeext
17521if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17522 (eval $ac_link) 2>&5
17523 ac_status=$?
17524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17525 (exit $ac_status); } &&
17526 { ac_try='test -s conftest$ac_exeext'
17527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17528 (eval $ac_try) 2>&5
17529 ac_status=$?
17530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17531 (exit $ac_status); }; }; then
17532 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017533else
Martin v. Löwis11437992002-04-12 09:54:03 +000017534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017535sed 's/^/| /' conftest.$ac_ext >&5
17536
Martin v. Löwis11437992002-04-12 09:54:03 +000017537ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017538fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017539rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17540LIBS=$ac_check_lib_save_LIBS
17541fi
17542echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17543echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17544if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017545
Martin v. Löwis11437992002-04-12 09:54:03 +000017546cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017547#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017548_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017549
Guido van Rossum353ae582001-07-10 16:45:32 +000017550fi
17551
Jack Jansendd19cf82001-12-06 22:36:17 +000017552
Martin v. Löwis11437992002-04-12 09:54:03 +000017553echo "$as_me:$LINENO: checking for broken nice()" >&5
17554echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17555if test "${ac_cv_broken_nice+set}" = set; then
17556 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017557else
Martin v. Löwis11437992002-04-12 09:54:03 +000017558
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017559if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017560 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017561else
Martin v. Löwis11437992002-04-12 09:54:03 +000017562 cat >conftest.$ac_ext <<_ACEOF
17563#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017564/* confdefs.h. */
17565_ACEOF
17566cat confdefs.h >>conftest.$ac_ext
17567cat >>conftest.$ac_ext <<_ACEOF
17568/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017569
17570int main()
17571{
17572 int val1 = nice(1);
17573 if (val1 != -1 && val1 == nice(2))
17574 exit(0);
17575 exit(1);
17576}
17577
Martin v. Löwis11437992002-04-12 09:54:03 +000017578_ACEOF
17579rm -f conftest$ac_exeext
17580if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17581 (eval $ac_link) 2>&5
17582 ac_status=$?
17583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17584 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17586 (eval $ac_try) 2>&5
17587 ac_status=$?
17588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17589 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017590 ac_cv_broken_nice=yes
17591else
Martin v. Löwis11437992002-04-12 09:54:03 +000017592 echo "$as_me: program exited with status $ac_status" >&5
17593echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017594sed 's/^/| /' conftest.$ac_ext >&5
17595
Martin v. Löwis11437992002-04-12 09:54:03 +000017596( exit $ac_status )
17597ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017598fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017599rm -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 +000017600fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017601fi
17602
Martin v. Löwis11437992002-04-12 09:54:03 +000017603echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17604echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017605if test "$ac_cv_broken_nice" = yes
17606then
Martin v. Löwis11437992002-04-12 09:54:03 +000017607
17608cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017609#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017610_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017611
17612fi
17613
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017614# tzset(3) exists and works like we expect it to
17615echo "$as_me:$LINENO: checking for working tzset()" >&5
17616echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17617if test "${ac_cv_working_tzset+set}" = set; then
17618 echo $ECHO_N "(cached) $ECHO_C" >&6
17619else
17620
17621if test "$cross_compiling" = yes; then
17622 ac_cv_working_tzset=no
17623else
17624 cat >conftest.$ac_ext <<_ACEOF
17625#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017626/* confdefs.h. */
17627_ACEOF
17628cat confdefs.h >>conftest.$ac_ext
17629cat >>conftest.$ac_ext <<_ACEOF
17630/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017631
17632#include <stdlib.h>
17633#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017634#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017635int main()
17636{
Brett Cannon18367812003-09-19 00:59:16 +000017637 /* Note that we need to ensure that not only does tzset(3)
17638 do 'something' with localtime, but it works as documented
17639 in the library reference and as expected by the test suite.
17640
17641 Red Hat 6.2 doesn't understand the southern hemisphere
17642 after New Year's Day; it thinks swaps on that day.
17643 */
17644
17645 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17646 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17647
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017648 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017649 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017650 if (localtime(&groundhogday)->tm_hour != 0)
17651 exit(1);
17652
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017653 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017654 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017655 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017656 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017657
17658 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17659 tzset();
17660 if (localtime(&groundhogday)->tm_hour != 11)
17661 exit(1);
17662 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17663 exit(1);
17664 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17665 exit(1);
17666
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017667 exit(0);
17668}
17669
17670_ACEOF
17671rm -f conftest$ac_exeext
17672if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17673 (eval $ac_link) 2>&5
17674 ac_status=$?
17675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17676 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17678 (eval $ac_try) 2>&5
17679 ac_status=$?
17680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17681 (exit $ac_status); }; }; then
17682 ac_cv_working_tzset=yes
17683else
17684 echo "$as_me: program exited with status $ac_status" >&5
17685echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017686sed 's/^/| /' conftest.$ac_ext >&5
17687
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017688( exit $ac_status )
17689ac_cv_working_tzset=no
17690fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017691rm -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 +000017692fi
17693fi
17694
17695echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17696echo "${ECHO_T}$ac_cv_working_tzset" >&6
17697if test "$ac_cv_working_tzset" = yes
17698then
17699
17700cat >>confdefs.h <<\_ACEOF
17701#define HAVE_WORKING_TZSET 1
17702_ACEOF
17703
17704fi
17705
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017706# Look for subsecond timestamps in struct stat
17707echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17708echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17709if test "${ac_cv_stat_tv_nsec+set}" = set; then
17710 echo $ECHO_N "(cached) $ECHO_C" >&6
17711else
17712 cat >conftest.$ac_ext <<_ACEOF
17713#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017714/* confdefs.h. */
17715_ACEOF
17716cat confdefs.h >>conftest.$ac_ext
17717cat >>conftest.$ac_ext <<_ACEOF
17718/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017719#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017720int
17721main ()
17722{
17723
17724struct stat st;
17725st.st_mtim.tv_nsec = 1;
17726
17727 ;
17728 return 0;
17729}
17730_ACEOF
17731rm -f conftest.$ac_objext
17732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17733 (eval $ac_compile) 2>&5
17734 ac_status=$?
17735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17736 (exit $ac_status); } &&
17737 { ac_try='test -s conftest.$ac_objext'
17738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17739 (eval $ac_try) 2>&5
17740 ac_status=$?
17741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17742 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017743 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017744else
17745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017746sed 's/^/| /' conftest.$ac_ext >&5
17747
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017748ac_cv_stat_tv_nsec=no
17749fi
17750rm -f conftest.$ac_objext conftest.$ac_ext
17751fi
17752
17753echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17754echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17755if test "$ac_cv_stat_tv_nsec" = yes
17756then
17757
17758cat >>confdefs.h <<\_ACEOF
17759#define HAVE_STAT_TV_NSEC 1
17760_ACEOF
17761
17762fi
17763
Jack Jansen666b1e72001-10-31 12:11:48 +000017764# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017765echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17766echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17767if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17768 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017769else
Martin v. Löwis11437992002-04-12 09:54:03 +000017770 cat >conftest.$ac_ext <<_ACEOF
17771#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017772/* confdefs.h. */
17773_ACEOF
17774cat confdefs.h >>conftest.$ac_ext
17775cat >>conftest.$ac_ext <<_ACEOF
17776/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017777#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017778int
17779main ()
17780{
Jack Jansen666b1e72001-10-31 12:11:48 +000017781
17782 int rtn;
17783 rtn = mvwdelch(0,0,0);
17784
Martin v. Löwis11437992002-04-12 09:54:03 +000017785 ;
17786 return 0;
17787}
17788_ACEOF
17789rm -f conftest.$ac_objext
17790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17791 (eval $ac_compile) 2>&5
17792 ac_status=$?
17793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17794 (exit $ac_status); } &&
17795 { ac_try='test -s conftest.$ac_objext'
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
Jack Jansen666b1e72001-10-31 12:11:48 +000017801 ac_cv_mvwdelch_is_expression=yes
17802else
Martin v. Löwis11437992002-04-12 09:54:03 +000017803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017804sed 's/^/| /' conftest.$ac_ext >&5
17805
Martin v. Löwis11437992002-04-12 09:54:03 +000017806ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017807fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017808rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017809fi
17810
Martin v. Löwis11437992002-04-12 09:54:03 +000017811echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17812echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017813
17814if test "$ac_cv_mvwdelch_is_expression" = yes
17815then
Martin v. Löwis11437992002-04-12 09:54:03 +000017816
17817cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017818#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017819_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017820
17821fi
17822
Martin v. Löwis11437992002-04-12 09:54:03 +000017823echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17824echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17825if test "${ac_cv_window_has_flags+set}" = set; then
17826 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017827else
Martin v. Löwis11437992002-04-12 09:54:03 +000017828 cat >conftest.$ac_ext <<_ACEOF
17829#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017830/* confdefs.h. */
17831_ACEOF
17832cat confdefs.h >>conftest.$ac_ext
17833cat >>conftest.$ac_ext <<_ACEOF
17834/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017835#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017836int
17837main ()
17838{
Jack Jansen666b1e72001-10-31 12:11:48 +000017839
17840 WINDOW *w;
17841 w->_flags = 0;
17842
Martin v. Löwis11437992002-04-12 09:54:03 +000017843 ;
17844 return 0;
17845}
17846_ACEOF
17847rm -f conftest.$ac_objext
17848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17849 (eval $ac_compile) 2>&5
17850 ac_status=$?
17851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17852 (exit $ac_status); } &&
17853 { ac_try='test -s conftest.$ac_objext'
17854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17855 (eval $ac_try) 2>&5
17856 ac_status=$?
17857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17858 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017859 ac_cv_window_has_flags=yes
17860else
Martin v. Löwis11437992002-04-12 09:54:03 +000017861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017862sed 's/^/| /' conftest.$ac_ext >&5
17863
Martin v. Löwis11437992002-04-12 09:54:03 +000017864ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017866rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017867fi
17868
Martin v. Löwis11437992002-04-12 09:54:03 +000017869echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17870echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017871
Jack Jansen666b1e72001-10-31 12:11:48 +000017872
17873if test "$ac_cv_window_has_flags" = yes
17874then
Martin v. Löwis11437992002-04-12 09:54:03 +000017875
17876cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017877#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017878_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017879
17880fi
17881
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017882echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17883echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17884
17885if test -e /dev/ptmx
17886then
17887 echo "$as_me:$LINENO: result: yes" >&5
17888echo "${ECHO_T}yes" >&6
17889
17890cat >>confdefs.h <<\_ACEOF
17891#define HAVE_DEV_PTMX 1
17892_ACEOF
17893
17894else
17895 echo "$as_me:$LINENO: result: no" >&5
17896echo "${ECHO_T}no" >&6
17897fi
17898
Neal Norwitz865400f2003-03-21 01:42:58 +000017899echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17900echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17901
17902if test -e /dev/ptc
17903then
17904 echo "$as_me:$LINENO: result: yes" >&5
17905echo "${ECHO_T}yes" >&6
17906
17907cat >>confdefs.h <<\_ACEOF
17908#define HAVE_DEV_PTC 1
17909_ACEOF
17910
17911else
17912 echo "$as_me:$LINENO: result: no" >&5
17913echo "${ECHO_T}no" >&6
17914fi
17915
Martin v. Löwis11437992002-04-12 09:54:03 +000017916echo "$as_me:$LINENO: checking for socklen_t" >&5
17917echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17918if test "${ac_cv_type_socklen_t+set}" = set; then
17919 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017920else
Martin v. Löwis11437992002-04-12 09:54:03 +000017921 cat >conftest.$ac_ext <<_ACEOF
17922#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017923/* confdefs.h. */
17924_ACEOF
17925cat confdefs.h >>conftest.$ac_ext
17926cat >>conftest.$ac_ext <<_ACEOF
17927/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000017928
17929#ifdef HAVE_SYS_TYPES_H
17930#include <sys/types.h>
17931#endif
17932#ifdef HAVE_SYS_SOCKET_H
17933#include <sys/socket.h>
17934#endif
17935
17936
Martin v. Löwis11437992002-04-12 09:54:03 +000017937int
17938main ()
17939{
17940if ((socklen_t *) 0)
17941 return 0;
17942if (sizeof (socklen_t))
17943 return 0;
17944 ;
17945 return 0;
17946}
17947_ACEOF
17948rm -f conftest.$ac_objext
17949if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17950 (eval $ac_compile) 2>&5
17951 ac_status=$?
17952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17953 (exit $ac_status); } &&
17954 { ac_try='test -s conftest.$ac_objext'
17955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17956 (eval $ac_try) 2>&5
17957 ac_status=$?
17958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17959 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017960 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017961else
Martin v. Löwis11437992002-04-12 09:54:03 +000017962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017963sed 's/^/| /' conftest.$ac_ext >&5
17964
Martin v. Löwis11437992002-04-12 09:54:03 +000017965ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017967rm -f conftest.$ac_objext conftest.$ac_ext
17968fi
17969echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17970echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17971if test $ac_cv_type_socklen_t = yes; then
17972 :
17973else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017974
Martin v. Löwis01c04012002-11-11 14:58:44 +000017975cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017976#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017977_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017978
17979fi
17980
Michael W. Hudson54241132001-12-07 15:38:26 +000017981
Michael W. Hudson54241132001-12-07 15:38:26 +000017982
17983
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017984for h in `(cd $srcdir;echo Python/thread_*.h)`
17985do
17986 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17987done
17988
Michael W. Hudson54241132001-12-07 15:38:26 +000017989
Jack Jansen0b06be72002-06-21 14:48:38 +000017990SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017991echo "$as_me:$LINENO: checking for build directories" >&5
17992echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017993for dir in $SRCDIRS; do
17994 if test ! -d $dir; then
17995 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017996 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017997done
Martin v. Löwis11437992002-04-12 09:54:03 +000017998echo "$as_me:$LINENO: result: done" >&5
17999echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018000
Guido van Rossum627b2d71993-12-24 10:39:16 +000018001# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018002 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018003
Martin v. Löwis11437992002-04-12 09:54:03 +000018004cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018005# This file is a shell script that caches the results of configure
18006# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018007# scripts and configure runs, see configure's option --config-cache.
18008# It is not useful on other systems. If it contains results you don't
18009# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018010#
Martin v. Löwis11437992002-04-12 09:54:03 +000018011# config.status only pays attention to the cache file if you give it
18012# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018013#
Skip Montanaro6dead952003-09-25 14:50:04 +000018014# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018015# loading this file, other *unset* `ac_cv_foo' will be assigned the
18016# following values.
18017
18018_ACEOF
18019
Guido van Rossumf78abae1997-01-21 22:02:36 +000018020# The following way of writing the cache mishandles newlines in values,
18021# but we know of no workaround that is simple, portable, and efficient.
18022# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018023# Ultrix sh set writes to stderr and can't be redirected directly,
18024# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018025{
18026 (set) 2>&1 |
18027 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18028 *ac_space=\ *)
18029 # `set' does not quote correctly, so add quotes (double-quote
18030 # substitution turns \\\\ into \\, and sed turns \\ into \).
18031 sed -n \
18032 "s/'/'\\\\''/g;
18033 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18034 ;;
18035 *)
18036 # `set' quotes correctly as required by POSIX, so do not add quotes.
18037 sed -n \
18038 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18039 ;;
18040 esac;
18041} |
18042 sed '
18043 t clear
18044 : clear
18045 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18046 t end
18047 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18048 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018049if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018050 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018051 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18052 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018053 else
18054 echo "not updating unwritable cache $cache_file"
18055 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018056fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018057rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018058
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018059test "x$prefix" = xNONE && prefix=$ac_default_prefix
18060# Let make expand exec_prefix.
18061test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018062
Martin v. Löwis11437992002-04-12 09:54:03 +000018063# VPATH may cause trouble with some makes, so we remove $(srcdir),
18064# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18065# trailing colons and then remove the whole line if VPATH becomes empty
18066# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018067if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018068 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18069s/:*\$(srcdir):*/:/;
18070s/:*\${srcdir}:*/:/;
18071s/:*@srcdir@:*/:/;
18072s/^\([^=]*=[ ]*\):*/\1/;
18073s/:*$//;
18074s/^[^=]*=[ ]*$//;
18075}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018076fi
18077
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018078DEFS=-DHAVE_CONFIG_H
18079
Skip Montanaro6dead952003-09-25 14:50:04 +000018080ac_libobjs=
18081ac_ltlibobjs=
18082for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18083 # 1. Remove the extension, and $U if already installed.
18084 ac_i=`echo "$ac_i" |
18085 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18086 # 2. Add them.
18087 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18088 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18089done
18090LIBOBJS=$ac_libobjs
18091
18092LTLIBOBJS=$ac_ltlibobjs
18093
18094
Martin v. Löwis11437992002-04-12 09:54:03 +000018095
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018096: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018097ac_clean_files_save=$ac_clean_files
18098ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18099{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18100echo "$as_me: creating $CONFIG_STATUS" >&6;}
18101cat >$CONFIG_STATUS <<_ACEOF
18102#! $SHELL
18103# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018104# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018105# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018106# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018107
Martin v. Löwis11437992002-04-12 09:54:03 +000018108debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018109ac_cs_recheck=false
18110ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018111SHELL=\${CONFIG_SHELL-$SHELL}
18112_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018113
Martin v. Löwis11437992002-04-12 09:54:03 +000018114cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018115## --------------------- ##
18116## M4sh Initialization. ##
18117## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018118
Martin v. Löwis11437992002-04-12 09:54:03 +000018119# Be Bourne compatible
18120if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18121 emulate sh
18122 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018123 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18124 # is contrary to our usage. Disable this feature.
18125 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018126elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18127 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018128fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018129
Martin v. Löwis11437992002-04-12 09:54:03 +000018130# Support unset when possible.
18131if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18132 as_unset=unset
18133else
18134 as_unset=false
18135fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018136
Skip Montanaro6dead952003-09-25 14:50:04 +000018137
18138# Work around bugs in pre-3.0 UWIN ksh.
18139$as_unset ENV MAIL MAILPATH
18140PS1='$ '
18141PS2='> '
18142PS4='+ '
18143
18144# NLS nuisances.
18145for as_var in \
18146 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18147 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18148 LC_TELEPHONE LC_TIME
18149do
18150 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18151 eval $as_var=C; export $as_var
18152 else
18153 $as_unset $as_var
18154 fi
18155done
18156
18157# Required to use basename.
18158if expr a : '\(a\)' >/dev/null 2>&1; then
18159 as_expr=expr
18160else
18161 as_expr=false
18162fi
18163
18164if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18165 as_basename=basename
18166else
18167 as_basename=false
18168fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018169
18170
18171# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018172as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018173$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18174 X"$0" : 'X\(//\)$' \| \
18175 X"$0" : 'X\(/\)$' \| \
18176 . : '\(.\)' 2>/dev/null ||
18177echo X/"$0" |
18178 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18179 /^X\/\(\/\/\)$/{ s//\1/; q; }
18180 /^X\/\(\/\).*/{ s//\1/; q; }
18181 s/.*/./; q'`
18182
Skip Montanaro6dead952003-09-25 14:50:04 +000018183
Martin v. Löwis11437992002-04-12 09:54:03 +000018184# PATH needs CR, and LINENO needs CR and PATH.
18185# Avoid depending upon Character Ranges.
18186as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18187as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18188as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18189as_cr_digits='0123456789'
18190as_cr_alnum=$as_cr_Letters$as_cr_digits
18191
18192# The user is always right.
18193if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018194 echo "#! /bin/sh" >conf$$.sh
18195 echo "exit 0" >>conf$$.sh
18196 chmod +x conf$$.sh
18197 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018198 PATH_SEPARATOR=';'
18199 else
18200 PATH_SEPARATOR=:
18201 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018202 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018203fi
18204
18205
18206 as_lineno_1=$LINENO
18207 as_lineno_2=$LINENO
18208 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18209 test "x$as_lineno_1" != "x$as_lineno_2" &&
18210 test "x$as_lineno_3" = "x$as_lineno_2" || {
18211 # Find who we are. Look in the path if we contain no path at all
18212 # relative or not.
18213 case $0 in
18214 *[\\/]* ) as_myself=$0 ;;
18215 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18216for as_dir in $PATH
18217do
18218 IFS=$as_save_IFS
18219 test -z "$as_dir" && as_dir=.
18220 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18221done
18222
18223 ;;
18224 esac
18225 # We did not find ourselves, most probably we were run as `sh COMMAND'
18226 # in which case we are not to be found in the path.
18227 if test "x$as_myself" = x; then
18228 as_myself=$0
18229 fi
18230 if test ! -f "$as_myself"; then
18231 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18232echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18233 { (exit 1); exit 1; }; }
18234 fi
18235 case $CONFIG_SHELL in
18236 '')
18237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18238for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18239do
18240 IFS=$as_save_IFS
18241 test -z "$as_dir" && as_dir=.
18242 for as_base in sh bash ksh sh5; do
18243 case $as_dir in
18244 /*)
18245 if ("$as_dir/$as_base" -c '
18246 as_lineno_1=$LINENO
18247 as_lineno_2=$LINENO
18248 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18249 test "x$as_lineno_1" != "x$as_lineno_2" &&
18250 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018251 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18252 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018253 CONFIG_SHELL=$as_dir/$as_base
18254 export CONFIG_SHELL
18255 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18256 fi;;
18257 esac
18258 done
18259done
18260;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018261 esac
18262
Martin v. Löwis11437992002-04-12 09:54:03 +000018263 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18264 # uniformly replaced by the line number. The first 'sed' inserts a
18265 # line-number line before each line; the second 'sed' does the real
18266 # work. The second script uses 'N' to pair each line-number line
18267 # with the numbered line, and appends trailing '-' during
18268 # substitution so that $LINENO is not a special case at line end.
18269 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18270 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18271 sed '=' <$as_myself |
18272 sed '
18273 N
18274 s,$,-,
18275 : loop
18276 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18277 t loop
18278 s,-$,,
18279 s,^['$as_cr_digits']*\n,,
18280 ' >$as_me.lineno &&
18281 chmod +x $as_me.lineno ||
18282 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18283echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18284 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018285
Martin v. Löwis11437992002-04-12 09:54:03 +000018286 # Don't try to exec as it changes $[0], causing all sort of problems
18287 # (the dirname of $[0] is not the place where we might find the
18288 # original and so on. Autoconf is especially sensible to this).
18289 . ./$as_me.lineno
18290 # Exit status is that of the last command.
18291 exit
18292}
18293
18294
18295case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18296 *c*,-n*) ECHO_N= ECHO_C='
18297' ECHO_T=' ' ;;
18298 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18299 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18300esac
18301
18302if expr a : '\(a\)' >/dev/null 2>&1; then
18303 as_expr=expr
18304else
18305 as_expr=false
18306fi
18307
18308rm -f conf$$ conf$$.exe conf$$.file
18309echo >conf$$.file
18310if ln -s conf$$.file conf$$ 2>/dev/null; then
18311 # We could just check for DJGPP; but this test a) works b) is more generic
18312 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18313 if test -f conf$$.exe; then
18314 # Don't use ln at all; we don't have any links
18315 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018316 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018317 as_ln_s='ln -s'
18318 fi
18319elif ln conf$$.file conf$$ 2>/dev/null; then
18320 as_ln_s=ln
18321else
18322 as_ln_s='cp -p'
18323fi
18324rm -f conf$$ conf$$.exe conf$$.file
18325
Skip Montanaro6dead952003-09-25 14:50:04 +000018326if mkdir -p . 2>/dev/null; then
18327 as_mkdir_p=:
18328else
18329 as_mkdir_p=false
18330fi
18331
Martin v. Löwis11437992002-04-12 09:54:03 +000018332as_executable_p="test -f"
18333
18334# Sed expression to map a string onto a valid CPP name.
18335as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18336
18337# Sed expression to map a string onto a valid variable name.
18338as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18339
18340
18341# IFS
18342# We need space, tab and new line, in precisely that order.
18343as_nl='
18344'
18345IFS=" $as_nl"
18346
18347# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018348$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018349
18350exec 6>&1
18351
18352# Open the log real soon, to keep \$[0] and so on meaningful, and to
18353# report actual input values of CONFIG_FILES etc. instead of their
18354# values after options handling. Logging --version etc. is OK.
18355exec 5>>config.log
18356{
18357 echo
18358 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18359## Running $as_me. ##
18360_ASBOX
18361} >&5
18362cat >&5 <<_CSEOF
18363
Fred Drake9bd44622003-07-30 17:39:48 +000018364This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000018365generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018366
18367 CONFIG_FILES = $CONFIG_FILES
18368 CONFIG_HEADERS = $CONFIG_HEADERS
18369 CONFIG_LINKS = $CONFIG_LINKS
18370 CONFIG_COMMANDS = $CONFIG_COMMANDS
18371 $ $0 $@
18372
18373_CSEOF
18374echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18375echo >&5
18376_ACEOF
18377
18378# Files that config.status was made for.
18379if test -n "$ac_config_files"; then
18380 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18381fi
18382
18383if test -n "$ac_config_headers"; then
18384 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18385fi
18386
18387if test -n "$ac_config_links"; then
18388 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18389fi
18390
18391if test -n "$ac_config_commands"; then
18392 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18393fi
18394
18395cat >>$CONFIG_STATUS <<\_ACEOF
18396
18397ac_cs_usage="\
18398\`$as_me' instantiates files from templates according to the
18399current configuration.
18400
18401Usage: $0 [OPTIONS] [FILE]...
18402
18403 -h, --help print this help, then exit
18404 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018405 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018406 -d, --debug don't remove temporary files
18407 --recheck update $as_me by reconfiguring in the same conditions
18408 --file=FILE[:TEMPLATE]
18409 instantiate the configuration file FILE
18410 --header=FILE[:TEMPLATE]
18411 instantiate the configuration header FILE
18412
18413Configuration files:
18414$config_files
18415
18416Configuration headers:
18417$config_headers
18418
18419Report bugs to <bug-autoconf@gnu.org>."
18420_ACEOF
18421
18422cat >>$CONFIG_STATUS <<_ACEOF
18423ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018424python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000018425configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018426 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18427
18428Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18429Free Software Foundation, Inc.
18430This config.status script is free software; the Free Software Foundation
18431gives unlimited permission to copy, distribute and modify it."
18432srcdir=$srcdir
18433INSTALL="$INSTALL"
18434_ACEOF
18435
18436cat >>$CONFIG_STATUS <<\_ACEOF
18437# If no file are specified by the user, then we need to provide default
18438# value. By we need to know if files were specified by the user.
18439ac_need_defaults=:
18440while test $# != 0
18441do
18442 case $1 in
18443 --*=*)
18444 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18445 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018446 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018447 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018448 -*)
18449 ac_option=$1
18450 ac_optarg=$2
18451 ac_shift=shift
18452 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018453 *) # This is not an option, so the user has probably given explicit
18454 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018455 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018456 ac_need_defaults=false;;
18457 esac
18458
Skip Montanaro6dead952003-09-25 14:50:04 +000018459 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018460 # Handling of the options.
18461_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018462cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018463 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18464 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018465 --version | --vers* | -V )
18466 echo "$ac_cs_version"; exit 0 ;;
18467 --he | --h)
18468 # Conflict between --help and --header
18469 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18470Try \`$0 --help' for more information." >&5
18471echo "$as_me: error: ambiguous option: $1
18472Try \`$0 --help' for more information." >&2;}
18473 { (exit 1); exit 1; }; };;
18474 --help | --hel | -h )
18475 echo "$ac_cs_usage"; exit 0 ;;
18476 --debug | --d* | -d )
18477 debug=: ;;
18478 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018479 $ac_shift
18480 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018481 ac_need_defaults=false;;
18482 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018483 $ac_shift
18484 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018485 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018486 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18487 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18488 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018489
18490 # This is an error.
18491 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18492Try \`$0 --help' for more information." >&5
18493echo "$as_me: error: unrecognized option: $1
18494Try \`$0 --help' for more information." >&2;}
18495 { (exit 1); exit 1; }; } ;;
18496
18497 *) ac_config_targets="$ac_config_targets $1" ;;
18498
18499 esac
18500 shift
18501done
18502
Skip Montanaro6dead952003-09-25 14:50:04 +000018503ac_configure_extra_args=
18504
18505if $ac_cs_silent; then
18506 exec 6>/dev/null
18507 ac_configure_extra_args="$ac_configure_extra_args --silent"
18508fi
18509
18510_ACEOF
18511cat >>$CONFIG_STATUS <<_ACEOF
18512if \$ac_cs_recheck; then
18513 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18514 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18515fi
18516
Martin v. Löwis11437992002-04-12 09:54:03 +000018517_ACEOF
18518
18519
18520
18521
18522
18523cat >>$CONFIG_STATUS <<\_ACEOF
18524for ac_config_target in $ac_config_targets
18525do
18526 case "$ac_config_target" in
18527 # Handling of arguments.
18528 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18529 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18530 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18531 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18532echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18533 { (exit 1); exit 1; }; };;
18534 esac
18535done
18536
18537# If the user did not use the arguments to specify the items to instantiate,
18538# then the envvar interface is used. Set only those that are not.
18539# We use the long form for the default assignment because of an extremely
18540# bizarre bug on SunOS 4.1.3.
18541if $ac_need_defaults; then
18542 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18543 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18544fi
18545
Skip Montanaro6dead952003-09-25 14:50:04 +000018546# Have a temporary directory for convenience. Make it in the build tree
18547# simply because there is no reason to put it here, and in addition,
18548# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018549# Create a temporary directory, and hook for its removal unless debugging.
18550$debug ||
18551{
18552 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18553 trap '{ (exit 1); exit 1; }' 1 2 13 15
18554}
18555
18556# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018557
Martin v. Löwis11437992002-04-12 09:54:03 +000018558{
Skip Montanaro6dead952003-09-25 14:50:04 +000018559 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018560 test -n "$tmp" && test -d "$tmp"
18561} ||
18562{
Skip Montanaro6dead952003-09-25 14:50:04 +000018563 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018564 (umask 077 && mkdir $tmp)
18565} ||
18566{
Skip Montanaro6dead952003-09-25 14:50:04 +000018567 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018568 { (exit 1); exit 1; }
18569}
18570
18571_ACEOF
18572
18573cat >>$CONFIG_STATUS <<_ACEOF
18574
18575#
18576# CONFIG_FILES section.
18577#
18578
18579# No need to generate the scripts if there are no CONFIG_FILES.
18580# This happens for instance when ./config.status config.h
18581if test -n "\$CONFIG_FILES"; then
18582 # Protect against being on the right side of a sed subst in config.status.
18583 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18584 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18585s,@SHELL@,$SHELL,;t t
18586s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18587s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18588s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18589s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18590s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18591s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18592s,@exec_prefix@,$exec_prefix,;t t
18593s,@prefix@,$prefix,;t t
18594s,@program_transform_name@,$program_transform_name,;t t
18595s,@bindir@,$bindir,;t t
18596s,@sbindir@,$sbindir,;t t
18597s,@libexecdir@,$libexecdir,;t t
18598s,@datadir@,$datadir,;t t
18599s,@sysconfdir@,$sysconfdir,;t t
18600s,@sharedstatedir@,$sharedstatedir,;t t
18601s,@localstatedir@,$localstatedir,;t t
18602s,@libdir@,$libdir,;t t
18603s,@includedir@,$includedir,;t t
18604s,@oldincludedir@,$oldincludedir,;t t
18605s,@infodir@,$infodir,;t t
18606s,@mandir@,$mandir,;t t
18607s,@build_alias@,$build_alias,;t t
18608s,@host_alias@,$host_alias,;t t
18609s,@target_alias@,$target_alias,;t t
18610s,@DEFS@,$DEFS,;t t
18611s,@ECHO_C@,$ECHO_C,;t t
18612s,@ECHO_N@,$ECHO_N,;t t
18613s,@ECHO_T@,$ECHO_T,;t t
18614s,@LIBS@,$LIBS,;t t
18615s,@VERSION@,$VERSION,;t t
18616s,@SOVERSION@,$SOVERSION,;t t
18617s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18618s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18619s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18620s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18621s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18622s,@MACHDEP@,$MACHDEP,;t t
18623s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018624s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018625s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018626s,@CXX@,$CXX,;t t
18627s,@MAINOBJ@,$MAINOBJ,;t t
18628s,@EXEEXT@,$EXEEXT,;t t
18629s,@CC@,$CC,;t t
18630s,@CFLAGS@,$CFLAGS,;t t
18631s,@LDFLAGS@,$LDFLAGS,;t t
18632s,@CPPFLAGS@,$CPPFLAGS,;t t
18633s,@ac_ct_CC@,$ac_ct_CC,;t t
18634s,@OBJEXT@,$OBJEXT,;t t
18635s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018636s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018637s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18638s,@LIBRARY@,$LIBRARY,;t t
18639s,@LDLIBRARY@,$LDLIBRARY,;t t
18640s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18641s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18642s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18643s,@INSTSONAME@,$INSTSONAME,;t t
18644s,@RUNSHARED@,$RUNSHARED,;t t
18645s,@LINKCC@,$LINKCC,;t t
18646s,@RANLIB@,$RANLIB,;t t
18647s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18648s,@AR@,$AR,;t t
18649s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18650s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18651s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18652s,@LN@,$LN,;t t
18653s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018654s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018655s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18656s,@SO@,$SO,;t t
18657s,@LDSHARED@,$LDSHARED,;t t
18658s,@BLDSHARED@,$BLDSHARED,;t t
18659s,@CCSHARED@,$CCSHARED,;t t
18660s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18661s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018662s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018663s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18664s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18665s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18666s,@LDLAST@,$LDLAST,;t t
18667s,@THREADOBJ@,$THREADOBJ,;t t
18668s,@DLINCLDIR@,$DLINCLDIR,;t t
18669s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18670s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018671s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018672s,@LIBOBJS@,$LIBOBJS,;t t
18673s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18674s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18675s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18676s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18677s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18678s,@LIBM@,$LIBM,;t t
18679s,@LIBC@,$LIBC,;t t
18680s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18681s,@THREADHEADERS@,$THREADHEADERS,;t t
18682s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018683s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018684CEOF
18685
18686_ACEOF
18687
18688 cat >>$CONFIG_STATUS <<\_ACEOF
18689 # Split the substitutions into bite-sized pieces for seds with
18690 # small command number limits, like on Digital OSF/1 and HP-UX.
18691 ac_max_sed_lines=48
18692 ac_sed_frag=1 # Number of current file.
18693 ac_beg=1 # First line for current file.
18694 ac_end=$ac_max_sed_lines # Line after last line for current file.
18695 ac_more_lines=:
18696 ac_sed_cmds=
18697 while $ac_more_lines; do
18698 if test $ac_beg -gt 1; then
18699 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18700 else
18701 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18702 fi
18703 if test ! -s $tmp/subs.frag; then
18704 ac_more_lines=false
18705 else
18706 # The purpose of the label and of the branching condition is to
18707 # speed up the sed processing (if there are no `@' at all, there
18708 # is no need to browse any of the substitutions).
18709 # These are the two extra sed commands mentioned above.
18710 (echo ':t
18711 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18712 if test -z "$ac_sed_cmds"; then
18713 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18714 else
18715 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18716 fi
18717 ac_sed_frag=`expr $ac_sed_frag + 1`
18718 ac_beg=$ac_end
18719 ac_end=`expr $ac_end + $ac_max_sed_lines`
18720 fi
18721 done
18722 if test -z "$ac_sed_cmds"; then
18723 ac_sed_cmds=cat
18724 fi
18725fi # test -n "$CONFIG_FILES"
18726
18727_ACEOF
18728cat >>$CONFIG_STATUS <<\_ACEOF
18729for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18730 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18731 case $ac_file in
18732 - | *:- | *:-:* ) # input from stdin
18733 cat >$tmp/stdin
18734 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18735 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18736 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18737 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18738 * ) ac_file_in=$ac_file.in ;;
18739 esac
18740
18741 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18742 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18743$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18744 X"$ac_file" : 'X\(//\)[^/]' \| \
18745 X"$ac_file" : 'X\(//\)$' \| \
18746 X"$ac_file" : 'X\(/\)' \| \
18747 . : '\(.\)' 2>/dev/null ||
18748echo X"$ac_file" |
18749 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18750 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18751 /^X\(\/\/\)$/{ s//\1/; q; }
18752 /^X\(\/\).*/{ s//\1/; q; }
18753 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018754 { if $as_mkdir_p; then
18755 mkdir -p "$ac_dir"
18756 else
18757 as_dir="$ac_dir"
18758 as_dirs=
18759 while test ! -d "$as_dir"; do
18760 as_dirs="$as_dir $as_dirs"
18761 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18762$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18763 X"$as_dir" : 'X\(//\)[^/]' \| \
18764 X"$as_dir" : 'X\(//\)$' \| \
18765 X"$as_dir" : 'X\(/\)' \| \
18766 . : '\(.\)' 2>/dev/null ||
18767echo X"$as_dir" |
18768 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18769 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18770 /^X\(\/\/\)$/{ s//\1/; q; }
18771 /^X\(\/\).*/{ s//\1/; q; }
18772 s/.*/./; q'`
18773 done
18774 test ! -n "$as_dirs" || mkdir $as_dirs
18775 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18776echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18777 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018778
18779 ac_builddir=.
18780
18781if test "$ac_dir" != .; then
18782 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18783 # A "../" for each directory in $ac_dir_suffix.
18784 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18785else
18786 ac_dir_suffix= ac_top_builddir=
18787fi
18788
18789case $srcdir in
18790 .) # No --srcdir option. We are building in place.
18791 ac_srcdir=.
18792 if test -z "$ac_top_builddir"; then
18793 ac_top_srcdir=.
18794 else
18795 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18796 fi ;;
18797 [\\/]* | ?:[\\/]* ) # Absolute path.
18798 ac_srcdir=$srcdir$ac_dir_suffix;
18799 ac_top_srcdir=$srcdir ;;
18800 *) # Relative path.
18801 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18802 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18803esac
18804# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18805# absolute.
18806ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018807ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018808ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18809ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18810
18811
18812 case $INSTALL in
18813 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18814 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18815 esac
18816
18817 if test x"$ac_file" != x-; then
18818 { echo "$as_me:$LINENO: creating $ac_file" >&5
18819echo "$as_me: creating $ac_file" >&6;}
18820 rm -f "$ac_file"
18821 fi
18822 # Let's still pretend it is `configure' which instantiates (i.e., don't
18823 # use $as_me), people would be surprised to read:
18824 # /* config.h. Generated by config.status. */
18825 if test x"$ac_file" = x-; then
18826 configure_input=
18827 else
18828 configure_input="$ac_file. "
18829 fi
18830 configure_input=$configure_input"Generated from `echo $ac_file_in |
18831 sed 's,.*/,,'` by configure."
18832
18833 # First look for the input files in the build tree, otherwise in the
18834 # src tree.
18835 ac_file_inputs=`IFS=:
18836 for f in $ac_file_in; do
18837 case $f in
18838 -) echo $tmp/stdin ;;
18839 [\\/$]*)
18840 # Absolute (can't be DOS-style, as IFS=:)
18841 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18842echo "$as_me: error: cannot find input file: $f" >&2;}
18843 { (exit 1); exit 1; }; }
18844 echo $f;;
18845 *) # Relative
18846 if test -f "$f"; then
18847 # Build tree
18848 echo $f
18849 elif test -f "$srcdir/$f"; then
18850 # Source tree
18851 echo $srcdir/$f
18852 else
18853 # /dev/null tree
18854 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18855echo "$as_me: error: cannot find input file: $f" >&2;}
18856 { (exit 1); exit 1; }; }
18857 fi;;
18858 esac
18859 done` || { (exit 1); exit 1; }
18860_ACEOF
18861cat >>$CONFIG_STATUS <<_ACEOF
18862 sed "$ac_vpsub
18863$extrasub
18864_ACEOF
18865cat >>$CONFIG_STATUS <<\_ACEOF
18866:t
18867/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18868s,@configure_input@,$configure_input,;t t
18869s,@srcdir@,$ac_srcdir,;t t
18870s,@abs_srcdir@,$ac_abs_srcdir,;t t
18871s,@top_srcdir@,$ac_top_srcdir,;t t
18872s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18873s,@builddir@,$ac_builddir,;t t
18874s,@abs_builddir@,$ac_abs_builddir,;t t
18875s,@top_builddir@,$ac_top_builddir,;t t
18876s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18877s,@INSTALL@,$ac_INSTALL,;t t
18878" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18879 rm -f $tmp/stdin
18880 if test x"$ac_file" != x-; then
18881 mv $tmp/out $ac_file
18882 else
18883 cat $tmp/out
18884 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018885 fi
18886
Martin v. Löwis11437992002-04-12 09:54:03 +000018887done
18888_ACEOF
18889cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018890
Martin v. Löwis11437992002-04-12 09:54:03 +000018891#
18892# CONFIG_HEADER section.
18893#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018894
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018895# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18896# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018897#
18898# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018899ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18900ac_dB='[ ].*$,\1#\2'
18901ac_dC=' '
18902ac_dD=',;t'
18903# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18904ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18905ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018906ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018907ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018908
Martin v. Löwis11437992002-04-12 09:54:03 +000018909for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018910 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018911 case $ac_file in
18912 - | *:- | *:-:* ) # input from stdin
18913 cat >$tmp/stdin
18914 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18915 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18916 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18917 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18918 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018919 esac
18920
Martin v. Löwis11437992002-04-12 09:54:03 +000018921 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18922echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018923
Martin v. Löwis11437992002-04-12 09:54:03 +000018924 # First look for the input files in the build tree, otherwise in the
18925 # src tree.
18926 ac_file_inputs=`IFS=:
18927 for f in $ac_file_in; do
18928 case $f in
18929 -) echo $tmp/stdin ;;
18930 [\\/$]*)
18931 # Absolute (can't be DOS-style, as IFS=:)
18932 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18933echo "$as_me: error: cannot find input file: $f" >&2;}
18934 { (exit 1); exit 1; }; }
18935 echo $f;;
18936 *) # Relative
18937 if test -f "$f"; then
18938 # Build tree
18939 echo $f
18940 elif test -f "$srcdir/$f"; then
18941 # Source tree
18942 echo $srcdir/$f
18943 else
18944 # /dev/null tree
18945 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18946echo "$as_me: error: cannot find input file: $f" >&2;}
18947 { (exit 1); exit 1; }; }
18948 fi;;
18949 esac
18950 done` || { (exit 1); exit 1; }
18951 # Remove the trailing spaces.
18952 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018953
Martin v. Löwis11437992002-04-12 09:54:03 +000018954_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018955
Martin v. Löwis11437992002-04-12 09:54:03 +000018956# Transform confdefs.h into two sed scripts, `conftest.defines' and
18957# `conftest.undefs', that substitutes the proper values into
18958# config.h.in to produce config.h. The first handles `#define'
18959# templates, and the second `#undef' templates.
18960# And first: Protect against being on the right side of a sed subst in
18961# config.status. Protect against being in an unquoted here document
18962# in config.status.
18963rm -f conftest.defines conftest.undefs
18964# Using a here document instead of a string reduces the quoting nightmare.
18965# Putting comments in sed scripts is not portable.
18966#
18967# `end' is used to avoid that the second main sed command (meant for
18968# 0-ary CPP macros) applies to n-ary macro definitions.
18969# See the Autoconf documentation for `clear'.
18970cat >confdef2sed.sed <<\_ACEOF
18971s/[\\&,]/\\&/g
18972s,[\\$`],\\&,g
18973t clear
18974: clear
18975s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18976t end
18977s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18978: end
18979_ACEOF
18980# If some macros were called several times there might be several times
18981# the same #defines, which is useless. Nevertheless, we may not want to
18982# sort them, since we want the *last* AC-DEFINE to be honored.
18983uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18984sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18985rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018986
18987# This sed command replaces #undef with comments. This is necessary, for
18988# example, in the case of _POSIX_SOURCE, which is predefined and required
18989# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018990cat >>conftest.undefs <<\_ACEOF
18991s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18992_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018993
Martin v. Löwis11437992002-04-12 09:54:03 +000018994# Break up conftest.defines because some shells have a limit on the size
18995# of here documents, and old seds have small limits too (100 cmds).
18996echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000018997echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018998echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18999echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019000rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019001while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019002do
Martin v. Löwis11437992002-04-12 09:54:03 +000019003 # Write a limited-size here document to $tmp/defines.sed.
19004 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19005 # Speed up: don't consider the non `#define' lines.
19006 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19007 # Work around the forget-to-reset-the-flag bug.
19008 echo 't clr' >>$CONFIG_STATUS
19009 echo ': clr' >>$CONFIG_STATUS
19010 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019011 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019012 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19013 rm -f $tmp/in
19014 mv $tmp/out $tmp/in
19015' >>$CONFIG_STATUS
19016 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19017 rm -f conftest.defines
19018 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019019done
Martin v. Löwis11437992002-04-12 09:54:03 +000019020rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019021echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019022echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019023
Martin v. Löwis11437992002-04-12 09:54:03 +000019024# Break up conftest.undefs because some shells have a limit on the size
19025# of here documents, and old seds have small limits too (100 cmds).
19026echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19027rm -f conftest.tail
19028while grep . conftest.undefs >/dev/null
19029do
19030 # Write a limited-size here document to $tmp/undefs.sed.
19031 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19032 # Speed up: don't consider the non `#undef'
19033 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19034 # Work around the forget-to-reset-the-flag bug.
19035 echo 't clr' >>$CONFIG_STATUS
19036 echo ': clr' >>$CONFIG_STATUS
19037 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19038 echo 'CEOF
19039 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19040 rm -f $tmp/in
19041 mv $tmp/out $tmp/in
19042' >>$CONFIG_STATUS
19043 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19044 rm -f conftest.undefs
19045 mv conftest.tail conftest.undefs
19046done
19047rm -f conftest.undefs
19048
19049cat >>$CONFIG_STATUS <<\_ACEOF
19050 # Let's still pretend it is `configure' which instantiates (i.e., don't
19051 # use $as_me), people would be surprised to read:
19052 # /* config.h. Generated by config.status. */
19053 if test x"$ac_file" = x-; then
19054 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019055 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019056 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019057 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019058 cat $tmp/in >>$tmp/config.h
19059 rm -f $tmp/in
19060 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019061 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019062 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19063echo "$as_me: $ac_file is unchanged" >&6;}
19064 else
19065 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19066$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19067 X"$ac_file" : 'X\(//\)[^/]' \| \
19068 X"$ac_file" : 'X\(//\)$' \| \
19069 X"$ac_file" : 'X\(/\)' \| \
19070 . : '\(.\)' 2>/dev/null ||
19071echo X"$ac_file" |
19072 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19073 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19074 /^X\(\/\/\)$/{ s//\1/; q; }
19075 /^X\(\/\).*/{ s//\1/; q; }
19076 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019077 { if $as_mkdir_p; then
19078 mkdir -p "$ac_dir"
19079 else
19080 as_dir="$ac_dir"
19081 as_dirs=
19082 while test ! -d "$as_dir"; do
19083 as_dirs="$as_dir $as_dirs"
19084 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19085$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19086 X"$as_dir" : 'X\(//\)[^/]' \| \
19087 X"$as_dir" : 'X\(//\)$' \| \
19088 X"$as_dir" : 'X\(/\)' \| \
19089 . : '\(.\)' 2>/dev/null ||
19090echo X"$as_dir" |
19091 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19092 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19093 /^X\(\/\/\)$/{ s//\1/; q; }
19094 /^X\(\/\).*/{ s//\1/; q; }
19095 s/.*/./; q'`
19096 done
19097 test ! -n "$as_dirs" || mkdir $as_dirs
19098 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19099echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19100 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019101
Martin v. Löwis11437992002-04-12 09:54:03 +000019102 rm -f $ac_file
19103 mv $tmp/config.h $ac_file
19104 fi
19105 else
19106 cat $tmp/config.h
19107 rm -f $tmp/config.h
19108 fi
19109done
19110_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019111
Martin v. Löwis11437992002-04-12 09:54:03 +000019112cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019113
Martin v. Löwis11437992002-04-12 09:54:03 +000019114{ (exit 0); exit 0; }
19115_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019116chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019117ac_clean_files=$ac_clean_files_save
19118
19119
19120# configure is writing to config.log, and then calls config.status.
19121# config.status does its own redirection, appending to config.log.
19122# Unfortunately, on DOS this fails, as config.log is still kept open
19123# by configure, so config.status won't be able to write to it; its
19124# output is simply discarded. So we exec the FD to /dev/null,
19125# effectively closing config.log, so it can be properly (re)opened and
19126# appended to by config.status. When coming back to configure, we
19127# need to make the FD available again.
19128if test "$no_create" != yes; then
19129 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019130 ac_config_status_args=
19131 test "$silent" = yes &&
19132 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019133 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019134 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019135 exec 5>>config.log
19136 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19137 # would make configure fail if this is the last instruction.
19138 $ac_cs_success || { (exit 1); exit 1; }
19139fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019140
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019141
19142echo "creating Setup"
19143if test ! -f Modules/Setup
19144then
19145 cp $srcdir/Modules/Setup.dist Modules/Setup
19146fi
19147
19148echo "creating Setup.local"
19149if test ! -f Modules/Setup.local
19150then
19151 echo "# Edit this file for local setup changes" >Modules/Setup.local
19152fi
19153
19154echo "creating Makefile"
19155$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19156 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019157 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019158mv config.c Modules