blob: 7b3017c8126946ad5d6620f47b15bab80d42b8b7 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Hye-Shik Chang81268602004-02-02 06:05:24 +00002# From configure.in Revision: 1.449 .
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
Hye-Shik Chang81268602004-02-02 06:05:24 +00004353
Martin v. Löwis11437992002-04-12 09:54:03 +00004354for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004355libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004356signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4357unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004358sys/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 +00004359sys/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 +00004360sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004361sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4362bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004363do
Martin v. Löwis11437992002-04-12 09:54:03 +00004364as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4365if eval "test \"\${$as_ac_Header+set}\" = set"; then
4366 echo "$as_me:$LINENO: checking for $ac_header" >&5
4367echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4368if eval "test \"\${$as_ac_Header+set}\" = set"; then
4369 echo $ECHO_N "(cached) $ECHO_C" >&6
4370fi
4371echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4372echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373else
Martin v. Löwis11437992002-04-12 09:54:03 +00004374 # Is the header compilable?
4375echo "$as_me:$LINENO: checking $ac_header usability" >&5
4376echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4377cat >conftest.$ac_ext <<_ACEOF
4378#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004379/* confdefs.h. */
4380_ACEOF
4381cat confdefs.h >>conftest.$ac_ext
4382cat >>conftest.$ac_ext <<_ACEOF
4383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004384$ac_includes_default
4385#include <$ac_header>
4386_ACEOF
4387rm -f conftest.$ac_objext
4388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4389 (eval $ac_compile) 2>&5
4390 ac_status=$?
4391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4392 (exit $ac_status); } &&
4393 { ac_try='test -s conftest.$ac_objext'
4394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4395 (eval $ac_try) 2>&5
4396 ac_status=$?
4397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4398 (exit $ac_status); }; }; then
4399 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004400else
Martin v. Löwis11437992002-04-12 09:54:03 +00004401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004402sed 's/^/| /' conftest.$ac_ext >&5
4403
Martin v. Löwis11437992002-04-12 09:54:03 +00004404ac_header_compiler=no
4405fi
4406rm -f conftest.$ac_objext conftest.$ac_ext
4407echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4408echo "${ECHO_T}$ac_header_compiler" >&6
4409
4410# Is the header present?
4411echo "$as_me:$LINENO: checking $ac_header presence" >&5
4412echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4413cat >conftest.$ac_ext <<_ACEOF
4414#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004415/* confdefs.h. */
4416_ACEOF
4417cat confdefs.h >>conftest.$ac_ext
4418cat >>conftest.$ac_ext <<_ACEOF
4419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004420#include <$ac_header>
4421_ACEOF
4422if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4423 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4424 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004425 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004426 rm -f conftest.er1
4427 cat conftest.err >&5
4428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4429 (exit $ac_status); } >/dev/null; then
4430 if test -s conftest.err; then
4431 ac_cpp_err=$ac_c_preproc_warn_flag
4432 else
4433 ac_cpp_err=
4434 fi
4435else
4436 ac_cpp_err=yes
4437fi
4438if test -z "$ac_cpp_err"; then
4439 ac_header_preproc=yes
4440else
4441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004442sed 's/^/| /' conftest.$ac_ext >&5
4443
Martin v. Löwis11437992002-04-12 09:54:03 +00004444 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004445fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004446rm -f conftest.err conftest.$ac_ext
4447echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4448echo "${ECHO_T}$ac_header_preproc" >&6
4449
4450# So? What about this header?
4451case $ac_header_compiler:$ac_header_preproc in
4452 yes:no )
4453 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4454echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4455 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004456echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4457 (
4458 cat <<\_ASBOX
4459## ------------------------------------ ##
4460## Report this to bug-autoconf@gnu.org. ##
4461## ------------------------------------ ##
4462_ASBOX
4463 ) |
4464 sed "s/^/$as_me: WARNING: /" >&2
4465 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004466 no:yes )
4467 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4468echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4469 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4470echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4471 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004472echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4473 (
4474 cat <<\_ASBOX
4475## ------------------------------------ ##
4476## Report this to bug-autoconf@gnu.org. ##
4477## ------------------------------------ ##
4478_ASBOX
4479 ) |
4480 sed "s/^/$as_me: WARNING: /" >&2
4481 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004482esac
4483echo "$as_me:$LINENO: checking for $ac_header" >&5
4484echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4485if eval "test \"\${$as_ac_Header+set}\" = set"; then
4486 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004487else
Martin v. Löwis11437992002-04-12 09:54:03 +00004488 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004490echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4491echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4492
4493fi
4494if test `eval echo '${'$as_ac_Header'}'` = yes; then
4495 cat >>confdefs.h <<_ACEOF
4496#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4497_ACEOF
4498
4499fi
4500
Guido van Rossum627b2d71993-12-24 10:39:16 +00004501done
4502
Martin v. Löwis11437992002-04-12 09:54:03 +00004503
4504
4505
4506
4507
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004508ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004509for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4510 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4511echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4512echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4513if eval "test \"\${$as_ac_Header+set}\" = set"; then
4514 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004515else
Martin v. Löwis11437992002-04-12 09:54:03 +00004516 cat >conftest.$ac_ext <<_ACEOF
4517#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004518/* confdefs.h. */
4519_ACEOF
4520cat confdefs.h >>conftest.$ac_ext
4521cat >>conftest.$ac_ext <<_ACEOF
4522/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004523#include <sys/types.h>
4524#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004525
Martin v. Löwis11437992002-04-12 09:54:03 +00004526int
4527main ()
4528{
4529if ((DIR *) 0)
4530return 0;
4531 ;
4532 return 0;
4533}
4534_ACEOF
4535rm -f conftest.$ac_objext
4536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4537 (eval $ac_compile) 2>&5
4538 ac_status=$?
4539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540 (exit $ac_status); } &&
4541 { ac_try='test -s conftest.$ac_objext'
4542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4543 (eval $ac_try) 2>&5
4544 ac_status=$?
4545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546 (exit $ac_status); }; }; then
4547 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004548else
Martin v. Löwis11437992002-04-12 09:54:03 +00004549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004550sed 's/^/| /' conftest.$ac_ext >&5
4551
Martin v. Löwis11437992002-04-12 09:54:03 +00004552eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004554rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004555fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004556echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4557echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4558if test `eval echo '${'$as_ac_Header'}'` = yes; then
4559 cat >>confdefs.h <<_ACEOF
4560#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4561_ACEOF
4562
4563ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004565
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004566done
4567# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4568if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004569 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4570echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4571if test "${ac_cv_search_opendir+set}" = set; then
4572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004573else
Martin v. Löwis11437992002-04-12 09:54:03 +00004574 ac_func_search_save_LIBS=$LIBS
4575ac_cv_search_opendir=no
4576cat >conftest.$ac_ext <<_ACEOF
4577#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004578/* confdefs.h. */
4579_ACEOF
4580cat confdefs.h >>conftest.$ac_ext
4581cat >>conftest.$ac_ext <<_ACEOF
4582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004583
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004584/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004585#ifdef __cplusplus
4586extern "C"
4587#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004588/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004589 builtin and then its argument prototype would still apply. */
4590char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004591int
4592main ()
4593{
4594opendir ();
4595 ;
4596 return 0;
4597}
4598_ACEOF
4599rm -f conftest.$ac_objext conftest$ac_exeext
4600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4601 (eval $ac_link) 2>&5
4602 ac_status=$?
4603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4604 (exit $ac_status); } &&
4605 { ac_try='test -s conftest$ac_exeext'
4606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4607 (eval $ac_try) 2>&5
4608 ac_status=$?
4609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4610 (exit $ac_status); }; }; then
4611 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004612else
Martin v. Löwis11437992002-04-12 09:54:03 +00004613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004614sed 's/^/| /' conftest.$ac_ext >&5
4615
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004617rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4618if test "$ac_cv_search_opendir" = no; then
4619 for ac_lib in dir; do
4620 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4621 cat >conftest.$ac_ext <<_ACEOF
4622#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004623/* confdefs.h. */
4624_ACEOF
4625cat confdefs.h >>conftest.$ac_ext
4626cat >>conftest.$ac_ext <<_ACEOF
4627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004628
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004629/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004630#ifdef __cplusplus
4631extern "C"
4632#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004633/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004634 builtin and then its argument prototype would still apply. */
4635char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004636int
4637main ()
4638{
4639opendir ();
4640 ;
4641 return 0;
4642}
4643_ACEOF
4644rm -f conftest.$ac_objext conftest$ac_exeext
4645if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4646 (eval $ac_link) 2>&5
4647 ac_status=$?
4648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4649 (exit $ac_status); } &&
4650 { ac_try='test -s conftest$ac_exeext'
4651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4652 (eval $ac_try) 2>&5
4653 ac_status=$?
4654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4655 (exit $ac_status); }; }; then
4656 ac_cv_search_opendir="-l$ac_lib"
4657break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004658else
Martin v. Löwis11437992002-04-12 09:54:03 +00004659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004660sed 's/^/| /' conftest.$ac_ext >&5
4661
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004662fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004663rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4664 done
4665fi
4666LIBS=$ac_func_search_save_LIBS
4667fi
4668echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4669echo "${ECHO_T}$ac_cv_search_opendir" >&6
4670if test "$ac_cv_search_opendir" != no; then
4671 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004672
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004673fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004674
Michael W. Hudson54241132001-12-07 15:38:26 +00004675else
Martin v. Löwis11437992002-04-12 09:54:03 +00004676 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4677echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4678if test "${ac_cv_search_opendir+set}" = set; then
4679 echo $ECHO_N "(cached) $ECHO_C" >&6
4680else
4681 ac_func_search_save_LIBS=$LIBS
4682ac_cv_search_opendir=no
4683cat >conftest.$ac_ext <<_ACEOF
4684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004685/* confdefs.h. */
4686_ACEOF
4687cat confdefs.h >>conftest.$ac_ext
4688cat >>conftest.$ac_ext <<_ACEOF
4689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004690
4691/* Override any gcc2 internal prototype to avoid an error. */
4692#ifdef __cplusplus
4693extern "C"
4694#endif
4695/* We use char because int might match the return type of a gcc2
4696 builtin and then its argument prototype would still apply. */
4697char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004698int
4699main ()
4700{
4701opendir ();
4702 ;
4703 return 0;
4704}
4705_ACEOF
4706rm -f conftest.$ac_objext conftest$ac_exeext
4707if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4708 (eval $ac_link) 2>&5
4709 ac_status=$?
4710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4711 (exit $ac_status); } &&
4712 { ac_try='test -s conftest$ac_exeext'
4713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4714 (eval $ac_try) 2>&5
4715 ac_status=$?
4716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4717 (exit $ac_status); }; }; then
4718 ac_cv_search_opendir="none required"
4719else
4720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004721sed 's/^/| /' conftest.$ac_ext >&5
4722
Martin v. Löwis11437992002-04-12 09:54:03 +00004723fi
4724rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4725if test "$ac_cv_search_opendir" = no; then
4726 for ac_lib in x; do
4727 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4728 cat >conftest.$ac_ext <<_ACEOF
4729#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004730/* confdefs.h. */
4731_ACEOF
4732cat confdefs.h >>conftest.$ac_ext
4733cat >>conftest.$ac_ext <<_ACEOF
4734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004735
4736/* Override any gcc2 internal prototype to avoid an error. */
4737#ifdef __cplusplus
4738extern "C"
4739#endif
4740/* We use char because int might match the return type of a gcc2
4741 builtin and then its argument prototype would still apply. */
4742char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004743int
4744main ()
4745{
4746opendir ();
4747 ;
4748 return 0;
4749}
4750_ACEOF
4751rm -f conftest.$ac_objext conftest$ac_exeext
4752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4753 (eval $ac_link) 2>&5
4754 ac_status=$?
4755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756 (exit $ac_status); } &&
4757 { ac_try='test -s conftest$ac_exeext'
4758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4759 (eval $ac_try) 2>&5
4760 ac_status=$?
4761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4762 (exit $ac_status); }; }; then
4763 ac_cv_search_opendir="-l$ac_lib"
4764break
4765else
4766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004767sed 's/^/| /' conftest.$ac_ext >&5
4768
Martin v. Löwis11437992002-04-12 09:54:03 +00004769fi
4770rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4771 done
4772fi
4773LIBS=$ac_func_search_save_LIBS
4774fi
4775echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4776echo "${ECHO_T}$ac_cv_search_opendir" >&6
4777if test "$ac_cv_search_opendir" != no; then
4778 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4779
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004780fi
4781
4782fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004783
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004784echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4785echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4786if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4787 echo $ECHO_N "(cached) $ECHO_C" >&6
4788else
4789 cat >conftest.$ac_ext <<_ACEOF
4790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004791/* confdefs.h. */
4792_ACEOF
4793cat confdefs.h >>conftest.$ac_ext
4794cat >>conftest.$ac_ext <<_ACEOF
4795/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004796#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004797int
4798main ()
4799{
4800return makedev(0, 0);
4801 ;
4802 return 0;
4803}
4804_ACEOF
4805rm -f conftest.$ac_objext conftest$ac_exeext
4806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4807 (eval $ac_link) 2>&5
4808 ac_status=$?
4809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4810 (exit $ac_status); } &&
4811 { ac_try='test -s conftest$ac_exeext'
4812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4813 (eval $ac_try) 2>&5
4814 ac_status=$?
4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816 (exit $ac_status); }; }; then
4817 ac_cv_header_sys_types_h_makedev=yes
4818else
4819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004820sed 's/^/| /' conftest.$ac_ext >&5
4821
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004822ac_cv_header_sys_types_h_makedev=no
4823fi
4824rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4825
4826fi
4827echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4828echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4829
4830if test $ac_cv_header_sys_types_h_makedev = no; then
4831if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4832 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4833echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4834if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4835 echo $ECHO_N "(cached) $ECHO_C" >&6
4836fi
4837echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4838echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4839else
4840 # Is the header compilable?
4841echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4842echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4843cat >conftest.$ac_ext <<_ACEOF
4844#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004845/* confdefs.h. */
4846_ACEOF
4847cat confdefs.h >>conftest.$ac_ext
4848cat >>conftest.$ac_ext <<_ACEOF
4849/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004850$ac_includes_default
4851#include <sys/mkdev.h>
4852_ACEOF
4853rm -f conftest.$ac_objext
4854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4855 (eval $ac_compile) 2>&5
4856 ac_status=$?
4857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4858 (exit $ac_status); } &&
4859 { ac_try='test -s conftest.$ac_objext'
4860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4861 (eval $ac_try) 2>&5
4862 ac_status=$?
4863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4864 (exit $ac_status); }; }; then
4865 ac_header_compiler=yes
4866else
4867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004868sed 's/^/| /' conftest.$ac_ext >&5
4869
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004870ac_header_compiler=no
4871fi
4872rm -f conftest.$ac_objext conftest.$ac_ext
4873echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4874echo "${ECHO_T}$ac_header_compiler" >&6
4875
4876# Is the header present?
4877echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4878echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4879cat >conftest.$ac_ext <<_ACEOF
4880#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004881/* confdefs.h. */
4882_ACEOF
4883cat confdefs.h >>conftest.$ac_ext
4884cat >>conftest.$ac_ext <<_ACEOF
4885/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004886#include <sys/mkdev.h>
4887_ACEOF
4888if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4889 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4890 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004891 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004892 rm -f conftest.er1
4893 cat conftest.err >&5
4894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4895 (exit $ac_status); } >/dev/null; then
4896 if test -s conftest.err; then
4897 ac_cpp_err=$ac_c_preproc_warn_flag
4898 else
4899 ac_cpp_err=
4900 fi
4901else
4902 ac_cpp_err=yes
4903fi
4904if test -z "$ac_cpp_err"; then
4905 ac_header_preproc=yes
4906else
4907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004908sed 's/^/| /' conftest.$ac_ext >&5
4909
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004910 ac_header_preproc=no
4911fi
4912rm -f conftest.err conftest.$ac_ext
4913echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4914echo "${ECHO_T}$ac_header_preproc" >&6
4915
4916# So? What about this header?
4917case $ac_header_compiler:$ac_header_preproc in
4918 yes:no )
4919 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4920echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4921 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004922echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4923 (
4924 cat <<\_ASBOX
4925## ------------------------------------ ##
4926## Report this to bug-autoconf@gnu.org. ##
4927## ------------------------------------ ##
4928_ASBOX
4929 ) |
4930 sed "s/^/$as_me: WARNING: /" >&2
4931 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004932 no:yes )
4933 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4934echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4935 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4936echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4937 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004938echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4939 (
4940 cat <<\_ASBOX
4941## ------------------------------------ ##
4942## Report this to bug-autoconf@gnu.org. ##
4943## ------------------------------------ ##
4944_ASBOX
4945 ) |
4946 sed "s/^/$as_me: WARNING: /" >&2
4947 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004948esac
4949echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4950echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4951if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4952 echo $ECHO_N "(cached) $ECHO_C" >&6
4953else
4954 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4955fi
4956echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4957echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4958
4959fi
4960if test $ac_cv_header_sys_mkdev_h = yes; then
4961
4962cat >>confdefs.h <<\_ACEOF
4963#define MAJOR_IN_MKDEV 1
4964_ACEOF
4965
4966fi
4967
4968
4969
4970 if test $ac_cv_header_sys_mkdev_h = no; then
4971 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4972 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4973echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4974if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4975 echo $ECHO_N "(cached) $ECHO_C" >&6
4976fi
4977echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4978echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4979else
4980 # Is the header compilable?
4981echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4982echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4983cat >conftest.$ac_ext <<_ACEOF
4984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004985/* confdefs.h. */
4986_ACEOF
4987cat confdefs.h >>conftest.$ac_ext
4988cat >>conftest.$ac_ext <<_ACEOF
4989/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004990$ac_includes_default
4991#include <sys/sysmacros.h>
4992_ACEOF
4993rm -f conftest.$ac_objext
4994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4995 (eval $ac_compile) 2>&5
4996 ac_status=$?
4997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4998 (exit $ac_status); } &&
4999 { ac_try='test -s conftest.$ac_objext'
5000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5001 (eval $ac_try) 2>&5
5002 ac_status=$?
5003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5004 (exit $ac_status); }; }; then
5005 ac_header_compiler=yes
5006else
5007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005008sed 's/^/| /' conftest.$ac_ext >&5
5009
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005010ac_header_compiler=no
5011fi
5012rm -f conftest.$ac_objext conftest.$ac_ext
5013echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5014echo "${ECHO_T}$ac_header_compiler" >&6
5015
5016# Is the header present?
5017echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5018echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5019cat >conftest.$ac_ext <<_ACEOF
5020#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005021/* confdefs.h. */
5022_ACEOF
5023cat confdefs.h >>conftest.$ac_ext
5024cat >>conftest.$ac_ext <<_ACEOF
5025/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005026#include <sys/sysmacros.h>
5027_ACEOF
5028if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5029 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5030 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005031 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005032 rm -f conftest.er1
5033 cat conftest.err >&5
5034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5035 (exit $ac_status); } >/dev/null; then
5036 if test -s conftest.err; then
5037 ac_cpp_err=$ac_c_preproc_warn_flag
5038 else
5039 ac_cpp_err=
5040 fi
5041else
5042 ac_cpp_err=yes
5043fi
5044if test -z "$ac_cpp_err"; then
5045 ac_header_preproc=yes
5046else
5047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005048sed 's/^/| /' conftest.$ac_ext >&5
5049
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005050 ac_header_preproc=no
5051fi
5052rm -f conftest.err conftest.$ac_ext
5053echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5054echo "${ECHO_T}$ac_header_preproc" >&6
5055
5056# So? What about this header?
5057case $ac_header_compiler:$ac_header_preproc in
5058 yes:no )
5059 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5060echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5061 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005062echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5063 (
5064 cat <<\_ASBOX
5065## ------------------------------------ ##
5066## Report this to bug-autoconf@gnu.org. ##
5067## ------------------------------------ ##
5068_ASBOX
5069 ) |
5070 sed "s/^/$as_me: WARNING: /" >&2
5071 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005072 no:yes )
5073 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5074echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5075 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5076echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5077 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005078echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5079 (
5080 cat <<\_ASBOX
5081## ------------------------------------ ##
5082## Report this to bug-autoconf@gnu.org. ##
5083## ------------------------------------ ##
5084_ASBOX
5085 ) |
5086 sed "s/^/$as_me: WARNING: /" >&2
5087 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005088esac
5089echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5090echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5091if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5092 echo $ECHO_N "(cached) $ECHO_C" >&6
5093else
5094 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5095fi
5096echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5097echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5098
5099fi
5100if test $ac_cv_header_sys_sysmacros_h = yes; then
5101
5102cat >>confdefs.h <<\_ACEOF
5103#define MAJOR_IN_SYSMACROS 1
5104_ACEOF
5105
5106fi
5107
5108
5109 fi
5110fi
5111
Michael W. Hudson54241132001-12-07 15:38:26 +00005112
Guido van Rossum627b2d71993-12-24 10:39:16 +00005113# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005114was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005115echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5116echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5117cat >conftest.$ac_ext <<_ACEOF
5118#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005119/* confdefs.h. */
5120_ACEOF
5121cat confdefs.h >>conftest.$ac_ext
5122cat >>conftest.$ac_ext <<_ACEOF
5123/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005124#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005125
5126_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005128 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005129 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005130else
Martin v. Löwis11437992002-04-12 09:54:03 +00005131
5132
5133cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005134#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005135_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005136
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005137
Guido van Rossum627b2d71993-12-24 10:39:16 +00005138fi
5139rm -f conftest*
5140
Martin v. Löwis11437992002-04-12 09:54:03 +00005141echo "$as_me:$LINENO: result: $was_it_defined" >&5
5142echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005143
Neal Norwitz11690112002-07-30 01:08:28 +00005144# Check whether using makedev requires defining _OSF_SOURCE
5145echo "$as_me:$LINENO: checking for makedev" >&5
5146echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5147cat >conftest.$ac_ext <<_ACEOF
5148#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005149/* confdefs.h. */
5150_ACEOF
5151cat confdefs.h >>conftest.$ac_ext
5152cat >>conftest.$ac_ext <<_ACEOF
5153/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005154#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005155int
5156main ()
5157{
5158 makedev(0, 0)
5159 ;
5160 return 0;
5161}
5162_ACEOF
5163rm -f conftest.$ac_objext conftest$ac_exeext
5164if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5165 (eval $ac_link) 2>&5
5166 ac_status=$?
5167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5168 (exit $ac_status); } &&
5169 { ac_try='test -s conftest$ac_exeext'
5170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5171 (eval $ac_try) 2>&5
5172 ac_status=$?
5173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5174 (exit $ac_status); }; }; then
5175 ac_cv_has_makedev=yes
5176else
5177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005178sed 's/^/| /' conftest.$ac_ext >&5
5179
Neal Norwitz11690112002-07-30 01:08:28 +00005180ac_cv_has_makedev=no
5181fi
5182rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5183if test "$ac_cv_has_makedev" = "no"; then
5184 # we didn't link, try if _OSF_SOURCE will allow us to link
5185 cat >conftest.$ac_ext <<_ACEOF
5186#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005187/* confdefs.h. */
5188_ACEOF
5189cat confdefs.h >>conftest.$ac_ext
5190cat >>conftest.$ac_ext <<_ACEOF
5191/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005192
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005193#define _OSF_SOURCE 1
5194#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005195
Neal Norwitz11690112002-07-30 01:08:28 +00005196int
5197main ()
5198{
5199 makedev(0, 0)
5200 ;
5201 return 0;
5202}
5203_ACEOF
5204rm -f conftest.$ac_objext conftest$ac_exeext
5205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5206 (eval $ac_link) 2>&5
5207 ac_status=$?
5208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5209 (exit $ac_status); } &&
5210 { ac_try='test -s conftest$ac_exeext'
5211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5212 (eval $ac_try) 2>&5
5213 ac_status=$?
5214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5215 (exit $ac_status); }; }; then
5216 ac_cv_has_makedev=yes
5217else
5218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005219sed 's/^/| /' conftest.$ac_ext >&5
5220
Neal Norwitz11690112002-07-30 01:08:28 +00005221ac_cv_has_makedev=no
5222fi
5223rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5224 if test "$ac_cv_has_makedev" = "yes"; then
5225
5226cat >>confdefs.h <<\_ACEOF
5227#define _OSF_SOURCE 1
5228_ACEOF
5229
5230 fi
5231fi
5232echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5233echo "${ECHO_T}$ac_cv_has_makedev" >&6
5234if test "$ac_cv_has_makedev" = "yes"; then
5235
5236cat >>confdefs.h <<\_ACEOF
5237#define HAVE_MAKEDEV 1
5238_ACEOF
5239
5240fi
5241
Martin v. Löwis399a6892002-10-04 10:22:02 +00005242# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5243# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5244# defined, but the compiler does not support pragma redefine_extname,
5245# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5246# structures (such as rlimit64) without declaring them. As a
5247# work-around, disable LFS on such configurations
5248
5249use_lfs=yes
5250echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5251echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5252cat >conftest.$ac_ext <<_ACEOF
5253#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005254/* confdefs.h. */
5255_ACEOF
5256cat confdefs.h >>conftest.$ac_ext
5257cat >>conftest.$ac_ext <<_ACEOF
5258/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005259
5260#define _LARGEFILE_SOURCE 1
5261#define _FILE_OFFSET_BITS 64
5262#include <sys/resource.h>
5263
Martin v. Löwis399a6892002-10-04 10:22:02 +00005264int
5265main ()
5266{
5267struct rlimit foo;
5268 ;
5269 return 0;
5270}
5271_ACEOF
5272rm -f conftest.$ac_objext
5273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5274 (eval $ac_compile) 2>&5
5275 ac_status=$?
5276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277 (exit $ac_status); } &&
5278 { ac_try='test -s conftest.$ac_objext'
5279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5280 (eval $ac_try) 2>&5
5281 ac_status=$?
5282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5283 (exit $ac_status); }; }; then
5284 sol_lfs_bug=no
5285else
5286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005287sed 's/^/| /' conftest.$ac_ext >&5
5288
Martin v. Löwis399a6892002-10-04 10:22:02 +00005289sol_lfs_bug=yes
5290fi
5291rm -f conftest.$ac_objext conftest.$ac_ext
5292echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5293echo "${ECHO_T}$sol_lfs_bug" >&6
5294if test "$sol_lfs_bug" = "yes"; then
5295 use_lfs=no
5296fi
5297
5298if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005299# Two defines needed to enable largefile support on various platforms
5300# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005301
Martin v. Löwis11437992002-04-12 09:54:03 +00005302cat >>confdefs.h <<\_ACEOF
5303#define _LARGEFILE_SOURCE 1
5304_ACEOF
5305
5306
5307cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005308#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005309_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005310
Martin v. Löwis399a6892002-10-04 10:22:02 +00005311fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005312
Guido van Rossum84e7b241996-08-19 21:59:00 +00005313# Add some code to confdefs.h so that the test for off_t works on SCO
5314cat >> confdefs.h <<\EOF
5315#if defined(SCO_DS)
5316#undef _OFF_T
5317#endif
5318EOF
5319
Guido van Rossumef2255b2000-03-10 22:30:29 +00005320# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005321echo "$as_me:$LINENO: checking for mode_t" >&5
5322echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5323if test "${ac_cv_type_mode_t+set}" = set; then
5324 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005325else
Martin v. Löwis11437992002-04-12 09:54:03 +00005326 cat >conftest.$ac_ext <<_ACEOF
5327#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005328/* confdefs.h. */
5329_ACEOF
5330cat confdefs.h >>conftest.$ac_ext
5331cat >>conftest.$ac_ext <<_ACEOF
5332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005333$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005334int
5335main ()
5336{
5337if ((mode_t *) 0)
5338 return 0;
5339if (sizeof (mode_t))
5340 return 0;
5341 ;
5342 return 0;
5343}
5344_ACEOF
5345rm -f conftest.$ac_objext
5346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5347 (eval $ac_compile) 2>&5
5348 ac_status=$?
5349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5350 (exit $ac_status); } &&
5351 { ac_try='test -s conftest.$ac_objext'
5352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5353 (eval $ac_try) 2>&5
5354 ac_status=$?
5355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5356 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005357 ac_cv_type_mode_t=yes
5358else
Martin v. Löwis11437992002-04-12 09:54:03 +00005359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005360sed 's/^/| /' conftest.$ac_ext >&5
5361
Martin v. Löwis11437992002-04-12 09:54:03 +00005362ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005364rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005366echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5367echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5368if test $ac_cv_type_mode_t = yes; then
5369 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005370else
Martin v. Löwis11437992002-04-12 09:54:03 +00005371
5372cat >>confdefs.h <<_ACEOF
5373#define mode_t int
5374_ACEOF
5375
5376fi
5377
5378echo "$as_me:$LINENO: checking for off_t" >&5
5379echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5380if test "${ac_cv_type_off_t+set}" = set; then
5381 echo $ECHO_N "(cached) $ECHO_C" >&6
5382else
5383 cat >conftest.$ac_ext <<_ACEOF
5384#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005385/* confdefs.h. */
5386_ACEOF
5387cat confdefs.h >>conftest.$ac_ext
5388cat >>conftest.$ac_ext <<_ACEOF
5389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005390$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005391int
5392main ()
5393{
5394if ((off_t *) 0)
5395 return 0;
5396if (sizeof (off_t))
5397 return 0;
5398 ;
5399 return 0;
5400}
5401_ACEOF
5402rm -f conftest.$ac_objext
5403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5404 (eval $ac_compile) 2>&5
5405 ac_status=$?
5406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5407 (exit $ac_status); } &&
5408 { ac_try='test -s conftest.$ac_objext'
5409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5410 (eval $ac_try) 2>&5
5411 ac_status=$?
5412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5413 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005414 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005415else
Martin v. Löwis11437992002-04-12 09:54:03 +00005416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005417sed 's/^/| /' conftest.$ac_ext >&5
5418
Martin v. Löwis11437992002-04-12 09:54:03 +00005419ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005421rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005422fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005423echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5424echo "${ECHO_T}$ac_cv_type_off_t" >&6
5425if test $ac_cv_type_off_t = yes; then
5426 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005427else
Martin v. Löwis11437992002-04-12 09:54:03 +00005428
5429cat >>confdefs.h <<_ACEOF
5430#define off_t long
5431_ACEOF
5432
5433fi
5434
5435echo "$as_me:$LINENO: checking for pid_t" >&5
5436echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5437if test "${ac_cv_type_pid_t+set}" = set; then
5438 echo $ECHO_N "(cached) $ECHO_C" >&6
5439else
5440 cat >conftest.$ac_ext <<_ACEOF
5441#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005442/* confdefs.h. */
5443_ACEOF
5444cat confdefs.h >>conftest.$ac_ext
5445cat >>conftest.$ac_ext <<_ACEOF
5446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005447$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005448int
5449main ()
5450{
5451if ((pid_t *) 0)
5452 return 0;
5453if (sizeof (pid_t))
5454 return 0;
5455 ;
5456 return 0;
5457}
5458_ACEOF
5459rm -f conftest.$ac_objext
5460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5461 (eval $ac_compile) 2>&5
5462 ac_status=$?
5463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5464 (exit $ac_status); } &&
5465 { ac_try='test -s conftest.$ac_objext'
5466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5467 (eval $ac_try) 2>&5
5468 ac_status=$?
5469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005471 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005472else
Martin v. Löwis11437992002-04-12 09:54:03 +00005473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005474sed 's/^/| /' conftest.$ac_ext >&5
5475
Martin v. Löwis11437992002-04-12 09:54:03 +00005476ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005478rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005479fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005480echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5481echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5482if test $ac_cv_type_pid_t = yes; then
5483 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005484else
Martin v. Löwis11437992002-04-12 09:54:03 +00005485
5486cat >>confdefs.h <<_ACEOF
5487#define pid_t int
5488_ACEOF
5489
5490fi
5491
5492echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5493echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5494if test "${ac_cv_type_signal+set}" = set; then
5495 echo $ECHO_N "(cached) $ECHO_C" >&6
5496else
5497 cat >conftest.$ac_ext <<_ACEOF
5498#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005499/* confdefs.h. */
5500_ACEOF
5501cat confdefs.h >>conftest.$ac_ext
5502cat >>conftest.$ac_ext <<_ACEOF
5503/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005504#include <sys/types.h>
5505#include <signal.h>
5506#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005507# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005508#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005509#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005510extern "C" void (*signal (int, void (*)(int)))(int);
5511#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005512void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005513#endif
5514
Martin v. Löwis11437992002-04-12 09:54:03 +00005515int
5516main ()
5517{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005518int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005519 ;
5520 return 0;
5521}
5522_ACEOF
5523rm -f conftest.$ac_objext
5524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5525 (eval $ac_compile) 2>&5
5526 ac_status=$?
5527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5528 (exit $ac_status); } &&
5529 { ac_try='test -s conftest.$ac_objext'
5530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5531 (eval $ac_try) 2>&5
5532 ac_status=$?
5533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5534 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005535 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005536else
Martin v. Löwis11437992002-04-12 09:54:03 +00005537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005538sed 's/^/| /' conftest.$ac_ext >&5
5539
Martin v. Löwis11437992002-04-12 09:54:03 +00005540ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005542rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005544echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5545echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005546
Martin v. Löwis11437992002-04-12 09:54:03 +00005547cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005548#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005549_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005550
Michael W. Hudson54241132001-12-07 15:38:26 +00005551
Martin v. Löwis11437992002-04-12 09:54:03 +00005552echo "$as_me:$LINENO: checking for size_t" >&5
5553echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5554if test "${ac_cv_type_size_t+set}" = set; then
5555 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005556else
Martin v. Löwis11437992002-04-12 09:54:03 +00005557 cat >conftest.$ac_ext <<_ACEOF
5558#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005559/* confdefs.h. */
5560_ACEOF
5561cat confdefs.h >>conftest.$ac_ext
5562cat >>conftest.$ac_ext <<_ACEOF
5563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005564$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005565int
5566main ()
5567{
5568if ((size_t *) 0)
5569 return 0;
5570if (sizeof (size_t))
5571 return 0;
5572 ;
5573 return 0;
5574}
5575_ACEOF
5576rm -f conftest.$ac_objext
5577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5578 (eval $ac_compile) 2>&5
5579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); } &&
5582 { ac_try='test -s conftest.$ac_objext'
5583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5584 (eval $ac_try) 2>&5
5585 ac_status=$?
5586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005588 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005589else
Martin v. Löwis11437992002-04-12 09:54:03 +00005590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005591sed 's/^/| /' conftest.$ac_ext >&5
5592
Martin v. Löwis11437992002-04-12 09:54:03 +00005593ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005595rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005596fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005597echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5598echo "${ECHO_T}$ac_cv_type_size_t" >&6
5599if test $ac_cv_type_size_t = yes; then
5600 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005601else
Martin v. Löwis11437992002-04-12 09:54:03 +00005602
5603cat >>confdefs.h <<_ACEOF
5604#define size_t unsigned
5605_ACEOF
5606
5607fi
5608
5609echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5610echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5611if test "${ac_cv_type_uid_t+set}" = set; then
5612 echo $ECHO_N "(cached) $ECHO_C" >&6
5613else
5614 cat >conftest.$ac_ext <<_ACEOF
5615#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005616/* confdefs.h. */
5617_ACEOF
5618cat confdefs.h >>conftest.$ac_ext
5619cat >>conftest.$ac_ext <<_ACEOF
5620/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005621#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005622
5623_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005625 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005626 ac_cv_type_uid_t=yes
5627else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005628 ac_cv_type_uid_t=no
5629fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005630rm -f conftest*
5631
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005633echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5634echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005635if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005636
Martin v. Löwis11437992002-04-12 09:54:03 +00005637cat >>confdefs.h <<\_ACEOF
5638#define uid_t int
5639_ACEOF
5640
5641
5642cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005643#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005644_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005645
5646fi
5647
Jack Jansendd19cf82001-12-06 22:36:17 +00005648
Michael W. Hudson54241132001-12-07 15:38:26 +00005649# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005650# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005651echo "$as_me:$LINENO: checking for int" >&5
5652echo $ECHO_N "checking for int... $ECHO_C" >&6
5653if test "${ac_cv_type_int+set}" = set; then
5654 echo $ECHO_N "(cached) $ECHO_C" >&6
5655else
5656 cat >conftest.$ac_ext <<_ACEOF
5657#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005658/* confdefs.h. */
5659_ACEOF
5660cat confdefs.h >>conftest.$ac_ext
5661cat >>conftest.$ac_ext <<_ACEOF
5662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005663$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005664int
5665main ()
5666{
5667if ((int *) 0)
5668 return 0;
5669if (sizeof (int))
5670 return 0;
5671 ;
5672 return 0;
5673}
5674_ACEOF
5675rm -f conftest.$ac_objext
5676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5677 (eval $ac_compile) 2>&5
5678 ac_status=$?
5679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5680 (exit $ac_status); } &&
5681 { ac_try='test -s conftest.$ac_objext'
5682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5683 (eval $ac_try) 2>&5
5684 ac_status=$?
5685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5686 (exit $ac_status); }; }; then
5687 ac_cv_type_int=yes
5688else
5689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005690sed 's/^/| /' conftest.$ac_ext >&5
5691
Martin v. Löwis11437992002-04-12 09:54:03 +00005692ac_cv_type_int=no
5693fi
5694rm -f conftest.$ac_objext conftest.$ac_ext
5695fi
5696echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5697echo "${ECHO_T}$ac_cv_type_int" >&6
5698
5699echo "$as_me:$LINENO: checking size of int" >&5
5700echo $ECHO_N "checking size of int... $ECHO_C" >&6
5701if test "${ac_cv_sizeof_int+set}" = set; then
5702 echo $ECHO_N "(cached) $ECHO_C" >&6
5703else
5704 if test "$ac_cv_type_int" = yes; then
5705 # The cast to unsigned long works around a bug in the HP C Compiler
5706 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5707 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5708 # This bug is HP SR number 8606223364.
5709 if test "$cross_compiling" = yes; then
5710 # Depending upon the size, compute the lo and hi bounds.
5711cat >conftest.$ac_ext <<_ACEOF
5712#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005713/* confdefs.h. */
5714_ACEOF
5715cat confdefs.h >>conftest.$ac_ext
5716cat >>conftest.$ac_ext <<_ACEOF
5717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005718$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005719int
5720main ()
5721{
5722static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5723test_array [0] = 0
5724
5725 ;
5726 return 0;
5727}
5728_ACEOF
5729rm -f conftest.$ac_objext
5730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5731 (eval $ac_compile) 2>&5
5732 ac_status=$?
5733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5734 (exit $ac_status); } &&
5735 { ac_try='test -s conftest.$ac_objext'
5736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5737 (eval $ac_try) 2>&5
5738 ac_status=$?
5739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5740 (exit $ac_status); }; }; then
5741 ac_lo=0 ac_mid=0
5742 while :; do
5743 cat >conftest.$ac_ext <<_ACEOF
5744#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005745/* confdefs.h. */
5746_ACEOF
5747cat confdefs.h >>conftest.$ac_ext
5748cat >>conftest.$ac_ext <<_ACEOF
5749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005750$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005751int
5752main ()
5753{
5754static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5755test_array [0] = 0
5756
5757 ;
5758 return 0;
5759}
5760_ACEOF
5761rm -f conftest.$ac_objext
5762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5763 (eval $ac_compile) 2>&5
5764 ac_status=$?
5765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5766 (exit $ac_status); } &&
5767 { ac_try='test -s conftest.$ac_objext'
5768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5769 (eval $ac_try) 2>&5
5770 ac_status=$?
5771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5772 (exit $ac_status); }; }; then
5773 ac_hi=$ac_mid; break
5774else
5775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005776sed 's/^/| /' conftest.$ac_ext >&5
5777
Martin v. Löwis11437992002-04-12 09:54:03 +00005778ac_lo=`expr $ac_mid + 1`
5779 if test $ac_lo -le $ac_mid; then
5780 ac_lo= ac_hi=
5781 break
5782 fi
5783 ac_mid=`expr 2 '*' $ac_mid + 1`
5784fi
5785rm -f conftest.$ac_objext conftest.$ac_ext
5786 done
5787else
5788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005789sed 's/^/| /' conftest.$ac_ext >&5
5790
Martin v. Löwis11437992002-04-12 09:54:03 +00005791cat >conftest.$ac_ext <<_ACEOF
5792#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005793/* confdefs.h. */
5794_ACEOF
5795cat confdefs.h >>conftest.$ac_ext
5796cat >>conftest.$ac_ext <<_ACEOF
5797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005798$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005799int
5800main ()
5801{
5802static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5803test_array [0] = 0
5804
5805 ;
5806 return 0;
5807}
5808_ACEOF
5809rm -f conftest.$ac_objext
5810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5811 (eval $ac_compile) 2>&5
5812 ac_status=$?
5813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5814 (exit $ac_status); } &&
5815 { ac_try='test -s conftest.$ac_objext'
5816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5817 (eval $ac_try) 2>&5
5818 ac_status=$?
5819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820 (exit $ac_status); }; }; then
5821 ac_hi=-1 ac_mid=-1
5822 while :; do
5823 cat >conftest.$ac_ext <<_ACEOF
5824#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005825/* confdefs.h. */
5826_ACEOF
5827cat confdefs.h >>conftest.$ac_ext
5828cat >>conftest.$ac_ext <<_ACEOF
5829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005830$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005831int
5832main ()
5833{
5834static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5835test_array [0] = 0
5836
5837 ;
5838 return 0;
5839}
5840_ACEOF
5841rm -f conftest.$ac_objext
5842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5843 (eval $ac_compile) 2>&5
5844 ac_status=$?
5845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5846 (exit $ac_status); } &&
5847 { ac_try='test -s conftest.$ac_objext'
5848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5849 (eval $ac_try) 2>&5
5850 ac_status=$?
5851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5852 (exit $ac_status); }; }; then
5853 ac_lo=$ac_mid; break
5854else
5855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005856sed 's/^/| /' conftest.$ac_ext >&5
5857
Martin v. Löwis11437992002-04-12 09:54:03 +00005858ac_hi=`expr '(' $ac_mid ')' - 1`
5859 if test $ac_mid -le $ac_hi; then
5860 ac_lo= ac_hi=
5861 break
5862 fi
5863 ac_mid=`expr 2 '*' $ac_mid`
5864fi
5865rm -f conftest.$ac_objext conftest.$ac_ext
5866 done
5867else
5868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005869sed 's/^/| /' conftest.$ac_ext >&5
5870
Martin v. Löwis11437992002-04-12 09:54:03 +00005871ac_lo= ac_hi=
5872fi
5873rm -f conftest.$ac_objext conftest.$ac_ext
5874fi
5875rm -f conftest.$ac_objext conftest.$ac_ext
5876# Binary search between lo and hi bounds.
5877while test "x$ac_lo" != "x$ac_hi"; do
5878 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5879 cat >conftest.$ac_ext <<_ACEOF
5880#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005881/* confdefs.h. */
5882_ACEOF
5883cat confdefs.h >>conftest.$ac_ext
5884cat >>conftest.$ac_ext <<_ACEOF
5885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005886$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005887int
5888main ()
5889{
5890static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5891test_array [0] = 0
5892
5893 ;
5894 return 0;
5895}
5896_ACEOF
5897rm -f conftest.$ac_objext
5898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5899 (eval $ac_compile) 2>&5
5900 ac_status=$?
5901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5902 (exit $ac_status); } &&
5903 { ac_try='test -s conftest.$ac_objext'
5904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5905 (eval $ac_try) 2>&5
5906 ac_status=$?
5907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5908 (exit $ac_status); }; }; then
5909 ac_hi=$ac_mid
5910else
5911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005912sed 's/^/| /' conftest.$ac_ext >&5
5913
Martin v. Löwis11437992002-04-12 09:54:03 +00005914ac_lo=`expr '(' $ac_mid ')' + 1`
5915fi
5916rm -f conftest.$ac_objext conftest.$ac_ext
5917done
5918case $ac_lo in
5919?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005920'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5921See \`config.log' for more details." >&5
5922echo "$as_me: error: cannot compute sizeof (int), 77
5923See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005924 { (exit 1); exit 1; }; } ;;
5925esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005926else
5927 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005928 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5929See \`config.log' for more details." >&5
5930echo "$as_me: error: cannot run test program while cross compiling
5931See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005932 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005933else
Martin v. Löwis11437992002-04-12 09:54:03 +00005934 cat >conftest.$ac_ext <<_ACEOF
5935#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005936/* confdefs.h. */
5937_ACEOF
5938cat confdefs.h >>conftest.$ac_ext
5939cat >>conftest.$ac_ext <<_ACEOF
5940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005941$ac_includes_default
5942long longval () { return (long) (sizeof (int)); }
5943unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005944#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005945#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005946int
5947main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005948{
Martin v. Löwis11437992002-04-12 09:54:03 +00005949
5950 FILE *f = fopen ("conftest.val", "w");
5951 if (! f)
5952 exit (1);
5953 if (((long) (sizeof (int))) < 0)
5954 {
5955 long i = longval ();
5956 if (i != ((long) (sizeof (int))))
5957 exit (1);
5958 fprintf (f, "%ld\n", i);
5959 }
5960 else
5961 {
5962 unsigned long i = ulongval ();
5963 if (i != ((long) (sizeof (int))))
5964 exit (1);
5965 fprintf (f, "%lu\n", i);
5966 }
5967 exit (ferror (f) || fclose (f) != 0);
5968
5969 ;
5970 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005971}
Martin v. Löwis11437992002-04-12 09:54:03 +00005972_ACEOF
5973rm -f conftest$ac_exeext
5974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5975 (eval $ac_link) 2>&5
5976 ac_status=$?
5977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5980 (eval $ac_try) 2>&5
5981 ac_status=$?
5982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5983 (exit $ac_status); }; }; then
5984 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005985else
Martin v. Löwis11437992002-04-12 09:54:03 +00005986 echo "$as_me: program exited with status $ac_status" >&5
5987echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005988sed 's/^/| /' conftest.$ac_ext >&5
5989
Martin v. Löwis11437992002-04-12 09:54:03 +00005990( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00005991{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5992See \`config.log' for more details." >&5
5993echo "$as_me: error: cannot compute sizeof (int), 77
5994See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005995 { (exit 1); exit 1; }; }
5996fi
Skip Montanaro6dead952003-09-25 14:50:04 +00005997rm -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 +00005998fi
5999fi
6000rm -f conftest.val
6001else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006002 ac_cv_sizeof_int=0
6003fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006004fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006005echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6006echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6007cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006008#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006009_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006010
6011
Martin v. Löwis11437992002-04-12 09:54:03 +00006012echo "$as_me:$LINENO: checking for long" >&5
6013echo $ECHO_N "checking for long... $ECHO_C" >&6
6014if test "${ac_cv_type_long+set}" = set; then
6015 echo $ECHO_N "(cached) $ECHO_C" >&6
6016else
6017 cat >conftest.$ac_ext <<_ACEOF
6018#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006019/* confdefs.h. */
6020_ACEOF
6021cat confdefs.h >>conftest.$ac_ext
6022cat >>conftest.$ac_ext <<_ACEOF
6023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006024$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006025int
6026main ()
6027{
6028if ((long *) 0)
6029 return 0;
6030if (sizeof (long))
6031 return 0;
6032 ;
6033 return 0;
6034}
6035_ACEOF
6036rm -f conftest.$ac_objext
6037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6038 (eval $ac_compile) 2>&5
6039 ac_status=$?
6040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6041 (exit $ac_status); } &&
6042 { ac_try='test -s conftest.$ac_objext'
6043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6044 (eval $ac_try) 2>&5
6045 ac_status=$?
6046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6047 (exit $ac_status); }; }; then
6048 ac_cv_type_long=yes
6049else
6050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006051sed 's/^/| /' conftest.$ac_ext >&5
6052
Martin v. Löwis11437992002-04-12 09:54:03 +00006053ac_cv_type_long=no
6054fi
6055rm -f conftest.$ac_objext conftest.$ac_ext
6056fi
6057echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6058echo "${ECHO_T}$ac_cv_type_long" >&6
6059
6060echo "$as_me:$LINENO: checking size of long" >&5
6061echo $ECHO_N "checking size of long... $ECHO_C" >&6
6062if test "${ac_cv_sizeof_long+set}" = set; then
6063 echo $ECHO_N "(cached) $ECHO_C" >&6
6064else
6065 if test "$ac_cv_type_long" = yes; then
6066 # The cast to unsigned long works around a bug in the HP C Compiler
6067 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6068 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6069 # This bug is HP SR number 8606223364.
6070 if test "$cross_compiling" = yes; then
6071 # Depending upon the size, compute the lo and hi bounds.
6072cat >conftest.$ac_ext <<_ACEOF
6073#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006074/* confdefs.h. */
6075_ACEOF
6076cat confdefs.h >>conftest.$ac_ext
6077cat >>conftest.$ac_ext <<_ACEOF
6078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006079$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006080int
6081main ()
6082{
6083static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6084test_array [0] = 0
6085
6086 ;
6087 return 0;
6088}
6089_ACEOF
6090rm -f conftest.$ac_objext
6091if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6092 (eval $ac_compile) 2>&5
6093 ac_status=$?
6094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6095 (exit $ac_status); } &&
6096 { ac_try='test -s conftest.$ac_objext'
6097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6098 (eval $ac_try) 2>&5
6099 ac_status=$?
6100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6101 (exit $ac_status); }; }; then
6102 ac_lo=0 ac_mid=0
6103 while :; do
6104 cat >conftest.$ac_ext <<_ACEOF
6105#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006106/* confdefs.h. */
6107_ACEOF
6108cat confdefs.h >>conftest.$ac_ext
6109cat >>conftest.$ac_ext <<_ACEOF
6110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006111$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006112int
6113main ()
6114{
6115static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6116test_array [0] = 0
6117
6118 ;
6119 return 0;
6120}
6121_ACEOF
6122rm -f conftest.$ac_objext
6123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6124 (eval $ac_compile) 2>&5
6125 ac_status=$?
6126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6127 (exit $ac_status); } &&
6128 { ac_try='test -s conftest.$ac_objext'
6129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6130 (eval $ac_try) 2>&5
6131 ac_status=$?
6132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6133 (exit $ac_status); }; }; then
6134 ac_hi=$ac_mid; break
6135else
6136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006137sed 's/^/| /' conftest.$ac_ext >&5
6138
Martin v. Löwis11437992002-04-12 09:54:03 +00006139ac_lo=`expr $ac_mid + 1`
6140 if test $ac_lo -le $ac_mid; then
6141 ac_lo= ac_hi=
6142 break
6143 fi
6144 ac_mid=`expr 2 '*' $ac_mid + 1`
6145fi
6146rm -f conftest.$ac_objext conftest.$ac_ext
6147 done
6148else
6149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006150sed 's/^/| /' conftest.$ac_ext >&5
6151
Martin v. Löwis11437992002-04-12 09:54:03 +00006152cat >conftest.$ac_ext <<_ACEOF
6153#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006154/* confdefs.h. */
6155_ACEOF
6156cat confdefs.h >>conftest.$ac_ext
6157cat >>conftest.$ac_ext <<_ACEOF
6158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006159$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006160int
6161main ()
6162{
6163static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6164test_array [0] = 0
6165
6166 ;
6167 return 0;
6168}
6169_ACEOF
6170rm -f conftest.$ac_objext
6171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6172 (eval $ac_compile) 2>&5
6173 ac_status=$?
6174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6175 (exit $ac_status); } &&
6176 { ac_try='test -s conftest.$ac_objext'
6177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6178 (eval $ac_try) 2>&5
6179 ac_status=$?
6180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6181 (exit $ac_status); }; }; then
6182 ac_hi=-1 ac_mid=-1
6183 while :; do
6184 cat >conftest.$ac_ext <<_ACEOF
6185#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006186/* confdefs.h. */
6187_ACEOF
6188cat confdefs.h >>conftest.$ac_ext
6189cat >>conftest.$ac_ext <<_ACEOF
6190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006191$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006192int
6193main ()
6194{
6195static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6196test_array [0] = 0
6197
6198 ;
6199 return 0;
6200}
6201_ACEOF
6202rm -f conftest.$ac_objext
6203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6204 (eval $ac_compile) 2>&5
6205 ac_status=$?
6206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6207 (exit $ac_status); } &&
6208 { ac_try='test -s conftest.$ac_objext'
6209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6210 (eval $ac_try) 2>&5
6211 ac_status=$?
6212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6213 (exit $ac_status); }; }; then
6214 ac_lo=$ac_mid; break
6215else
6216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006217sed 's/^/| /' conftest.$ac_ext >&5
6218
Martin v. Löwis11437992002-04-12 09:54:03 +00006219ac_hi=`expr '(' $ac_mid ')' - 1`
6220 if test $ac_mid -le $ac_hi; then
6221 ac_lo= ac_hi=
6222 break
6223 fi
6224 ac_mid=`expr 2 '*' $ac_mid`
6225fi
6226rm -f conftest.$ac_objext conftest.$ac_ext
6227 done
6228else
6229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006230sed 's/^/| /' conftest.$ac_ext >&5
6231
Martin v. Löwis11437992002-04-12 09:54:03 +00006232ac_lo= ac_hi=
6233fi
6234rm -f conftest.$ac_objext conftest.$ac_ext
6235fi
6236rm -f conftest.$ac_objext conftest.$ac_ext
6237# Binary search between lo and hi bounds.
6238while test "x$ac_lo" != "x$ac_hi"; do
6239 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6240 cat >conftest.$ac_ext <<_ACEOF
6241#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006242/* confdefs.h. */
6243_ACEOF
6244cat confdefs.h >>conftest.$ac_ext
6245cat >>conftest.$ac_ext <<_ACEOF
6246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006247$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006248int
6249main ()
6250{
6251static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6252test_array [0] = 0
6253
6254 ;
6255 return 0;
6256}
6257_ACEOF
6258rm -f conftest.$ac_objext
6259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6260 (eval $ac_compile) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); } &&
6264 { ac_try='test -s conftest.$ac_objext'
6265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6266 (eval $ac_try) 2>&5
6267 ac_status=$?
6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6269 (exit $ac_status); }; }; then
6270 ac_hi=$ac_mid
6271else
6272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006273sed 's/^/| /' conftest.$ac_ext >&5
6274
Martin v. Löwis11437992002-04-12 09:54:03 +00006275ac_lo=`expr '(' $ac_mid ')' + 1`
6276fi
6277rm -f conftest.$ac_objext conftest.$ac_ext
6278done
6279case $ac_lo in
6280?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006281'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6282See \`config.log' for more details." >&5
6283echo "$as_me: error: cannot compute sizeof (long), 77
6284See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006285 { (exit 1); exit 1; }; } ;;
6286esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006287else
6288 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006289 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6290See \`config.log' for more details." >&5
6291echo "$as_me: error: cannot run test program while cross compiling
6292See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006293 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006294else
Martin v. Löwis11437992002-04-12 09:54:03 +00006295 cat >conftest.$ac_ext <<_ACEOF
6296#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006297/* confdefs.h. */
6298_ACEOF
6299cat confdefs.h >>conftest.$ac_ext
6300cat >>conftest.$ac_ext <<_ACEOF
6301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006302$ac_includes_default
6303long longval () { return (long) (sizeof (long)); }
6304unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006305#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006306#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006307int
6308main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006309{
Martin v. Löwis11437992002-04-12 09:54:03 +00006310
6311 FILE *f = fopen ("conftest.val", "w");
6312 if (! f)
6313 exit (1);
6314 if (((long) (sizeof (long))) < 0)
6315 {
6316 long i = longval ();
6317 if (i != ((long) (sizeof (long))))
6318 exit (1);
6319 fprintf (f, "%ld\n", i);
6320 }
6321 else
6322 {
6323 unsigned long i = ulongval ();
6324 if (i != ((long) (sizeof (long))))
6325 exit (1);
6326 fprintf (f, "%lu\n", i);
6327 }
6328 exit (ferror (f) || fclose (f) != 0);
6329
6330 ;
6331 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006332}
Martin v. Löwis11437992002-04-12 09:54:03 +00006333_ACEOF
6334rm -f conftest$ac_exeext
6335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6336 (eval $ac_link) 2>&5
6337 ac_status=$?
6338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6339 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6341 (eval $ac_try) 2>&5
6342 ac_status=$?
6343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6344 (exit $ac_status); }; }; then
6345 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006346else
Martin v. Löwis11437992002-04-12 09:54:03 +00006347 echo "$as_me: program exited with status $ac_status" >&5
6348echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006349sed 's/^/| /' conftest.$ac_ext >&5
6350
Martin v. Löwis11437992002-04-12 09:54:03 +00006351( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006352{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6353See \`config.log' for more details." >&5
6354echo "$as_me: error: cannot compute sizeof (long), 77
6355See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006356 { (exit 1); exit 1; }; }
6357fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006358rm -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 +00006359fi
6360fi
6361rm -f conftest.val
6362else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006363 ac_cv_sizeof_long=0
6364fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006366echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6367echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6368cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006369#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006370_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006371
6372
Martin v. Löwis11437992002-04-12 09:54:03 +00006373echo "$as_me:$LINENO: checking for void *" >&5
6374echo $ECHO_N "checking for void *... $ECHO_C" >&6
6375if test "${ac_cv_type_void_p+set}" = set; then
6376 echo $ECHO_N "(cached) $ECHO_C" >&6
6377else
6378 cat >conftest.$ac_ext <<_ACEOF
6379#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006380/* confdefs.h. */
6381_ACEOF
6382cat confdefs.h >>conftest.$ac_ext
6383cat >>conftest.$ac_ext <<_ACEOF
6384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006385$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006386int
6387main ()
6388{
6389if ((void * *) 0)
6390 return 0;
6391if (sizeof (void *))
6392 return 0;
6393 ;
6394 return 0;
6395}
6396_ACEOF
6397rm -f conftest.$ac_objext
6398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6399 (eval $ac_compile) 2>&5
6400 ac_status=$?
6401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6402 (exit $ac_status); } &&
6403 { ac_try='test -s conftest.$ac_objext'
6404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6405 (eval $ac_try) 2>&5
6406 ac_status=$?
6407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6408 (exit $ac_status); }; }; then
6409 ac_cv_type_void_p=yes
6410else
6411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006412sed 's/^/| /' conftest.$ac_ext >&5
6413
Martin v. Löwis11437992002-04-12 09:54:03 +00006414ac_cv_type_void_p=no
6415fi
6416rm -f conftest.$ac_objext conftest.$ac_ext
6417fi
6418echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6419echo "${ECHO_T}$ac_cv_type_void_p" >&6
6420
6421echo "$as_me:$LINENO: checking size of void *" >&5
6422echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6423if test "${ac_cv_sizeof_void_p+set}" = set; then
6424 echo $ECHO_N "(cached) $ECHO_C" >&6
6425else
6426 if test "$ac_cv_type_void_p" = yes; then
6427 # The cast to unsigned long works around a bug in the HP C Compiler
6428 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6429 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6430 # This bug is HP SR number 8606223364.
6431 if test "$cross_compiling" = yes; then
6432 # Depending upon the size, compute the lo and hi bounds.
6433cat >conftest.$ac_ext <<_ACEOF
6434#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006435/* confdefs.h. */
6436_ACEOF
6437cat confdefs.h >>conftest.$ac_ext
6438cat >>conftest.$ac_ext <<_ACEOF
6439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006440$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006441int
6442main ()
6443{
6444static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6445test_array [0] = 0
6446
6447 ;
6448 return 0;
6449}
6450_ACEOF
6451rm -f conftest.$ac_objext
6452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6453 (eval $ac_compile) 2>&5
6454 ac_status=$?
6455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6456 (exit $ac_status); } &&
6457 { ac_try='test -s conftest.$ac_objext'
6458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6459 (eval $ac_try) 2>&5
6460 ac_status=$?
6461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6462 (exit $ac_status); }; }; then
6463 ac_lo=0 ac_mid=0
6464 while :; do
6465 cat >conftest.$ac_ext <<_ACEOF
6466#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006467/* confdefs.h. */
6468_ACEOF
6469cat confdefs.h >>conftest.$ac_ext
6470cat >>conftest.$ac_ext <<_ACEOF
6471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006472$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006473int
6474main ()
6475{
6476static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6477test_array [0] = 0
6478
6479 ;
6480 return 0;
6481}
6482_ACEOF
6483rm -f conftest.$ac_objext
6484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6485 (eval $ac_compile) 2>&5
6486 ac_status=$?
6487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6488 (exit $ac_status); } &&
6489 { ac_try='test -s conftest.$ac_objext'
6490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6491 (eval $ac_try) 2>&5
6492 ac_status=$?
6493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6494 (exit $ac_status); }; }; then
6495 ac_hi=$ac_mid; break
6496else
6497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006498sed 's/^/| /' conftest.$ac_ext >&5
6499
Martin v. Löwis11437992002-04-12 09:54:03 +00006500ac_lo=`expr $ac_mid + 1`
6501 if test $ac_lo -le $ac_mid; then
6502 ac_lo= ac_hi=
6503 break
6504 fi
6505 ac_mid=`expr 2 '*' $ac_mid + 1`
6506fi
6507rm -f conftest.$ac_objext conftest.$ac_ext
6508 done
6509else
6510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006511sed 's/^/| /' conftest.$ac_ext >&5
6512
Martin v. Löwis11437992002-04-12 09:54:03 +00006513cat >conftest.$ac_ext <<_ACEOF
6514#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006515/* confdefs.h. */
6516_ACEOF
6517cat confdefs.h >>conftest.$ac_ext
6518cat >>conftest.$ac_ext <<_ACEOF
6519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006520$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006521int
6522main ()
6523{
6524static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6525test_array [0] = 0
6526
6527 ;
6528 return 0;
6529}
6530_ACEOF
6531rm -f conftest.$ac_objext
6532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6533 (eval $ac_compile) 2>&5
6534 ac_status=$?
6535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6536 (exit $ac_status); } &&
6537 { ac_try='test -s conftest.$ac_objext'
6538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6539 (eval $ac_try) 2>&5
6540 ac_status=$?
6541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6542 (exit $ac_status); }; }; then
6543 ac_hi=-1 ac_mid=-1
6544 while :; do
6545 cat >conftest.$ac_ext <<_ACEOF
6546#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006547/* confdefs.h. */
6548_ACEOF
6549cat confdefs.h >>conftest.$ac_ext
6550cat >>conftest.$ac_ext <<_ACEOF
6551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006552$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006553int
6554main ()
6555{
6556static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6557test_array [0] = 0
6558
6559 ;
6560 return 0;
6561}
6562_ACEOF
6563rm -f conftest.$ac_objext
6564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6565 (eval $ac_compile) 2>&5
6566 ac_status=$?
6567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6568 (exit $ac_status); } &&
6569 { ac_try='test -s conftest.$ac_objext'
6570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6571 (eval $ac_try) 2>&5
6572 ac_status=$?
6573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6574 (exit $ac_status); }; }; then
6575 ac_lo=$ac_mid; break
6576else
6577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006578sed 's/^/| /' conftest.$ac_ext >&5
6579
Martin v. Löwis11437992002-04-12 09:54:03 +00006580ac_hi=`expr '(' $ac_mid ')' - 1`
6581 if test $ac_mid -le $ac_hi; then
6582 ac_lo= ac_hi=
6583 break
6584 fi
6585 ac_mid=`expr 2 '*' $ac_mid`
6586fi
6587rm -f conftest.$ac_objext conftest.$ac_ext
6588 done
6589else
6590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006591sed 's/^/| /' conftest.$ac_ext >&5
6592
Martin v. Löwis11437992002-04-12 09:54:03 +00006593ac_lo= ac_hi=
6594fi
6595rm -f conftest.$ac_objext conftest.$ac_ext
6596fi
6597rm -f conftest.$ac_objext conftest.$ac_ext
6598# Binary search between lo and hi bounds.
6599while test "x$ac_lo" != "x$ac_hi"; do
6600 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6601 cat >conftest.$ac_ext <<_ACEOF
6602#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006603/* confdefs.h. */
6604_ACEOF
6605cat confdefs.h >>conftest.$ac_ext
6606cat >>conftest.$ac_ext <<_ACEOF
6607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006608$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006609int
6610main ()
6611{
6612static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6613test_array [0] = 0
6614
6615 ;
6616 return 0;
6617}
6618_ACEOF
6619rm -f conftest.$ac_objext
6620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6621 (eval $ac_compile) 2>&5
6622 ac_status=$?
6623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624 (exit $ac_status); } &&
6625 { ac_try='test -s conftest.$ac_objext'
6626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6627 (eval $ac_try) 2>&5
6628 ac_status=$?
6629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630 (exit $ac_status); }; }; then
6631 ac_hi=$ac_mid
6632else
6633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006634sed 's/^/| /' conftest.$ac_ext >&5
6635
Martin v. Löwis11437992002-04-12 09:54:03 +00006636ac_lo=`expr '(' $ac_mid ')' + 1`
6637fi
6638rm -f conftest.$ac_objext conftest.$ac_ext
6639done
6640case $ac_lo in
6641?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006642'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6643See \`config.log' for more details." >&5
6644echo "$as_me: error: cannot compute sizeof (void *), 77
6645See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006646 { (exit 1); exit 1; }; } ;;
6647esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006648else
6649 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006650 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6651See \`config.log' for more details." >&5
6652echo "$as_me: error: cannot run test program while cross compiling
6653See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006654 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006655else
Martin v. Löwis11437992002-04-12 09:54:03 +00006656 cat >conftest.$ac_ext <<_ACEOF
6657#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006658/* confdefs.h. */
6659_ACEOF
6660cat confdefs.h >>conftest.$ac_ext
6661cat >>conftest.$ac_ext <<_ACEOF
6662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006663$ac_includes_default
6664long longval () { return (long) (sizeof (void *)); }
6665unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006666#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006667#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006668int
6669main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006670{
Martin v. Löwis11437992002-04-12 09:54:03 +00006671
6672 FILE *f = fopen ("conftest.val", "w");
6673 if (! f)
6674 exit (1);
6675 if (((long) (sizeof (void *))) < 0)
6676 {
6677 long i = longval ();
6678 if (i != ((long) (sizeof (void *))))
6679 exit (1);
6680 fprintf (f, "%ld\n", i);
6681 }
6682 else
6683 {
6684 unsigned long i = ulongval ();
6685 if (i != ((long) (sizeof (void *))))
6686 exit (1);
6687 fprintf (f, "%lu\n", i);
6688 }
6689 exit (ferror (f) || fclose (f) != 0);
6690
6691 ;
6692 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006693}
Martin v. Löwis11437992002-04-12 09:54:03 +00006694_ACEOF
6695rm -f conftest$ac_exeext
6696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6697 (eval $ac_link) 2>&5
6698 ac_status=$?
6699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6700 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6702 (eval $ac_try) 2>&5
6703 ac_status=$?
6704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6705 (exit $ac_status); }; }; then
6706 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006707else
Martin v. Löwis11437992002-04-12 09:54:03 +00006708 echo "$as_me: program exited with status $ac_status" >&5
6709echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006710sed 's/^/| /' conftest.$ac_ext >&5
6711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006713{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6714See \`config.log' for more details." >&5
6715echo "$as_me: error: cannot compute sizeof (void *), 77
6716See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 { (exit 1); exit 1; }; }
6718fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006719rm -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 +00006720fi
6721fi
6722rm -f conftest.val
6723else
Guido van Rossumad678af1998-10-02 14:42:15 +00006724 ac_cv_sizeof_void_p=0
6725fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006727echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6728echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6729cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006730#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006731_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006732
6733
Martin v. Löwis11437992002-04-12 09:54:03 +00006734echo "$as_me:$LINENO: checking for short" >&5
6735echo $ECHO_N "checking for short... $ECHO_C" >&6
6736if test "${ac_cv_type_short+set}" = set; then
6737 echo $ECHO_N "(cached) $ECHO_C" >&6
6738else
6739 cat >conftest.$ac_ext <<_ACEOF
6740#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006741/* confdefs.h. */
6742_ACEOF
6743cat confdefs.h >>conftest.$ac_ext
6744cat >>conftest.$ac_ext <<_ACEOF
6745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006746$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006747int
6748main ()
6749{
6750if ((short *) 0)
6751 return 0;
6752if (sizeof (short))
6753 return 0;
6754 ;
6755 return 0;
6756}
6757_ACEOF
6758rm -f conftest.$ac_objext
6759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6760 (eval $ac_compile) 2>&5
6761 ac_status=$?
6762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6763 (exit $ac_status); } &&
6764 { ac_try='test -s conftest.$ac_objext'
6765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6766 (eval $ac_try) 2>&5
6767 ac_status=$?
6768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6769 (exit $ac_status); }; }; then
6770 ac_cv_type_short=yes
6771else
6772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006773sed 's/^/| /' conftest.$ac_ext >&5
6774
Martin v. Löwis11437992002-04-12 09:54:03 +00006775ac_cv_type_short=no
6776fi
6777rm -f conftest.$ac_objext conftest.$ac_ext
6778fi
6779echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6780echo "${ECHO_T}$ac_cv_type_short" >&6
6781
6782echo "$as_me:$LINENO: checking size of short" >&5
6783echo $ECHO_N "checking size of short... $ECHO_C" >&6
6784if test "${ac_cv_sizeof_short+set}" = set; then
6785 echo $ECHO_N "(cached) $ECHO_C" >&6
6786else
6787 if test "$ac_cv_type_short" = yes; then
6788 # The cast to unsigned long works around a bug in the HP C Compiler
6789 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6790 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6791 # This bug is HP SR number 8606223364.
6792 if test "$cross_compiling" = yes; then
6793 # Depending upon the size, compute the lo and hi bounds.
6794cat >conftest.$ac_ext <<_ACEOF
6795#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006796/* confdefs.h. */
6797_ACEOF
6798cat confdefs.h >>conftest.$ac_ext
6799cat >>conftest.$ac_ext <<_ACEOF
6800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006801$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006802int
6803main ()
6804{
6805static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6806test_array [0] = 0
6807
6808 ;
6809 return 0;
6810}
6811_ACEOF
6812rm -f conftest.$ac_objext
6813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6814 (eval $ac_compile) 2>&5
6815 ac_status=$?
6816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6817 (exit $ac_status); } &&
6818 { ac_try='test -s conftest.$ac_objext'
6819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6820 (eval $ac_try) 2>&5
6821 ac_status=$?
6822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6823 (exit $ac_status); }; }; then
6824 ac_lo=0 ac_mid=0
6825 while :; do
6826 cat >conftest.$ac_ext <<_ACEOF
6827#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006828/* confdefs.h. */
6829_ACEOF
6830cat confdefs.h >>conftest.$ac_ext
6831cat >>conftest.$ac_ext <<_ACEOF
6832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006833$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006834int
6835main ()
6836{
6837static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6838test_array [0] = 0
6839
6840 ;
6841 return 0;
6842}
6843_ACEOF
6844rm -f conftest.$ac_objext
6845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6846 (eval $ac_compile) 2>&5
6847 ac_status=$?
6848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6849 (exit $ac_status); } &&
6850 { ac_try='test -s conftest.$ac_objext'
6851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6852 (eval $ac_try) 2>&5
6853 ac_status=$?
6854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6855 (exit $ac_status); }; }; then
6856 ac_hi=$ac_mid; break
6857else
6858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006859sed 's/^/| /' conftest.$ac_ext >&5
6860
Martin v. Löwis11437992002-04-12 09:54:03 +00006861ac_lo=`expr $ac_mid + 1`
6862 if test $ac_lo -le $ac_mid; then
6863 ac_lo= ac_hi=
6864 break
6865 fi
6866 ac_mid=`expr 2 '*' $ac_mid + 1`
6867fi
6868rm -f conftest.$ac_objext conftest.$ac_ext
6869 done
6870else
6871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006872sed 's/^/| /' conftest.$ac_ext >&5
6873
Martin v. Löwis11437992002-04-12 09:54:03 +00006874cat >conftest.$ac_ext <<_ACEOF
6875#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006876/* confdefs.h. */
6877_ACEOF
6878cat confdefs.h >>conftest.$ac_ext
6879cat >>conftest.$ac_ext <<_ACEOF
6880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006881$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006882int
6883main ()
6884{
6885static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6886test_array [0] = 0
6887
6888 ;
6889 return 0;
6890}
6891_ACEOF
6892rm -f conftest.$ac_objext
6893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6894 (eval $ac_compile) 2>&5
6895 ac_status=$?
6896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6897 (exit $ac_status); } &&
6898 { ac_try='test -s conftest.$ac_objext'
6899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6900 (eval $ac_try) 2>&5
6901 ac_status=$?
6902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6903 (exit $ac_status); }; }; then
6904 ac_hi=-1 ac_mid=-1
6905 while :; do
6906 cat >conftest.$ac_ext <<_ACEOF
6907#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006908/* confdefs.h. */
6909_ACEOF
6910cat confdefs.h >>conftest.$ac_ext
6911cat >>conftest.$ac_ext <<_ACEOF
6912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006913$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006914int
6915main ()
6916{
6917static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6918test_array [0] = 0
6919
6920 ;
6921 return 0;
6922}
6923_ACEOF
6924rm -f conftest.$ac_objext
6925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6926 (eval $ac_compile) 2>&5
6927 ac_status=$?
6928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6929 (exit $ac_status); } &&
6930 { ac_try='test -s conftest.$ac_objext'
6931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6932 (eval $ac_try) 2>&5
6933 ac_status=$?
6934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6935 (exit $ac_status); }; }; then
6936 ac_lo=$ac_mid; break
6937else
6938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006939sed 's/^/| /' conftest.$ac_ext >&5
6940
Martin v. Löwis11437992002-04-12 09:54:03 +00006941ac_hi=`expr '(' $ac_mid ')' - 1`
6942 if test $ac_mid -le $ac_hi; then
6943 ac_lo= ac_hi=
6944 break
6945 fi
6946 ac_mid=`expr 2 '*' $ac_mid`
6947fi
6948rm -f conftest.$ac_objext conftest.$ac_ext
6949 done
6950else
6951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006952sed 's/^/| /' conftest.$ac_ext >&5
6953
Martin v. Löwis11437992002-04-12 09:54:03 +00006954ac_lo= ac_hi=
6955fi
6956rm -f conftest.$ac_objext conftest.$ac_ext
6957fi
6958rm -f conftest.$ac_objext conftest.$ac_ext
6959# Binary search between lo and hi bounds.
6960while test "x$ac_lo" != "x$ac_hi"; do
6961 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6962 cat >conftest.$ac_ext <<_ACEOF
6963#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006964/* confdefs.h. */
6965_ACEOF
6966cat confdefs.h >>conftest.$ac_ext
6967cat >>conftest.$ac_ext <<_ACEOF
6968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006969$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006970int
6971main ()
6972{
6973static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6974test_array [0] = 0
6975
6976 ;
6977 return 0;
6978}
6979_ACEOF
6980rm -f conftest.$ac_objext
6981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6982 (eval $ac_compile) 2>&5
6983 ac_status=$?
6984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6985 (exit $ac_status); } &&
6986 { ac_try='test -s conftest.$ac_objext'
6987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6988 (eval $ac_try) 2>&5
6989 ac_status=$?
6990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6991 (exit $ac_status); }; }; then
6992 ac_hi=$ac_mid
6993else
6994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006995sed 's/^/| /' conftest.$ac_ext >&5
6996
Martin v. Löwis11437992002-04-12 09:54:03 +00006997ac_lo=`expr '(' $ac_mid ')' + 1`
6998fi
6999rm -f conftest.$ac_objext conftest.$ac_ext
7000done
7001case $ac_lo in
7002?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007003'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7004See \`config.log' for more details." >&5
7005echo "$as_me: error: cannot compute sizeof (short), 77
7006See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007007 { (exit 1); exit 1; }; } ;;
7008esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007009else
7010 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007011 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7012See \`config.log' for more details." >&5
7013echo "$as_me: error: cannot run test program while cross compiling
7014See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007016else
Martin v. Löwis11437992002-04-12 09:54:03 +00007017 cat >conftest.$ac_ext <<_ACEOF
7018#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007019/* confdefs.h. */
7020_ACEOF
7021cat confdefs.h >>conftest.$ac_ext
7022cat >>conftest.$ac_ext <<_ACEOF
7023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007024$ac_includes_default
7025long longval () { return (long) (sizeof (short)); }
7026unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007027#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007028#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007029int
7030main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007031{
Martin v. Löwis11437992002-04-12 09:54:03 +00007032
7033 FILE *f = fopen ("conftest.val", "w");
7034 if (! f)
7035 exit (1);
7036 if (((long) (sizeof (short))) < 0)
7037 {
7038 long i = longval ();
7039 if (i != ((long) (sizeof (short))))
7040 exit (1);
7041 fprintf (f, "%ld\n", i);
7042 }
7043 else
7044 {
7045 unsigned long i = ulongval ();
7046 if (i != ((long) (sizeof (short))))
7047 exit (1);
7048 fprintf (f, "%lu\n", i);
7049 }
7050 exit (ferror (f) || fclose (f) != 0);
7051
7052 ;
7053 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007054}
Martin v. Löwis11437992002-04-12 09:54:03 +00007055_ACEOF
7056rm -f conftest$ac_exeext
7057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7058 (eval $ac_link) 2>&5
7059 ac_status=$?
7060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7063 (eval $ac_try) 2>&5
7064 ac_status=$?
7065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7066 (exit $ac_status); }; }; then
7067 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007068else
Martin v. Löwis11437992002-04-12 09:54:03 +00007069 echo "$as_me: program exited with status $ac_status" >&5
7070echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007071sed 's/^/| /' conftest.$ac_ext >&5
7072
Martin v. Löwis11437992002-04-12 09:54:03 +00007073( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007074{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7075See \`config.log' for more details." >&5
7076echo "$as_me: error: cannot compute sizeof (short), 77
7077See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007078 { (exit 1); exit 1; }; }
7079fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007080rm -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 +00007081fi
7082fi
7083rm -f conftest.val
7084else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007085 ac_cv_sizeof_short=0
7086fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007088echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7089echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7090cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007091#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007092_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007093
7094
Martin v. Löwis11437992002-04-12 09:54:03 +00007095echo "$as_me:$LINENO: checking for float" >&5
7096echo $ECHO_N "checking for float... $ECHO_C" >&6
7097if test "${ac_cv_type_float+set}" = set; then
7098 echo $ECHO_N "(cached) $ECHO_C" >&6
7099else
7100 cat >conftest.$ac_ext <<_ACEOF
7101#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007102/* confdefs.h. */
7103_ACEOF
7104cat confdefs.h >>conftest.$ac_ext
7105cat >>conftest.$ac_ext <<_ACEOF
7106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007107$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007108int
7109main ()
7110{
7111if ((float *) 0)
7112 return 0;
7113if (sizeof (float))
7114 return 0;
7115 ;
7116 return 0;
7117}
7118_ACEOF
7119rm -f conftest.$ac_objext
7120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7121 (eval $ac_compile) 2>&5
7122 ac_status=$?
7123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7124 (exit $ac_status); } &&
7125 { ac_try='test -s conftest.$ac_objext'
7126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7127 (eval $ac_try) 2>&5
7128 ac_status=$?
7129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7130 (exit $ac_status); }; }; then
7131 ac_cv_type_float=yes
7132else
7133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007134sed 's/^/| /' conftest.$ac_ext >&5
7135
Martin v. Löwis11437992002-04-12 09:54:03 +00007136ac_cv_type_float=no
7137fi
7138rm -f conftest.$ac_objext conftest.$ac_ext
7139fi
7140echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7141echo "${ECHO_T}$ac_cv_type_float" >&6
7142
7143echo "$as_me:$LINENO: checking size of float" >&5
7144echo $ECHO_N "checking size of float... $ECHO_C" >&6
7145if test "${ac_cv_sizeof_float+set}" = set; then
7146 echo $ECHO_N "(cached) $ECHO_C" >&6
7147else
7148 if test "$ac_cv_type_float" = yes; then
7149 # The cast to unsigned long works around a bug in the HP C Compiler
7150 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7151 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7152 # This bug is HP SR number 8606223364.
7153 if test "$cross_compiling" = yes; then
7154 # Depending upon the size, compute the lo and hi bounds.
7155cat >conftest.$ac_ext <<_ACEOF
7156#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007157/* confdefs.h. */
7158_ACEOF
7159cat confdefs.h >>conftest.$ac_ext
7160cat >>conftest.$ac_ext <<_ACEOF
7161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007162$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007163int
7164main ()
7165{
7166static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7167test_array [0] = 0
7168
7169 ;
7170 return 0;
7171}
7172_ACEOF
7173rm -f conftest.$ac_objext
7174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7175 (eval $ac_compile) 2>&5
7176 ac_status=$?
7177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7178 (exit $ac_status); } &&
7179 { ac_try='test -s conftest.$ac_objext'
7180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7181 (eval $ac_try) 2>&5
7182 ac_status=$?
7183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7184 (exit $ac_status); }; }; then
7185 ac_lo=0 ac_mid=0
7186 while :; do
7187 cat >conftest.$ac_ext <<_ACEOF
7188#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007189/* confdefs.h. */
7190_ACEOF
7191cat confdefs.h >>conftest.$ac_ext
7192cat >>conftest.$ac_ext <<_ACEOF
7193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007194$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007195int
7196main ()
7197{
7198static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7199test_array [0] = 0
7200
7201 ;
7202 return 0;
7203}
7204_ACEOF
7205rm -f conftest.$ac_objext
7206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7207 (eval $ac_compile) 2>&5
7208 ac_status=$?
7209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210 (exit $ac_status); } &&
7211 { ac_try='test -s conftest.$ac_objext'
7212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7213 (eval $ac_try) 2>&5
7214 ac_status=$?
7215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7216 (exit $ac_status); }; }; then
7217 ac_hi=$ac_mid; break
7218else
7219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007220sed 's/^/| /' conftest.$ac_ext >&5
7221
Martin v. Löwis11437992002-04-12 09:54:03 +00007222ac_lo=`expr $ac_mid + 1`
7223 if test $ac_lo -le $ac_mid; then
7224 ac_lo= ac_hi=
7225 break
7226 fi
7227 ac_mid=`expr 2 '*' $ac_mid + 1`
7228fi
7229rm -f conftest.$ac_objext conftest.$ac_ext
7230 done
7231else
7232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007233sed 's/^/| /' conftest.$ac_ext >&5
7234
Martin v. Löwis11437992002-04-12 09:54:03 +00007235cat >conftest.$ac_ext <<_ACEOF
7236#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007237/* confdefs.h. */
7238_ACEOF
7239cat confdefs.h >>conftest.$ac_ext
7240cat >>conftest.$ac_ext <<_ACEOF
7241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007242$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007243int
7244main ()
7245{
7246static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7247test_array [0] = 0
7248
7249 ;
7250 return 0;
7251}
7252_ACEOF
7253rm -f conftest.$ac_objext
7254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7255 (eval $ac_compile) 2>&5
7256 ac_status=$?
7257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7258 (exit $ac_status); } &&
7259 { ac_try='test -s conftest.$ac_objext'
7260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7261 (eval $ac_try) 2>&5
7262 ac_status=$?
7263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7264 (exit $ac_status); }; }; then
7265 ac_hi=-1 ac_mid=-1
7266 while :; do
7267 cat >conftest.$ac_ext <<_ACEOF
7268#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007269/* confdefs.h. */
7270_ACEOF
7271cat confdefs.h >>conftest.$ac_ext
7272cat >>conftest.$ac_ext <<_ACEOF
7273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007274$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007275int
7276main ()
7277{
7278static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7279test_array [0] = 0
7280
7281 ;
7282 return 0;
7283}
7284_ACEOF
7285rm -f conftest.$ac_objext
7286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7287 (eval $ac_compile) 2>&5
7288 ac_status=$?
7289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7290 (exit $ac_status); } &&
7291 { ac_try='test -s conftest.$ac_objext'
7292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7293 (eval $ac_try) 2>&5
7294 ac_status=$?
7295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7296 (exit $ac_status); }; }; then
7297 ac_lo=$ac_mid; break
7298else
7299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007300sed 's/^/| /' conftest.$ac_ext >&5
7301
Martin v. Löwis11437992002-04-12 09:54:03 +00007302ac_hi=`expr '(' $ac_mid ')' - 1`
7303 if test $ac_mid -le $ac_hi; then
7304 ac_lo= ac_hi=
7305 break
7306 fi
7307 ac_mid=`expr 2 '*' $ac_mid`
7308fi
7309rm -f conftest.$ac_objext conftest.$ac_ext
7310 done
7311else
7312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007313sed 's/^/| /' conftest.$ac_ext >&5
7314
Martin v. Löwis11437992002-04-12 09:54:03 +00007315ac_lo= ac_hi=
7316fi
7317rm -f conftest.$ac_objext conftest.$ac_ext
7318fi
7319rm -f conftest.$ac_objext conftest.$ac_ext
7320# Binary search between lo and hi bounds.
7321while test "x$ac_lo" != "x$ac_hi"; do
7322 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7323 cat >conftest.$ac_ext <<_ACEOF
7324#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007325/* confdefs.h. */
7326_ACEOF
7327cat confdefs.h >>conftest.$ac_ext
7328cat >>conftest.$ac_ext <<_ACEOF
7329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007330$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007331int
7332main ()
7333{
7334static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7335test_array [0] = 0
7336
7337 ;
7338 return 0;
7339}
7340_ACEOF
7341rm -f conftest.$ac_objext
7342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7343 (eval $ac_compile) 2>&5
7344 ac_status=$?
7345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7346 (exit $ac_status); } &&
7347 { ac_try='test -s conftest.$ac_objext'
7348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7349 (eval $ac_try) 2>&5
7350 ac_status=$?
7351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7352 (exit $ac_status); }; }; then
7353 ac_hi=$ac_mid
7354else
7355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007356sed 's/^/| /' conftest.$ac_ext >&5
7357
Martin v. Löwis11437992002-04-12 09:54:03 +00007358ac_lo=`expr '(' $ac_mid ')' + 1`
7359fi
7360rm -f conftest.$ac_objext conftest.$ac_ext
7361done
7362case $ac_lo in
7363?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007364'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7365See \`config.log' for more details." >&5
7366echo "$as_me: error: cannot compute sizeof (float), 77
7367See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007368 { (exit 1); exit 1; }; } ;;
7369esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007370else
7371 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007372 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7373See \`config.log' for more details." >&5
7374echo "$as_me: error: cannot run test program while cross compiling
7375See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007376 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007377else
Martin v. Löwis11437992002-04-12 09:54:03 +00007378 cat >conftest.$ac_ext <<_ACEOF
7379#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007380/* confdefs.h. */
7381_ACEOF
7382cat confdefs.h >>conftest.$ac_ext
7383cat >>conftest.$ac_ext <<_ACEOF
7384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007385$ac_includes_default
7386long longval () { return (long) (sizeof (float)); }
7387unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007388#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007389#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007390int
7391main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007392{
Martin v. Löwis11437992002-04-12 09:54:03 +00007393
7394 FILE *f = fopen ("conftest.val", "w");
7395 if (! f)
7396 exit (1);
7397 if (((long) (sizeof (float))) < 0)
7398 {
7399 long i = longval ();
7400 if (i != ((long) (sizeof (float))))
7401 exit (1);
7402 fprintf (f, "%ld\n", i);
7403 }
7404 else
7405 {
7406 unsigned long i = ulongval ();
7407 if (i != ((long) (sizeof (float))))
7408 exit (1);
7409 fprintf (f, "%lu\n", i);
7410 }
7411 exit (ferror (f) || fclose (f) != 0);
7412
7413 ;
7414 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007415}
Martin v. Löwis11437992002-04-12 09:54:03 +00007416_ACEOF
7417rm -f conftest$ac_exeext
7418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7419 (eval $ac_link) 2>&5
7420 ac_status=$?
7421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7422 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7424 (eval $ac_try) 2>&5
7425 ac_status=$?
7426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7427 (exit $ac_status); }; }; then
7428 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007429else
Martin v. Löwis11437992002-04-12 09:54:03 +00007430 echo "$as_me: program exited with status $ac_status" >&5
7431echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007432sed 's/^/| /' conftest.$ac_ext >&5
7433
Martin v. Löwis11437992002-04-12 09:54:03 +00007434( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007435{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7436See \`config.log' for more details." >&5
7437echo "$as_me: error: cannot compute sizeof (float), 77
7438See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007439 { (exit 1); exit 1; }; }
7440fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007441rm -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 +00007442fi
7443fi
7444rm -f conftest.val
7445else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007446 ac_cv_sizeof_float=0
7447fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007448fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007449echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7450echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7451cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007452#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007453_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007454
7455
Martin v. Löwis11437992002-04-12 09:54:03 +00007456echo "$as_me:$LINENO: checking for double" >&5
7457echo $ECHO_N "checking for double... $ECHO_C" >&6
7458if test "${ac_cv_type_double+set}" = set; then
7459 echo $ECHO_N "(cached) $ECHO_C" >&6
7460else
7461 cat >conftest.$ac_ext <<_ACEOF
7462#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007463/* confdefs.h. */
7464_ACEOF
7465cat confdefs.h >>conftest.$ac_ext
7466cat >>conftest.$ac_ext <<_ACEOF
7467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007468$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007469int
7470main ()
7471{
7472if ((double *) 0)
7473 return 0;
7474if (sizeof (double))
7475 return 0;
7476 ;
7477 return 0;
7478}
7479_ACEOF
7480rm -f conftest.$ac_objext
7481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7482 (eval $ac_compile) 2>&5
7483 ac_status=$?
7484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7485 (exit $ac_status); } &&
7486 { ac_try='test -s conftest.$ac_objext'
7487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7488 (eval $ac_try) 2>&5
7489 ac_status=$?
7490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7491 (exit $ac_status); }; }; then
7492 ac_cv_type_double=yes
7493else
7494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007495sed 's/^/| /' conftest.$ac_ext >&5
7496
Martin v. Löwis11437992002-04-12 09:54:03 +00007497ac_cv_type_double=no
7498fi
7499rm -f conftest.$ac_objext conftest.$ac_ext
7500fi
7501echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7502echo "${ECHO_T}$ac_cv_type_double" >&6
7503
7504echo "$as_me:$LINENO: checking size of double" >&5
7505echo $ECHO_N "checking size of double... $ECHO_C" >&6
7506if test "${ac_cv_sizeof_double+set}" = set; then
7507 echo $ECHO_N "(cached) $ECHO_C" >&6
7508else
7509 if test "$ac_cv_type_double" = yes; then
7510 # The cast to unsigned long works around a bug in the HP C Compiler
7511 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7512 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7513 # This bug is HP SR number 8606223364.
7514 if test "$cross_compiling" = yes; then
7515 # Depending upon the size, compute the lo and hi bounds.
7516cat >conftest.$ac_ext <<_ACEOF
7517#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007518/* confdefs.h. */
7519_ACEOF
7520cat confdefs.h >>conftest.$ac_ext
7521cat >>conftest.$ac_ext <<_ACEOF
7522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007523$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007524int
7525main ()
7526{
7527static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7528test_array [0] = 0
7529
7530 ;
7531 return 0;
7532}
7533_ACEOF
7534rm -f conftest.$ac_objext
7535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7536 (eval $ac_compile) 2>&5
7537 ac_status=$?
7538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7539 (exit $ac_status); } &&
7540 { ac_try='test -s conftest.$ac_objext'
7541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7542 (eval $ac_try) 2>&5
7543 ac_status=$?
7544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7545 (exit $ac_status); }; }; then
7546 ac_lo=0 ac_mid=0
7547 while :; do
7548 cat >conftest.$ac_ext <<_ACEOF
7549#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007550/* confdefs.h. */
7551_ACEOF
7552cat confdefs.h >>conftest.$ac_ext
7553cat >>conftest.$ac_ext <<_ACEOF
7554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007555$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007556int
7557main ()
7558{
7559static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7560test_array [0] = 0
7561
7562 ;
7563 return 0;
7564}
7565_ACEOF
7566rm -f conftest.$ac_objext
7567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7568 (eval $ac_compile) 2>&5
7569 ac_status=$?
7570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7571 (exit $ac_status); } &&
7572 { ac_try='test -s conftest.$ac_objext'
7573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7574 (eval $ac_try) 2>&5
7575 ac_status=$?
7576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7577 (exit $ac_status); }; }; then
7578 ac_hi=$ac_mid; break
7579else
7580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007581sed 's/^/| /' conftest.$ac_ext >&5
7582
Martin v. Löwis11437992002-04-12 09:54:03 +00007583ac_lo=`expr $ac_mid + 1`
7584 if test $ac_lo -le $ac_mid; then
7585 ac_lo= ac_hi=
7586 break
7587 fi
7588 ac_mid=`expr 2 '*' $ac_mid + 1`
7589fi
7590rm -f conftest.$ac_objext conftest.$ac_ext
7591 done
7592else
7593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007594sed 's/^/| /' conftest.$ac_ext >&5
7595
Martin v. Löwis11437992002-04-12 09:54:03 +00007596cat >conftest.$ac_ext <<_ACEOF
7597#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007598/* confdefs.h. */
7599_ACEOF
7600cat confdefs.h >>conftest.$ac_ext
7601cat >>conftest.$ac_ext <<_ACEOF
7602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007603$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007604int
7605main ()
7606{
7607static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7608test_array [0] = 0
7609
7610 ;
7611 return 0;
7612}
7613_ACEOF
7614rm -f conftest.$ac_objext
7615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7616 (eval $ac_compile) 2>&5
7617 ac_status=$?
7618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7619 (exit $ac_status); } &&
7620 { ac_try='test -s conftest.$ac_objext'
7621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7622 (eval $ac_try) 2>&5
7623 ac_status=$?
7624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625 (exit $ac_status); }; }; then
7626 ac_hi=-1 ac_mid=-1
7627 while :; do
7628 cat >conftest.$ac_ext <<_ACEOF
7629#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007630/* confdefs.h. */
7631_ACEOF
7632cat confdefs.h >>conftest.$ac_ext
7633cat >>conftest.$ac_ext <<_ACEOF
7634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007635$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007636int
7637main ()
7638{
7639static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7640test_array [0] = 0
7641
7642 ;
7643 return 0;
7644}
7645_ACEOF
7646rm -f conftest.$ac_objext
7647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7648 (eval $ac_compile) 2>&5
7649 ac_status=$?
7650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7651 (exit $ac_status); } &&
7652 { ac_try='test -s conftest.$ac_objext'
7653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7654 (eval $ac_try) 2>&5
7655 ac_status=$?
7656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7657 (exit $ac_status); }; }; then
7658 ac_lo=$ac_mid; break
7659else
7660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007661sed 's/^/| /' conftest.$ac_ext >&5
7662
Martin v. Löwis11437992002-04-12 09:54:03 +00007663ac_hi=`expr '(' $ac_mid ')' - 1`
7664 if test $ac_mid -le $ac_hi; then
7665 ac_lo= ac_hi=
7666 break
7667 fi
7668 ac_mid=`expr 2 '*' $ac_mid`
7669fi
7670rm -f conftest.$ac_objext conftest.$ac_ext
7671 done
7672else
7673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007674sed 's/^/| /' conftest.$ac_ext >&5
7675
Martin v. Löwis11437992002-04-12 09:54:03 +00007676ac_lo= ac_hi=
7677fi
7678rm -f conftest.$ac_objext conftest.$ac_ext
7679fi
7680rm -f conftest.$ac_objext conftest.$ac_ext
7681# Binary search between lo and hi bounds.
7682while test "x$ac_lo" != "x$ac_hi"; do
7683 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7684 cat >conftest.$ac_ext <<_ACEOF
7685#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007686/* confdefs.h. */
7687_ACEOF
7688cat confdefs.h >>conftest.$ac_ext
7689cat >>conftest.$ac_ext <<_ACEOF
7690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007691$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007692int
7693main ()
7694{
7695static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7696test_array [0] = 0
7697
7698 ;
7699 return 0;
7700}
7701_ACEOF
7702rm -f conftest.$ac_objext
7703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7704 (eval $ac_compile) 2>&5
7705 ac_status=$?
7706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7707 (exit $ac_status); } &&
7708 { ac_try='test -s conftest.$ac_objext'
7709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7710 (eval $ac_try) 2>&5
7711 ac_status=$?
7712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7713 (exit $ac_status); }; }; then
7714 ac_hi=$ac_mid
7715else
7716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007717sed 's/^/| /' conftest.$ac_ext >&5
7718
Martin v. Löwis11437992002-04-12 09:54:03 +00007719ac_lo=`expr '(' $ac_mid ')' + 1`
7720fi
7721rm -f conftest.$ac_objext conftest.$ac_ext
7722done
7723case $ac_lo in
7724?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007725'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7726See \`config.log' for more details." >&5
7727echo "$as_me: error: cannot compute sizeof (double), 77
7728See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007729 { (exit 1); exit 1; }; } ;;
7730esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007731else
7732 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007733 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7734See \`config.log' for more details." >&5
7735echo "$as_me: error: cannot run test program while cross compiling
7736See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007738else
Martin v. Löwis11437992002-04-12 09:54:03 +00007739 cat >conftest.$ac_ext <<_ACEOF
7740#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007741/* confdefs.h. */
7742_ACEOF
7743cat confdefs.h >>conftest.$ac_ext
7744cat >>conftest.$ac_ext <<_ACEOF
7745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007746$ac_includes_default
7747long longval () { return (long) (sizeof (double)); }
7748unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007749#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007750#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007751int
7752main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007753{
Martin v. Löwis11437992002-04-12 09:54:03 +00007754
7755 FILE *f = fopen ("conftest.val", "w");
7756 if (! f)
7757 exit (1);
7758 if (((long) (sizeof (double))) < 0)
7759 {
7760 long i = longval ();
7761 if (i != ((long) (sizeof (double))))
7762 exit (1);
7763 fprintf (f, "%ld\n", i);
7764 }
7765 else
7766 {
7767 unsigned long i = ulongval ();
7768 if (i != ((long) (sizeof (double))))
7769 exit (1);
7770 fprintf (f, "%lu\n", i);
7771 }
7772 exit (ferror (f) || fclose (f) != 0);
7773
7774 ;
7775 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007776}
Martin v. Löwis11437992002-04-12 09:54:03 +00007777_ACEOF
7778rm -f conftest$ac_exeext
7779if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7780 (eval $ac_link) 2>&5
7781 ac_status=$?
7782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7783 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7785 (eval $ac_try) 2>&5
7786 ac_status=$?
7787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788 (exit $ac_status); }; }; then
7789 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007790else
Martin v. Löwis11437992002-04-12 09:54:03 +00007791 echo "$as_me: program exited with status $ac_status" >&5
7792echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007793sed 's/^/| /' conftest.$ac_ext >&5
7794
Martin v. Löwis11437992002-04-12 09:54:03 +00007795( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007796{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7797See \`config.log' for more details." >&5
7798echo "$as_me: error: cannot compute sizeof (double), 77
7799See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 { (exit 1); exit 1; }; }
7801fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007802rm -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 +00007803fi
7804fi
7805rm -f conftest.val
7806else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007807 ac_cv_sizeof_double=0
7808fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007809fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007810echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7811echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7812cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007813#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007814_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007815
7816
Martin v. Löwis11437992002-04-12 09:54:03 +00007817echo "$as_me:$LINENO: checking for fpos_t" >&5
7818echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7819if test "${ac_cv_type_fpos_t+set}" = set; then
7820 echo $ECHO_N "(cached) $ECHO_C" >&6
7821else
7822 cat >conftest.$ac_ext <<_ACEOF
7823#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007824/* confdefs.h. */
7825_ACEOF
7826cat confdefs.h >>conftest.$ac_ext
7827cat >>conftest.$ac_ext <<_ACEOF
7828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007829$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007830int
7831main ()
7832{
7833if ((fpos_t *) 0)
7834 return 0;
7835if (sizeof (fpos_t))
7836 return 0;
7837 ;
7838 return 0;
7839}
7840_ACEOF
7841rm -f conftest.$ac_objext
7842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7843 (eval $ac_compile) 2>&5
7844 ac_status=$?
7845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7846 (exit $ac_status); } &&
7847 { ac_try='test -s conftest.$ac_objext'
7848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7849 (eval $ac_try) 2>&5
7850 ac_status=$?
7851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7852 (exit $ac_status); }; }; then
7853 ac_cv_type_fpos_t=yes
7854else
7855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007856sed 's/^/| /' conftest.$ac_ext >&5
7857
Martin v. Löwis11437992002-04-12 09:54:03 +00007858ac_cv_type_fpos_t=no
7859fi
7860rm -f conftest.$ac_objext conftest.$ac_ext
7861fi
7862echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7863echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7864
7865echo "$as_me:$LINENO: checking size of fpos_t" >&5
7866echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7867if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7868 echo $ECHO_N "(cached) $ECHO_C" >&6
7869else
7870 if test "$ac_cv_type_fpos_t" = yes; then
7871 # The cast to unsigned long works around a bug in the HP C Compiler
7872 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7873 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7874 # This bug is HP SR number 8606223364.
7875 if test "$cross_compiling" = yes; then
7876 # Depending upon the size, compute the lo and hi bounds.
7877cat >conftest.$ac_ext <<_ACEOF
7878#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007879/* confdefs.h. */
7880_ACEOF
7881cat confdefs.h >>conftest.$ac_ext
7882cat >>conftest.$ac_ext <<_ACEOF
7883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007884$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007885int
7886main ()
7887{
7888static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7889test_array [0] = 0
7890
7891 ;
7892 return 0;
7893}
7894_ACEOF
7895rm -f conftest.$ac_objext
7896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7897 (eval $ac_compile) 2>&5
7898 ac_status=$?
7899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7900 (exit $ac_status); } &&
7901 { ac_try='test -s conftest.$ac_objext'
7902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7903 (eval $ac_try) 2>&5
7904 ac_status=$?
7905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7906 (exit $ac_status); }; }; then
7907 ac_lo=0 ac_mid=0
7908 while :; do
7909 cat >conftest.$ac_ext <<_ACEOF
7910#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007911/* confdefs.h. */
7912_ACEOF
7913cat confdefs.h >>conftest.$ac_ext
7914cat >>conftest.$ac_ext <<_ACEOF
7915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007916$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007917int
7918main ()
7919{
7920static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7921test_array [0] = 0
7922
7923 ;
7924 return 0;
7925}
7926_ACEOF
7927rm -f conftest.$ac_objext
7928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7929 (eval $ac_compile) 2>&5
7930 ac_status=$?
7931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7932 (exit $ac_status); } &&
7933 { ac_try='test -s conftest.$ac_objext'
7934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7935 (eval $ac_try) 2>&5
7936 ac_status=$?
7937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7938 (exit $ac_status); }; }; then
7939 ac_hi=$ac_mid; break
7940else
7941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007942sed 's/^/| /' conftest.$ac_ext >&5
7943
Martin v. Löwis11437992002-04-12 09:54:03 +00007944ac_lo=`expr $ac_mid + 1`
7945 if test $ac_lo -le $ac_mid; then
7946 ac_lo= ac_hi=
7947 break
7948 fi
7949 ac_mid=`expr 2 '*' $ac_mid + 1`
7950fi
7951rm -f conftest.$ac_objext conftest.$ac_ext
7952 done
7953else
7954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007955sed 's/^/| /' conftest.$ac_ext >&5
7956
Martin v. Löwis11437992002-04-12 09:54:03 +00007957cat >conftest.$ac_ext <<_ACEOF
7958#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007959/* confdefs.h. */
7960_ACEOF
7961cat confdefs.h >>conftest.$ac_ext
7962cat >>conftest.$ac_ext <<_ACEOF
7963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007964$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007965int
7966main ()
7967{
7968static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7969test_array [0] = 0
7970
7971 ;
7972 return 0;
7973}
7974_ACEOF
7975rm -f conftest.$ac_objext
7976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7977 (eval $ac_compile) 2>&5
7978 ac_status=$?
7979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980 (exit $ac_status); } &&
7981 { ac_try='test -s conftest.$ac_objext'
7982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7983 (eval $ac_try) 2>&5
7984 ac_status=$?
7985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7986 (exit $ac_status); }; }; then
7987 ac_hi=-1 ac_mid=-1
7988 while :; do
7989 cat >conftest.$ac_ext <<_ACEOF
7990#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* confdefs.h. */
7992_ACEOF
7993cat confdefs.h >>conftest.$ac_ext
7994cat >>conftest.$ac_ext <<_ACEOF
7995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007997int
7998main ()
7999{
8000static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8001test_array [0] = 0
8002
8003 ;
8004 return 0;
8005}
8006_ACEOF
8007rm -f conftest.$ac_objext
8008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8009 (eval $ac_compile) 2>&5
8010 ac_status=$?
8011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8012 (exit $ac_status); } &&
8013 { ac_try='test -s conftest.$ac_objext'
8014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8015 (eval $ac_try) 2>&5
8016 ac_status=$?
8017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8018 (exit $ac_status); }; }; then
8019 ac_lo=$ac_mid; break
8020else
8021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008022sed 's/^/| /' conftest.$ac_ext >&5
8023
Martin v. Löwis11437992002-04-12 09:54:03 +00008024ac_hi=`expr '(' $ac_mid ')' - 1`
8025 if test $ac_mid -le $ac_hi; then
8026 ac_lo= ac_hi=
8027 break
8028 fi
8029 ac_mid=`expr 2 '*' $ac_mid`
8030fi
8031rm -f conftest.$ac_objext conftest.$ac_ext
8032 done
8033else
8034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008035sed 's/^/| /' conftest.$ac_ext >&5
8036
Martin v. Löwis11437992002-04-12 09:54:03 +00008037ac_lo= ac_hi=
8038fi
8039rm -f conftest.$ac_objext conftest.$ac_ext
8040fi
8041rm -f conftest.$ac_objext conftest.$ac_ext
8042# Binary search between lo and hi bounds.
8043while test "x$ac_lo" != "x$ac_hi"; do
8044 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8045 cat >conftest.$ac_ext <<_ACEOF
8046#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008047/* confdefs.h. */
8048_ACEOF
8049cat confdefs.h >>conftest.$ac_ext
8050cat >>conftest.$ac_ext <<_ACEOF
8051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008052$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008053int
8054main ()
8055{
8056static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8057test_array [0] = 0
8058
8059 ;
8060 return 0;
8061}
8062_ACEOF
8063rm -f conftest.$ac_objext
8064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8065 (eval $ac_compile) 2>&5
8066 ac_status=$?
8067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8068 (exit $ac_status); } &&
8069 { ac_try='test -s conftest.$ac_objext'
8070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8071 (eval $ac_try) 2>&5
8072 ac_status=$?
8073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8074 (exit $ac_status); }; }; then
8075 ac_hi=$ac_mid
8076else
8077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008078sed 's/^/| /' conftest.$ac_ext >&5
8079
Martin v. Löwis11437992002-04-12 09:54:03 +00008080ac_lo=`expr '(' $ac_mid ')' + 1`
8081fi
8082rm -f conftest.$ac_objext conftest.$ac_ext
8083done
8084case $ac_lo in
8085?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008086'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8087See \`config.log' for more details." >&5
8088echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8089See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008090 { (exit 1); exit 1; }; } ;;
8091esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008092else
8093 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008094 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8095See \`config.log' for more details." >&5
8096echo "$as_me: error: cannot run test program while cross compiling
8097See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008099else
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 cat >conftest.$ac_ext <<_ACEOF
8101#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008102/* confdefs.h. */
8103_ACEOF
8104cat confdefs.h >>conftest.$ac_ext
8105cat >>conftest.$ac_ext <<_ACEOF
8106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008107$ac_includes_default
8108long longval () { return (long) (sizeof (fpos_t)); }
8109unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008110#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008111#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008112int
8113main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008114{
Martin v. Löwis11437992002-04-12 09:54:03 +00008115
8116 FILE *f = fopen ("conftest.val", "w");
8117 if (! f)
8118 exit (1);
8119 if (((long) (sizeof (fpos_t))) < 0)
8120 {
8121 long i = longval ();
8122 if (i != ((long) (sizeof (fpos_t))))
8123 exit (1);
8124 fprintf (f, "%ld\n", i);
8125 }
8126 else
8127 {
8128 unsigned long i = ulongval ();
8129 if (i != ((long) (sizeof (fpos_t))))
8130 exit (1);
8131 fprintf (f, "%lu\n", i);
8132 }
8133 exit (ferror (f) || fclose (f) != 0);
8134
8135 ;
8136 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008137}
Martin v. Löwis11437992002-04-12 09:54:03 +00008138_ACEOF
8139rm -f conftest$ac_exeext
8140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8141 (eval $ac_link) 2>&5
8142 ac_status=$?
8143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8144 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8146 (eval $ac_try) 2>&5
8147 ac_status=$?
8148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149 (exit $ac_status); }; }; then
8150 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008151else
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 echo "$as_me: program exited with status $ac_status" >&5
8153echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008154sed 's/^/| /' conftest.$ac_ext >&5
8155
Martin v. Löwis11437992002-04-12 09:54:03 +00008156( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008157{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8158See \`config.log' for more details." >&5
8159echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8160See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 { (exit 1); exit 1; }; }
8162fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008163rm -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 +00008164fi
8165fi
8166rm -f conftest.val
8167else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008168 ac_cv_sizeof_fpos_t=0
8169fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008170fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008171echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8172echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8173cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008174#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008175_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008176
Michael W. Hudson54241132001-12-07 15:38:26 +00008177
8178
Martin v. Löwis11437992002-04-12 09:54:03 +00008179echo "$as_me:$LINENO: checking for long long support" >&5
8180echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008181have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008182cat >conftest.$ac_ext <<_ACEOF
8183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008184/* confdefs.h. */
8185_ACEOF
8186cat confdefs.h >>conftest.$ac_ext
8187cat >>conftest.$ac_ext <<_ACEOF
8188/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008189
Martin v. Löwis11437992002-04-12 09:54:03 +00008190int
8191main ()
8192{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008193long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 ;
8195 return 0;
8196}
8197_ACEOF
8198rm -f conftest.$ac_objext
8199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8200 (eval $ac_compile) 2>&5
8201 ac_status=$?
8202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8203 (exit $ac_status); } &&
8204 { ac_try='test -s conftest.$ac_objext'
8205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8206 (eval $ac_try) 2>&5
8207 ac_status=$?
8208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8209 (exit $ac_status); }; }; then
8210
8211
8212cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008213#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008214_ACEOF
8215
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008216 have_long_long=yes
8217
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008218else
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008220sed 's/^/| /' conftest.$ac_ext >&5
8221
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008222fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008223rm -f conftest.$ac_objext conftest.$ac_ext
8224echo "$as_me:$LINENO: result: $have_long_long" >&5
8225echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008226if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008227echo "$as_me:$LINENO: checking for long long" >&5
8228echo $ECHO_N "checking for long long... $ECHO_C" >&6
8229if test "${ac_cv_type_long_long+set}" = set; then
8230 echo $ECHO_N "(cached) $ECHO_C" >&6
8231else
8232 cat >conftest.$ac_ext <<_ACEOF
8233#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008234/* confdefs.h. */
8235_ACEOF
8236cat confdefs.h >>conftest.$ac_ext
8237cat >>conftest.$ac_ext <<_ACEOF
8238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008239$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008240int
8241main ()
8242{
8243if ((long long *) 0)
8244 return 0;
8245if (sizeof (long long))
8246 return 0;
8247 ;
8248 return 0;
8249}
8250_ACEOF
8251rm -f conftest.$ac_objext
8252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8253 (eval $ac_compile) 2>&5
8254 ac_status=$?
8255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8256 (exit $ac_status); } &&
8257 { ac_try='test -s conftest.$ac_objext'
8258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8259 (eval $ac_try) 2>&5
8260 ac_status=$?
8261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262 (exit $ac_status); }; }; then
8263 ac_cv_type_long_long=yes
8264else
8265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008266sed 's/^/| /' conftest.$ac_ext >&5
8267
Martin v. Löwis11437992002-04-12 09:54:03 +00008268ac_cv_type_long_long=no
8269fi
8270rm -f conftest.$ac_objext conftest.$ac_ext
8271fi
8272echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8273echo "${ECHO_T}$ac_cv_type_long_long" >&6
8274
8275echo "$as_me:$LINENO: checking size of long long" >&5
8276echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8277if test "${ac_cv_sizeof_long_long+set}" = set; then
8278 echo $ECHO_N "(cached) $ECHO_C" >&6
8279else
8280 if test "$ac_cv_type_long_long" = yes; then
8281 # The cast to unsigned long works around a bug in the HP C Compiler
8282 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8283 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8284 # This bug is HP SR number 8606223364.
8285 if test "$cross_compiling" = yes; then
8286 # Depending upon the size, compute the lo and hi bounds.
8287cat >conftest.$ac_ext <<_ACEOF
8288#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008289/* confdefs.h. */
8290_ACEOF
8291cat confdefs.h >>conftest.$ac_ext
8292cat >>conftest.$ac_ext <<_ACEOF
8293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008294$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008295int
8296main ()
8297{
8298static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8299test_array [0] = 0
8300
8301 ;
8302 return 0;
8303}
8304_ACEOF
8305rm -f conftest.$ac_objext
8306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8307 (eval $ac_compile) 2>&5
8308 ac_status=$?
8309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8310 (exit $ac_status); } &&
8311 { ac_try='test -s conftest.$ac_objext'
8312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8313 (eval $ac_try) 2>&5
8314 ac_status=$?
8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8316 (exit $ac_status); }; }; then
8317 ac_lo=0 ac_mid=0
8318 while :; do
8319 cat >conftest.$ac_ext <<_ACEOF
8320#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008321/* confdefs.h. */
8322_ACEOF
8323cat confdefs.h >>conftest.$ac_ext
8324cat >>conftest.$ac_ext <<_ACEOF
8325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008326$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008327int
8328main ()
8329{
8330static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8331test_array [0] = 0
8332
8333 ;
8334 return 0;
8335}
8336_ACEOF
8337rm -f conftest.$ac_objext
8338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8339 (eval $ac_compile) 2>&5
8340 ac_status=$?
8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342 (exit $ac_status); } &&
8343 { ac_try='test -s conftest.$ac_objext'
8344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8345 (eval $ac_try) 2>&5
8346 ac_status=$?
8347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8348 (exit $ac_status); }; }; then
8349 ac_hi=$ac_mid; break
8350else
8351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008352sed 's/^/| /' conftest.$ac_ext >&5
8353
Martin v. Löwis11437992002-04-12 09:54:03 +00008354ac_lo=`expr $ac_mid + 1`
8355 if test $ac_lo -le $ac_mid; then
8356 ac_lo= ac_hi=
8357 break
8358 fi
8359 ac_mid=`expr 2 '*' $ac_mid + 1`
8360fi
8361rm -f conftest.$ac_objext conftest.$ac_ext
8362 done
8363else
8364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008365sed 's/^/| /' conftest.$ac_ext >&5
8366
Martin v. Löwis11437992002-04-12 09:54:03 +00008367cat >conftest.$ac_ext <<_ACEOF
8368#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008369/* confdefs.h. */
8370_ACEOF
8371cat confdefs.h >>conftest.$ac_ext
8372cat >>conftest.$ac_ext <<_ACEOF
8373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008374$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008375int
8376main ()
8377{
8378static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8379test_array [0] = 0
8380
8381 ;
8382 return 0;
8383}
8384_ACEOF
8385rm -f conftest.$ac_objext
8386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8387 (eval $ac_compile) 2>&5
8388 ac_status=$?
8389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8390 (exit $ac_status); } &&
8391 { ac_try='test -s conftest.$ac_objext'
8392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8393 (eval $ac_try) 2>&5
8394 ac_status=$?
8395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8396 (exit $ac_status); }; }; then
8397 ac_hi=-1 ac_mid=-1
8398 while :; do
8399 cat >conftest.$ac_ext <<_ACEOF
8400#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008401/* confdefs.h. */
8402_ACEOF
8403cat confdefs.h >>conftest.$ac_ext
8404cat >>conftest.$ac_ext <<_ACEOF
8405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008406$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008407int
8408main ()
8409{
8410static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8411test_array [0] = 0
8412
8413 ;
8414 return 0;
8415}
8416_ACEOF
8417rm -f conftest.$ac_objext
8418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8419 (eval $ac_compile) 2>&5
8420 ac_status=$?
8421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8422 (exit $ac_status); } &&
8423 { ac_try='test -s conftest.$ac_objext'
8424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8425 (eval $ac_try) 2>&5
8426 ac_status=$?
8427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8428 (exit $ac_status); }; }; then
8429 ac_lo=$ac_mid; break
8430else
8431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008432sed 's/^/| /' conftest.$ac_ext >&5
8433
Martin v. Löwis11437992002-04-12 09:54:03 +00008434ac_hi=`expr '(' $ac_mid ')' - 1`
8435 if test $ac_mid -le $ac_hi; then
8436 ac_lo= ac_hi=
8437 break
8438 fi
8439 ac_mid=`expr 2 '*' $ac_mid`
8440fi
8441rm -f conftest.$ac_objext conftest.$ac_ext
8442 done
8443else
8444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008445sed 's/^/| /' conftest.$ac_ext >&5
8446
Martin v. Löwis11437992002-04-12 09:54:03 +00008447ac_lo= ac_hi=
8448fi
8449rm -f conftest.$ac_objext conftest.$ac_ext
8450fi
8451rm -f conftest.$ac_objext conftest.$ac_ext
8452# Binary search between lo and hi bounds.
8453while test "x$ac_lo" != "x$ac_hi"; do
8454 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8455 cat >conftest.$ac_ext <<_ACEOF
8456#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* confdefs.h. */
8458_ACEOF
8459cat confdefs.h >>conftest.$ac_ext
8460cat >>conftest.$ac_ext <<_ACEOF
8461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008463int
8464main ()
8465{
8466static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8467test_array [0] = 0
8468
8469 ;
8470 return 0;
8471}
8472_ACEOF
8473rm -f conftest.$ac_objext
8474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8475 (eval $ac_compile) 2>&5
8476 ac_status=$?
8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478 (exit $ac_status); } &&
8479 { ac_try='test -s conftest.$ac_objext'
8480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8481 (eval $ac_try) 2>&5
8482 ac_status=$?
8483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8484 (exit $ac_status); }; }; then
8485 ac_hi=$ac_mid
8486else
8487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008488sed 's/^/| /' conftest.$ac_ext >&5
8489
Martin v. Löwis11437992002-04-12 09:54:03 +00008490ac_lo=`expr '(' $ac_mid ')' + 1`
8491fi
8492rm -f conftest.$ac_objext conftest.$ac_ext
8493done
8494case $ac_lo in
8495?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008496'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8497See \`config.log' for more details." >&5
8498echo "$as_me: error: cannot compute sizeof (long long), 77
8499See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 { (exit 1); exit 1; }; } ;;
8501esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008502else
8503 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008504 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8505See \`config.log' for more details." >&5
8506echo "$as_me: error: cannot run test program while cross compiling
8507See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008509else
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 cat >conftest.$ac_ext <<_ACEOF
8511#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008512/* confdefs.h. */
8513_ACEOF
8514cat confdefs.h >>conftest.$ac_ext
8515cat >>conftest.$ac_ext <<_ACEOF
8516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008517$ac_includes_default
8518long longval () { return (long) (sizeof (long long)); }
8519unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008520#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008521#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008522int
8523main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008524{
Martin v. Löwis11437992002-04-12 09:54:03 +00008525
8526 FILE *f = fopen ("conftest.val", "w");
8527 if (! f)
8528 exit (1);
8529 if (((long) (sizeof (long long))) < 0)
8530 {
8531 long i = longval ();
8532 if (i != ((long) (sizeof (long long))))
8533 exit (1);
8534 fprintf (f, "%ld\n", i);
8535 }
8536 else
8537 {
8538 unsigned long i = ulongval ();
8539 if (i != ((long) (sizeof (long long))))
8540 exit (1);
8541 fprintf (f, "%lu\n", i);
8542 }
8543 exit (ferror (f) || fclose (f) != 0);
8544
8545 ;
8546 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008547}
Martin v. Löwis11437992002-04-12 09:54:03 +00008548_ACEOF
8549rm -f conftest$ac_exeext
8550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8551 (eval $ac_link) 2>&5
8552 ac_status=$?
8553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8554 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8556 (eval $ac_try) 2>&5
8557 ac_status=$?
8558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8559 (exit $ac_status); }; }; then
8560 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008561else
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 echo "$as_me: program exited with status $ac_status" >&5
8563echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008564sed 's/^/| /' conftest.$ac_ext >&5
8565
Martin v. Löwis11437992002-04-12 09:54:03 +00008566( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008567{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8568See \`config.log' for more details." >&5
8569echo "$as_me: error: cannot compute sizeof (long long), 77
8570See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 { (exit 1); exit 1; }; }
8572fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008573rm -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 +00008574fi
8575fi
8576rm -f conftest.val
8577else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008578 ac_cv_sizeof_long_long=0
8579fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008581echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8582echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8583cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008584#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008585_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008586
Michael W. Hudson54241132001-12-07 15:38:26 +00008587
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008588fi
8589
Martin v. Löwis11437992002-04-12 09:54:03 +00008590echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8591echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008592have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008593cat >conftest.$ac_ext <<_ACEOF
8594#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008595/* confdefs.h. */
8596_ACEOF
8597cat confdefs.h >>conftest.$ac_ext
8598cat >>conftest.$ac_ext <<_ACEOF
8599/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008600
Martin v. Löwis11437992002-04-12 09:54:03 +00008601int
8602main ()
8603{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008604uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008605 ;
8606 return 0;
8607}
8608_ACEOF
8609rm -f conftest.$ac_objext
8610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8611 (eval $ac_compile) 2>&5
8612 ac_status=$?
8613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8614 (exit $ac_status); } &&
8615 { ac_try='test -s conftest.$ac_objext'
8616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8617 (eval $ac_try) 2>&5
8618 ac_status=$?
8619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8620 (exit $ac_status); }; }; then
8621
8622
8623cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008624#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008625_ACEOF
8626
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008627 have_uintptr_t=yes
8628
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008629else
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008631sed 's/^/| /' conftest.$ac_ext >&5
8632
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008633fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008634rm -f conftest.$ac_objext conftest.$ac_ext
8635echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8636echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008637if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008638echo "$as_me:$LINENO: checking for uintptr_t" >&5
8639echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8640if test "${ac_cv_type_uintptr_t+set}" = set; then
8641 echo $ECHO_N "(cached) $ECHO_C" >&6
8642else
8643 cat >conftest.$ac_ext <<_ACEOF
8644#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008645/* confdefs.h. */
8646_ACEOF
8647cat confdefs.h >>conftest.$ac_ext
8648cat >>conftest.$ac_ext <<_ACEOF
8649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008650$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008651int
8652main ()
8653{
8654if ((uintptr_t *) 0)
8655 return 0;
8656if (sizeof (uintptr_t))
8657 return 0;
8658 ;
8659 return 0;
8660}
8661_ACEOF
8662rm -f conftest.$ac_objext
8663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8664 (eval $ac_compile) 2>&5
8665 ac_status=$?
8666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667 (exit $ac_status); } &&
8668 { ac_try='test -s conftest.$ac_objext'
8669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8670 (eval $ac_try) 2>&5
8671 ac_status=$?
8672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8673 (exit $ac_status); }; }; then
8674 ac_cv_type_uintptr_t=yes
8675else
8676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008677sed 's/^/| /' conftest.$ac_ext >&5
8678
Martin v. Löwis11437992002-04-12 09:54:03 +00008679ac_cv_type_uintptr_t=no
8680fi
8681rm -f conftest.$ac_objext conftest.$ac_ext
8682fi
8683echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8684echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8685
8686echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8687echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8688if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8689 echo $ECHO_N "(cached) $ECHO_C" >&6
8690else
8691 if test "$ac_cv_type_uintptr_t" = yes; then
8692 # The cast to unsigned long works around a bug in the HP C Compiler
8693 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8694 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8695 # This bug is HP SR number 8606223364.
8696 if test "$cross_compiling" = yes; then
8697 # Depending upon the size, compute the lo and hi bounds.
8698cat >conftest.$ac_ext <<_ACEOF
8699#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008700/* confdefs.h. */
8701_ACEOF
8702cat confdefs.h >>conftest.$ac_ext
8703cat >>conftest.$ac_ext <<_ACEOF
8704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008705$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008706int
8707main ()
8708{
8709static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8710test_array [0] = 0
8711
8712 ;
8713 return 0;
8714}
8715_ACEOF
8716rm -f conftest.$ac_objext
8717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8718 (eval $ac_compile) 2>&5
8719 ac_status=$?
8720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8721 (exit $ac_status); } &&
8722 { ac_try='test -s conftest.$ac_objext'
8723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8724 (eval $ac_try) 2>&5
8725 ac_status=$?
8726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8727 (exit $ac_status); }; }; then
8728 ac_lo=0 ac_mid=0
8729 while :; do
8730 cat >conftest.$ac_ext <<_ACEOF
8731#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008732/* confdefs.h. */
8733_ACEOF
8734cat confdefs.h >>conftest.$ac_ext
8735cat >>conftest.$ac_ext <<_ACEOF
8736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
8741static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8742test_array [0] = 0
8743
8744 ;
8745 return 0;
8746}
8747_ACEOF
8748rm -f conftest.$ac_objext
8749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8750 (eval $ac_compile) 2>&5
8751 ac_status=$?
8752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8753 (exit $ac_status); } &&
8754 { ac_try='test -s conftest.$ac_objext'
8755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8756 (eval $ac_try) 2>&5
8757 ac_status=$?
8758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8759 (exit $ac_status); }; }; then
8760 ac_hi=$ac_mid; break
8761else
8762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008763sed 's/^/| /' conftest.$ac_ext >&5
8764
Martin v. Löwis11437992002-04-12 09:54:03 +00008765ac_lo=`expr $ac_mid + 1`
8766 if test $ac_lo -le $ac_mid; then
8767 ac_lo= ac_hi=
8768 break
8769 fi
8770 ac_mid=`expr 2 '*' $ac_mid + 1`
8771fi
8772rm -f conftest.$ac_objext conftest.$ac_ext
8773 done
8774else
8775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008776sed 's/^/| /' conftest.$ac_ext >&5
8777
Martin v. Löwis11437992002-04-12 09:54:03 +00008778cat >conftest.$ac_ext <<_ACEOF
8779#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008780/* confdefs.h. */
8781_ACEOF
8782cat confdefs.h >>conftest.$ac_ext
8783cat >>conftest.$ac_ext <<_ACEOF
8784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008785$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008786int
8787main ()
8788{
8789static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8790test_array [0] = 0
8791
8792 ;
8793 return 0;
8794}
8795_ACEOF
8796rm -f conftest.$ac_objext
8797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8798 (eval $ac_compile) 2>&5
8799 ac_status=$?
8800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8801 (exit $ac_status); } &&
8802 { ac_try='test -s conftest.$ac_objext'
8803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8804 (eval $ac_try) 2>&5
8805 ac_status=$?
8806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8807 (exit $ac_status); }; }; then
8808 ac_hi=-1 ac_mid=-1
8809 while :; do
8810 cat >conftest.$ac_ext <<_ACEOF
8811#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008812/* confdefs.h. */
8813_ACEOF
8814cat confdefs.h >>conftest.$ac_ext
8815cat >>conftest.$ac_ext <<_ACEOF
8816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008817$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008818int
8819main ()
8820{
8821static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8822test_array [0] = 0
8823
8824 ;
8825 return 0;
8826}
8827_ACEOF
8828rm -f conftest.$ac_objext
8829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8830 (eval $ac_compile) 2>&5
8831 ac_status=$?
8832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8833 (exit $ac_status); } &&
8834 { ac_try='test -s conftest.$ac_objext'
8835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8836 (eval $ac_try) 2>&5
8837 ac_status=$?
8838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8839 (exit $ac_status); }; }; then
8840 ac_lo=$ac_mid; break
8841else
8842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008843sed 's/^/| /' conftest.$ac_ext >&5
8844
Martin v. Löwis11437992002-04-12 09:54:03 +00008845ac_hi=`expr '(' $ac_mid ')' - 1`
8846 if test $ac_mid -le $ac_hi; then
8847 ac_lo= ac_hi=
8848 break
8849 fi
8850 ac_mid=`expr 2 '*' $ac_mid`
8851fi
8852rm -f conftest.$ac_objext conftest.$ac_ext
8853 done
8854else
8855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008856sed 's/^/| /' conftest.$ac_ext >&5
8857
Martin v. Löwis11437992002-04-12 09:54:03 +00008858ac_lo= ac_hi=
8859fi
8860rm -f conftest.$ac_objext conftest.$ac_ext
8861fi
8862rm -f conftest.$ac_objext conftest.$ac_ext
8863# Binary search between lo and hi bounds.
8864while test "x$ac_lo" != "x$ac_hi"; do
8865 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8866 cat >conftest.$ac_ext <<_ACEOF
8867#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008868/* confdefs.h. */
8869_ACEOF
8870cat confdefs.h >>conftest.$ac_ext
8871cat >>conftest.$ac_ext <<_ACEOF
8872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008873$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008874int
8875main ()
8876{
8877static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8878test_array [0] = 0
8879
8880 ;
8881 return 0;
8882}
8883_ACEOF
8884rm -f conftest.$ac_objext
8885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8886 (eval $ac_compile) 2>&5
8887 ac_status=$?
8888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8889 (exit $ac_status); } &&
8890 { ac_try='test -s conftest.$ac_objext'
8891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8892 (eval $ac_try) 2>&5
8893 ac_status=$?
8894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8895 (exit $ac_status); }; }; then
8896 ac_hi=$ac_mid
8897else
8898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008899sed 's/^/| /' conftest.$ac_ext >&5
8900
Martin v. Löwis11437992002-04-12 09:54:03 +00008901ac_lo=`expr '(' $ac_mid ')' + 1`
8902fi
8903rm -f conftest.$ac_objext conftest.$ac_ext
8904done
8905case $ac_lo in
8906?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008907'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8908See \`config.log' for more details." >&5
8909echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8910See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 { (exit 1); exit 1; }; } ;;
8912esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008913else
8914 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008915 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8916See \`config.log' for more details." >&5
8917echo "$as_me: error: cannot run test program while cross compiling
8918See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008920else
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 cat >conftest.$ac_ext <<_ACEOF
8922#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008923/* confdefs.h. */
8924_ACEOF
8925cat confdefs.h >>conftest.$ac_ext
8926cat >>conftest.$ac_ext <<_ACEOF
8927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008928$ac_includes_default
8929long longval () { return (long) (sizeof (uintptr_t)); }
8930unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008931#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008932#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008933int
8934main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008935{
Martin v. Löwis11437992002-04-12 09:54:03 +00008936
8937 FILE *f = fopen ("conftest.val", "w");
8938 if (! f)
8939 exit (1);
8940 if (((long) (sizeof (uintptr_t))) < 0)
8941 {
8942 long i = longval ();
8943 if (i != ((long) (sizeof (uintptr_t))))
8944 exit (1);
8945 fprintf (f, "%ld\n", i);
8946 }
8947 else
8948 {
8949 unsigned long i = ulongval ();
8950 if (i != ((long) (sizeof (uintptr_t))))
8951 exit (1);
8952 fprintf (f, "%lu\n", i);
8953 }
8954 exit (ferror (f) || fclose (f) != 0);
8955
8956 ;
8957 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008958}
Martin v. Löwis11437992002-04-12 09:54:03 +00008959_ACEOF
8960rm -f conftest$ac_exeext
8961if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8962 (eval $ac_link) 2>&5
8963 ac_status=$?
8964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8965 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8967 (eval $ac_try) 2>&5
8968 ac_status=$?
8969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8970 (exit $ac_status); }; }; then
8971 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008972else
Martin v. Löwis11437992002-04-12 09:54:03 +00008973 echo "$as_me: program exited with status $ac_status" >&5
8974echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008975sed 's/^/| /' conftest.$ac_ext >&5
8976
Martin v. Löwis11437992002-04-12 09:54:03 +00008977( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008978{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8979See \`config.log' for more details." >&5
8980echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8981See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 { (exit 1); exit 1; }; }
8983fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008984rm -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 +00008985fi
8986fi
8987rm -f conftest.val
8988else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008989 ac_cv_sizeof_uintptr_t=0
8990fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008991fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008992echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8993echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8994cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008995#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008996_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008997
Michael W. Hudson54241132001-12-07 15:38:26 +00008998
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008999fi
9000
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009001# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009002echo "$as_me:$LINENO: checking size of off_t" >&5
9003echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9004if test "${ac_cv_sizeof_off_t+set}" = set; then
9005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009006else
9007 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009008 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009009else
Martin v. Löwis11437992002-04-12 09:54:03 +00009010 cat >conftest.$ac_ext <<_ACEOF
9011#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* confdefs.h. */
9013_ACEOF
9014cat confdefs.h >>conftest.$ac_ext
9015cat >>conftest.$ac_ext <<_ACEOF
9016/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009017#include <stdio.h>
9018#include <sys/types.h>
9019main()
9020{
9021 FILE *f=fopen("conftestval", "w");
9022 if (!f) exit(1);
9023 fprintf(f, "%d\n", sizeof(off_t));
9024 exit(0);
9025}
Martin v. Löwis11437992002-04-12 09:54:03 +00009026_ACEOF
9027rm -f conftest$ac_exeext
9028if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9029 (eval $ac_link) 2>&5
9030 ac_status=$?
9031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9034 (eval $ac_try) 2>&5
9035 ac_status=$?
9036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9037 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009038 ac_cv_sizeof_off_t=`cat conftestval`
9039else
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 echo "$as_me: program exited with status $ac_status" >&5
9041echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009042sed 's/^/| /' conftest.$ac_ext >&5
9043
Martin v. Löwis11437992002-04-12 09:54:03 +00009044( exit $ac_status )
9045ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009046fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009047rm -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 +00009048fi
9049
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009050fi
9051
Martin v. Löwis11437992002-04-12 09:54:03 +00009052echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9053echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9054
9055cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009056#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009057_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009058
Michael W. Hudson54241132001-12-07 15:38:26 +00009059
Martin v. Löwis11437992002-04-12 09:54:03 +00009060echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9061echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009062if test "$have_long_long" = yes -a \
9063 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9064 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009065
Martin v. Löwis11437992002-04-12 09:54:03 +00009066cat >>confdefs.h <<\_ACEOF
9067#define HAVE_LARGEFILE_SUPPORT 1
9068_ACEOF
9069
9070 echo "$as_me:$LINENO: result: yes" >&5
9071echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009072else
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 echo "$as_me:$LINENO: result: no" >&5
9074echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009075fi
9076
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009077# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009078echo "$as_me:$LINENO: checking size of time_t" >&5
9079echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9080if test "${ac_cv_sizeof_time_t+set}" = set; then
9081 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009082else
9083 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009084 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009085else
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 cat >conftest.$ac_ext <<_ACEOF
9087#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009088/* confdefs.h. */
9089_ACEOF
9090cat confdefs.h >>conftest.$ac_ext
9091cat >>conftest.$ac_ext <<_ACEOF
9092/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009093#include <stdio.h>
9094#include <time.h>
9095main()
9096{
9097 FILE *f=fopen("conftestval", "w");
9098 if (!f) exit(1);
9099 fprintf(f, "%d\n", sizeof(time_t));
9100 exit(0);
9101}
Martin v. Löwis11437992002-04-12 09:54:03 +00009102_ACEOF
9103rm -f conftest$ac_exeext
9104if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9105 (eval $ac_link) 2>&5
9106 ac_status=$?
9107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9110 (eval $ac_try) 2>&5
9111 ac_status=$?
9112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9113 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009114 ac_cv_sizeof_time_t=`cat conftestval`
9115else
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 echo "$as_me: program exited with status $ac_status" >&5
9117echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009118sed 's/^/| /' conftest.$ac_ext >&5
9119
Martin v. Löwis11437992002-04-12 09:54:03 +00009120( exit $ac_status )
9121ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009122fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009123rm -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 +00009124fi
9125
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009126fi
9127
Martin v. Löwis11437992002-04-12 09:54:03 +00009128echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9129echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9130
9131cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009132#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009133_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009134
Michael W. Hudson54241132001-12-07 15:38:26 +00009135
9136
Trent Mick635f6fb2000-08-23 21:33:05 +00009137# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009138ac_save_cc="$CC"
9139if test "$ac_cv_kpthread" = "yes"
9140then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009141elif test "$ac_cv_kthread" = "yes"
9142then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009143elif test "$ac_cv_pthread" = "yes"
9144then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009145fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009146echo "$as_me:$LINENO: checking for pthread_t" >&5
9147echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009148have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009149cat >conftest.$ac_ext <<_ACEOF
9150#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009151/* confdefs.h. */
9152_ACEOF
9153cat confdefs.h >>conftest.$ac_ext
9154cat >>conftest.$ac_ext <<_ACEOF
9155/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009156#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009157int
9158main ()
9159{
Guido van Rossum12580492000-09-24 16:47:19 +00009160pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 ;
9162 return 0;
9163}
9164_ACEOF
9165rm -f conftest.$ac_objext
9166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9167 (eval $ac_compile) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); } &&
9171 { ac_try='test -s conftest.$ac_objext'
9172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9173 (eval $ac_try) 2>&5
9174 ac_status=$?
9175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009177 have_pthread_t=yes
9178else
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009180sed 's/^/| /' conftest.$ac_ext >&5
9181
Trent Mick635f6fb2000-08-23 21:33:05 +00009182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009183rm -f conftest.$ac_objext conftest.$ac_ext
9184echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9185echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009186if test "$have_pthread_t" = yes ; then
9187 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009188 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9189echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9190 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9191 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009192else
9193 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009194 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009195else
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 cat >conftest.$ac_ext <<_ACEOF
9197#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009198/* confdefs.h. */
9199_ACEOF
9200cat confdefs.h >>conftest.$ac_ext
9201cat >>conftest.$ac_ext <<_ACEOF
9202/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009203#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009204#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009205 main()
9206 {
9207 FILE *f=fopen("conftestval", "w");
9208 if (!f) exit(1);
9209 fprintf(f, "%d\n", sizeof(pthread_t));
9210 exit(0);
9211 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009212_ACEOF
9213rm -f conftest$ac_exeext
9214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9215 (eval $ac_link) 2>&5
9216 ac_status=$?
9217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9220 (eval $ac_try) 2>&5
9221 ac_status=$?
9222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9223 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009224 ac_cv_sizeof_pthread_t=`cat conftestval`
9225else
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 echo "$as_me: program exited with status $ac_status" >&5
9227echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009228sed 's/^/| /' conftest.$ac_ext >&5
9229
Martin v. Löwis11437992002-04-12 09:54:03 +00009230( exit $ac_status )
9231ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009232fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009233rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009234fi
9235
Trent Mick635f6fb2000-08-23 21:33:05 +00009236fi
9237
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9239echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9240
9241cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009242#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009243_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009244
9245fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009246CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009247
Martin v. Löwis11437992002-04-12 09:54:03 +00009248echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9249echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009250# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9251if test "${enable_toolbox_glue+set}" = set; then
9252 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009253
Martin v. Löwis11437992002-04-12 09:54:03 +00009254fi;
Jack Jansene578a632001-08-15 01:27:14 +00009255
9256if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009257then
Jack Jansene578a632001-08-15 01:27:14 +00009258 case $ac_sys_system/$ac_sys_release in
9259 Darwin/*)
9260 enable_toolbox_glue="yes";;
9261 *)
9262 enable_toolbox_glue="no";;
9263 esac
9264fi
9265case "$enable_toolbox_glue" in
9266yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009267 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009268 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009269 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009270
9271cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009272#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009273_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009274
9275 ;;
9276*)
9277 extra_frameworks=""
9278 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009279 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009280 ;;
9281esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009282echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9283echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009284
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009285
9286case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009287 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009288 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009289 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009291 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009292 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009293 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009294 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009295 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009296 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009297esac
9298
Martin v. Löwis11437992002-04-12 09:54:03 +00009299echo "$as_me:$LINENO: checking for --enable-framework" >&5
9300echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009301if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009302then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009303 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009305 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009306
Martin v. Löwis11437992002-04-12 09:54:03 +00009307cat >>confdefs.h <<\_ACEOF
9308#define WITH_NEXT_FRAMEWORK 1
9309_ACEOF
9310
9311 echo "$as_me:$LINENO: result: yes" >&5
9312echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009313else
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 echo "$as_me:$LINENO: result: no" >&5
9315echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009316fi
9317
Martin v. Löwis11437992002-04-12 09:54:03 +00009318echo "$as_me:$LINENO: checking for dyld" >&5
9319echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009320case $ac_sys_system/$ac_sys_release in
9321 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009322
Martin v. Löwis11437992002-04-12 09:54:03 +00009323cat >>confdefs.h <<\_ACEOF
9324#define WITH_DYLD 1
9325_ACEOF
9326
9327 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9328echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009329 ;;
9330 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 echo "$as_me:$LINENO: result: no" >&5
9332echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009333 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009334esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009335
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009337
Michael W. Hudson54241132001-12-07 15:38:26 +00009338
9339
9340
9341
Guido van Rossum0a516c91994-09-12 10:58:40 +00009342# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009343# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009344echo "$as_me:$LINENO: checking SO" >&5
9345echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009346if test -z "$SO"
9347then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009348 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009349 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009350 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009351 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009352 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009353else
9354 # this might also be a termcap variable, see #610332
9355 echo
9356 echo '====================================================================='
9357 echo '+ +'
9358 echo '+ WARNING: You have set SO in your environment. +'
9359 echo '+ Do you really mean to change the extension for shared libraries? +'
9360 echo '+ Continuing in 10 seconds to let you to ponder. +'
9361 echo '+ +'
9362 echo '====================================================================='
9363 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009365echo "$as_me:$LINENO: result: $SO" >&5
9366echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009367# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009368# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009369# (Shared libraries in this instance are shared modules to be loaded into
9370# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009371echo "$as_me:$LINENO: checking LDSHARED" >&5
9372echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009373if test -z "$LDSHARED"
9374then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009375 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009376 AIX*)
9377 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009378 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009379 ;;
9380 BeOS*)
9381 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009382 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009383 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009384 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009385 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00009387 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009388 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009389 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +00009390 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009391 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009392 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009393 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009394 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9395 if test "$enable_framework" ; then
9396 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009397 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9398 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009399 else
9400 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009401 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009402 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009403 Darwin/*)
9404 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9405 if test "$enable_framework" ; then
9406 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009407 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9408 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009409 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009410 # No framework, use the Python app as bundle-loader
9411 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009412 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009413 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009414 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009415 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009416 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009417 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009418 then
9419 LDSHARED="cc -shared ${LDFLAGS}"
9420 else
9421 LDSHARED="ld -Bshareable ${LDFLAGS}"
9422 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009423 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009424 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009425 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009426 then LDSHARED='$(CC) -shared'
9427 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009428 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009429 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009430 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009431 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009432 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009433 *) LDSHARED="ld";;
9434 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009435fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009436echo "$as_me:$LINENO: result: $LDSHARED" >&5
9437echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009438BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009439# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009440# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009441echo "$as_me:$LINENO: checking CCSHARED" >&5
9442echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009443if test -z "$CCSHARED"
9444then
Guido van Rossum07397971997-04-29 21:49:50 +00009445 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009446 SunOS*) if test "$GCC" = yes;
9447 then CCSHARED="-fPIC";
9448 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009449 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009450 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009451 else CCSHARED="+z";
9452 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009453 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009454 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009455 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009456 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009457 if test "$GCC" = "yes"
9458 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009459 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009460 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009461 SCO_SV*)
9462 if test "$GCC" = "yes"
9463 then CCSHARED="-fPIC"
9464 else CCSHARED="-Kpic -belf"
9465 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009466 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009467 IRIX*/6*) case $CC in
9468 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009469 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009470 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009471 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009472 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009473fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009474echo "$as_me:$LINENO: result: $CCSHARED" >&5
9475echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009476# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009477# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009478echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9479echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009480if test -z "$LINKFORSHARED"
9481then
Guido van Rossum07397971997-04-29 21:49:50 +00009482 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009483 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009484 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009485 LINKFORSHARED="-Wl,-E -Wl,+s";;
9486# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009487 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009488 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009489 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009491 # -u __dummy makes the linker aware of the objc runtime
9492 # in System.framework; otherwise, __objcInit (referenced in
9493 # crt1.o) gets erroneously defined as common, which breaks dynamic
9494 # loading of any modules which reference it in System.framework.
9495 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9496 # not used by the core itself but which needs to be in the core so
9497 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009498 # -prebind is no longer used, because it actually seems to give a
9499 # slowdown in stead of a speedup, maybe due to the large number of
9500 # dynamic loads Python does.
9501 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009502 if test "$enable_framework"
9503 then
Jack Jansenc8607b72003-12-08 01:10:12 +00009504 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework Python"
Jack Jansene578a632001-08-15 01:27:14 +00009505 fi
9506 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009507 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009508 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009509 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009511 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9512 then
9513 LINKFORSHARED="-Wl,--export-dynamic"
9514 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009515 SunOS/5*) case $CC in
9516 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009517 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009518 then
9519 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009520 fi;;
9521 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009522 CYGWIN*)
9523 if test $enable_shared = "no"
9524 then
9525 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9526 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009527 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009528fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009529echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9530echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009531
Michael W. Hudson54241132001-12-07 15:38:26 +00009532
Martin v. Löwis11437992002-04-12 09:54:03 +00009533echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9534echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009535if test ! "$LIBRARY" = "$LDLIBRARY"
9536then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009537 case $ac_sys_system in
9538 CYGWIN*)
9539 # Cygwin needs CCSHARED when building extension DLLs
9540 # but not when building the interpreter DLL.
9541 CFLAGSFORSHARED='';;
9542 *)
9543 CFLAGSFORSHARED='$(CCSHARED)'
9544 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009546echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9547echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009548
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009549# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9550# library (with --enable-shared).
9551# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009552# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9553# if it is not required, since it creates a dependency of the shared library
9554# to LIBS. This, in turn, means that applications linking the shared libpython
9555# don't need to link LIBS explicitly. The default should be only changed
9556# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009557
9558echo "$as_me:$LINENO: checking SHLIBS" >&5
9559echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9560case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009561 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009562 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009563esac
9564echo "$as_me:$LINENO: result: $SHLIBS" >&5
9565echo "${ECHO_T}$SHLIBS" >&6
9566
9567
Guido van Rossum627b2d71993-12-24 10:39:16 +00009568# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009569
9570echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9571echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9572if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9573 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009574else
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009576LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009577cat >conftest.$ac_ext <<_ACEOF
9578#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009579/* confdefs.h. */
9580_ACEOF
9581cat confdefs.h >>conftest.$ac_ext
9582cat >>conftest.$ac_ext <<_ACEOF
9583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009584
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009585/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009586#ifdef __cplusplus
9587extern "C"
9588#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009589/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 builtin and then its argument prototype would still apply. */
9591char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009592int
9593main ()
9594{
9595dlopen ();
9596 ;
9597 return 0;
9598}
9599_ACEOF
9600rm -f conftest.$ac_objext conftest$ac_exeext
9601if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9602 (eval $ac_link) 2>&5
9603 ac_status=$?
9604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605 (exit $ac_status); } &&
9606 { ac_try='test -s conftest$ac_exeext'
9607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9608 (eval $ac_try) 2>&5
9609 ac_status=$?
9610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9611 (exit $ac_status); }; }; then
9612 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009613else
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009615sed 's/^/| /' conftest.$ac_ext >&5
9616
Martin v. Löwis11437992002-04-12 09:54:03 +00009617ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009618fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009619rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9620LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009621fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009622echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9623echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9624if test $ac_cv_lib_dl_dlopen = yes; then
9625 cat >>confdefs.h <<_ACEOF
9626#define HAVE_LIBDL 1
9627_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009628
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009629 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009630
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009631fi
9632 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009633
9634echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9635echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9636if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9637 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009638else
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009640LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009641cat >conftest.$ac_ext <<_ACEOF
9642#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009643/* confdefs.h. */
9644_ACEOF
9645cat confdefs.h >>conftest.$ac_ext
9646cat >>conftest.$ac_ext <<_ACEOF
9647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009648
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009649/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009650#ifdef __cplusplus
9651extern "C"
9652#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009653/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 builtin and then its argument prototype would still apply. */
9655char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009656int
9657main ()
9658{
9659shl_load ();
9660 ;
9661 return 0;
9662}
9663_ACEOF
9664rm -f conftest.$ac_objext conftest$ac_exeext
9665if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9666 (eval $ac_link) 2>&5
9667 ac_status=$?
9668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9669 (exit $ac_status); } &&
9670 { ac_try='test -s conftest$ac_exeext'
9671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9672 (eval $ac_try) 2>&5
9673 ac_status=$?
9674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9675 (exit $ac_status); }; }; then
9676 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009677else
Martin v. Löwis11437992002-04-12 09:54:03 +00009678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009679sed 's/^/| /' conftest.$ac_ext >&5
9680
Martin v. Löwis11437992002-04-12 09:54:03 +00009681ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009682fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009683rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9684LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009685fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009686echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9687echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9688if test $ac_cv_lib_dld_shl_load = yes; then
9689 cat >>confdefs.h <<_ACEOF
9690#define HAVE_LIBDLD 1
9691_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009692
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009693 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009694
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009695fi
9696 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009697
9698# only check for sem_ini if thread support is requested
9699if test "$with_threads" = "yes" -o -z "$with_threads"; then
9700 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009701echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9702if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009704else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009705 ac_func_search_save_LIBS=$LIBS
9706ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009707cat >conftest.$ac_ext <<_ACEOF
9708#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009709/* confdefs.h. */
9710_ACEOF
9711cat confdefs.h >>conftest.$ac_ext
9712cat >>conftest.$ac_ext <<_ACEOF
9713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009714
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009715/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009716#ifdef __cplusplus
9717extern "C"
9718#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009719/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 builtin and then its argument prototype would still apply. */
9721char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009722int
9723main ()
9724{
9725sem_init ();
9726 ;
9727 return 0;
9728}
9729_ACEOF
9730rm -f conftest.$ac_objext conftest$ac_exeext
9731if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9732 (eval $ac_link) 2>&5
9733 ac_status=$?
9734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9735 (exit $ac_status); } &&
9736 { ac_try='test -s conftest$ac_exeext'
9737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9738 (eval $ac_try) 2>&5
9739 ac_status=$?
9740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9741 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009742 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009743else
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009745sed 's/^/| /' conftest.$ac_ext >&5
9746
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009747fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009748rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009749if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009750 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009751 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9752 cat >conftest.$ac_ext <<_ACEOF
9753#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009754/* confdefs.h. */
9755_ACEOF
9756cat confdefs.h >>conftest.$ac_ext
9757cat >>conftest.$ac_ext <<_ACEOF
9758/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009759
9760/* Override any gcc2 internal prototype to avoid an error. */
9761#ifdef __cplusplus
9762extern "C"
9763#endif
9764/* We use char because int might match the return type of a gcc2
9765 builtin and then its argument prototype would still apply. */
9766char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009767int
9768main ()
9769{
9770sem_init ();
9771 ;
9772 return 0;
9773}
Martin v. Löwis11437992002-04-12 09:54:03 +00009774_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009775rm -f conftest.$ac_objext conftest$ac_exeext
9776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9777 (eval $ac_link) 2>&5
9778 ac_status=$?
9779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9780 (exit $ac_status); } &&
9781 { ac_try='test -s conftest$ac_exeext'
9782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9783 (eval $ac_try) 2>&5
9784 ac_status=$?
9785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9786 (exit $ac_status); }; }; then
9787 ac_cv_search_sem_init="-l$ac_lib"
9788break
9789else
9790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009791sed 's/^/| /' conftest.$ac_ext >&5
9792
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009793fi
9794rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9795 done
9796fi
9797LIBS=$ac_func_search_save_LIBS
9798fi
9799echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9800echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9801if test "$ac_cv_search_sem_init" != no; then
9802 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009803
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009804fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009805 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009806 # posix4 on Solaris 2.6
9807 # pthread (first!) on Linux
9808fi
9809
Martin v. Löwis19d17342003-06-14 21:03:05 +00009810# check if we need libintl for locale functions
9811echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9812echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9813if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9814 echo $ECHO_N "(cached) $ECHO_C" >&6
9815else
9816 ac_check_lib_save_LIBS=$LIBS
9817LIBS="-lintl $LIBS"
9818cat >conftest.$ac_ext <<_ACEOF
9819#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009820/* confdefs.h. */
9821_ACEOF
9822cat confdefs.h >>conftest.$ac_ext
9823cat >>conftest.$ac_ext <<_ACEOF
9824/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009825
9826/* Override any gcc2 internal prototype to avoid an error. */
9827#ifdef __cplusplus
9828extern "C"
9829#endif
9830/* We use char because int might match the return type of a gcc2
9831 builtin and then its argument prototype would still apply. */
9832char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009833int
9834main ()
9835{
9836textdomain ();
9837 ;
9838 return 0;
9839}
9840_ACEOF
9841rm -f conftest.$ac_objext conftest$ac_exeext
9842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9843 (eval $ac_link) 2>&5
9844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); } &&
9847 { ac_try='test -s conftest$ac_exeext'
9848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9849 (eval $ac_try) 2>&5
9850 ac_status=$?
9851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852 (exit $ac_status); }; }; then
9853 ac_cv_lib_intl_textdomain=yes
9854else
9855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009856sed 's/^/| /' conftest.$ac_ext >&5
9857
Martin v. Löwis19d17342003-06-14 21:03:05 +00009858ac_cv_lib_intl_textdomain=no
9859fi
9860rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9861LIBS=$ac_check_lib_save_LIBS
9862fi
9863echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9864echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9865if test $ac_cv_lib_intl_textdomain = yes; then
9866
9867cat >>confdefs.h <<\_ACEOF
9868#define WITH_LIBINTL 1
9869_ACEOF
9870
9871fi
9872
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009873
9874# checks for system dependent C++ extensions support
9875case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9877echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9878 cat >conftest.$ac_ext <<_ACEOF
9879#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009880/* confdefs.h. */
9881_ACEOF
9882cat confdefs.h >>conftest.$ac_ext
9883cat >>conftest.$ac_ext <<_ACEOF
9884/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009885#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009886int
9887main ()
9888{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009889loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 ;
9891 return 0;
9892}
9893_ACEOF
9894rm -f conftest.$ac_objext conftest$ac_exeext
9895if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9896 (eval $ac_link) 2>&5
9897 ac_status=$?
9898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9899 (exit $ac_status); } &&
9900 { ac_try='test -s conftest$ac_exeext'
9901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9902 (eval $ac_try) 2>&5
9903 ac_status=$?
9904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9905 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009906
Martin v. Löwis11437992002-04-12 09:54:03 +00009907cat >>confdefs.h <<\_ACEOF
9908#define AIX_GENUINE_CPLUSPLUS 1
9909_ACEOF
9910
9911 echo "$as_me:$LINENO: result: yes" >&5
9912echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009913else
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009915sed 's/^/| /' conftest.$ac_ext >&5
9916
Martin v. Löwis11437992002-04-12 09:54:03 +00009917echo "$as_me:$LINENO: result: no" >&5
9918echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009919fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009920rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009921 *) ;;
9922esac
9923
Guido van Rossum70c7f481998-03-26 18:44:10 +00009924# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009925# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +00009926echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9927echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9928if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9929 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009930else
Martin v. Löwis11437992002-04-12 09:54:03 +00009931 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009932LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009933cat >conftest.$ac_ext <<_ACEOF
9934#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009935/* confdefs.h. */
9936_ACEOF
9937cat confdefs.h >>conftest.$ac_ext
9938cat >>conftest.$ac_ext <<_ACEOF
9939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009940
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009941/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009942#ifdef __cplusplus
9943extern "C"
9944#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009945/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009946 builtin and then its argument prototype would still apply. */
9947char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009948int
9949main ()
9950{
9951t_open ();
9952 ;
9953 return 0;
9954}
9955_ACEOF
9956rm -f conftest.$ac_objext conftest$ac_exeext
9957if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9958 (eval $ac_link) 2>&5
9959 ac_status=$?
9960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9961 (exit $ac_status); } &&
9962 { ac_try='test -s conftest$ac_exeext'
9963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9964 (eval $ac_try) 2>&5
9965 ac_status=$?
9966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9967 (exit $ac_status); }; }; then
9968 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009969else
Martin v. Löwis11437992002-04-12 09:54:03 +00009970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009971sed 's/^/| /' conftest.$ac_ext >&5
9972
Martin v. Löwis11437992002-04-12 09:54:03 +00009973ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009974fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009975rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9976LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009977fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009978echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9979echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9980if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009981 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009982fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009983 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009984echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9985echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9986if test "${ac_cv_lib_socket_socket+set}" = set; then
9987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009988else
Martin v. Löwis11437992002-04-12 09:54:03 +00009989 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009990LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009991cat >conftest.$ac_ext <<_ACEOF
9992#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009993/* confdefs.h. */
9994_ACEOF
9995cat confdefs.h >>conftest.$ac_ext
9996cat >>conftest.$ac_ext <<_ACEOF
9997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009998
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009999/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010000#ifdef __cplusplus
10001extern "C"
10002#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010003/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010004 builtin and then its argument prototype would still apply. */
10005char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010006int
10007main ()
10008{
10009socket ();
10010 ;
10011 return 0;
10012}
10013_ACEOF
10014rm -f conftest.$ac_objext conftest$ac_exeext
10015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10016 (eval $ac_link) 2>&5
10017 ac_status=$?
10018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10019 (exit $ac_status); } &&
10020 { ac_try='test -s conftest$ac_exeext'
10021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10022 (eval $ac_try) 2>&5
10023 ac_status=$?
10024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10025 (exit $ac_status); }; }; then
10026 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010027else
Martin v. Löwis11437992002-04-12 09:54:03 +000010028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010029sed 's/^/| /' conftest.$ac_ext >&5
10030
Martin v. Löwis11437992002-04-12 09:54:03 +000010031ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010032fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010033rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10034LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010036echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10037echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10038if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010039 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010040fi
10041 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010042
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010043case "$ac_sys_system" in
10044BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010045echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10046echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10047if test "${ac_cv_lib_net_socket+set}" = set; then
10048 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010049else
Martin v. Löwis11437992002-04-12 09:54:03 +000010050 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010051LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010052cat >conftest.$ac_ext <<_ACEOF
10053#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010054/* confdefs.h. */
10055_ACEOF
10056cat confdefs.h >>conftest.$ac_ext
10057cat >>conftest.$ac_ext <<_ACEOF
10058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010059
Guido van Rossumad678af1998-10-02 14:42:15 +000010060/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010061#ifdef __cplusplus
10062extern "C"
10063#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010064/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010065 builtin and then its argument prototype would still apply. */
10066char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010067int
10068main ()
10069{
10070socket ();
10071 ;
10072 return 0;
10073}
10074_ACEOF
10075rm -f conftest.$ac_objext conftest$ac_exeext
10076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10077 (eval $ac_link) 2>&5
10078 ac_status=$?
10079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10080 (exit $ac_status); } &&
10081 { ac_try='test -s conftest$ac_exeext'
10082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10083 (eval $ac_try) 2>&5
10084 ac_status=$?
10085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10086 (exit $ac_status); }; }; then
10087 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010088else
Martin v. Löwis11437992002-04-12 09:54:03 +000010089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010090sed 's/^/| /' conftest.$ac_ext >&5
10091
Martin v. Löwis11437992002-04-12 09:54:03 +000010092ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010094rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10095LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010096fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010097echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10098echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10099if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010100 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010101fi
10102 # BeOS
10103;;
10104esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010105
Martin v. Löwis11437992002-04-12 09:54:03 +000010106echo "$as_me:$LINENO: checking for --with-libs" >&5
10107echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10108
Guido van Rossuma68acba1996-07-31 17:36:39 +000010109# Check whether --with-libs or --without-libs was given.
10110if test "${with_libs+set}" = set; then
10111 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010112
10113echo "$as_me:$LINENO: result: $withval" >&5
10114echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010115LIBS="$withval $LIBS"
10116
10117else
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 echo "$as_me:$LINENO: result: no" >&5
10119echo "${ECHO_T}no" >&6
10120fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010121
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010122# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010123
10124
Martin v. Löwis11437992002-04-12 09:54:03 +000010125echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10126echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10127
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010128# Check whether --with-signal-module or --without-signal-module was given.
10129if test "${with_signal_module+set}" = set; then
10130 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010131
Martin v. Löwis11437992002-04-12 09:54:03 +000010132fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010133
10134if test -z "$with_signal_module"
10135then with_signal_module="yes"
10136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010137echo "$as_me:$LINENO: result: $with_signal_module" >&5
10138echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010139
10140if test "${with_signal_module}" = "yes"; then
10141 USE_SIGNAL_MODULE=""
10142 SIGNAL_OBJS=""
10143else
10144 USE_SIGNAL_MODULE="#"
10145 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10146fi
10147
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010148# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010149
Barry Warsawc0d24d82000-06-29 16:12:00 +000010150USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010151
Martin v. Löwis11437992002-04-12 09:54:03 +000010152echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10153echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10154
Guido van Rossumec2f0731997-01-22 20:54:01 +000010155
10156# Check whether --with-dec-threads or --without-dec-threads was given.
10157if test "${with_dec_threads+set}" = set; then
10158 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010159
10160echo "$as_me:$LINENO: result: $withval" >&5
10161echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010162LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010163if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010164 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010165fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010166else
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 echo "$as_me:$LINENO: result: no" >&5
10168echo "${ECHO_T}no" >&6
10169fi;
10170
10171# Templates for things AC_DEFINEd more than once.
10172# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010173
10174
Martin v. Löwis11437992002-04-12 09:54:03 +000010175
10176
10177
10178
10179
10180echo "$as_me:$LINENO: checking for --with-threads" >&5
10181echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10182
Guido van Rossumec2f0731997-01-22 20:54:01 +000010183# Check whether --with-threads or --without-threads was given.
10184if test "${with_threads+set}" = set; then
10185 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010186
Martin v. Löwis11437992002-04-12 09:54:03 +000010187fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010188
Barry Warsawc0d24d82000-06-29 16:12:00 +000010189# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010190
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010191# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010192if test "${with_thread+set}" = set; then
10193 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010194 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010195fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000010196
10197if test -z "$with_threads"
10198then with_threads="yes"
10199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010200echo "$as_me:$LINENO: result: $with_threads" >&5
10201echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000010202
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010203
Barry Warsawc0d24d82000-06-29 16:12:00 +000010204if test "$with_threads" = "no"
10205then
10206 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010207elif test "$ac_cv_pthread_is_default" = yes
10208then
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010210#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010211_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010212
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010213 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010215#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010216_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010217
10218 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010219 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010220elif test "$ac_cv_kpthread" = "yes"
10221then
10222 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010223 if test "$ac_cv_cxx_thread" = "yes"; then
10224 CXX="$CXX -Kpthread"
10225 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010227#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010228_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010229
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010230 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010231 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010232elif test "$ac_cv_kthread" = "yes"
10233then
10234 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010235 if test "$ac_cv_cxx_thread" = "yes"; then
10236 CXX="$CXX -Kthread"
10237 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010238 cat >>confdefs.h <<\_ACEOF
10239#define WITH_THREAD 1
10240_ACEOF
10241
10242 posix_threads=yes
10243 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010244elif test "$ac_cv_pthread" = "yes"
10245then
10246 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010247 if test "$ac_cv_cxx_thread" = "yes"; then
10248 CXX="$CXX -pthread"
10249 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010250 cat >>confdefs.h <<\_ACEOF
10251#define WITH_THREAD 1
10252_ACEOF
10253
10254 posix_threads=yes
10255 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010256else
10257 if test ! -z "$with_threads" -a -d "$with_threads"
10258 then LDFLAGS="$LDFLAGS -L$with_threads"
10259 fi
10260 if test ! -z "$withval" -a -d "$withval"
10261 then LDFLAGS="$LDFLAGS -L$withval"
10262 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010263
10264 # According to the POSIX spec, a pthreads implementation must
10265 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10267echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10268 cat >conftest.$ac_ext <<_ACEOF
10269#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010270/* confdefs.h. */
10271_ACEOF
10272cat confdefs.h >>conftest.$ac_ext
10273cat >>conftest.$ac_ext <<_ACEOF
10274/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010275
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010276#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010277#ifdef _POSIX_THREADS
10278yes
10279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010280
10281_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010283 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010284 unistd_defines_pthreads=yes
10285else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010286 unistd_defines_pthreads=no
10287fi
10288rm -f conftest*
10289
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10291echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010292
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010294#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010295_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010296
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 if test "${ac_cv_header_cthreads_h+set}" = set; then
10298 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10299echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10300if test "${ac_cv_header_cthreads_h+set}" = set; then
10301 echo $ECHO_N "(cached) $ECHO_C" >&6
10302fi
10303echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10304echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010305else
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 # Is the header compilable?
10307echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10308echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10309cat >conftest.$ac_ext <<_ACEOF
10310#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010311/* confdefs.h. */
10312_ACEOF
10313cat confdefs.h >>conftest.$ac_ext
10314cat >>conftest.$ac_ext <<_ACEOF
10315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010316$ac_includes_default
10317#include <cthreads.h>
10318_ACEOF
10319rm -f conftest.$ac_objext
10320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10321 (eval $ac_compile) 2>&5
10322 ac_status=$?
10323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10324 (exit $ac_status); } &&
10325 { ac_try='test -s conftest.$ac_objext'
10326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10327 (eval $ac_try) 2>&5
10328 ac_status=$?
10329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10330 (exit $ac_status); }; }; then
10331 ac_header_compiler=yes
10332else
10333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010334sed 's/^/| /' conftest.$ac_ext >&5
10335
Martin v. Löwis11437992002-04-12 09:54:03 +000010336ac_header_compiler=no
10337fi
10338rm -f conftest.$ac_objext conftest.$ac_ext
10339echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10340echo "${ECHO_T}$ac_header_compiler" >&6
10341
10342# Is the header present?
10343echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10344echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10345cat >conftest.$ac_ext <<_ACEOF
10346#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010347/* confdefs.h. */
10348_ACEOF
10349cat confdefs.h >>conftest.$ac_ext
10350cat >>conftest.$ac_ext <<_ACEOF
10351/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010352#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010353_ACEOF
10354if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10355 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10356 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010357 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 rm -f conftest.er1
10359 cat conftest.err >&5
10360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10361 (exit $ac_status); } >/dev/null; then
10362 if test -s conftest.err; then
10363 ac_cpp_err=$ac_c_preproc_warn_flag
10364 else
10365 ac_cpp_err=
10366 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010367else
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 ac_cpp_err=yes
10369fi
10370if test -z "$ac_cpp_err"; then
10371 ac_header_preproc=yes
10372else
10373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010374sed 's/^/| /' conftest.$ac_ext >&5
10375
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010377fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010378rm -f conftest.err conftest.$ac_ext
10379echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10380echo "${ECHO_T}$ac_header_preproc" >&6
10381
10382# So? What about this header?
10383case $ac_header_compiler:$ac_header_preproc in
10384 yes:no )
10385 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10386echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10387 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010388echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10389 (
10390 cat <<\_ASBOX
10391## ------------------------------------ ##
10392## Report this to bug-autoconf@gnu.org. ##
10393## ------------------------------------ ##
10394_ASBOX
10395 ) |
10396 sed "s/^/$as_me: WARNING: /" >&2
10397 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 no:yes )
10399 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10400echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10401 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10402echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10403 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010404echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10405 (
10406 cat <<\_ASBOX
10407## ------------------------------------ ##
10408## Report this to bug-autoconf@gnu.org. ##
10409## ------------------------------------ ##
10410_ASBOX
10411 ) |
10412 sed "s/^/$as_me: WARNING: /" >&2
10413 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010414esac
10415echo "$as_me:$LINENO: checking for cthreads.h" >&5
10416echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10417if test "${ac_cv_header_cthreads_h+set}" = set; then
10418 echo $ECHO_N "(cached) $ECHO_C" >&6
10419else
10420 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010422echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10423echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10424
10425fi
10426if test $ac_cv_header_cthreads_h = yes; then
10427 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010428#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010429_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010430
Martin v. Löwis11437992002-04-12 09:54:03 +000010431 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010432#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010433_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010434
Martin v. Löwis11437992002-04-12 09:54:03 +000010435
10436cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010437#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010438_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010439
10440 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010441 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010442else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010443
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10445 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10446echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10447if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10448 echo $ECHO_N "(cached) $ECHO_C" >&6
10449fi
10450echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10451echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010452else
Martin v. Löwis11437992002-04-12 09:54:03 +000010453 # Is the header compilable?
10454echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10455echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10456cat >conftest.$ac_ext <<_ACEOF
10457#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010458/* confdefs.h. */
10459_ACEOF
10460cat confdefs.h >>conftest.$ac_ext
10461cat >>conftest.$ac_ext <<_ACEOF
10462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010463$ac_includes_default
10464#include <mach/cthreads.h>
10465_ACEOF
10466rm -f conftest.$ac_objext
10467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10468 (eval $ac_compile) 2>&5
10469 ac_status=$?
10470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10471 (exit $ac_status); } &&
10472 { ac_try='test -s conftest.$ac_objext'
10473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10474 (eval $ac_try) 2>&5
10475 ac_status=$?
10476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10477 (exit $ac_status); }; }; then
10478 ac_header_compiler=yes
10479else
10480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010481sed 's/^/| /' conftest.$ac_ext >&5
10482
Martin v. Löwis11437992002-04-12 09:54:03 +000010483ac_header_compiler=no
10484fi
10485rm -f conftest.$ac_objext conftest.$ac_ext
10486echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10487echo "${ECHO_T}$ac_header_compiler" >&6
10488
10489# Is the header present?
10490echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10491echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10492cat >conftest.$ac_ext <<_ACEOF
10493#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010494/* confdefs.h. */
10495_ACEOF
10496cat confdefs.h >>conftest.$ac_ext
10497cat >>conftest.$ac_ext <<_ACEOF
10498/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010499#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010500_ACEOF
10501if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10502 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10503 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010504 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 rm -f conftest.er1
10506 cat conftest.err >&5
10507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10508 (exit $ac_status); } >/dev/null; then
10509 if test -s conftest.err; then
10510 ac_cpp_err=$ac_c_preproc_warn_flag
10511 else
10512 ac_cpp_err=
10513 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010514else
Martin v. Löwis11437992002-04-12 09:54:03 +000010515 ac_cpp_err=yes
10516fi
10517if test -z "$ac_cpp_err"; then
10518 ac_header_preproc=yes
10519else
10520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010521sed 's/^/| /' conftest.$ac_ext >&5
10522
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010525rm -f conftest.err conftest.$ac_ext
10526echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10527echo "${ECHO_T}$ac_header_preproc" >&6
10528
10529# So? What about this header?
10530case $ac_header_compiler:$ac_header_preproc in
10531 yes:no )
10532 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10533echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10534 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010535echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10536 (
10537 cat <<\_ASBOX
10538## ------------------------------------ ##
10539## Report this to bug-autoconf@gnu.org. ##
10540## ------------------------------------ ##
10541_ASBOX
10542 ) |
10543 sed "s/^/$as_me: WARNING: /" >&2
10544 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010545 no:yes )
10546 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10547echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10548 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10549echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10550 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010551echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10552 (
10553 cat <<\_ASBOX
10554## ------------------------------------ ##
10555## Report this to bug-autoconf@gnu.org. ##
10556## ------------------------------------ ##
10557_ASBOX
10558 ) |
10559 sed "s/^/$as_me: WARNING: /" >&2
10560 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010561esac
10562echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10563echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10564if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10565 echo $ECHO_N "(cached) $ECHO_C" >&6
10566else
10567 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010569echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10570echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10571
10572fi
10573if test $ac_cv_header_mach_cthreads_h = yes; then
10574 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010575#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010576_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010577
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010579#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010580_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010581
Martin v. Löwis11437992002-04-12 09:54:03 +000010582
10583cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010584#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010585_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010586
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010587 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010588else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010589
Martin v. Löwis11437992002-04-12 09:54:03 +000010590 echo "$as_me:$LINENO: checking for --with-pth" >&5
10591echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10592
10593# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010594if test "${with_pth+set}" = set; then
10595 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010596 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010597echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010598 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010599#define WITH_THREAD 1
10600_ACEOF
10601
10602
10603cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010604#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010605_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010606
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010607 LIBS="-lpth $LIBS"
10608 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010609else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010610 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010611echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010612
10613 # Just looking for pthread_create in libpthread is not enough:
10614 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10615 # So we really have to include pthread.h, and then link.
10616 _libs=$LIBS
10617 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10619echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10620 cat >conftest.$ac_ext <<_ACEOF
10621#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010622/* confdefs.h. */
10623_ACEOF
10624cat confdefs.h >>conftest.$ac_ext
10625cat >>conftest.$ac_ext <<_ACEOF
10626/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010627#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010628
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010629void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010630int
10631main ()
10632{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010633
10634pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010635 ;
10636 return 0;
10637}
10638_ACEOF
10639rm -f conftest.$ac_objext conftest$ac_exeext
10640if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10641 (eval $ac_link) 2>&5
10642 ac_status=$?
10643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10644 (exit $ac_status); } &&
10645 { ac_try='test -s conftest$ac_exeext'
10646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10647 (eval $ac_try) 2>&5
10648 ac_status=$?
10649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10650 (exit $ac_status); }; }; then
10651
10652 echo "$as_me:$LINENO: result: yes" >&5
10653echo "${ECHO_T}yes" >&6
10654 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010655#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010656_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010657
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010658 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010659 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010660else
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010662sed 's/^/| /' conftest.$ac_ext >&5
10663
Martin v. Löwis11437992002-04-12 09:54:03 +000010664
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010665 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10667echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10668if test "${ac_cv_func_pthread_detach+set}" = set; then
10669 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010670else
Martin v. Löwis11437992002-04-12 09:54:03 +000010671 cat >conftest.$ac_ext <<_ACEOF
10672#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010673/* confdefs.h. */
10674_ACEOF
10675cat confdefs.h >>conftest.$ac_ext
10676cat >>conftest.$ac_ext <<_ACEOF
10677/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010678/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010679 which can conflict with char pthread_detach (); below.
10680 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010681 <limits.h> exists even on freestanding compilers. Under hpux,
10682 including <limits.h> includes <sys/time.h> and causes problems
10683 checking for functions defined therein. */
10684#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010685# include <limits.h>
10686#else
10687# include <assert.h>
10688#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010689/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010690#ifdef __cplusplus
10691extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010692{
Martin v. Löwis11437992002-04-12 09:54:03 +000010693#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010694/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 builtin and then its argument prototype would still apply. */
10696char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010697/* The GNU C library defines this for functions which it implements
10698 to always fail with ENOSYS. Some functions are actually named
10699 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010700#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010701choke me
10702#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010703char (*f) () = pthread_detach;
10704#endif
10705#ifdef __cplusplus
10706}
Guido van Rossumad678af1998-10-02 14:42:15 +000010707#endif
10708
Skip Montanaro6dead952003-09-25 14:50:04 +000010709int
10710main ()
10711{
10712return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 ;
10714 return 0;
10715}
10716_ACEOF
10717rm -f conftest.$ac_objext conftest$ac_exeext
10718if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10719 (eval $ac_link) 2>&5
10720 ac_status=$?
10721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10722 (exit $ac_status); } &&
10723 { ac_try='test -s conftest$ac_exeext'
10724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10725 (eval $ac_try) 2>&5
10726 ac_status=$?
10727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10728 (exit $ac_status); }; }; then
10729 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010730else
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010732sed 's/^/| /' conftest.$ac_ext >&5
10733
Martin v. Löwis11437992002-04-12 09:54:03 +000010734ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010736rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010738echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10739echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10740if test $ac_cv_func_pthread_detach = yes; then
10741 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010742#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010743_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010744
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010745 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010746 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010747else
Guido van Rossumad678af1998-10-02 14:42:15 +000010748
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010749 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10750 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10751echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10752if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10753 echo $ECHO_N "(cached) $ECHO_C" >&6
10754fi
10755echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10756echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10757else
10758 # Is the header compilable?
10759echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10760echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10761cat >conftest.$ac_ext <<_ACEOF
10762#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010763/* confdefs.h. */
10764_ACEOF
10765cat confdefs.h >>conftest.$ac_ext
10766cat >>conftest.$ac_ext <<_ACEOF
10767/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010768$ac_includes_default
10769#include <atheos/threads.h>
10770_ACEOF
10771rm -f conftest.$ac_objext
10772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10773 (eval $ac_compile) 2>&5
10774 ac_status=$?
10775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10776 (exit $ac_status); } &&
10777 { ac_try='test -s conftest.$ac_objext'
10778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10779 (eval $ac_try) 2>&5
10780 ac_status=$?
10781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10782 (exit $ac_status); }; }; then
10783 ac_header_compiler=yes
10784else
10785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010786sed 's/^/| /' conftest.$ac_ext >&5
10787
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010788ac_header_compiler=no
10789fi
10790rm -f conftest.$ac_objext conftest.$ac_ext
10791echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10792echo "${ECHO_T}$ac_header_compiler" >&6
10793
10794# Is the header present?
10795echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10796echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10797cat >conftest.$ac_ext <<_ACEOF
10798#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010799/* confdefs.h. */
10800_ACEOF
10801cat confdefs.h >>conftest.$ac_ext
10802cat >>conftest.$ac_ext <<_ACEOF
10803/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010804#include <atheos/threads.h>
10805_ACEOF
10806if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10807 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10808 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010809 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010810 rm -f conftest.er1
10811 cat conftest.err >&5
10812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10813 (exit $ac_status); } >/dev/null; then
10814 if test -s conftest.err; then
10815 ac_cpp_err=$ac_c_preproc_warn_flag
10816 else
10817 ac_cpp_err=
10818 fi
10819else
10820 ac_cpp_err=yes
10821fi
10822if test -z "$ac_cpp_err"; then
10823 ac_header_preproc=yes
10824else
10825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010826sed 's/^/| /' conftest.$ac_ext >&5
10827
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010828 ac_header_preproc=no
10829fi
10830rm -f conftest.err conftest.$ac_ext
10831echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10832echo "${ECHO_T}$ac_header_preproc" >&6
10833
10834# So? What about this header?
10835case $ac_header_compiler:$ac_header_preproc in
10836 yes:no )
10837 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10838echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10839 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010840echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10841 (
10842 cat <<\_ASBOX
10843## ------------------------------------ ##
10844## Report this to bug-autoconf@gnu.org. ##
10845## ------------------------------------ ##
10846_ASBOX
10847 ) |
10848 sed "s/^/$as_me: WARNING: /" >&2
10849 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010850 no:yes )
10851 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10852echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10853 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10854echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10855 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010856echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10857 (
10858 cat <<\_ASBOX
10859## ------------------------------------ ##
10860## Report this to bug-autoconf@gnu.org. ##
10861## ------------------------------------ ##
10862_ASBOX
10863 ) |
10864 sed "s/^/$as_me: WARNING: /" >&2
10865 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010866esac
10867echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10868echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10869if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10870 echo $ECHO_N "(cached) $ECHO_C" >&6
10871else
10872 ac_cv_header_atheos_threads_h=$ac_header_preproc
10873fi
10874echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10875echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10876
10877fi
10878if test $ac_cv_header_atheos_threads_h = yes; then
10879 cat >>confdefs.h <<\_ACEOF
10880#define WITH_THREAD 1
10881_ACEOF
10882
10883
10884cat >>confdefs.h <<\_ACEOF
10885#define ATHEOS_THREADS 1
10886_ACEOF
10887
10888 THREADOBJ="Python/thread.o"
10889else
10890
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10892 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10893echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10894if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10895 echo $ECHO_N "(cached) $ECHO_C" >&6
10896fi
10897echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10898echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010899else
Martin v. Löwis11437992002-04-12 09:54:03 +000010900 # Is the header compilable?
10901echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10902echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10903cat >conftest.$ac_ext <<_ACEOF
10904#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* confdefs.h. */
10906_ACEOF
10907cat confdefs.h >>conftest.$ac_ext
10908cat >>conftest.$ac_ext <<_ACEOF
10909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010910$ac_includes_default
10911#include <kernel/OS.h>
10912_ACEOF
10913rm -f conftest.$ac_objext
10914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10915 (eval $ac_compile) 2>&5
10916 ac_status=$?
10917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10918 (exit $ac_status); } &&
10919 { ac_try='test -s conftest.$ac_objext'
10920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10921 (eval $ac_try) 2>&5
10922 ac_status=$?
10923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10924 (exit $ac_status); }; }; then
10925 ac_header_compiler=yes
10926else
10927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010928sed 's/^/| /' conftest.$ac_ext >&5
10929
Martin v. Löwis11437992002-04-12 09:54:03 +000010930ac_header_compiler=no
10931fi
10932rm -f conftest.$ac_objext conftest.$ac_ext
10933echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10934echo "${ECHO_T}$ac_header_compiler" >&6
10935
10936# Is the header present?
10937echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10938echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10939cat >conftest.$ac_ext <<_ACEOF
10940#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010941/* confdefs.h. */
10942_ACEOF
10943cat confdefs.h >>conftest.$ac_ext
10944cat >>conftest.$ac_ext <<_ACEOF
10945/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010946#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010947_ACEOF
10948if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10949 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10950 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010951 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010952 rm -f conftest.er1
10953 cat conftest.err >&5
10954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10955 (exit $ac_status); } >/dev/null; then
10956 if test -s conftest.err; then
10957 ac_cpp_err=$ac_c_preproc_warn_flag
10958 else
10959 ac_cpp_err=
10960 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010961else
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 ac_cpp_err=yes
10963fi
10964if test -z "$ac_cpp_err"; then
10965 ac_header_preproc=yes
10966else
10967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010968sed 's/^/| /' conftest.$ac_ext >&5
10969
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010971fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010972rm -f conftest.err conftest.$ac_ext
10973echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10974echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010975
Martin v. Löwis11437992002-04-12 09:54:03 +000010976# So? What about this header?
10977case $ac_header_compiler:$ac_header_preproc in
10978 yes:no )
10979 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10980echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10981 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010982echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10983 (
10984 cat <<\_ASBOX
10985## ------------------------------------ ##
10986## Report this to bug-autoconf@gnu.org. ##
10987## ------------------------------------ ##
10988_ASBOX
10989 ) |
10990 sed "s/^/$as_me: WARNING: /" >&2
10991 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 no:yes )
10993 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10994echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10995 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10996echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10997 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010998echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10999 (
11000 cat <<\_ASBOX
11001## ------------------------------------ ##
11002## Report this to bug-autoconf@gnu.org. ##
11003## ------------------------------------ ##
11004_ASBOX
11005 ) |
11006 sed "s/^/$as_me: WARNING: /" >&2
11007 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011008esac
11009echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11010echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11011if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11012 echo $ECHO_N "(cached) $ECHO_C" >&6
11013else
11014 ac_cv_header_kernel_OS_h=$ac_header_preproc
11015fi
11016echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11017echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11018
11019fi
11020if test $ac_cv_header_kernel_OS_h = yes; then
11021 cat >>confdefs.h <<\_ACEOF
11022#define WITH_THREAD 1
11023_ACEOF
11024
11025
11026cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011027#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011028_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011029
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011030 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011031else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011032
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11034echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11035if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11036 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011037else
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011039LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011040cat >conftest.$ac_ext <<_ACEOF
11041#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011042/* confdefs.h. */
11043_ACEOF
11044cat confdefs.h >>conftest.$ac_ext
11045cat >>conftest.$ac_ext <<_ACEOF
11046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011047
Greg Steinadf63d62000-07-05 10:38:09 +000011048/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011049#ifdef __cplusplus
11050extern "C"
11051#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011052/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 builtin and then its argument prototype would still apply. */
11054char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011055int
11056main ()
11057{
11058pthread_create ();
11059 ;
11060 return 0;
11061}
11062_ACEOF
11063rm -f conftest.$ac_objext conftest$ac_exeext
11064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11065 (eval $ac_link) 2>&5
11066 ac_status=$?
11067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11068 (exit $ac_status); } &&
11069 { ac_try='test -s conftest$ac_exeext'
11070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11071 (eval $ac_try) 2>&5
11072 ac_status=$?
11073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11074 (exit $ac_status); }; }; then
11075 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011076else
Martin v. Löwis11437992002-04-12 09:54:03 +000011077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011078sed 's/^/| /' conftest.$ac_ext >&5
11079
Martin v. Löwis11437992002-04-12 09:54:03 +000011080ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011082rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11083LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011085echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11086echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11087if test $ac_cv_lib_pthreads_pthread_create = yes; then
11088 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011089#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011090_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011091
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011092 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011093 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011094 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011095else
Greg Steinadf63d62000-07-05 10:38:09 +000011096
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11098echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11099if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11100 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011101else
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011103LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011104cat >conftest.$ac_ext <<_ACEOF
11105#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011106/* confdefs.h. */
11107_ACEOF
11108cat confdefs.h >>conftest.$ac_ext
11109cat >>conftest.$ac_ext <<_ACEOF
11110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011111
Guido van Rossum49545951997-12-02 19:28:29 +000011112/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011113#ifdef __cplusplus
11114extern "C"
11115#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011116/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 builtin and then its argument prototype would still apply. */
11118char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011119int
11120main ()
11121{
11122pthread_create ();
11123 ;
11124 return 0;
11125}
11126_ACEOF
11127rm -f conftest.$ac_objext conftest$ac_exeext
11128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11129 (eval $ac_link) 2>&5
11130 ac_status=$?
11131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11132 (exit $ac_status); } &&
11133 { ac_try='test -s conftest$ac_exeext'
11134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11135 (eval $ac_try) 2>&5
11136 ac_status=$?
11137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11138 (exit $ac_status); }; }; then
11139 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011140else
Martin v. Löwis11437992002-04-12 09:54:03 +000011141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011142sed 's/^/| /' conftest.$ac_ext >&5
11143
Martin v. Löwis11437992002-04-12 09:54:03 +000011144ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011145fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011146rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11147LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011148fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011149echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11150echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11151if test $ac_cv_lib_c_r_pthread_create = yes; then
11152 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011153#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011154_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011155
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011156 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011157 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011158 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011159else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011160
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11162echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11163if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11164 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011165else
Martin v. Löwis11437992002-04-12 09:54:03 +000011166 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011167LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011168cat >conftest.$ac_ext <<_ACEOF
11169#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011170/* confdefs.h. */
11171_ACEOF
11172cat confdefs.h >>conftest.$ac_ext
11173cat >>conftest.$ac_ext <<_ACEOF
11174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011175
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011176/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011177#ifdef __cplusplus
11178extern "C"
11179#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011180/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011181 builtin and then its argument prototype would still apply. */
11182char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011183int
11184main ()
11185{
11186__pthread_create_system ();
11187 ;
11188 return 0;
11189}
11190_ACEOF
11191rm -f conftest.$ac_objext conftest$ac_exeext
11192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11193 (eval $ac_link) 2>&5
11194 ac_status=$?
11195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11196 (exit $ac_status); } &&
11197 { ac_try='test -s conftest$ac_exeext'
11198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11199 (eval $ac_try) 2>&5
11200 ac_status=$?
11201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11202 (exit $ac_status); }; }; then
11203 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011204else
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011206sed 's/^/| /' conftest.$ac_ext >&5
11207
Martin v. Löwis11437992002-04-12 09:54:03 +000011208ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011209fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011210rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11211LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011212fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011213echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11214echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11215if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11216 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011217#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011218_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011219
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011220 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011221 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011222 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011223else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011224
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11226echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11227if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11228 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011229else
Martin v. Löwis11437992002-04-12 09:54:03 +000011230 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011231LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011232cat >conftest.$ac_ext <<_ACEOF
11233#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011234/* confdefs.h. */
11235_ACEOF
11236cat confdefs.h >>conftest.$ac_ext
11237cat >>conftest.$ac_ext <<_ACEOF
11238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011239
Guido van Rossumb93a8621998-05-07 13:27:32 +000011240/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011241#ifdef __cplusplus
11242extern "C"
11243#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011244/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011245 builtin and then its argument prototype would still apply. */
11246char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011247int
11248main ()
11249{
11250pthread_create ();
11251 ;
11252 return 0;
11253}
11254_ACEOF
11255rm -f conftest.$ac_objext conftest$ac_exeext
11256if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11257 (eval $ac_link) 2>&5
11258 ac_status=$?
11259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11260 (exit $ac_status); } &&
11261 { ac_try='test -s conftest$ac_exeext'
11262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11263 (eval $ac_try) 2>&5
11264 ac_status=$?
11265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11266 (exit $ac_status); }; }; then
11267 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011268else
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011270sed 's/^/| /' conftest.$ac_ext >&5
11271
Martin v. Löwis11437992002-04-12 09:54:03 +000011272ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011274rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11275LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011277echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11278echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11279if test $ac_cv_lib_cma_pthread_create = yes; then
11280 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011281#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011282_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011283
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011284 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011285 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011286 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011287else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011288
Martin v. Löwis130fb172001-07-19 11:00:41 +000011289 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011290fi
11291
Guido van Rossum627b2d71993-12-24 10:39:16 +000011292
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011293fi
11294
Guido van Rossum0be3e491997-05-22 20:33:33 +000011295fi
11296
Guido van Rossum49545951997-12-02 19:28:29 +000011297fi
11298
Guido van Rossumb93a8621998-05-07 13:27:32 +000011299fi
11300
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011301
Michael W. Hudson54241132001-12-07 15:38:26 +000011302fi
11303
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011304
11305fi
11306
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011307fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011308rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11309fi;
11310fi
11311
11312
11313fi
11314
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011315
Michael W. Hudson54241132001-12-07 15:38:26 +000011316
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11318echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11319if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11320 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321else
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011323LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011324cat >conftest.$ac_ext <<_ACEOF
11325#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011326/* confdefs.h. */
11327_ACEOF
11328cat confdefs.h >>conftest.$ac_ext
11329cat >>conftest.$ac_ext <<_ACEOF
11330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011331
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011332/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011333#ifdef __cplusplus
11334extern "C"
11335#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011336/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 builtin and then its argument prototype would still apply. */
11338char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011339int
11340main ()
11341{
11342usconfig ();
11343 ;
11344 return 0;
11345}
11346_ACEOF
11347rm -f conftest.$ac_objext conftest$ac_exeext
11348if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11349 (eval $ac_link) 2>&5
11350 ac_status=$?
11351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11352 (exit $ac_status); } &&
11353 { ac_try='test -s conftest$ac_exeext'
11354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11355 (eval $ac_try) 2>&5
11356 ac_status=$?
11357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11358 (exit $ac_status); }; }; then
11359 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011360else
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011362sed 's/^/| /' conftest.$ac_ext >&5
11363
Martin v. Löwis11437992002-04-12 09:54:03 +000011364ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011366rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11367LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011369echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11370echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11371if test $ac_cv_lib_mpc_usconfig = yes; then
11372 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011373#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011374_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011375
Martin v. Löwis130fb172001-07-19 11:00:41 +000011376 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011377 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011378 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011379fi
11380
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011381
Neal Norwitza978ab02002-11-02 16:58:05 +000011382 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11384echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11385if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11386 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011387else
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011389LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011390cat >conftest.$ac_ext <<_ACEOF
11391#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011392/* confdefs.h. */
11393_ACEOF
11394cat confdefs.h >>conftest.$ac_ext
11395cat >>conftest.$ac_ext <<_ACEOF
11396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011397
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011398/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011399#ifdef __cplusplus
11400extern "C"
11401#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011402/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 builtin and then its argument prototype would still apply. */
11404char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011405int
11406main ()
11407{
11408thr_create ();
11409 ;
11410 return 0;
11411}
11412_ACEOF
11413rm -f conftest.$ac_objext conftest$ac_exeext
11414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11415 (eval $ac_link) 2>&5
11416 ac_status=$?
11417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11418 (exit $ac_status); } &&
11419 { ac_try='test -s conftest$ac_exeext'
11420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11421 (eval $ac_try) 2>&5
11422 ac_status=$?
11423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11424 (exit $ac_status); }; }; then
11425 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011426else
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011428sed 's/^/| /' conftest.$ac_ext >&5
11429
Martin v. Löwis11437992002-04-12 09:54:03 +000011430ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11433LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011435echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11436echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11437if test $ac_cv_lib_thread_thr_create = yes; then
11438 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011439#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011440_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011442 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011443 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011444 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011445fi
11446
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011447 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011448
Martin v. Löwis130fb172001-07-19 11:00:41 +000011449 if test "$USE_THREAD_MODULE" != "#"
11450 then
11451 # If the above checks didn't disable threads, (at least) OSF1
11452 # needs this '-threads' argument during linking.
11453 case $ac_sys_system in
11454 OSF1) LDLAST=-threads;;
11455 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011456 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011457fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011458
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011459if test "$posix_threads" = "yes"; then
11460 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011461
11462cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011463#define _POSIX_THREADS 1
11464_ACEOF
11465
11466 fi
11467
11468 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11469 case $ac_sys_system/$ac_sys_release in
11470 SunOS/5.6)
11471cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011472#define HAVE_PTHREAD_DESTRUCTOR 1
11473_ACEOF
11474
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011475 ;;
11476 SunOS/5.8)
11477cat >>confdefs.h <<\_ACEOF
11478#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11479_ACEOF
11480
11481 ;;
11482 esac
11483
11484 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11485echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11486 if test "${ac_cv_pthread_system_supported+set}" = set; then
11487 echo $ECHO_N "(cached) $ECHO_C" >&6
11488else
11489 if test "$cross_compiling" = yes; then
11490 ac_cv_pthread_system_supported=no
11491else
11492 cat >conftest.$ac_ext <<_ACEOF
11493#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011494/* confdefs.h. */
11495_ACEOF
11496cat confdefs.h >>conftest.$ac_ext
11497cat >>conftest.$ac_ext <<_ACEOF
11498/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011499#include <pthread.h>
11500 void *foo(void *parm) {
11501 return NULL;
11502 }
11503 main() {
11504 pthread_attr_t attr;
11505 pthread_t id;
11506 if (pthread_attr_init(&attr)) exit(-1);
11507 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11508 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11509 exit(0);
11510 }
11511_ACEOF
11512rm -f conftest$ac_exeext
11513if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11514 (eval $ac_link) 2>&5
11515 ac_status=$?
11516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11517 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11519 (eval $ac_try) 2>&5
11520 ac_status=$?
11521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11522 (exit $ac_status); }; }; then
11523 ac_cv_pthread_system_supported=yes
11524else
11525 echo "$as_me: program exited with status $ac_status" >&5
11526echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011527sed 's/^/| /' conftest.$ac_ext >&5
11528
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011529( exit $ac_status )
11530ac_cv_pthread_system_supported=no
11531fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011532rm -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 +000011533fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011534
Guido van Rossum627b2d71993-12-24 10:39:16 +000011535fi
11536
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011537 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11538echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11539 if test "$ac_cv_pthread_system_supported" = "yes"; then
11540
11541cat >>confdefs.h <<\_ACEOF
11542#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11543_ACEOF
11544
11545 fi
11546
11547for ac_func in pthread_sigmask
11548do
11549as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11550echo "$as_me:$LINENO: checking for $ac_func" >&5
11551echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11552if eval "test \"\${$as_ac_var+set}\" = set"; then
11553 echo $ECHO_N "(cached) $ECHO_C" >&6
11554else
11555 cat >conftest.$ac_ext <<_ACEOF
11556#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011557/* confdefs.h. */
11558_ACEOF
11559cat confdefs.h >>conftest.$ac_ext
11560cat >>conftest.$ac_ext <<_ACEOF
11561/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011562/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011563 which can conflict with char $ac_func (); below.
11564 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011565 <limits.h> exists even on freestanding compilers. Under hpux,
11566 including <limits.h> includes <sys/time.h> and causes problems
11567 checking for functions defined therein. */
11568#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011569# include <limits.h>
11570#else
11571# include <assert.h>
11572#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011573/* Override any gcc2 internal prototype to avoid an error. */
11574#ifdef __cplusplus
11575extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011576{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011577#endif
11578/* We use char because int might match the return type of a gcc2
11579 builtin and then its argument prototype would still apply. */
11580char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011581/* The GNU C library defines this for functions which it implements
11582 to always fail with ENOSYS. Some functions are actually named
11583 something starting with __ and the normal name is an alias. */
11584#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11585choke me
11586#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011587char (*f) () = $ac_func;
11588#endif
11589#ifdef __cplusplus
11590}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011591#endif
11592
Skip Montanaro6dead952003-09-25 14:50:04 +000011593int
11594main ()
11595{
11596return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011597 ;
11598 return 0;
11599}
11600_ACEOF
11601rm -f conftest.$ac_objext conftest$ac_exeext
11602if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11603 (eval $ac_link) 2>&5
11604 ac_status=$?
11605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11606 (exit $ac_status); } &&
11607 { ac_try='test -s conftest$ac_exeext'
11608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11609 (eval $ac_try) 2>&5
11610 ac_status=$?
11611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11612 (exit $ac_status); }; }; then
11613 eval "$as_ac_var=yes"
11614else
11615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011616sed 's/^/| /' conftest.$ac_ext >&5
11617
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011618eval "$as_ac_var=no"
11619fi
11620rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11621fi
11622echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11623echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11624if test `eval echo '${'$as_ac_var'}'` = yes; then
11625 cat >>confdefs.h <<_ACEOF
11626#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11627_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011628 case $ac_sys_system in
11629 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011630
Jason Tishlerfac083d2003-07-22 15:20:49 +000011631cat >>confdefs.h <<\_ACEOF
11632#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11633_ACEOF
11634
11635 ;;
11636 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011637fi
11638done
11639
11640fi
11641
11642
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011643# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011644
11645
11646echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11647echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011648# Check whether --enable-ipv6 or --disable-ipv6 was given.
11649if test "${enable_ipv6+set}" = set; then
11650 enableval="$enable_ipv6"
11651 case "$enableval" in
11652 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 echo "$as_me:$LINENO: result: no" >&5
11654echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011655 ipv6=no
11656 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 *) echo "$as_me:$LINENO: result: yes" >&5
11658echo "${ECHO_T}yes" >&6
11659 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011660#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011661_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011662
11663 ipv6=yes
11664 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011665 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011666else
Martin v. Löwis11437992002-04-12 09:54:03 +000011667
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011668 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011669 echo "$as_me:$LINENO: result: no" >&5
11670echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011671 ipv6=no
11672
11673else
Martin v. Löwis11437992002-04-12 09:54:03 +000011674 cat >conftest.$ac_ext <<_ACEOF
11675#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011676/* confdefs.h. */
11677_ACEOF
11678cat confdefs.h >>conftest.$ac_ext
11679cat >>conftest.$ac_ext <<_ACEOF
11680/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011681 /* AF_INET6 available check */
11682#include <sys/types.h>
11683#include <sys/socket.h>
11684main()
11685{
11686 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11687 exit(1);
11688 else
11689 exit(0);
11690}
11691
Martin v. Löwis11437992002-04-12 09:54:03 +000011692_ACEOF
11693rm -f conftest$ac_exeext
11694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11695 (eval $ac_link) 2>&5
11696 ac_status=$?
11697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11698 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11700 (eval $ac_try) 2>&5
11701 ac_status=$?
11702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11703 (exit $ac_status); }; }; then
11704 echo "$as_me:$LINENO: result: yes" >&5
11705echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011706 ipv6=yes
11707else
Martin v. Löwis11437992002-04-12 09:54:03 +000011708 echo "$as_me: program exited with status $ac_status" >&5
11709echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011710sed 's/^/| /' conftest.$ac_ext >&5
11711
Martin v. Löwis11437992002-04-12 09:54:03 +000011712( exit $ac_status )
11713echo "$as_me:$LINENO: result: no" >&5
11714echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011715 ipv6=no
11716fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011717rm -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 +000011718fi
11719
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011720if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011721 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11722echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11723 cat >conftest.$ac_ext <<_ACEOF
11724#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011725/* confdefs.h. */
11726_ACEOF
11727cat confdefs.h >>conftest.$ac_ext
11728cat >>conftest.$ac_ext <<_ACEOF
11729/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011730#include <sys/types.h>
11731#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011732int
11733main ()
11734{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011735struct sockaddr_in6 x;
11736x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011737 ;
11738 return 0;
11739}
11740_ACEOF
11741rm -f conftest.$ac_objext
11742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11743 (eval $ac_compile) 2>&5
11744 ac_status=$?
11745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11746 (exit $ac_status); } &&
11747 { ac_try='test -s conftest.$ac_objext'
11748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11749 (eval $ac_try) 2>&5
11750 ac_status=$?
11751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11752 (exit $ac_status); }; }; then
11753 echo "$as_me:$LINENO: result: yes" >&5
11754echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011755 ipv6=yes
11756else
Martin v. Löwis11437992002-04-12 09:54:03 +000011757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011758sed 's/^/| /' conftest.$ac_ext >&5
11759
Martin v. Löwis11437992002-04-12 09:54:03 +000011760echo "$as_me:$LINENO: result: no" >&5
11761echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011762 ipv6=no
11763fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011764rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011765fi
11766
11767if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011768 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011769#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011770_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011771
11772fi
11773
Martin v. Löwis11437992002-04-12 09:54:03 +000011774fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011775
11776ipv6type=unknown
11777ipv6lib=none
11778ipv6trylibc=no
11779
11780if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011781 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11782echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011783 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11784 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011785 case $i in
11786 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 cat >conftest.$ac_ext <<_ACEOF
11788#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011789/* confdefs.h. */
11790_ACEOF
11791cat confdefs.h >>conftest.$ac_ext
11792cat >>conftest.$ac_ext <<_ACEOF
11793/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011794
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011795#include <netinet/in.h>
11796#ifdef IPV6_INRIA_VERSION
11797yes
11798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011799_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011801 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011802 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011803fi
11804rm -f conftest*
11805
11806 ;;
11807 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 cat >conftest.$ac_ext <<_ACEOF
11809#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011810/* confdefs.h. */
11811_ACEOF
11812cat confdefs.h >>conftest.$ac_ext
11813cat >>conftest.$ac_ext <<_ACEOF
11814/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011815
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011816#include <netinet/in.h>
11817#ifdef __KAME__
11818yes
11819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011820_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011822 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011823 ipv6type=$i;
11824 ipv6lib=inet6
11825 ipv6libdir=/usr/local/v6/lib
11826 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011827fi
11828rm -f conftest*
11829
11830 ;;
11831 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011832 cat >conftest.$ac_ext <<_ACEOF
11833#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011834/* confdefs.h. */
11835_ACEOF
11836cat confdefs.h >>conftest.$ac_ext
11837cat >>conftest.$ac_ext <<_ACEOF
11838/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011839
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011840#include <features.h>
11841#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11842yes
11843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011844_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011846 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011847 ipv6type=$i;
11848 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011849fi
11850rm -f conftest*
11851
11852 ;;
11853 linux-inet6)
11854 if test -d /usr/inet6; then
11855 ipv6type=$i
11856 ipv6lib=inet6
11857 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011858 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011859 fi
11860 ;;
11861 solaris)
11862 if test -f /etc/netconfig; then
11863 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11864 ipv6type=$i
11865 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011866 fi
11867 fi
11868 ;;
11869 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011870 cat >conftest.$ac_ext <<_ACEOF
11871#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011872/* confdefs.h. */
11873_ACEOF
11874cat confdefs.h >>conftest.$ac_ext
11875cat >>conftest.$ac_ext <<_ACEOF
11876/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011877
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011878#include <sys/param.h>
11879#ifdef _TOSHIBA_INET6
11880yes
11881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011882_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011884 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011885 ipv6type=$i;
11886 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011887 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011888fi
11889rm -f conftest*
11890
11891 ;;
11892 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011893 cat >conftest.$ac_ext <<_ACEOF
11894#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011895/* confdefs.h. */
11896_ACEOF
11897cat confdefs.h >>conftest.$ac_ext
11898cat >>conftest.$ac_ext <<_ACEOF
11899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011901#include </usr/local/v6/include/sys/v6config.h>
11902#ifdef __V6D__
11903yes
11904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011907 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011908 ipv6type=$i;
11909 ipv6lib=v6;
11910 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011911 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011912fi
11913rm -f conftest*
11914
11915 ;;
11916 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 cat >conftest.$ac_ext <<_ACEOF
11918#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011919/* confdefs.h. */
11920_ACEOF
11921cat confdefs.h >>conftest.$ac_ext
11922cat >>conftest.$ac_ext <<_ACEOF
11923/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011924
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011925#include <sys/param.h>
11926#ifdef _ZETA_MINAMI_INET6
11927yes
11928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011929_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011931 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011932 ipv6type=$i;
11933 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011934 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011935fi
11936rm -f conftest*
11937
11938 ;;
11939 esac
11940 if test "$ipv6type" != "unknown"; then
11941 break
11942 fi
11943 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011944 echo "$as_me:$LINENO: result: $ipv6type" >&5
11945echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011946fi
11947
11948if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11949 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11950 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11951 echo "using lib$ipv6lib"
11952 else
11953 if test $ipv6trylibc = "yes"; then
11954 echo "using libc"
11955 else
11956 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11957 echo "You need to fetch lib$ipv6lib.a from appropriate"
11958 echo 'ipv6 kit and compile beforehand.'
11959 exit 1
11960 fi
11961 fi
11962fi
11963
Jack Jansen7b8c7542002-04-14 20:12:41 +000011964# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011965echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11966echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011967
11968# Check whether --with-universal-newlines or --without-universal-newlines was given.
11969if test "${with_universal_newlines+set}" = set; then
11970 withval="$with_universal_newlines"
11971
11972fi;
11973
11974if test -z "$with_universal_newlines"
11975then with_universal_newlines="yes"
11976fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011977if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011978then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011979 echo --without-universal-newlines is unsupported, see README
11980 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011981else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011982
11983cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011984#define WITH_UNIVERSAL_NEWLINES 1
11985_ACEOF
11986
11987fi
11988echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11989echo "${ECHO_T}$with_universal_newlines" >&6
11990
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011991# Check for --with-doc-strings
11992echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11993echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11994
11995# Check whether --with-doc-strings or --without-doc-strings was given.
11996if test "${with_doc_strings+set}" = set; then
11997 withval="$with_doc_strings"
11998
11999fi;
12000
12001if test -z "$with_doc_strings"
12002then with_doc_strings="yes"
12003fi
12004if test "$with_doc_strings" != "no"
12005then
12006
12007cat >>confdefs.h <<\_ACEOF
12008#define WITH_DOC_STRINGS 1
12009_ACEOF
12010
12011fi
12012echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12013echo "${ECHO_T}$with_doc_strings" >&6
12014
Neil Schemenauera35c6882001-02-27 04:45:05 +000012015# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012016echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12017echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12018
Neil Schemenauera35c6882001-02-27 04:45:05 +000012019# Check whether --with-pymalloc or --without-pymalloc was given.
12020if test "${with_pymalloc+set}" = set; then
12021 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012022
Martin v. Löwis11437992002-04-12 09:54:03 +000012023fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012024
Neil Schemenauer16c22972002-03-22 15:34:49 +000012025if test -z "$with_pymalloc"
12026then with_pymalloc="yes"
12027fi
12028if test "$with_pymalloc" != "no"
12029then
Martin v. Löwis11437992002-04-12 09:54:03 +000012030
12031cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012032#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012033_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012034
12035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012036echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12037echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012038
Barry Warsawef82cd72000-06-30 16:21:01 +000012039# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012040echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12041echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12042
Barry Warsawef82cd72000-06-30 16:21:01 +000012043# Check whether --with-wctype-functions or --without-wctype-functions was given.
12044if test "${with_wctype_functions+set}" = set; then
12045 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012046
Barry Warsawef82cd72000-06-30 16:21:01 +000012047if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012048then
12049
12050cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012051#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012052_ACEOF
12053
12054 echo "$as_me:$LINENO: result: yes" >&5
12055echo "${ECHO_T}yes" >&6
12056else echo "$as_me:$LINENO: result: no" >&5
12057echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012058fi
12059else
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 echo "$as_me:$LINENO: result: no" >&5
12061echo "${ECHO_T}no" >&6
12062fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012064# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012065
Guido van Rossum98935bf2001-09-05 19:13:16 +000012066DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012067
Guido van Rossume97ee181999-12-20 21:27:22 +000012068# the dlopen() function means we might want to use dynload_shlib.o. some
12069# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012070
Thomas Wouters3a584202000-08-05 23:28:51 +000012071for ac_func in dlopen
12072do
Martin v. Löwis11437992002-04-12 09:54:03 +000012073as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12074echo "$as_me:$LINENO: checking for $ac_func" >&5
12075echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12076if eval "test \"\${$as_ac_var+set}\" = set"; then
12077 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012078else
Martin v. Löwis11437992002-04-12 09:54:03 +000012079 cat >conftest.$ac_ext <<_ACEOF
12080#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012081/* confdefs.h. */
12082_ACEOF
12083cat confdefs.h >>conftest.$ac_ext
12084cat >>conftest.$ac_ext <<_ACEOF
12085/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012086/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012087 which can conflict with char $ac_func (); below.
12088 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012089 <limits.h> exists even on freestanding compilers. Under hpux,
12090 including <limits.h> includes <sys/time.h> and causes problems
12091 checking for functions defined therein. */
12092#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012093# include <limits.h>
12094#else
12095# include <assert.h>
12096#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012097/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012098#ifdef __cplusplus
12099extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012100{
Martin v. Löwis11437992002-04-12 09:54:03 +000012101#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012102/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 builtin and then its argument prototype would still apply. */
12104char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012105/* The GNU C library defines this for functions which it implements
12106 to always fail with ENOSYS. Some functions are actually named
12107 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012108#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012109choke me
12110#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012111char (*f) () = $ac_func;
12112#endif
12113#ifdef __cplusplus
12114}
Guido van Rossume97ee181999-12-20 21:27:22 +000012115#endif
12116
Skip Montanaro6dead952003-09-25 14:50:04 +000012117int
12118main ()
12119{
12120return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012121 ;
12122 return 0;
12123}
12124_ACEOF
12125rm -f conftest.$ac_objext conftest$ac_exeext
12126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12127 (eval $ac_link) 2>&5
12128 ac_status=$?
12129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12130 (exit $ac_status); } &&
12131 { ac_try='test -s conftest$ac_exeext'
12132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12133 (eval $ac_try) 2>&5
12134 ac_status=$?
12135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12136 (exit $ac_status); }; }; then
12137 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012138else
Martin v. Löwis11437992002-04-12 09:54:03 +000012139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012140sed 's/^/| /' conftest.$ac_ext >&5
12141
Martin v. Löwis11437992002-04-12 09:54:03 +000012142eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012144rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012145fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012146echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12147echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12148if test `eval echo '${'$as_ac_var'}'` = yes; then
12149 cat >>confdefs.h <<_ACEOF
12150#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12151_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012152
Guido van Rossume97ee181999-12-20 21:27:22 +000012153fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012154done
Guido van Rossume97ee181999-12-20 21:27:22 +000012155
Michael W. Hudson54241132001-12-07 15:38:26 +000012156
Guido van Rossume97ee181999-12-20 21:27:22 +000012157# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12158# loading of modules.
12159
Martin v. Löwis11437992002-04-12 09:54:03 +000012160echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12161echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012162if test -z "$DYNLOADFILE"
12163then
12164 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012165 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12166 if test "$ac_cv_func_dlopen" = yes
12167 then DYNLOADFILE="dynload_shlib.o"
12168 else DYNLOADFILE="dynload_aix.o"
12169 fi
12170 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012171 BeOS*) DYNLOADFILE="dynload_beos.o";;
12172 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012173 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012174 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012175 *)
12176 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12177 # out any dynamic loading
12178 if test "$ac_cv_func_dlopen" = yes
12179 then DYNLOADFILE="dynload_shlib.o"
12180 else DYNLOADFILE="dynload_stub.o"
12181 fi
12182 ;;
12183 esac
12184fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012185echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12186echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012187if test "$DYNLOADFILE" != "dynload_stub.o"
12188then
Martin v. Löwis11437992002-04-12 09:54:03 +000012189
12190cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012191#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012192_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012193
12194fi
12195
Neil Schemenauer4e425612001-06-19 15:44:15 +000012196# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12197
Michael W. Hudson54241132001-12-07 15:38:26 +000012198
Martin v. Löwis11437992002-04-12 09:54:03 +000012199echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12200echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012201if test -z "$MACHDEP_OBJS"
12202then
Jack Jansene578a632001-08-15 01:27:14 +000012203 MACHDEP_OBJS=$extra_machdep_objs
12204else
12205 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012206fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012207echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12208echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012209
Guido van Rossum627b2d71993-12-24 10:39:16 +000012210# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012211
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
12280
12281
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012282
Martin v. Löwisd5843682002-11-21 20:41:28 +000012283for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012284 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012285 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012286 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012287 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012288 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012289 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012290 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012291 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012292 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012293 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012294 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012295do
Martin v. Löwis11437992002-04-12 09:54:03 +000012296as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12297echo "$as_me:$LINENO: checking for $ac_func" >&5
12298echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12299if eval "test \"\${$as_ac_var+set}\" = set"; then
12300 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012301else
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 cat >conftest.$ac_ext <<_ACEOF
12303#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012304/* confdefs.h. */
12305_ACEOF
12306cat confdefs.h >>conftest.$ac_ext
12307cat >>conftest.$ac_ext <<_ACEOF
12308/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012309/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012310 which can conflict with char $ac_func (); below.
12311 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012312 <limits.h> exists even on freestanding compilers. Under hpux,
12313 including <limits.h> includes <sys/time.h> and causes problems
12314 checking for functions defined therein. */
12315#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012316# include <limits.h>
12317#else
12318# include <assert.h>
12319#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012320/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012321#ifdef __cplusplus
12322extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012323{
Martin v. Löwis11437992002-04-12 09:54:03 +000012324#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012325/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012326 builtin and then its argument prototype would still apply. */
12327char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012328/* The GNU C library defines this for functions which it implements
12329 to always fail with ENOSYS. Some functions are actually named
12330 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012331#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012332choke me
12333#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012334char (*f) () = $ac_func;
12335#endif
12336#ifdef __cplusplus
12337}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012338#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012339
Skip Montanaro6dead952003-09-25 14:50:04 +000012340int
12341main ()
12342{
12343return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012344 ;
12345 return 0;
12346}
12347_ACEOF
12348rm -f conftest.$ac_objext conftest$ac_exeext
12349if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12350 (eval $ac_link) 2>&5
12351 ac_status=$?
12352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12353 (exit $ac_status); } &&
12354 { ac_try='test -s conftest$ac_exeext'
12355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12356 (eval $ac_try) 2>&5
12357 ac_status=$?
12358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12359 (exit $ac_status); }; }; then
12360 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012361else
Martin v. Löwis11437992002-04-12 09:54:03 +000012362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012363sed 's/^/| /' conftest.$ac_ext >&5
12364
Martin v. Löwis11437992002-04-12 09:54:03 +000012365eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012367rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012369echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12370echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12371if test `eval echo '${'$as_ac_var'}'` = yes; then
12372 cat >>confdefs.h <<_ACEOF
12373#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12374_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012376fi
12377done
12378
Michael W. Hudson54241132001-12-07 15:38:26 +000012379
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012380# For some functions, having a definition is not sufficient, since
12381# we want to take their address.
12382echo "$as_me:$LINENO: checking for chroot" >&5
12383echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12384cat >conftest.$ac_ext <<_ACEOF
12385#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012386/* confdefs.h. */
12387_ACEOF
12388cat confdefs.h >>conftest.$ac_ext
12389cat >>conftest.$ac_ext <<_ACEOF
12390/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012391#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012392int
12393main ()
12394{
12395void *x=chroot
12396 ;
12397 return 0;
12398}
12399_ACEOF
12400rm -f conftest.$ac_objext
12401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12402 (eval $ac_compile) 2>&5
12403 ac_status=$?
12404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12405 (exit $ac_status); } &&
12406 { ac_try='test -s conftest.$ac_objext'
12407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12408 (eval $ac_try) 2>&5
12409 ac_status=$?
12410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12411 (exit $ac_status); }; }; then
12412
12413cat >>confdefs.h <<\_ACEOF
12414#define HAVE_CHROOT 1
12415_ACEOF
12416
12417 echo "$as_me:$LINENO: result: yes" >&5
12418echo "${ECHO_T}yes" >&6
12419else
12420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012421sed 's/^/| /' conftest.$ac_ext >&5
12422
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012423echo "$as_me:$LINENO: result: no" >&5
12424echo "${ECHO_T}no" >&6
12425
12426fi
12427rm -f conftest.$ac_objext conftest.$ac_ext
12428echo "$as_me:$LINENO: checking for link" >&5
12429echo $ECHO_N "checking for link... $ECHO_C" >&6
12430cat >conftest.$ac_ext <<_ACEOF
12431#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012432/* confdefs.h. */
12433_ACEOF
12434cat confdefs.h >>conftest.$ac_ext
12435cat >>conftest.$ac_ext <<_ACEOF
12436/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012437#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012438int
12439main ()
12440{
12441void *x=link
12442 ;
12443 return 0;
12444}
12445_ACEOF
12446rm -f conftest.$ac_objext
12447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12448 (eval $ac_compile) 2>&5
12449 ac_status=$?
12450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12451 (exit $ac_status); } &&
12452 { ac_try='test -s conftest.$ac_objext'
12453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12454 (eval $ac_try) 2>&5
12455 ac_status=$?
12456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12457 (exit $ac_status); }; }; then
12458
12459cat >>confdefs.h <<\_ACEOF
12460#define HAVE_LINK 1
12461_ACEOF
12462
12463 echo "$as_me:$LINENO: result: yes" >&5
12464echo "${ECHO_T}yes" >&6
12465else
12466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012467sed 's/^/| /' conftest.$ac_ext >&5
12468
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012469echo "$as_me:$LINENO: result: no" >&5
12470echo "${ECHO_T}no" >&6
12471
12472fi
12473rm -f conftest.$ac_objext conftest.$ac_ext
12474echo "$as_me:$LINENO: checking for symlink" >&5
12475echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12476cat >conftest.$ac_ext <<_ACEOF
12477#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012478/* confdefs.h. */
12479_ACEOF
12480cat confdefs.h >>conftest.$ac_ext
12481cat >>conftest.$ac_ext <<_ACEOF
12482/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012483#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012484int
12485main ()
12486{
12487void *x=symlink
12488 ;
12489 return 0;
12490}
12491_ACEOF
12492rm -f conftest.$ac_objext
12493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12494 (eval $ac_compile) 2>&5
12495 ac_status=$?
12496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12497 (exit $ac_status); } &&
12498 { ac_try='test -s conftest.$ac_objext'
12499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12500 (eval $ac_try) 2>&5
12501 ac_status=$?
12502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12503 (exit $ac_status); }; }; then
12504
12505cat >>confdefs.h <<\_ACEOF
12506#define HAVE_SYMLINK 1
12507_ACEOF
12508
12509 echo "$as_me:$LINENO: result: yes" >&5
12510echo "${ECHO_T}yes" >&6
12511else
12512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012513sed 's/^/| /' conftest.$ac_ext >&5
12514
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012515echo "$as_me:$LINENO: result: no" >&5
12516echo "${ECHO_T}no" >&6
12517
12518fi
12519rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012520echo "$as_me:$LINENO: checking for fchdir" >&5
12521echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12522cat >conftest.$ac_ext <<_ACEOF
12523#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012524/* confdefs.h. */
12525_ACEOF
12526cat confdefs.h >>conftest.$ac_ext
12527cat >>conftest.$ac_ext <<_ACEOF
12528/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012529#include <unistd.h>
12530int
12531main ()
12532{
12533void *x=fchdir
12534 ;
12535 return 0;
12536}
12537_ACEOF
12538rm -f conftest.$ac_objext
12539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12540 (eval $ac_compile) 2>&5
12541 ac_status=$?
12542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12543 (exit $ac_status); } &&
12544 { ac_try='test -s conftest.$ac_objext'
12545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12546 (eval $ac_try) 2>&5
12547 ac_status=$?
12548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12549 (exit $ac_status); }; }; then
12550
12551cat >>confdefs.h <<\_ACEOF
12552#define HAVE_FCHDIR 1
12553_ACEOF
12554
12555 echo "$as_me:$LINENO: result: yes" >&5
12556echo "${ECHO_T}yes" >&6
12557else
12558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012559sed 's/^/| /' conftest.$ac_ext >&5
12560
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012561echo "$as_me:$LINENO: result: no" >&5
12562echo "${ECHO_T}no" >&6
12563
12564fi
12565rm -f conftest.$ac_objext conftest.$ac_ext
12566echo "$as_me:$LINENO: checking for fsync" >&5
12567echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12568cat >conftest.$ac_ext <<_ACEOF
12569#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012570/* confdefs.h. */
12571_ACEOF
12572cat confdefs.h >>conftest.$ac_ext
12573cat >>conftest.$ac_ext <<_ACEOF
12574/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012575#include <unistd.h>
12576int
12577main ()
12578{
12579void *x=fsync
12580 ;
12581 return 0;
12582}
12583_ACEOF
12584rm -f conftest.$ac_objext
12585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12586 (eval $ac_compile) 2>&5
12587 ac_status=$?
12588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12589 (exit $ac_status); } &&
12590 { ac_try='test -s conftest.$ac_objext'
12591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12592 (eval $ac_try) 2>&5
12593 ac_status=$?
12594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12595 (exit $ac_status); }; }; then
12596
12597cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012598#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012599_ACEOF
12600
12601 echo "$as_me:$LINENO: result: yes" >&5
12602echo "${ECHO_T}yes" >&6
12603else
12604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012605sed 's/^/| /' conftest.$ac_ext >&5
12606
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012607echo "$as_me:$LINENO: result: no" >&5
12608echo "${ECHO_T}no" >&6
12609
12610fi
12611rm -f conftest.$ac_objext conftest.$ac_ext
12612echo "$as_me:$LINENO: checking for fdatasync" >&5
12613echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12614cat >conftest.$ac_ext <<_ACEOF
12615#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012616/* confdefs.h. */
12617_ACEOF
12618cat confdefs.h >>conftest.$ac_ext
12619cat >>conftest.$ac_ext <<_ACEOF
12620/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012621#include <unistd.h>
12622int
12623main ()
12624{
12625void *x=fdatasync
12626 ;
12627 return 0;
12628}
12629_ACEOF
12630rm -f conftest.$ac_objext
12631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12632 (eval $ac_compile) 2>&5
12633 ac_status=$?
12634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12635 (exit $ac_status); } &&
12636 { ac_try='test -s conftest.$ac_objext'
12637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12638 (eval $ac_try) 2>&5
12639 ac_status=$?
12640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12641 (exit $ac_status); }; }; then
12642
12643cat >>confdefs.h <<\_ACEOF
12644#define HAVE_FDATASYNC 1
12645_ACEOF
12646
12647 echo "$as_me:$LINENO: result: yes" >&5
12648echo "${ECHO_T}yes" >&6
12649else
12650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012651sed 's/^/| /' conftest.$ac_ext >&5
12652
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012653echo "$as_me:$LINENO: result: no" >&5
12654echo "${ECHO_T}no" >&6
12655
12656fi
12657rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012658
Martin v. Löwisd5843682002-11-21 20:41:28 +000012659# On some systems (eg. FreeBSD 5), we would find a definition of the
12660# functions ctermid_r, setgroups in the library, but no prototype
12661# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12662# address to avoid compiler warnings and potential miscompilations
12663# because of the missing prototypes.
12664
12665echo "$as_me:$LINENO: checking for ctermid_r" >&5
12666echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12667cat >conftest.$ac_ext <<_ACEOF
12668#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012669/* confdefs.h. */
12670_ACEOF
12671cat confdefs.h >>conftest.$ac_ext
12672cat >>conftest.$ac_ext <<_ACEOF
12673/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012674
12675#include "confdefs.h"
12676#include <stdio.h>
12677
Martin v. Löwisd5843682002-11-21 20:41:28 +000012678int
12679main ()
12680{
12681void* p = ctermid_r
12682 ;
12683 return 0;
12684}
12685_ACEOF
12686rm -f conftest.$ac_objext
12687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12688 (eval $ac_compile) 2>&5
12689 ac_status=$?
12690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12691 (exit $ac_status); } &&
12692 { ac_try='test -s conftest.$ac_objext'
12693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12694 (eval $ac_try) 2>&5
12695 ac_status=$?
12696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12697 (exit $ac_status); }; }; then
12698
12699cat >>confdefs.h <<\_ACEOF
12700#define HAVE_CTERMID_R 1
12701_ACEOF
12702
12703 echo "$as_me:$LINENO: result: yes" >&5
12704echo "${ECHO_T}yes" >&6
12705else
12706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012707sed 's/^/| /' conftest.$ac_ext >&5
12708
Martin v. Löwisd5843682002-11-21 20:41:28 +000012709echo "$as_me:$LINENO: result: no" >&5
12710echo "${ECHO_T}no" >&6
12711
12712fi
12713rm -f conftest.$ac_objext conftest.$ac_ext
12714
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012715echo "$as_me:$LINENO: checking for flock" >&5
12716echo $ECHO_N "checking for flock... $ECHO_C" >&6
12717cat >conftest.$ac_ext <<_ACEOF
12718#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012719/* confdefs.h. */
12720_ACEOF
12721cat confdefs.h >>conftest.$ac_ext
12722cat >>conftest.$ac_ext <<_ACEOF
12723/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012724
12725#include "confdefs.h"
12726#include <sys/file.h>
12727
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012728int
12729main ()
12730{
12731void* p = flock
12732 ;
12733 return 0;
12734}
12735_ACEOF
12736rm -f conftest.$ac_objext
12737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12738 (eval $ac_compile) 2>&5
12739 ac_status=$?
12740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12741 (exit $ac_status); } &&
12742 { ac_try='test -s conftest.$ac_objext'
12743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12744 (eval $ac_try) 2>&5
12745 ac_status=$?
12746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747 (exit $ac_status); }; }; then
12748
12749cat >>confdefs.h <<\_ACEOF
12750#define HAVE_FLOCK 1
12751_ACEOF
12752
12753 echo "$as_me:$LINENO: result: yes" >&5
12754echo "${ECHO_T}yes" >&6
12755else
12756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012757sed 's/^/| /' conftest.$ac_ext >&5
12758
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012759echo "$as_me:$LINENO: result: no" >&5
12760echo "${ECHO_T}no" >&6
12761
12762fi
12763rm -f conftest.$ac_objext conftest.$ac_ext
12764
12765echo "$as_me:$LINENO: checking for getpagesize" >&5
12766echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12767cat >conftest.$ac_ext <<_ACEOF
12768#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012769/* confdefs.h. */
12770_ACEOF
12771cat confdefs.h >>conftest.$ac_ext
12772cat >>conftest.$ac_ext <<_ACEOF
12773/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012774
12775#include "confdefs.h"
12776#include <unistd.h>
12777
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012778int
12779main ()
12780{
12781void* p = getpagesize
12782 ;
12783 return 0;
12784}
12785_ACEOF
12786rm -f conftest.$ac_objext
12787if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12788 (eval $ac_compile) 2>&5
12789 ac_status=$?
12790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12791 (exit $ac_status); } &&
12792 { ac_try='test -s conftest.$ac_objext'
12793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12794 (eval $ac_try) 2>&5
12795 ac_status=$?
12796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12797 (exit $ac_status); }; }; then
12798
12799cat >>confdefs.h <<\_ACEOF
12800#define HAVE_GETPAGESIZE 1
12801_ACEOF
12802
12803 echo "$as_me:$LINENO: result: yes" >&5
12804echo "${ECHO_T}yes" >&6
12805else
12806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012807sed 's/^/| /' conftest.$ac_ext >&5
12808
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012809echo "$as_me:$LINENO: result: no" >&5
12810echo "${ECHO_T}no" >&6
12811
12812fi
12813rm -f conftest.$ac_objext conftest.$ac_ext
12814
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012815for ac_prog in true
12816do
12817 # Extract the first word of "$ac_prog", so it can be a program name with args.
12818set dummy $ac_prog; ac_word=$2
12819echo "$as_me:$LINENO: checking for $ac_word" >&5
12820echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12821if test "${ac_cv_prog_TRUE+set}" = set; then
12822 echo $ECHO_N "(cached) $ECHO_C" >&6
12823else
12824 if test -n "$TRUE"; then
12825 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12826else
12827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12828for as_dir in $PATH
12829do
12830 IFS=$as_save_IFS
12831 test -z "$as_dir" && as_dir=.
12832 for ac_exec_ext in '' $ac_executable_extensions; do
12833 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12834 ac_cv_prog_TRUE="$ac_prog"
12835 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12836 break 2
12837 fi
12838done
12839done
12840
12841fi
12842fi
12843TRUE=$ac_cv_prog_TRUE
12844if test -n "$TRUE"; then
12845 echo "$as_me:$LINENO: result: $TRUE" >&5
12846echo "${ECHO_T}$TRUE" >&6
12847else
12848 echo "$as_me:$LINENO: result: no" >&5
12849echo "${ECHO_T}no" >&6
12850fi
12851
12852 test -n "$TRUE" && break
12853done
12854test -n "$TRUE" || TRUE="/bin/true"
12855
12856
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012857echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12858echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12859if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12860 echo $ECHO_N "(cached) $ECHO_C" >&6
12861else
12862 ac_check_lib_save_LIBS=$LIBS
12863LIBS="-lc $LIBS"
12864cat >conftest.$ac_ext <<_ACEOF
12865#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012866/* confdefs.h. */
12867_ACEOF
12868cat confdefs.h >>conftest.$ac_ext
12869cat >>conftest.$ac_ext <<_ACEOF
12870/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012871
12872/* Override any gcc2 internal prototype to avoid an error. */
12873#ifdef __cplusplus
12874extern "C"
12875#endif
12876/* We use char because int might match the return type of a gcc2
12877 builtin and then its argument prototype would still apply. */
12878char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012879int
12880main ()
12881{
12882inet_aton ();
12883 ;
12884 return 0;
12885}
12886_ACEOF
12887rm -f conftest.$ac_objext conftest$ac_exeext
12888if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12889 (eval $ac_link) 2>&5
12890 ac_status=$?
12891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12892 (exit $ac_status); } &&
12893 { ac_try='test -s conftest$ac_exeext'
12894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12895 (eval $ac_try) 2>&5
12896 ac_status=$?
12897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12898 (exit $ac_status); }; }; then
12899 ac_cv_lib_c_inet_aton=yes
12900else
12901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012902sed 's/^/| /' conftest.$ac_ext >&5
12903
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012904ac_cv_lib_c_inet_aton=no
12905fi
12906rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12907LIBS=$ac_check_lib_save_LIBS
12908fi
12909echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12910echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12911if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012912 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012913else
12914
12915echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12916echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12917if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12918 echo $ECHO_N "(cached) $ECHO_C" >&6
12919else
12920 ac_check_lib_save_LIBS=$LIBS
12921LIBS="-lresolv $LIBS"
12922cat >conftest.$ac_ext <<_ACEOF
12923#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012924/* confdefs.h. */
12925_ACEOF
12926cat confdefs.h >>conftest.$ac_ext
12927cat >>conftest.$ac_ext <<_ACEOF
12928/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012929
12930/* Override any gcc2 internal prototype to avoid an error. */
12931#ifdef __cplusplus
12932extern "C"
12933#endif
12934/* We use char because int might match the return type of a gcc2
12935 builtin and then its argument prototype would still apply. */
12936char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012937int
12938main ()
12939{
12940inet_aton ();
12941 ;
12942 return 0;
12943}
12944_ACEOF
12945rm -f conftest.$ac_objext conftest$ac_exeext
12946if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12947 (eval $ac_link) 2>&5
12948 ac_status=$?
12949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12950 (exit $ac_status); } &&
12951 { ac_try='test -s conftest$ac_exeext'
12952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12953 (eval $ac_try) 2>&5
12954 ac_status=$?
12955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12956 (exit $ac_status); }; }; then
12957 ac_cv_lib_resolv_inet_aton=yes
12958else
12959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012960sed 's/^/| /' conftest.$ac_ext >&5
12961
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012962ac_cv_lib_resolv_inet_aton=no
12963fi
12964rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12965LIBS=$ac_check_lib_save_LIBS
12966fi
12967echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12968echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12969if test $ac_cv_lib_resolv_inet_aton = yes; then
12970 cat >>confdefs.h <<_ACEOF
12971#define HAVE_LIBRESOLV 1
12972_ACEOF
12973
12974 LIBS="-lresolv $LIBS"
12975
12976fi
12977
12978
12979fi
12980
12981
Martin v. Löwise9416172003-05-03 10:12:45 +000012982echo "$as_me:$LINENO: checking for hstrerror" >&5
12983echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12984cat >conftest.$ac_ext <<_ACEOF
12985#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012986/* confdefs.h. */
12987_ACEOF
12988cat confdefs.h >>conftest.$ac_ext
12989cat >>conftest.$ac_ext <<_ACEOF
12990/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012991
12992#include "confdefs.h"
12993#include <netdb.h>
12994
Martin v. Löwise9416172003-05-03 10:12:45 +000012995int
12996main ()
12997{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012998void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012999 ;
13000 return 0;
13001}
13002_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013003rm -f conftest.$ac_objext conftest$ac_exeext
13004if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13005 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013006 ac_status=$?
13007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13008 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013009 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13011 (eval $ac_try) 2>&5
13012 ac_status=$?
13013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13014 (exit $ac_status); }; }; then
13015
13016cat >>confdefs.h <<\_ACEOF
13017#define HAVE_HSTRERROR 1
13018_ACEOF
13019
13020 echo "$as_me:$LINENO: result: yes" >&5
13021echo "${ECHO_T}yes" >&6
13022else
13023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013024sed 's/^/| /' conftest.$ac_ext >&5
13025
Martin v. Löwise9416172003-05-03 10:12:45 +000013026echo "$as_me:$LINENO: result: no" >&5
13027echo "${ECHO_T}no" >&6
13028
13029fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013031
13032echo "$as_me:$LINENO: checking for inet_aton" >&5
13033echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13034cat >conftest.$ac_ext <<_ACEOF
13035#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013036/* confdefs.h. */
13037_ACEOF
13038cat confdefs.h >>conftest.$ac_ext
13039cat >>conftest.$ac_ext <<_ACEOF
13040/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013041
13042#include "confdefs.h"
13043#include <sys/socket.h>
13044#include <netinet/in.h>
13045#include <arpa/inet.h>
13046
Martin v. Löwise9416172003-05-03 10:12:45 +000013047int
13048main ()
13049{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013050void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013051 ;
13052 return 0;
13053}
13054_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013055rm -f conftest.$ac_objext conftest$ac_exeext
13056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13057 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013058 ac_status=$?
13059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13060 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013061 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13063 (eval $ac_try) 2>&5
13064 ac_status=$?
13065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13066 (exit $ac_status); }; }; then
13067
13068cat >>confdefs.h <<\_ACEOF
13069#define HAVE_INET_ATON 1
13070_ACEOF
13071
13072 echo "$as_me:$LINENO: result: yes" >&5
13073echo "${ECHO_T}yes" >&6
13074else
13075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013076sed 's/^/| /' conftest.$ac_ext >&5
13077
Martin v. Löwise9416172003-05-03 10:12:45 +000013078echo "$as_me:$LINENO: result: no" >&5
13079echo "${ECHO_T}no" >&6
13080
13081fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013082rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013083
13084echo "$as_me:$LINENO: checking for inet_pton" >&5
13085echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13086cat >conftest.$ac_ext <<_ACEOF
13087#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013088/* confdefs.h. */
13089_ACEOF
13090cat confdefs.h >>conftest.$ac_ext
13091cat >>conftest.$ac_ext <<_ACEOF
13092/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013093
13094#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013095#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013096#include <sys/socket.h>
13097#include <netinet/in.h>
13098#include <arpa/inet.h>
13099
Martin v. Löwise9416172003-05-03 10:12:45 +000013100int
13101main ()
13102{
13103void* p = inet_pton
13104 ;
13105 return 0;
13106}
13107_ACEOF
13108rm -f conftest.$ac_objext
13109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13110 (eval $ac_compile) 2>&5
13111 ac_status=$?
13112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13113 (exit $ac_status); } &&
13114 { ac_try='test -s conftest.$ac_objext'
13115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13116 (eval $ac_try) 2>&5
13117 ac_status=$?
13118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13119 (exit $ac_status); }; }; then
13120
13121cat >>confdefs.h <<\_ACEOF
13122#define HAVE_INET_PTON 1
13123_ACEOF
13124
13125 echo "$as_me:$LINENO: result: yes" >&5
13126echo "${ECHO_T}yes" >&6
13127else
13128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013129sed 's/^/| /' conftest.$ac_ext >&5
13130
Martin v. Löwise9416172003-05-03 10:12:45 +000013131echo "$as_me:$LINENO: result: no" >&5
13132echo "${ECHO_T}no" >&6
13133
13134fi
13135rm -f conftest.$ac_objext conftest.$ac_ext
13136
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013137# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013138echo "$as_me:$LINENO: checking for setgroups" >&5
13139echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13140cat >conftest.$ac_ext <<_ACEOF
13141#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013142/* confdefs.h. */
13143_ACEOF
13144cat confdefs.h >>conftest.$ac_ext
13145cat >>conftest.$ac_ext <<_ACEOF
13146/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013147
13148#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013149#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013150#ifdef HAVE_GRP_H
13151#include <grp.h>
13152#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013153
Martin v. Löwisd5843682002-11-21 20:41:28 +000013154int
13155main ()
13156{
13157void* p = setgroups
13158 ;
13159 return 0;
13160}
13161_ACEOF
13162rm -f conftest.$ac_objext
13163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13164 (eval $ac_compile) 2>&5
13165 ac_status=$?
13166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13167 (exit $ac_status); } &&
13168 { ac_try='test -s conftest.$ac_objext'
13169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13170 (eval $ac_try) 2>&5
13171 ac_status=$?
13172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13173 (exit $ac_status); }; }; then
13174
13175cat >>confdefs.h <<\_ACEOF
13176#define HAVE_SETGROUPS 1
13177_ACEOF
13178
13179 echo "$as_me:$LINENO: result: yes" >&5
13180echo "${ECHO_T}yes" >&6
13181else
13182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013183sed 's/^/| /' conftest.$ac_ext >&5
13184
Martin v. Löwisd5843682002-11-21 20:41:28 +000013185echo "$as_me:$LINENO: result: no" >&5
13186echo "${ECHO_T}no" >&6
13187
13188fi
13189rm -f conftest.$ac_objext conftest.$ac_ext
13190
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013191# check for openpty and forkpty
13192
Martin v. Löwis11437992002-04-12 09:54:03 +000013193
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013194for ac_func in openpty
13195do
Martin v. Löwis11437992002-04-12 09:54:03 +000013196as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13197echo "$as_me:$LINENO: checking for $ac_func" >&5
13198echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13199if eval "test \"\${$as_ac_var+set}\" = set"; then
13200 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013201else
Martin v. Löwis11437992002-04-12 09:54:03 +000013202 cat >conftest.$ac_ext <<_ACEOF
13203#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013204/* confdefs.h. */
13205_ACEOF
13206cat confdefs.h >>conftest.$ac_ext
13207cat >>conftest.$ac_ext <<_ACEOF
13208/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013209/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013210 which can conflict with char $ac_func (); below.
13211 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013212 <limits.h> exists even on freestanding compilers. Under hpux,
13213 including <limits.h> includes <sys/time.h> and causes problems
13214 checking for functions defined therein. */
13215#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013216# include <limits.h>
13217#else
13218# include <assert.h>
13219#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013220/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013221#ifdef __cplusplus
13222extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013223{
Martin v. Löwis11437992002-04-12 09:54:03 +000013224#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013225/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 builtin and then its argument prototype would still apply. */
13227char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013228/* The GNU C library defines this for functions which it implements
13229 to always fail with ENOSYS. Some functions are actually named
13230 something starting with __ and the normal name is an alias. */
13231#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13232choke me
13233#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013234char (*f) () = $ac_func;
13235#endif
13236#ifdef __cplusplus
13237}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013238#endif
13239
Skip Montanaro6dead952003-09-25 14:50:04 +000013240int
13241main ()
13242{
13243return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013244 ;
13245 return 0;
13246}
13247_ACEOF
13248rm -f conftest.$ac_objext conftest$ac_exeext
13249if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13250 (eval $ac_link) 2>&5
13251 ac_status=$?
13252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13253 (exit $ac_status); } &&
13254 { ac_try='test -s conftest$ac_exeext'
13255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13256 (eval $ac_try) 2>&5
13257 ac_status=$?
13258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13259 (exit $ac_status); }; }; then
13260 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013261else
Martin v. Löwis11437992002-04-12 09:54:03 +000013262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013263sed 's/^/| /' conftest.$ac_ext >&5
13264
Martin v. Löwis11437992002-04-12 09:54:03 +000013265eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013266fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013267rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013268fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013269echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13270echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13271if test `eval echo '${'$as_ac_var'}'` = yes; then
13272 cat >>confdefs.h <<_ACEOF
13273#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13274_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013275
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013276else
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13278echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13279if test "${ac_cv_lib_util_openpty+set}" = set; then
13280 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013281else
Martin v. Löwis11437992002-04-12 09:54:03 +000013282 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013283LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013284cat >conftest.$ac_ext <<_ACEOF
13285#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013286/* confdefs.h. */
13287_ACEOF
13288cat confdefs.h >>conftest.$ac_ext
13289cat >>conftest.$ac_ext <<_ACEOF
13290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013291
Fred Drake8cef4cf2000-06-28 16:40:38 +000013292/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013293#ifdef __cplusplus
13294extern "C"
13295#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013296/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 builtin and then its argument prototype would still apply. */
13298char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013299int
13300main ()
13301{
13302openpty ();
13303 ;
13304 return 0;
13305}
13306_ACEOF
13307rm -f conftest.$ac_objext conftest$ac_exeext
13308if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13309 (eval $ac_link) 2>&5
13310 ac_status=$?
13311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13312 (exit $ac_status); } &&
13313 { ac_try='test -s conftest$ac_exeext'
13314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13315 (eval $ac_try) 2>&5
13316 ac_status=$?
13317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13318 (exit $ac_status); }; }; then
13319 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013320else
Martin v. Löwis11437992002-04-12 09:54:03 +000013321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013322sed 's/^/| /' conftest.$ac_ext >&5
13323
Martin v. Löwis11437992002-04-12 09:54:03 +000013324ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013326rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13327LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013328fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013329echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13330echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13331if test $ac_cv_lib_util_openpty = yes; then
13332 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013333#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013334_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013335 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013336fi
13337
13338fi
13339done
13340
Martin v. Löwis11437992002-04-12 09:54:03 +000013341
Fred Drake8cef4cf2000-06-28 16:40:38 +000013342for ac_func in forkpty
13343do
Martin v. Löwis11437992002-04-12 09:54:03 +000013344as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13345echo "$as_me:$LINENO: checking for $ac_func" >&5
13346echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13347if eval "test \"\${$as_ac_var+set}\" = set"; then
13348 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013349else
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 cat >conftest.$ac_ext <<_ACEOF
13351#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013352/* confdefs.h. */
13353_ACEOF
13354cat confdefs.h >>conftest.$ac_ext
13355cat >>conftest.$ac_ext <<_ACEOF
13356/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013357/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013358 which can conflict with char $ac_func (); below.
13359 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013360 <limits.h> exists even on freestanding compilers. Under hpux,
13361 including <limits.h> includes <sys/time.h> and causes problems
13362 checking for functions defined therein. */
13363#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013364# include <limits.h>
13365#else
13366# include <assert.h>
13367#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013368/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013369#ifdef __cplusplus
13370extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013371{
Martin v. Löwis11437992002-04-12 09:54:03 +000013372#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013373/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 builtin and then its argument prototype would still apply. */
13375char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013376/* The GNU C library defines this for functions which it implements
13377 to always fail with ENOSYS. Some functions are actually named
13378 something starting with __ and the normal name is an alias. */
13379#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13380choke me
13381#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013382char (*f) () = $ac_func;
13383#endif
13384#ifdef __cplusplus
13385}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013386#endif
13387
Skip Montanaro6dead952003-09-25 14:50:04 +000013388int
13389main ()
13390{
13391return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013392 ;
13393 return 0;
13394}
13395_ACEOF
13396rm -f conftest.$ac_objext conftest$ac_exeext
13397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13398 (eval $ac_link) 2>&5
13399 ac_status=$?
13400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13401 (exit $ac_status); } &&
13402 { ac_try='test -s conftest$ac_exeext'
13403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13404 (eval $ac_try) 2>&5
13405 ac_status=$?
13406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13407 (exit $ac_status); }; }; then
13408 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013409else
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013411sed 's/^/| /' conftest.$ac_ext >&5
13412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013416fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013417echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13418echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13419if test `eval echo '${'$as_ac_var'}'` = yes; then
13420 cat >>confdefs.h <<_ACEOF
13421#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13422_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013423
Fred Drake8cef4cf2000-06-28 16:40:38 +000013424else
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13426echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13427if test "${ac_cv_lib_util_forkpty+set}" = set; then
13428 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013429else
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013431LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013432cat >conftest.$ac_ext <<_ACEOF
13433#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013434/* confdefs.h. */
13435_ACEOF
13436cat confdefs.h >>conftest.$ac_ext
13437cat >>conftest.$ac_ext <<_ACEOF
13438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013439
Fred Drake8cef4cf2000-06-28 16:40:38 +000013440/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013441#ifdef __cplusplus
13442extern "C"
13443#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013444/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 builtin and then its argument prototype would still apply. */
13446char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013447int
13448main ()
13449{
13450forkpty ();
13451 ;
13452 return 0;
13453}
13454_ACEOF
13455rm -f conftest.$ac_objext conftest$ac_exeext
13456if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13457 (eval $ac_link) 2>&5
13458 ac_status=$?
13459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13460 (exit $ac_status); } &&
13461 { ac_try='test -s conftest$ac_exeext'
13462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13463 (eval $ac_try) 2>&5
13464 ac_status=$?
13465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13466 (exit $ac_status); }; }; then
13467 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013468else
Martin v. Löwis11437992002-04-12 09:54:03 +000013469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013470sed 's/^/| /' conftest.$ac_ext >&5
13471
Martin v. Löwis11437992002-04-12 09:54:03 +000013472ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013473fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013474rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13475LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013476fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013477echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13478echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13479if test $ac_cv_lib_util_forkpty = yes; then
13480 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013481#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013482_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013483 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013484fi
13485
13486fi
13487done
13488
Jack Jansendd19cf82001-12-06 22:36:17 +000013489
Michael W. Hudson54241132001-12-07 15:38:26 +000013490# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013491
13492
13493
13494
13495
13496
Fred Drake8cef4cf2000-06-28 16:40:38 +000013497for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13498do
Martin v. Löwis11437992002-04-12 09:54:03 +000013499as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13500echo "$as_me:$LINENO: checking for $ac_func" >&5
13501echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13502if eval "test \"\${$as_ac_var+set}\" = set"; then
13503 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013504else
Martin v. Löwis11437992002-04-12 09:54:03 +000013505 cat >conftest.$ac_ext <<_ACEOF
13506#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013507/* confdefs.h. */
13508_ACEOF
13509cat confdefs.h >>conftest.$ac_ext
13510cat >>conftest.$ac_ext <<_ACEOF
13511/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013512/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013513 which can conflict with char $ac_func (); below.
13514 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013515 <limits.h> exists even on freestanding compilers. Under hpux,
13516 including <limits.h> includes <sys/time.h> and causes problems
13517 checking for functions defined therein. */
13518#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013519# include <limits.h>
13520#else
13521# include <assert.h>
13522#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013523/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013524#ifdef __cplusplus
13525extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013526{
Martin v. Löwis11437992002-04-12 09:54:03 +000013527#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013528/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 builtin and then its argument prototype would still apply. */
13530char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013531/* The GNU C library defines this for functions which it implements
13532 to always fail with ENOSYS. Some functions are actually named
13533 something starting with __ and the normal name is an alias. */
13534#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13535choke me
13536#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013537char (*f) () = $ac_func;
13538#endif
13539#ifdef __cplusplus
13540}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013541#endif
13542
Skip Montanaro6dead952003-09-25 14:50:04 +000013543int
13544main ()
13545{
13546return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 ;
13548 return 0;
13549}
13550_ACEOF
13551rm -f conftest.$ac_objext conftest$ac_exeext
13552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13553 (eval $ac_link) 2>&5
13554 ac_status=$?
13555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13556 (exit $ac_status); } &&
13557 { ac_try='test -s conftest$ac_exeext'
13558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13559 (eval $ac_try) 2>&5
13560 ac_status=$?
13561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13562 (exit $ac_status); }; }; then
13563 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013564else
Martin v. Löwis11437992002-04-12 09:54:03 +000013565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013566sed 's/^/| /' conftest.$ac_ext >&5
13567
Martin v. Löwis11437992002-04-12 09:54:03 +000013568eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013569fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013570rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013571fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013572echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13573echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13574if test `eval echo '${'$as_ac_var'}'` = yes; then
13575 cat >>confdefs.h <<_ACEOF
13576#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13577_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013578
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013579fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013580done
13581
Michael W. Hudson54241132001-12-07 15:38:26 +000013582
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
13584
13585
13586
13587
Martin v. Löwis1142de32002-03-29 16:28:31 +000013588for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013589do
Martin v. Löwis11437992002-04-12 09:54:03 +000013590as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13591echo "$as_me:$LINENO: checking for $ac_func" >&5
13592echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13593if eval "test \"\${$as_ac_var+set}\" = set"; then
13594 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013595else
Martin v. Löwis11437992002-04-12 09:54:03 +000013596 cat >conftest.$ac_ext <<_ACEOF
13597#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013598/* confdefs.h. */
13599_ACEOF
13600cat confdefs.h >>conftest.$ac_ext
13601cat >>conftest.$ac_ext <<_ACEOF
13602/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013603/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013604 which can conflict with char $ac_func (); below.
13605 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013606 <limits.h> exists even on freestanding compilers. Under hpux,
13607 including <limits.h> includes <sys/time.h> and causes problems
13608 checking for functions defined therein. */
13609#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013610# include <limits.h>
13611#else
13612# include <assert.h>
13613#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013614/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013615#ifdef __cplusplus
13616extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013617{
Martin v. Löwis11437992002-04-12 09:54:03 +000013618#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013619/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 builtin and then its argument prototype would still apply. */
13621char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013622/* The GNU C library defines this for functions which it implements
13623 to always fail with ENOSYS. Some functions are actually named
13624 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013625#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013626choke me
13627#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013628char (*f) () = $ac_func;
13629#endif
13630#ifdef __cplusplus
13631}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013632#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013633
Skip Montanaro6dead952003-09-25 14:50:04 +000013634int
13635main ()
13636{
13637return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 ;
13639 return 0;
13640}
13641_ACEOF
13642rm -f conftest.$ac_objext conftest$ac_exeext
13643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13644 (eval $ac_link) 2>&5
13645 ac_status=$?
13646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13647 (exit $ac_status); } &&
13648 { ac_try='test -s conftest$ac_exeext'
13649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13650 (eval $ac_try) 2>&5
13651 ac_status=$?
13652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13653 (exit $ac_status); }; }; then
13654 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013655else
Martin v. Löwis11437992002-04-12 09:54:03 +000013656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013657sed 's/^/| /' conftest.$ac_ext >&5
13658
Martin v. Löwis11437992002-04-12 09:54:03 +000013659eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013660fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013661rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013662fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013663echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13664echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13665if test `eval echo '${'$as_ac_var'}'` = yes; then
13666 cat >>confdefs.h <<_ACEOF
13667#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13668_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013669
Martin v. Löwis1142de32002-03-29 16:28:31 +000013670else
Martin v. Löwis11437992002-04-12 09:54:03 +000013671 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013672fi
13673done
13674
13675
Martin v. Löwis11437992002-04-12 09:54:03 +000013676
Martin v. Löwis1142de32002-03-29 16:28:31 +000013677for ac_func in getpgrp
13678do
Martin v. Löwis11437992002-04-12 09:54:03 +000013679as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13680echo "$as_me:$LINENO: checking for $ac_func" >&5
13681echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13682if eval "test \"\${$as_ac_var+set}\" = set"; then
13683 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013684else
Martin v. Löwis11437992002-04-12 09:54:03 +000013685 cat >conftest.$ac_ext <<_ACEOF
13686#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013687/* confdefs.h. */
13688_ACEOF
13689cat confdefs.h >>conftest.$ac_ext
13690cat >>conftest.$ac_ext <<_ACEOF
13691/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013692/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013693 which can conflict with char $ac_func (); below.
13694 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013695 <limits.h> exists even on freestanding compilers. Under hpux,
13696 including <limits.h> includes <sys/time.h> and causes problems
13697 checking for functions defined therein. */
13698#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013699# include <limits.h>
13700#else
13701# include <assert.h>
13702#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013703/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013704#ifdef __cplusplus
13705extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013706{
Martin v. Löwis11437992002-04-12 09:54:03 +000013707#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013708/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013709 builtin and then its argument prototype would still apply. */
13710char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013711/* The GNU C library defines this for functions which it implements
13712 to always fail with ENOSYS. Some functions are actually named
13713 something starting with __ and the normal name is an alias. */
13714#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13715choke me
13716#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013717char (*f) () = $ac_func;
13718#endif
13719#ifdef __cplusplus
13720}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013721#endif
13722
Skip Montanaro6dead952003-09-25 14:50:04 +000013723int
13724main ()
13725{
13726return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013727 ;
13728 return 0;
13729}
13730_ACEOF
13731rm -f conftest.$ac_objext conftest$ac_exeext
13732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13733 (eval $ac_link) 2>&5
13734 ac_status=$?
13735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13736 (exit $ac_status); } &&
13737 { ac_try='test -s conftest$ac_exeext'
13738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13739 (eval $ac_try) 2>&5
13740 ac_status=$?
13741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13742 (exit $ac_status); }; }; then
13743 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013744else
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013746sed 's/^/| /' conftest.$ac_ext >&5
13747
Martin v. Löwis11437992002-04-12 09:54:03 +000013748eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013749fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013750rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013751fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013752echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13753echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13754if test `eval echo '${'$as_ac_var'}'` = yes; then
13755 cat >>confdefs.h <<_ACEOF
13756#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13757_ACEOF
13758 cat >conftest.$ac_ext <<_ACEOF
13759#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013760/* confdefs.h. */
13761_ACEOF
13762cat confdefs.h >>conftest.$ac_ext
13763cat >>conftest.$ac_ext <<_ACEOF
13764/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013765#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013766int
13767main ()
13768{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013769getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 ;
13771 return 0;
13772}
13773_ACEOF
13774rm -f conftest.$ac_objext
13775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13776 (eval $ac_compile) 2>&5
13777 ac_status=$?
13778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13779 (exit $ac_status); } &&
13780 { ac_try='test -s conftest.$ac_objext'
13781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13782 (eval $ac_try) 2>&5
13783 ac_status=$?
13784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13785 (exit $ac_status); }; }; then
13786
13787cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013788#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013789_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013790
Martin v. Löwis11437992002-04-12 09:54:03 +000013791
Guido van Rossumf78abae1997-01-21 22:02:36 +000013792else
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013794sed 's/^/| /' conftest.$ac_ext >&5
13795
Guido van Rossum627b2d71993-12-24 10:39:16 +000013796fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013797rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013798
Guido van Rossum627b2d71993-12-24 10:39:16 +000013799fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013800done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013801
Jack Jansen150753c2003-03-29 22:07:47 +000013802
13803for ac_func in setpgrp
13804do
13805as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13806echo "$as_me:$LINENO: checking for $ac_func" >&5
13807echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13808if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013810else
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 cat >conftest.$ac_ext <<_ACEOF
13812#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013813/* confdefs.h. */
13814_ACEOF
13815cat confdefs.h >>conftest.$ac_ext
13816cat >>conftest.$ac_ext <<_ACEOF
13817/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013818/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013819 which can conflict with char $ac_func (); below.
13820 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013821 <limits.h> exists even on freestanding compilers. Under hpux,
13822 including <limits.h> includes <sys/time.h> and causes problems
13823 checking for functions defined therein. */
13824#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013825# include <limits.h>
13826#else
13827# include <assert.h>
13828#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013829/* Override any gcc2 internal prototype to avoid an error. */
13830#ifdef __cplusplus
13831extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013832{
Martin v. Löwis11437992002-04-12 09:54:03 +000013833#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013834/* We use char because int might match the return type of a gcc2
13835 builtin and then its argument prototype would still apply. */
13836char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013837/* The GNU C library defines this for functions which it implements
13838 to always fail with ENOSYS. Some functions are actually named
13839 something starting with __ and the normal name is an alias. */
13840#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13841choke me
13842#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013843char (*f) () = $ac_func;
13844#endif
13845#ifdef __cplusplus
13846}
Jack Jansen150753c2003-03-29 22:07:47 +000013847#endif
13848
Skip Montanaro6dead952003-09-25 14:50:04 +000013849int
13850main ()
13851{
13852return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013853 ;
13854 return 0;
13855}
13856_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013857rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013858if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13859 (eval $ac_link) 2>&5
13860 ac_status=$?
13861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013862 (exit $ac_status); } &&
13863 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13865 (eval $ac_try) 2>&5
13866 ac_status=$?
13867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13868 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013869 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013870else
Jack Jansen150753c2003-03-29 22:07:47 +000013871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013872sed 's/^/| /' conftest.$ac_ext >&5
13873
Jack Jansen150753c2003-03-29 22:07:47 +000013874eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013875fi
Jack Jansen150753c2003-03-29 22:07:47 +000013876rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013877fi
Jack Jansen150753c2003-03-29 22:07:47 +000013878echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13879echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13880if test `eval echo '${'$as_ac_var'}'` = yes; then
13881 cat >>confdefs.h <<_ACEOF
13882#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13883_ACEOF
13884 cat >conftest.$ac_ext <<_ACEOF
13885#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013886/* confdefs.h. */
13887_ACEOF
13888cat confdefs.h >>conftest.$ac_ext
13889cat >>conftest.$ac_ext <<_ACEOF
13890/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013891#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013892int
13893main ()
13894{
13895setpgrp(0,0);
13896 ;
13897 return 0;
13898}
13899_ACEOF
13900rm -f conftest.$ac_objext
13901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13902 (eval $ac_compile) 2>&5
13903 ac_status=$?
13904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13905 (exit $ac_status); } &&
13906 { ac_try='test -s conftest.$ac_objext'
13907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13908 (eval $ac_try) 2>&5
13909 ac_status=$?
13910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13911 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013912
13913cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013914#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013915_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013916
Jack Jansen150753c2003-03-29 22:07:47 +000013917
13918else
13919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013920sed 's/^/| /' conftest.$ac_ext >&5
13921
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013922fi
Jack Jansen150753c2003-03-29 22:07:47 +000013923rm -f conftest.$ac_objext conftest.$ac_ext
13924
13925fi
13926done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013927
Martin v. Löwis11437992002-04-12 09:54:03 +000013928
Thomas Wouters3a584202000-08-05 23:28:51 +000013929for ac_func in gettimeofday
13930do
Martin v. Löwis11437992002-04-12 09:54:03 +000013931as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13932echo "$as_me:$LINENO: checking for $ac_func" >&5
13933echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13934if eval "test \"\${$as_ac_var+set}\" = set"; then
13935 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013936else
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 cat >conftest.$ac_ext <<_ACEOF
13938#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013939/* confdefs.h. */
13940_ACEOF
13941cat confdefs.h >>conftest.$ac_ext
13942cat >>conftest.$ac_ext <<_ACEOF
13943/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013944/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013945 which can conflict with char $ac_func (); below.
13946 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013947 <limits.h> exists even on freestanding compilers. Under hpux,
13948 including <limits.h> includes <sys/time.h> and causes problems
13949 checking for functions defined therein. */
13950#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013951# include <limits.h>
13952#else
13953# include <assert.h>
13954#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013955/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013956#ifdef __cplusplus
13957extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013958{
Martin v. Löwis11437992002-04-12 09:54:03 +000013959#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013960/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 builtin and then its argument prototype would still apply. */
13962char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013963/* The GNU C library defines this for functions which it implements
13964 to always fail with ENOSYS. Some functions are actually named
13965 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013966#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013967choke me
13968#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013969char (*f) () = $ac_func;
13970#endif
13971#ifdef __cplusplus
13972}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013973#endif
13974
Skip Montanaro6dead952003-09-25 14:50:04 +000013975int
13976main ()
13977{
13978return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ;
13980 return 0;
13981}
13982_ACEOF
13983rm -f conftest.$ac_objext conftest$ac_exeext
13984if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13985 (eval $ac_link) 2>&5
13986 ac_status=$?
13987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13988 (exit $ac_status); } &&
13989 { ac_try='test -s conftest$ac_exeext'
13990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13991 (eval $ac_try) 2>&5
13992 ac_status=$?
13993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13994 (exit $ac_status); }; }; then
13995 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013996else
Martin v. Löwis11437992002-04-12 09:54:03 +000013997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013998sed 's/^/| /' conftest.$ac_ext >&5
13999
Martin v. Löwis11437992002-04-12 09:54:03 +000014000eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014001fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014002rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014003fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014004echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14005echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14006if test `eval echo '${'$as_ac_var'}'` = yes; then
14007 cat >>confdefs.h <<_ACEOF
14008#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14009_ACEOF
14010 cat >conftest.$ac_ext <<_ACEOF
14011#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014012/* confdefs.h. */
14013_ACEOF
14014cat confdefs.h >>conftest.$ac_ext
14015cat >>conftest.$ac_ext <<_ACEOF
14016/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014017#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014018int
14019main ()
14020{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014021gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 ;
14023 return 0;
14024}
14025_ACEOF
14026rm -f conftest.$ac_objext
14027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14028 (eval $ac_compile) 2>&5
14029 ac_status=$?
14030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14031 (exit $ac_status); } &&
14032 { ac_try='test -s conftest.$ac_objext'
14033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14034 (eval $ac_try) 2>&5
14035 ac_status=$?
14036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14037 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014038 :
14039else
Martin v. Löwis11437992002-04-12 09:54:03 +000014040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014041sed 's/^/| /' conftest.$ac_ext >&5
14042
Martin v. Löwis11437992002-04-12 09:54:03 +000014043
14044cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014045#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014046_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014047
Martin v. Löwis11437992002-04-12 09:54:03 +000014048
Guido van Rossum627b2d71993-12-24 10:39:16 +000014049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014050rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014051
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014052fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014053done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014054
Michael W. Hudson54241132001-12-07 15:38:26 +000014055
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014056echo "$as_me:$LINENO: checking for major" >&5
14057echo $ECHO_N "checking for major... $ECHO_C" >&6
14058cat >conftest.$ac_ext <<_ACEOF
14059#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014060/* confdefs.h. */
14061_ACEOF
14062cat confdefs.h >>conftest.$ac_ext
14063cat >>conftest.$ac_ext <<_ACEOF
14064/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014065
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014066#if defined(MAJOR_IN_MKDEV)
14067#include <sys/mkdev.h>
14068#elif defined(MAJOR_IN_SYSMACROS)
14069#include <sys/sysmacros.h>
14070#else
14071#include <sys/types.h>
14072#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014073
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014074int
14075main ()
14076{
14077
14078 makedev(major(0),minor(0));
14079
14080 ;
14081 return 0;
14082}
14083_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014084rm -f conftest.$ac_objext conftest$ac_exeext
14085if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14086 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014087 ac_status=$?
14088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14089 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014090 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14092 (eval $ac_try) 2>&5
14093 ac_status=$?
14094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14095 (exit $ac_status); }; }; then
14096
14097
14098cat >>confdefs.h <<\_ACEOF
14099#define HAVE_DEVICE_MACROS 1
14100_ACEOF
14101
14102 echo "$as_me:$LINENO: result: yes" >&5
14103echo "${ECHO_T}yes" >&6
14104
14105else
14106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014107sed 's/^/| /' conftest.$ac_ext >&5
14108
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014109
14110 echo "$as_me:$LINENO: result: no" >&5
14111echo "${ECHO_T}no" >&6
14112
14113fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014114rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014115
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014116# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014117# for [no]getaddrinfo in netdb.h.
14118echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14119echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14120cat >conftest.$ac_ext <<_ACEOF
14121#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014122/* confdefs.h. */
14123_ACEOF
14124cat confdefs.h >>conftest.$ac_ext
14125cat >>conftest.$ac_ext <<_ACEOF
14126/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014127
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014128#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014129#include <sys/socket.h>
14130#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014131#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014132
Martin v. Löwis11437992002-04-12 09:54:03 +000014133int
14134main ()
14135{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014136
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014137getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014138
Martin v. Löwis11437992002-04-12 09:54:03 +000014139 ;
14140 return 0;
14141}
14142_ACEOF
14143rm -f conftest.$ac_objext conftest$ac_exeext
14144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14145 (eval $ac_link) 2>&5
14146 ac_status=$?
14147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14148 (exit $ac_status); } &&
14149 { ac_try='test -s conftest$ac_exeext'
14150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14151 (eval $ac_try) 2>&5
14152 ac_status=$?
14153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14154 (exit $ac_status); }; }; then
14155
14156echo "$as_me:$LINENO: result: yes" >&5
14157echo "${ECHO_T}yes" >&6
14158echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14159echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014160if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014161 echo "$as_me:$LINENO: result: buggy" >&5
14162echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014163buggygetaddrinfo=yes
14164else
Martin v. Löwis11437992002-04-12 09:54:03 +000014165 cat >conftest.$ac_ext <<_ACEOF
14166#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014167/* confdefs.h. */
14168_ACEOF
14169cat confdefs.h >>conftest.$ac_ext
14170cat >>conftest.$ac_ext <<_ACEOF
14171/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014172
14173#include <sys/types.h>
14174#include <netdb.h>
14175#include <string.h>
14176#include <sys/socket.h>
14177#include <netinet/in.h>
14178
14179main()
14180{
14181 int passive, gaierr, inet4 = 0, inet6 = 0;
14182 struct addrinfo hints, *ai, *aitop;
14183 char straddr[INET6_ADDRSTRLEN], strport[16];
14184
14185 for (passive = 0; passive <= 1; passive++) {
14186 memset(&hints, 0, sizeof(hints));
14187 hints.ai_family = AF_UNSPEC;
14188 hints.ai_flags = passive ? AI_PASSIVE : 0;
14189 hints.ai_socktype = SOCK_STREAM;
14190 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14191 (void)gai_strerror(gaierr);
14192 goto bad;
14193 }
14194 for (ai = aitop; ai; ai = ai->ai_next) {
14195 if (ai->ai_addr == NULL ||
14196 ai->ai_addrlen == 0 ||
14197 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14198 straddr, sizeof(straddr), strport, sizeof(strport),
14199 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14200 goto bad;
14201 }
14202 switch (ai->ai_family) {
14203 case AF_INET:
14204 if (strcmp(strport, "54321") != 0) {
14205 goto bad;
14206 }
14207 if (passive) {
14208 if (strcmp(straddr, "0.0.0.0") != 0) {
14209 goto bad;
14210 }
14211 } else {
14212 if (strcmp(straddr, "127.0.0.1") != 0) {
14213 goto bad;
14214 }
14215 }
14216 inet4++;
14217 break;
14218 case AF_INET6:
14219 if (strcmp(strport, "54321") != 0) {
14220 goto bad;
14221 }
14222 if (passive) {
14223 if (strcmp(straddr, "::") != 0) {
14224 goto bad;
14225 }
14226 } else {
14227 if (strcmp(straddr, "::1") != 0) {
14228 goto bad;
14229 }
14230 }
14231 inet6++;
14232 break;
14233 case AF_UNSPEC:
14234 goto bad;
14235 break;
14236 default:
14237 /* another family support? */
14238 break;
14239 }
14240 }
14241 }
14242
14243 if (!(inet4 == 0 || inet4 == 2))
14244 goto bad;
14245 if (!(inet6 == 0 || inet6 == 2))
14246 goto bad;
14247
14248 if (aitop)
14249 freeaddrinfo(aitop);
14250 exit(0);
14251
14252 bad:
14253 if (aitop)
14254 freeaddrinfo(aitop);
14255 exit(1);
14256}
14257
Martin v. Löwis11437992002-04-12 09:54:03 +000014258_ACEOF
14259rm -f conftest$ac_exeext
14260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14261 (eval $ac_link) 2>&5
14262 ac_status=$?
14263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14264 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14266 (eval $ac_try) 2>&5
14267 ac_status=$?
14268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14269 (exit $ac_status); }; }; then
14270 echo "$as_me:$LINENO: result: good" >&5
14271echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014272buggygetaddrinfo=no
14273else
Martin v. Löwis11437992002-04-12 09:54:03 +000014274 echo "$as_me: program exited with status $ac_status" >&5
14275echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014276sed 's/^/| /' conftest.$ac_ext >&5
14277
Martin v. Löwis11437992002-04-12 09:54:03 +000014278( exit $ac_status )
14279echo "$as_me:$LINENO: result: buggy" >&5
14280echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014281buggygetaddrinfo=yes
14282fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014283rm -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 +000014284fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014285else
Martin v. Löwis11437992002-04-12 09:54:03 +000014286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014287sed 's/^/| /' conftest.$ac_ext >&5
14288
Martin v. Löwis11437992002-04-12 09:54:03 +000014289
14290echo "$as_me:$LINENO: result: no" >&5
14291echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014292buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014293
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014294fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014295rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014296
14297if test "$buggygetaddrinfo" = "yes"; then
14298 if test "$ipv6" = "yes"; then
14299 echo 'Fatal: You must get working getaddrinfo() function.'
14300 echo ' or you can specify "--disable-ipv6"'.
14301 exit 1
14302 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014303else
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
14305cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014306#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014307_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014308
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014310
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014311for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014312do
Martin v. Löwis11437992002-04-12 09:54:03 +000014313as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14314echo "$as_me:$LINENO: checking for $ac_func" >&5
14315echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14316if eval "test \"\${$as_ac_var+set}\" = set"; then
14317 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014318else
Martin v. Löwis11437992002-04-12 09:54:03 +000014319 cat >conftest.$ac_ext <<_ACEOF
14320#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014321/* confdefs.h. */
14322_ACEOF
14323cat confdefs.h >>conftest.$ac_ext
14324cat >>conftest.$ac_ext <<_ACEOF
14325/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014326/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014327 which can conflict with char $ac_func (); below.
14328 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014329 <limits.h> exists even on freestanding compilers. Under hpux,
14330 including <limits.h> includes <sys/time.h> and causes problems
14331 checking for functions defined therein. */
14332#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014333# include <limits.h>
14334#else
14335# include <assert.h>
14336#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014337/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014338#ifdef __cplusplus
14339extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014340{
Martin v. Löwis11437992002-04-12 09:54:03 +000014341#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014342/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 builtin and then its argument prototype would still apply. */
14344char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014345/* The GNU C library defines this for functions which it implements
14346 to always fail with ENOSYS. Some functions are actually named
14347 something starting with __ and the normal name is an alias. */
14348#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14349choke me
14350#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014351char (*f) () = $ac_func;
14352#endif
14353#ifdef __cplusplus
14354}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014355#endif
14356
Skip Montanaro6dead952003-09-25 14:50:04 +000014357int
14358main ()
14359{
14360return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014361 ;
14362 return 0;
14363}
14364_ACEOF
14365rm -f conftest.$ac_objext conftest$ac_exeext
14366if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14367 (eval $ac_link) 2>&5
14368 ac_status=$?
14369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14370 (exit $ac_status); } &&
14371 { ac_try='test -s conftest$ac_exeext'
14372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14373 (eval $ac_try) 2>&5
14374 ac_status=$?
14375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14376 (exit $ac_status); }; }; then
14377 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014378else
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014380sed 's/^/| /' conftest.$ac_ext >&5
14381
Martin v. Löwis11437992002-04-12 09:54:03 +000014382eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014384rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014385fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014386echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14387echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14388if test `eval echo '${'$as_ac_var'}'` = yes; then
14389 cat >>confdefs.h <<_ACEOF
14390#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14391_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014392
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014393fi
14394done
14395
Michael W. Hudson54241132001-12-07 15:38:26 +000014396
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014397# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014398echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14399echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14400if test "${ac_cv_header_time+set}" = set; then
14401 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014402else
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 cat >conftest.$ac_ext <<_ACEOF
14404#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014405/* confdefs.h. */
14406_ACEOF
14407cat confdefs.h >>conftest.$ac_ext
14408cat >>conftest.$ac_ext <<_ACEOF
14409/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014410#include <sys/types.h>
14411#include <sys/time.h>
14412#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014413
Martin v. Löwis11437992002-04-12 09:54:03 +000014414int
14415main ()
14416{
14417if ((struct tm *) 0)
14418return 0;
14419 ;
14420 return 0;
14421}
14422_ACEOF
14423rm -f conftest.$ac_objext
14424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14425 (eval $ac_compile) 2>&5
14426 ac_status=$?
14427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14428 (exit $ac_status); } &&
14429 { ac_try='test -s conftest.$ac_objext'
14430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14431 (eval $ac_try) 2>&5
14432 ac_status=$?
14433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14434 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014435 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014436else
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014438sed 's/^/| /' conftest.$ac_ext >&5
14439
Martin v. Löwis11437992002-04-12 09:54:03 +000014440ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014442rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014443fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014444echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14445echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014446if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014447
14448cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014449#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014450_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014451
14452fi
14453
Martin v. Löwis11437992002-04-12 09:54:03 +000014454echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14455echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14456if test "${ac_cv_struct_tm+set}" = set; then
14457 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014458else
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 cat >conftest.$ac_ext <<_ACEOF
14460#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014461/* confdefs.h. */
14462_ACEOF
14463cat confdefs.h >>conftest.$ac_ext
14464cat >>conftest.$ac_ext <<_ACEOF
14465/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014466#include <sys/types.h>
14467#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014468
Martin v. Löwis11437992002-04-12 09:54:03 +000014469int
14470main ()
14471{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014472struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 ;
14474 return 0;
14475}
14476_ACEOF
14477rm -f conftest.$ac_objext
14478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14479 (eval $ac_compile) 2>&5
14480 ac_status=$?
14481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14482 (exit $ac_status); } &&
14483 { ac_try='test -s conftest.$ac_objext'
14484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14485 (eval $ac_try) 2>&5
14486 ac_status=$?
14487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14488 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014489 ac_cv_struct_tm=time.h
14490else
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014492sed 's/^/| /' conftest.$ac_ext >&5
14493
Martin v. Löwis11437992002-04-12 09:54:03 +000014494ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014495fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014496rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014497fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014498echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14499echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014500if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014501
14502cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014503#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014504_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014505
14506fi
14507
Martin v. Löwis11437992002-04-12 09:54:03 +000014508echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14509echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14510if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14511 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014512else
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 cat >conftest.$ac_ext <<_ACEOF
14514#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014515/* confdefs.h. */
14516_ACEOF
14517cat confdefs.h >>conftest.$ac_ext
14518cat >>conftest.$ac_ext <<_ACEOF
14519/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014520#include <sys/types.h>
14521#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014522
14523
Martin v. Löwis11437992002-04-12 09:54:03 +000014524int
14525main ()
14526{
14527static struct tm ac_aggr;
14528if (ac_aggr.tm_zone)
14529return 0;
14530 ;
14531 return 0;
14532}
14533_ACEOF
14534rm -f conftest.$ac_objext
14535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14536 (eval $ac_compile) 2>&5
14537 ac_status=$?
14538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14539 (exit $ac_status); } &&
14540 { ac_try='test -s conftest.$ac_objext'
14541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14542 (eval $ac_try) 2>&5
14543 ac_status=$?
14544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14545 (exit $ac_status); }; }; then
14546 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014547else
Martin v. Löwis11437992002-04-12 09:54:03 +000014548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014549sed 's/^/| /' conftest.$ac_ext >&5
14550
14551cat >conftest.$ac_ext <<_ACEOF
14552#line $LINENO "configure"
14553/* confdefs.h. */
14554_ACEOF
14555cat confdefs.h >>conftest.$ac_ext
14556cat >>conftest.$ac_ext <<_ACEOF
14557/* end confdefs.h. */
14558#include <sys/types.h>
14559#include <$ac_cv_struct_tm>
14560
14561
14562int
14563main ()
14564{
14565static struct tm ac_aggr;
14566if (sizeof ac_aggr.tm_zone)
14567return 0;
14568 ;
14569 return 0;
14570}
14571_ACEOF
14572rm -f conftest.$ac_objext
14573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14574 (eval $ac_compile) 2>&5
14575 ac_status=$?
14576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14577 (exit $ac_status); } &&
14578 { ac_try='test -s conftest.$ac_objext'
14579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14580 (eval $ac_try) 2>&5
14581 ac_status=$?
14582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14583 (exit $ac_status); }; }; then
14584 ac_cv_member_struct_tm_tm_zone=yes
14585else
14586 echo "$as_me: failed program was:" >&5
14587sed 's/^/| /' conftest.$ac_ext >&5
14588
Martin v. Löwis11437992002-04-12 09:54:03 +000014589ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014590fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014591rm -f conftest.$ac_objext conftest.$ac_ext
14592fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014593rm -f conftest.$ac_objext conftest.$ac_ext
14594fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014595echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14596echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14597if test $ac_cv_member_struct_tm_tm_zone = yes; then
14598
14599cat >>confdefs.h <<_ACEOF
14600#define HAVE_STRUCT_TM_TM_ZONE 1
14601_ACEOF
14602
14603
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014604fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014605
Martin v. Löwis11437992002-04-12 09:54:03 +000014606if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14607
14608cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014609#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014610_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014611
14612else
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 echo "$as_me:$LINENO: checking for tzname" >&5
14614echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14615if test "${ac_cv_var_tzname+set}" = set; then
14616 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014617else
Martin v. Löwis11437992002-04-12 09:54:03 +000014618 cat >conftest.$ac_ext <<_ACEOF
14619#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014620/* confdefs.h. */
14621_ACEOF
14622cat confdefs.h >>conftest.$ac_ext
14623cat >>conftest.$ac_ext <<_ACEOF
14624/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014625#include <time.h>
14626#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014627extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014629
Martin v. Löwis11437992002-04-12 09:54:03 +000014630int
14631main ()
14632{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014633atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014634 ;
14635 return 0;
14636}
14637_ACEOF
14638rm -f conftest.$ac_objext conftest$ac_exeext
14639if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14640 (eval $ac_link) 2>&5
14641 ac_status=$?
14642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14643 (exit $ac_status); } &&
14644 { ac_try='test -s conftest$ac_exeext'
14645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14646 (eval $ac_try) 2>&5
14647 ac_status=$?
14648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14649 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014650 ac_cv_var_tzname=yes
14651else
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014653sed 's/^/| /' conftest.$ac_ext >&5
14654
Martin v. Löwis11437992002-04-12 09:54:03 +000014655ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014656fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014657rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014658fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014659echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14660echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014661 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014662
14663cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014664#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014665_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014666
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014667 fi
14668fi
14669
Martin v. Löwis11437992002-04-12 09:54:03 +000014670echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14671echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14672if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14673 echo $ECHO_N "(cached) $ECHO_C" >&6
14674else
14675 cat >conftest.$ac_ext <<_ACEOF
14676#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014677/* confdefs.h. */
14678_ACEOF
14679cat confdefs.h >>conftest.$ac_ext
14680cat >>conftest.$ac_ext <<_ACEOF
14681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014682$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014683int
14684main ()
14685{
14686static struct stat ac_aggr;
14687if (ac_aggr.st_rdev)
14688return 0;
14689 ;
14690 return 0;
14691}
14692_ACEOF
14693rm -f conftest.$ac_objext
14694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14695 (eval $ac_compile) 2>&5
14696 ac_status=$?
14697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14698 (exit $ac_status); } &&
14699 { ac_try='test -s conftest.$ac_objext'
14700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14701 (eval $ac_try) 2>&5
14702 ac_status=$?
14703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14704 (exit $ac_status); }; }; then
14705 ac_cv_member_struct_stat_st_rdev=yes
14706else
14707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014708sed 's/^/| /' conftest.$ac_ext >&5
14709
14710cat >conftest.$ac_ext <<_ACEOF
14711#line $LINENO "configure"
14712/* confdefs.h. */
14713_ACEOF
14714cat confdefs.h >>conftest.$ac_ext
14715cat >>conftest.$ac_ext <<_ACEOF
14716/* end confdefs.h. */
14717$ac_includes_default
14718int
14719main ()
14720{
14721static struct stat ac_aggr;
14722if (sizeof ac_aggr.st_rdev)
14723return 0;
14724 ;
14725 return 0;
14726}
14727_ACEOF
14728rm -f conftest.$ac_objext
14729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14730 (eval $ac_compile) 2>&5
14731 ac_status=$?
14732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14733 (exit $ac_status); } &&
14734 { ac_try='test -s conftest.$ac_objext'
14735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14736 (eval $ac_try) 2>&5
14737 ac_status=$?
14738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14739 (exit $ac_status); }; }; then
14740 ac_cv_member_struct_stat_st_rdev=yes
14741else
14742 echo "$as_me: failed program was:" >&5
14743sed 's/^/| /' conftest.$ac_ext >&5
14744
Martin v. Löwis11437992002-04-12 09:54:03 +000014745ac_cv_member_struct_stat_st_rdev=no
14746fi
14747rm -f conftest.$ac_objext conftest.$ac_ext
14748fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014749rm -f conftest.$ac_objext conftest.$ac_ext
14750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014751echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14752echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14753if test $ac_cv_member_struct_stat_st_rdev = yes; then
14754
14755cat >>confdefs.h <<_ACEOF
14756#define HAVE_STRUCT_STAT_ST_RDEV 1
14757_ACEOF
14758
14759
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014760fi
14761
Martin v. Löwis11437992002-04-12 09:54:03 +000014762echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14763echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14764if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14765 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014766else
Martin v. Löwis11437992002-04-12 09:54:03 +000014767 cat >conftest.$ac_ext <<_ACEOF
14768#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014769/* confdefs.h. */
14770_ACEOF
14771cat confdefs.h >>conftest.$ac_ext
14772cat >>conftest.$ac_ext <<_ACEOF
14773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014774$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014775int
14776main ()
14777{
14778static struct stat ac_aggr;
14779if (ac_aggr.st_blksize)
14780return 0;
14781 ;
14782 return 0;
14783}
14784_ACEOF
14785rm -f conftest.$ac_objext
14786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14787 (eval $ac_compile) 2>&5
14788 ac_status=$?
14789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14790 (exit $ac_status); } &&
14791 { ac_try='test -s conftest.$ac_objext'
14792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14793 (eval $ac_try) 2>&5
14794 ac_status=$?
14795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14796 (exit $ac_status); }; }; then
14797 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014798else
Martin v. Löwis11437992002-04-12 09:54:03 +000014799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014800sed 's/^/| /' conftest.$ac_ext >&5
14801
14802cat >conftest.$ac_ext <<_ACEOF
14803#line $LINENO "configure"
14804/* confdefs.h. */
14805_ACEOF
14806cat confdefs.h >>conftest.$ac_ext
14807cat >>conftest.$ac_ext <<_ACEOF
14808/* end confdefs.h. */
14809$ac_includes_default
14810int
14811main ()
14812{
14813static struct stat ac_aggr;
14814if (sizeof ac_aggr.st_blksize)
14815return 0;
14816 ;
14817 return 0;
14818}
14819_ACEOF
14820rm -f conftest.$ac_objext
14821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14822 (eval $ac_compile) 2>&5
14823 ac_status=$?
14824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14825 (exit $ac_status); } &&
14826 { ac_try='test -s conftest.$ac_objext'
14827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14828 (eval $ac_try) 2>&5
14829 ac_status=$?
14830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14831 (exit $ac_status); }; }; then
14832 ac_cv_member_struct_stat_st_blksize=yes
14833else
14834 echo "$as_me: failed program was:" >&5
14835sed 's/^/| /' conftest.$ac_ext >&5
14836
Martin v. Löwis11437992002-04-12 09:54:03 +000014837ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014839rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014840fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014841rm -f conftest.$ac_objext conftest.$ac_ext
14842fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014843echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14844echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14845if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014846
Martin v. Löwis11437992002-04-12 09:54:03 +000014847cat >>confdefs.h <<_ACEOF
14848#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14849_ACEOF
14850
14851
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014852fi
14853
Martin v. Löwis11437992002-04-12 09:54:03 +000014854echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14855echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14856if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14857 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014858else
Martin v. Löwis11437992002-04-12 09:54:03 +000014859 cat >conftest.$ac_ext <<_ACEOF
14860#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014861/* confdefs.h. */
14862_ACEOF
14863cat confdefs.h >>conftest.$ac_ext
14864cat >>conftest.$ac_ext <<_ACEOF
14865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014866$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014867int
14868main ()
14869{
14870static struct stat ac_aggr;
14871if (ac_aggr.st_blocks)
14872return 0;
14873 ;
14874 return 0;
14875}
14876_ACEOF
14877rm -f conftest.$ac_objext
14878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14879 (eval $ac_compile) 2>&5
14880 ac_status=$?
14881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14882 (exit $ac_status); } &&
14883 { ac_try='test -s conftest.$ac_objext'
14884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14885 (eval $ac_try) 2>&5
14886 ac_status=$?
14887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14888 (exit $ac_status); }; }; then
14889 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014890else
Martin v. Löwis11437992002-04-12 09:54:03 +000014891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014892sed 's/^/| /' conftest.$ac_ext >&5
14893
14894cat >conftest.$ac_ext <<_ACEOF
14895#line $LINENO "configure"
14896/* confdefs.h. */
14897_ACEOF
14898cat confdefs.h >>conftest.$ac_ext
14899cat >>conftest.$ac_ext <<_ACEOF
14900/* end confdefs.h. */
14901$ac_includes_default
14902int
14903main ()
14904{
14905static struct stat ac_aggr;
14906if (sizeof ac_aggr.st_blocks)
14907return 0;
14908 ;
14909 return 0;
14910}
14911_ACEOF
14912rm -f conftest.$ac_objext
14913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14914 (eval $ac_compile) 2>&5
14915 ac_status=$?
14916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14917 (exit $ac_status); } &&
14918 { ac_try='test -s conftest.$ac_objext'
14919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14920 (eval $ac_try) 2>&5
14921 ac_status=$?
14922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14923 (exit $ac_status); }; }; then
14924 ac_cv_member_struct_stat_st_blocks=yes
14925else
14926 echo "$as_me: failed program was:" >&5
14927sed 's/^/| /' conftest.$ac_ext >&5
14928
Martin v. Löwis11437992002-04-12 09:54:03 +000014929ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014930fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014931rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014932fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014933rm -f conftest.$ac_objext conftest.$ac_ext
14934fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014935echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14936echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14937if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014938
Martin v. Löwis11437992002-04-12 09:54:03 +000014939cat >>confdefs.h <<_ACEOF
14940#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14941_ACEOF
14942
14943
14944cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014945#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014946_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014947
14948else
Martin v. Löwis11437992002-04-12 09:54:03 +000014949 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014950fi
14951
Michael W. Hudson54241132001-12-07 15:38:26 +000014952
Martin v. Löwis11437992002-04-12 09:54:03 +000014953
14954echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14955echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14956if test "${ac_cv_header_time_altzone+set}" = set; then
14957 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014958else
Martin v. Löwis11437992002-04-12 09:54:03 +000014959 cat >conftest.$ac_ext <<_ACEOF
14960#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014961/* confdefs.h. */
14962_ACEOF
14963cat confdefs.h >>conftest.$ac_ext
14964cat >>conftest.$ac_ext <<_ACEOF
14965/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014966#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014967int
14968main ()
14969{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014970return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014971 ;
14972 return 0;
14973}
14974_ACEOF
14975rm -f conftest.$ac_objext
14976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14977 (eval $ac_compile) 2>&5
14978 ac_status=$?
14979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14980 (exit $ac_status); } &&
14981 { ac_try='test -s conftest.$ac_objext'
14982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14983 (eval $ac_try) 2>&5
14984 ac_status=$?
14985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14986 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014987 ac_cv_header_time_altzone=yes
14988else
Martin v. Löwis11437992002-04-12 09:54:03 +000014989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014990sed 's/^/| /' conftest.$ac_ext >&5
14991
Martin v. Löwis11437992002-04-12 09:54:03 +000014992ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014993fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014994rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014995fi
14996
Martin v. Löwis11437992002-04-12 09:54:03 +000014997echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14998echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014999if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015000
15001cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015002#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015003_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015004
15005fi
15006
Guido van Rossumda88dad1995-01-26 00:46:29 +000015007was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015008echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15009echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15010cat >conftest.$ac_ext <<_ACEOF
15011#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015012/* confdefs.h. */
15013_ACEOF
15014cat confdefs.h >>conftest.$ac_ext
15015cat >>conftest.$ac_ext <<_ACEOF
15016/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015017
15018#include <sys/types.h>
15019#include <sys/select.h>
15020#include <sys/time.h>
15021
Martin v. Löwis11437992002-04-12 09:54:03 +000015022int
15023main ()
15024{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015025;
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 ;
15027 return 0;
15028}
15029_ACEOF
15030rm -f conftest.$ac_objext
15031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15032 (eval $ac_compile) 2>&5
15033 ac_status=$?
15034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15035 (exit $ac_status); } &&
15036 { ac_try='test -s conftest.$ac_objext'
15037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15038 (eval $ac_try) 2>&5
15039 ac_status=$?
15040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15041 (exit $ac_status); }; }; then
15042
15043
15044cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015045#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015046_ACEOF
15047
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015048 was_it_defined=yes
15049
Guido van Rossumf78abae1997-01-21 22:02:36 +000015050else
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015052sed 's/^/| /' conftest.$ac_ext >&5
15053
Guido van Rossum7f43da71994-08-01 12:15:30 +000015054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015055rm -f conftest.$ac_objext conftest.$ac_ext
15056echo "$as_me:$LINENO: result: $was_it_defined" >&5
15057echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015058
Martin v. Löwis11437992002-04-12 09:54:03 +000015059echo "$as_me:$LINENO: checking for addrinfo" >&5
15060echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15061if test "${ac_cv_struct_addrinfo+set}" = set; then
15062 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015063else
Martin v. Löwis11437992002-04-12 09:54:03 +000015064 cat >conftest.$ac_ext <<_ACEOF
15065#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015066/* confdefs.h. */
15067_ACEOF
15068cat confdefs.h >>conftest.$ac_ext
15069cat >>conftest.$ac_ext <<_ACEOF
15070/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015071
15072# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015073int
15074main ()
15075{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015076struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015077 ;
15078 return 0;
15079}
15080_ACEOF
15081rm -f conftest.$ac_objext
15082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15083 (eval $ac_compile) 2>&5
15084 ac_status=$?
15085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15086 (exit $ac_status); } &&
15087 { ac_try='test -s conftest.$ac_objext'
15088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15089 (eval $ac_try) 2>&5
15090 ac_status=$?
15091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15092 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015093 ac_cv_struct_addrinfo=yes
15094else
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015096sed 's/^/| /' conftest.$ac_ext >&5
15097
Martin v. Löwis11437992002-04-12 09:54:03 +000015098ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015099fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015100rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015101fi
15102
Martin v. Löwis11437992002-04-12 09:54:03 +000015103echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15104echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015105if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015106
15107cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015108#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015109_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015110
15111fi
15112
Martin v. Löwis11437992002-04-12 09:54:03 +000015113echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15114echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15115if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15116 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015117else
Martin v. Löwis11437992002-04-12 09:54:03 +000015118 cat >conftest.$ac_ext <<_ACEOF
15119#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015120/* confdefs.h. */
15121_ACEOF
15122cat confdefs.h >>conftest.$ac_ext
15123cat >>conftest.$ac_ext <<_ACEOF
15124/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015125
15126# include <sys/types.h>
15127# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015128int
15129main ()
15130{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015131struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015132 ;
15133 return 0;
15134}
15135_ACEOF
15136rm -f conftest.$ac_objext
15137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15138 (eval $ac_compile) 2>&5
15139 ac_status=$?
15140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15141 (exit $ac_status); } &&
15142 { ac_try='test -s conftest.$ac_objext'
15143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15144 (eval $ac_try) 2>&5
15145 ac_status=$?
15146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15147 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015148 ac_cv_struct_sockaddr_storage=yes
15149else
Martin v. Löwis11437992002-04-12 09:54:03 +000015150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015151sed 's/^/| /' conftest.$ac_ext >&5
15152
Martin v. Löwis11437992002-04-12 09:54:03 +000015153ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015154fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015155rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015156fi
15157
Martin v. Löwis11437992002-04-12 09:54:03 +000015158echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15159echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015160if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015161
15162cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015163#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015164_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015165
15166fi
15167
Guido van Rossum627b2d71993-12-24 10:39:16 +000015168# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015169
Michael W. Hudson54241132001-12-07 15:38:26 +000015170
Martin v. Löwis11437992002-04-12 09:54:03 +000015171echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15172echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15173if test "${ac_cv_c_char_unsigned+set}" = set; then
15174 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015175else
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 cat >conftest.$ac_ext <<_ACEOF
15177#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015178/* confdefs.h. */
15179_ACEOF
15180cat confdefs.h >>conftest.$ac_ext
15181cat >>conftest.$ac_ext <<_ACEOF
15182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015183$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015184int
15185main ()
15186{
15187static int test_array [1 - 2 * !(((char) -1) < 0)];
15188test_array [0] = 0
15189
15190 ;
15191 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015192}
Martin v. Löwis11437992002-04-12 09:54:03 +000015193_ACEOF
15194rm -f conftest.$ac_objext
15195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15196 (eval $ac_compile) 2>&5
15197 ac_status=$?
15198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15199 (exit $ac_status); } &&
15200 { ac_try='test -s conftest.$ac_objext'
15201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15202 (eval $ac_try) 2>&5
15203 ac_status=$?
15204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15205 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015206 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015207else
15208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015209sed 's/^/| /' conftest.$ac_ext >&5
15210
Martin v. Löwis11437992002-04-12 09:54:03 +000015211ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015212fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015213rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015214fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015215echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15216echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015217if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015219#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015220_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015221
15222fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015223
Martin v. Löwis11437992002-04-12 09:54:03 +000015224echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15225echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15226if test "${ac_cv_c_const+set}" = set; then
15227 echo $ECHO_N "(cached) $ECHO_C" >&6
15228else
15229 cat >conftest.$ac_ext <<_ACEOF
15230#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015231/* confdefs.h. */
15232_ACEOF
15233cat confdefs.h >>conftest.$ac_ext
15234cat >>conftest.$ac_ext <<_ACEOF
15235/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015236
Martin v. Löwis11437992002-04-12 09:54:03 +000015237int
15238main ()
15239{
15240/* FIXME: Include the comments suggested by Paul. */
15241#ifndef __cplusplus
15242 /* Ultrix mips cc rejects this. */
15243 typedef int charset[2];
15244 const charset x;
15245 /* SunOS 4.1.1 cc rejects this. */
15246 char const *const *ccp;
15247 char **p;
15248 /* NEC SVR4.0.2 mips cc rejects this. */
15249 struct point {int x, y;};
15250 static struct point const zero = {0,0};
15251 /* AIX XL C 1.02.0.0 rejects this.
15252 It does not let you subtract one const X* pointer from another in
15253 an arm of an if-expression whose if-part is not a constant
15254 expression */
15255 const char *g = "string";
15256 ccp = &g + (g ? g-g : 0);
15257 /* HPUX 7.0 cc rejects these. */
15258 ++ccp;
15259 p = (char**) ccp;
15260 ccp = (char const *const *) p;
15261 { /* SCO 3.2v4 cc rejects this. */
15262 char *t;
15263 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015264
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 *t++ = 0;
15266 }
15267 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15268 int x[] = {25, 17};
15269 const int *foo = &x[0];
15270 ++foo;
15271 }
15272 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15273 typedef const int *iptr;
15274 iptr p = 0;
15275 ++p;
15276 }
15277 { /* AIX XL C 1.02.0.0 rejects this saying
15278 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15279 struct s { int j; const int *ap[3]; };
15280 struct s *b; b->j = 5;
15281 }
15282 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15283 const int foo = 10;
15284 }
15285#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015286
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 ;
15288 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015289}
Martin v. Löwis11437992002-04-12 09:54:03 +000015290_ACEOF
15291rm -f conftest.$ac_objext
15292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15293 (eval $ac_compile) 2>&5
15294 ac_status=$?
15295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15296 (exit $ac_status); } &&
15297 { ac_try='test -s conftest.$ac_objext'
15298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15299 (eval $ac_try) 2>&5
15300 ac_status=$?
15301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15302 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015303 ac_cv_c_const=yes
15304else
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015306sed 's/^/| /' conftest.$ac_ext >&5
15307
Martin v. Löwis11437992002-04-12 09:54:03 +000015308ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015310rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015311fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015312echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15313echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015314if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015315
15316cat >>confdefs.h <<\_ACEOF
15317#define const
15318_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015319
15320fi
15321
Michael W. Hudson54241132001-12-07 15:38:26 +000015322
Guido van Rossumda88dad1995-01-26 00:46:29 +000015323works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015324echo "$as_me:$LINENO: checking for working volatile" >&5
15325echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15326cat >conftest.$ac_ext <<_ACEOF
15327#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015328/* confdefs.h. */
15329_ACEOF
15330cat confdefs.h >>conftest.$ac_ext
15331cat >>conftest.$ac_ext <<_ACEOF
15332/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015333
Martin v. Löwis11437992002-04-12 09:54:03 +000015334int
15335main ()
15336{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015337volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015338 ;
15339 return 0;
15340}
15341_ACEOF
15342rm -f conftest.$ac_objext
15343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15344 (eval $ac_compile) 2>&5
15345 ac_status=$?
15346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15347 (exit $ac_status); } &&
15348 { ac_try='test -s conftest.$ac_objext'
15349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15350 (eval $ac_try) 2>&5
15351 ac_status=$?
15352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15353 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015354 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015355else
Martin v. Löwis11437992002-04-12 09:54:03 +000015356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015357sed 's/^/| /' conftest.$ac_ext >&5
15358
Martin v. Löwis11437992002-04-12 09:54:03 +000015359
15360cat >>confdefs.h <<\_ACEOF
15361#define volatile
15362_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015363
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015364
Guido van Rossum627b2d71993-12-24 10:39:16 +000015365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015366rm -f conftest.$ac_objext conftest.$ac_ext
15367echo "$as_me:$LINENO: result: $works" >&5
15368echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015369
Guido van Rossumda88dad1995-01-26 00:46:29 +000015370works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015371echo "$as_me:$LINENO: checking for working signed char" >&5
15372echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15373cat >conftest.$ac_ext <<_ACEOF
15374#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015375/* confdefs.h. */
15376_ACEOF
15377cat confdefs.h >>conftest.$ac_ext
15378cat >>conftest.$ac_ext <<_ACEOF
15379/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015380
Martin v. Löwis11437992002-04-12 09:54:03 +000015381int
15382main ()
15383{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015384signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015385 ;
15386 return 0;
15387}
15388_ACEOF
15389rm -f conftest.$ac_objext
15390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15391 (eval $ac_compile) 2>&5
15392 ac_status=$?
15393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15394 (exit $ac_status); } &&
15395 { ac_try='test -s conftest.$ac_objext'
15396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15397 (eval $ac_try) 2>&5
15398 ac_status=$?
15399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15400 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015401 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015402else
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015404sed 's/^/| /' conftest.$ac_ext >&5
15405
Martin v. Löwis11437992002-04-12 09:54:03 +000015406
15407cat >>confdefs.h <<\_ACEOF
15408#define signed
15409_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015410
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015411
Guido van Rossum7f43da71994-08-01 12:15:30 +000015412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015413rm -f conftest.$ac_objext conftest.$ac_ext
15414echo "$as_me:$LINENO: result: $works" >&5
15415echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015416
Guido van Rossumda88dad1995-01-26 00:46:29 +000015417have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015418echo "$as_me:$LINENO: checking for prototypes" >&5
15419echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15420cat >conftest.$ac_ext <<_ACEOF
15421#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015422/* confdefs.h. */
15423_ACEOF
15424cat confdefs.h >>conftest.$ac_ext
15425cat >>conftest.$ac_ext <<_ACEOF
15426/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015427int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015428int
15429main ()
15430{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015431return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015432 ;
15433 return 0;
15434}
15435_ACEOF
15436rm -f conftest.$ac_objext
15437if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15438 (eval $ac_compile) 2>&5
15439 ac_status=$?
15440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15441 (exit $ac_status); } &&
15442 { ac_try='test -s conftest.$ac_objext'
15443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15444 (eval $ac_try) 2>&5
15445 ac_status=$?
15446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15447 (exit $ac_status); }; }; then
15448
15449
15450cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015451#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015452_ACEOF
15453
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015454 have_prototypes=yes
15455
Guido van Rossumf78abae1997-01-21 22:02:36 +000015456else
Martin v. Löwis11437992002-04-12 09:54:03 +000015457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015458sed 's/^/| /' conftest.$ac_ext >&5
15459
Guido van Rossum7f43da71994-08-01 12:15:30 +000015460fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015461rm -f conftest.$ac_objext conftest.$ac_ext
15462echo "$as_me:$LINENO: result: $have_prototypes" >&5
15463echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015464
Guido van Rossumda88dad1995-01-26 00:46:29 +000015465works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015466echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15467echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15468cat >conftest.$ac_ext <<_ACEOF
15469#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015470/* confdefs.h. */
15471_ACEOF
15472cat confdefs.h >>conftest.$ac_ext
15473cat >>conftest.$ac_ext <<_ACEOF
15474/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015475
15476#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015477int foo(int x, ...) {
15478 va_list va;
15479 va_start(va, x);
15480 va_arg(va, int);
15481 va_arg(va, char *);
15482 va_arg(va, double);
15483 return 0;
15484}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015485
Martin v. Löwis11437992002-04-12 09:54:03 +000015486int
15487main ()
15488{
Guido van Rossum90eea071996-08-30 20:58:57 +000015489return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015490 ;
15491 return 0;
15492}
15493_ACEOF
15494rm -f conftest.$ac_objext
15495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15496 (eval $ac_compile) 2>&5
15497 ac_status=$?
15498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15499 (exit $ac_status); } &&
15500 { ac_try='test -s conftest.$ac_objext'
15501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15502 (eval $ac_try) 2>&5
15503 ac_status=$?
15504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15505 (exit $ac_status); }; }; then
15506
15507
15508cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015509#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015510_ACEOF
15511
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015512 works=yes
15513
Guido van Rossumf78abae1997-01-21 22:02:36 +000015514else
Martin v. Löwis11437992002-04-12 09:54:03 +000015515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015516sed 's/^/| /' conftest.$ac_ext >&5
15517
Guido van Rossum627b2d71993-12-24 10:39:16 +000015518fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015519rm -f conftest.$ac_objext conftest.$ac_ext
15520echo "$as_me:$LINENO: result: $works" >&5
15521echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015522
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015523# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015524echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15525echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15526cat >conftest.$ac_ext <<_ACEOF
15527#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015528/* confdefs.h. */
15529_ACEOF
15530cat confdefs.h >>conftest.$ac_ext
15531cat >>conftest.$ac_ext <<_ACEOF
15532/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015533#include <sys/types.h>
15534#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015535int
15536main ()
15537{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015538struct sockaddr x;
15539x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015540 ;
15541 return 0;
15542}
15543_ACEOF
15544rm -f conftest.$ac_objext
15545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15546 (eval $ac_compile) 2>&5
15547 ac_status=$?
15548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15549 (exit $ac_status); } &&
15550 { ac_try='test -s conftest.$ac_objext'
15551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15552 (eval $ac_try) 2>&5
15553 ac_status=$?
15554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15555 (exit $ac_status); }; }; then
15556 echo "$as_me:$LINENO: result: yes" >&5
15557echo "${ECHO_T}yes" >&6
15558
15559cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015560#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015561_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015562
15563else
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015565sed 's/^/| /' conftest.$ac_ext >&5
15566
Martin v. Löwis11437992002-04-12 09:54:03 +000015567echo "$as_me:$LINENO: result: no" >&5
15568echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015569fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015570rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015571
Guido van Rossumda88dad1995-01-26 00:46:29 +000015572va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015573echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15574echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15575cat >conftest.$ac_ext <<_ACEOF
15576#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015577/* confdefs.h. */
15578_ACEOF
15579cat confdefs.h >>conftest.$ac_ext
15580cat >>conftest.$ac_ext <<_ACEOF
15581/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015582
15583#ifdef HAVE_STDARG_PROTOTYPES
15584#include <stdarg.h>
15585#else
15586#include <varargs.h>
15587#endif
15588
Martin v. Löwis11437992002-04-12 09:54:03 +000015589int
15590main ()
15591{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015592va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015593 ;
15594 return 0;
15595}
15596_ACEOF
15597rm -f conftest.$ac_objext
15598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15599 (eval $ac_compile) 2>&5
15600 ac_status=$?
15601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15602 (exit $ac_status); } &&
15603 { ac_try='test -s conftest.$ac_objext'
15604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15605 (eval $ac_try) 2>&5
15606 ac_status=$?
15607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15608 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015609 :
15610else
Martin v. Löwis11437992002-04-12 09:54:03 +000015611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015612sed 's/^/| /' conftest.$ac_ext >&5
15613
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
15615
15616cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015617#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015618_ACEOF
15619
Guido van Rossumda88dad1995-01-26 00:46:29 +000015620 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015621
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015622fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015623rm -f conftest.$ac_objext conftest.$ac_ext
15624echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15625echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015626
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015627# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015628
15629
15630
15631echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15632echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15633if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15634 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015635else
Martin v. Löwis11437992002-04-12 09:54:03 +000015636 cat >conftest.$ac_ext <<_ACEOF
15637#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015638/* confdefs.h. */
15639_ACEOF
15640cat confdefs.h >>conftest.$ac_ext
15641cat >>conftest.$ac_ext <<_ACEOF
15642/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015643/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015644 which can conflict with char gethostbyname_r (); below.
15645 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015646 <limits.h> exists even on freestanding compilers. Under hpux,
15647 including <limits.h> includes <sys/time.h> and causes problems
15648 checking for functions defined therein. */
15649#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015650# include <limits.h>
15651#else
15652# include <assert.h>
15653#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015654/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015655#ifdef __cplusplus
15656extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015657{
Martin v. Löwis11437992002-04-12 09:54:03 +000015658#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015659/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 builtin and then its argument prototype would still apply. */
15661char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015662/* The GNU C library defines this for functions which it implements
15663 to always fail with ENOSYS. Some functions are actually named
15664 something starting with __ and the normal name is an alias. */
15665#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15666choke me
15667#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015668char (*f) () = gethostbyname_r;
15669#endif
15670#ifdef __cplusplus
15671}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015672#endif
15673
Skip Montanaro6dead952003-09-25 14:50:04 +000015674int
15675main ()
15676{
15677return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015678 ;
15679 return 0;
15680}
15681_ACEOF
15682rm -f conftest.$ac_objext conftest$ac_exeext
15683if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15684 (eval $ac_link) 2>&5
15685 ac_status=$?
15686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15687 (exit $ac_status); } &&
15688 { ac_try='test -s conftest$ac_exeext'
15689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15690 (eval $ac_try) 2>&5
15691 ac_status=$?
15692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15693 (exit $ac_status); }; }; then
15694 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015695else
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015697sed 's/^/| /' conftest.$ac_ext >&5
15698
Martin v. Löwis11437992002-04-12 09:54:03 +000015699ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015700fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015701rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015702fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015703echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15704echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15705if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015706
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015708#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015709_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015710
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15712echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015713 OLD_CFLAGS=$CFLAGS
15714 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015715 cat >conftest.$ac_ext <<_ACEOF
15716#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015717/* confdefs.h. */
15718_ACEOF
15719cat confdefs.h >>conftest.$ac_ext
15720cat >>conftest.$ac_ext <<_ACEOF
15721/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015722
15723# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015724
Martin v. Löwis11437992002-04-12 09:54:03 +000015725int
15726main ()
15727{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015728
15729 char *name;
15730 struct hostent *he, *res;
15731 char buffer[2048];
15732 int buflen = 2048;
15733 int h_errnop;
15734
15735 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015736
15737 ;
15738 return 0;
15739}
15740_ACEOF
15741rm -f conftest.$ac_objext
15742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15743 (eval $ac_compile) 2>&5
15744 ac_status=$?
15745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15746 (exit $ac_status); } &&
15747 { ac_try='test -s conftest.$ac_objext'
15748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15749 (eval $ac_try) 2>&5
15750 ac_status=$?
15751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15752 (exit $ac_status); }; }; then
15753
15754 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015755#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015756_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015757
Martin v. Löwis11437992002-04-12 09:54:03 +000015758
15759cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015760#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015761_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015762
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 echo "$as_me:$LINENO: result: yes" >&5
15764echo "${ECHO_T}yes" >&6
15765
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015766else
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015768sed 's/^/| /' conftest.$ac_ext >&5
15769
Martin v. Löwis11437992002-04-12 09:54:03 +000015770
15771 echo "$as_me:$LINENO: result: no" >&5
15772echo "${ECHO_T}no" >&6
15773 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15774echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15775 cat >conftest.$ac_ext <<_ACEOF
15776#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015777/* confdefs.h. */
15778_ACEOF
15779cat confdefs.h >>conftest.$ac_ext
15780cat >>conftest.$ac_ext <<_ACEOF
15781/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015782
15783# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015784
Martin v. Löwis11437992002-04-12 09:54:03 +000015785int
15786main ()
15787{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015788
15789 char *name;
15790 struct hostent *he;
15791 char buffer[2048];
15792 int buflen = 2048;
15793 int h_errnop;
15794
15795 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015796
15797 ;
15798 return 0;
15799}
15800_ACEOF
15801rm -f conftest.$ac_objext
15802if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15803 (eval $ac_compile) 2>&5
15804 ac_status=$?
15805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15806 (exit $ac_status); } &&
15807 { ac_try='test -s conftest.$ac_objext'
15808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15809 (eval $ac_try) 2>&5
15810 ac_status=$?
15811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15812 (exit $ac_status); }; }; then
15813
15814 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015815#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015816_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015817
Martin v. Löwis11437992002-04-12 09:54:03 +000015818
15819cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015820#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015821_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015822
Martin v. Löwis11437992002-04-12 09:54:03 +000015823 echo "$as_me:$LINENO: result: yes" >&5
15824echo "${ECHO_T}yes" >&6
15825
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015826else
Martin v. Löwis11437992002-04-12 09:54:03 +000015827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015828sed 's/^/| /' conftest.$ac_ext >&5
15829
Martin v. Löwis11437992002-04-12 09:54:03 +000015830
15831 echo "$as_me:$LINENO: result: no" >&5
15832echo "${ECHO_T}no" >&6
15833 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15834echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15835 cat >conftest.$ac_ext <<_ACEOF
15836#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015837/* confdefs.h. */
15838_ACEOF
15839cat confdefs.h >>conftest.$ac_ext
15840cat >>conftest.$ac_ext <<_ACEOF
15841/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015842
15843# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015844
Martin v. Löwis11437992002-04-12 09:54:03 +000015845int
15846main ()
15847{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015848
15849 char *name;
15850 struct hostent *he;
15851 struct hostent_data data;
15852
15853 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015854
15855 ;
15856 return 0;
15857}
15858_ACEOF
15859rm -f conftest.$ac_objext
15860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15861 (eval $ac_compile) 2>&5
15862 ac_status=$?
15863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15864 (exit $ac_status); } &&
15865 { ac_try='test -s conftest.$ac_objext'
15866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15867 (eval $ac_try) 2>&5
15868 ac_status=$?
15869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15870 (exit $ac_status); }; }; then
15871
15872 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015873#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015874_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015875
Martin v. Löwis11437992002-04-12 09:54:03 +000015876
15877cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015878#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015879_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015880
Martin v. Löwis11437992002-04-12 09:54:03 +000015881 echo "$as_me:$LINENO: result: yes" >&5
15882echo "${ECHO_T}yes" >&6
15883
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015884else
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015886sed 's/^/| /' conftest.$ac_ext >&5
15887
Martin v. Löwis11437992002-04-12 09:54:03 +000015888
15889 echo "$as_me:$LINENO: result: no" >&5
15890echo "${ECHO_T}no" >&6
15891
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015892fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015893rm -f conftest.$ac_objext conftest.$ac_ext
15894
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015895fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015896rm -f conftest.$ac_objext conftest.$ac_ext
15897
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015898fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015899rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015900 CFLAGS=$OLD_CFLAGS
15901
15902else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015903
Martin v. Löwis11437992002-04-12 09:54:03 +000015904
15905for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015906do
Martin v. Löwis11437992002-04-12 09:54:03 +000015907as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15908echo "$as_me:$LINENO: checking for $ac_func" >&5
15909echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15910if eval "test \"\${$as_ac_var+set}\" = set"; then
15911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015912else
Martin v. Löwis11437992002-04-12 09:54:03 +000015913 cat >conftest.$ac_ext <<_ACEOF
15914#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015915/* confdefs.h. */
15916_ACEOF
15917cat confdefs.h >>conftest.$ac_ext
15918cat >>conftest.$ac_ext <<_ACEOF
15919/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015920/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015921 which can conflict with char $ac_func (); below.
15922 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015923 <limits.h> exists even on freestanding compilers. Under hpux,
15924 including <limits.h> includes <sys/time.h> and causes problems
15925 checking for functions defined therein. */
15926#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015927# include <limits.h>
15928#else
15929# include <assert.h>
15930#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015931/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015932#ifdef __cplusplus
15933extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015934{
Martin v. Löwis11437992002-04-12 09:54:03 +000015935#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015936/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015937 builtin and then its argument prototype would still apply. */
15938char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015939/* The GNU C library defines this for functions which it implements
15940 to always fail with ENOSYS. Some functions are actually named
15941 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015942#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015943choke me
15944#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015945char (*f) () = $ac_func;
15946#endif
15947#ifdef __cplusplus
15948}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015949#endif
15950
Skip Montanaro6dead952003-09-25 14:50:04 +000015951int
15952main ()
15953{
15954return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015955 ;
15956 return 0;
15957}
15958_ACEOF
15959rm -f conftest.$ac_objext conftest$ac_exeext
15960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15961 (eval $ac_link) 2>&5
15962 ac_status=$?
15963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964 (exit $ac_status); } &&
15965 { ac_try='test -s conftest$ac_exeext'
15966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15967 (eval $ac_try) 2>&5
15968 ac_status=$?
15969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15970 (exit $ac_status); }; }; then
15971 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015972else
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015974sed 's/^/| /' conftest.$ac_ext >&5
15975
Martin v. Löwis11437992002-04-12 09:54:03 +000015976eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015977fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015978rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015979fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015980echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15981echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15982if test `eval echo '${'$as_ac_var'}'` = yes; then
15983 cat >>confdefs.h <<_ACEOF
15984#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15985_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015986
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015987fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015988done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015989
Michael W. Hudson54241132001-12-07 15:38:26 +000015990
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015991fi
15992
Michael W. Hudson54241132001-12-07 15:38:26 +000015993
15994
15995
15996
15997
15998
Guido van Rossum627b2d71993-12-24 10:39:16 +000015999# checks for system services
16000# (none yet)
16001
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016002# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016003echo "$as_me:$LINENO: checking for __fpu_control" >&5
16004echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16005if test "${ac_cv_func___fpu_control+set}" = set; then
16006 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016007else
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 cat >conftest.$ac_ext <<_ACEOF
16009#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016010/* confdefs.h. */
16011_ACEOF
16012cat confdefs.h >>conftest.$ac_ext
16013cat >>conftest.$ac_ext <<_ACEOF
16014/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016015/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016016 which can conflict with char __fpu_control (); below.
16017 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016018 <limits.h> exists even on freestanding compilers. Under hpux,
16019 including <limits.h> includes <sys/time.h> and causes problems
16020 checking for functions defined therein. */
16021#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016022# include <limits.h>
16023#else
16024# include <assert.h>
16025#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016026/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016027#ifdef __cplusplus
16028extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016029{
Martin v. Löwis11437992002-04-12 09:54:03 +000016030#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016031/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016032 builtin and then its argument prototype would still apply. */
16033char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016034/* The GNU C library defines this for functions which it implements
16035 to always fail with ENOSYS. Some functions are actually named
16036 something starting with __ and the normal name is an alias. */
16037#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16038choke me
16039#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016040char (*f) () = __fpu_control;
16041#endif
16042#ifdef __cplusplus
16043}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016044#endif
16045
Skip Montanaro6dead952003-09-25 14:50:04 +000016046int
16047main ()
16048{
16049return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016050 ;
16051 return 0;
16052}
16053_ACEOF
16054rm -f conftest.$ac_objext conftest$ac_exeext
16055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16056 (eval $ac_link) 2>&5
16057 ac_status=$?
16058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16059 (exit $ac_status); } &&
16060 { ac_try='test -s conftest$ac_exeext'
16061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16062 (eval $ac_try) 2>&5
16063 ac_status=$?
16064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16065 (exit $ac_status); }; }; then
16066 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016067else
Martin v. Löwis11437992002-04-12 09:54:03 +000016068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016069sed 's/^/| /' conftest.$ac_ext >&5
16070
Martin v. Löwis11437992002-04-12 09:54:03 +000016071ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016072fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016073rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016074fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016075echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16076echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16077if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016078 :
16079else
Martin v. Löwis11437992002-04-12 09:54:03 +000016080
16081echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16082echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16083if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16084 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016085else
Martin v. Löwis11437992002-04-12 09:54:03 +000016086 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016087LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016088cat >conftest.$ac_ext <<_ACEOF
16089#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016090/* confdefs.h. */
16091_ACEOF
16092cat confdefs.h >>conftest.$ac_ext
16093cat >>conftest.$ac_ext <<_ACEOF
16094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016095
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016096/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016097#ifdef __cplusplus
16098extern "C"
16099#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016100/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016101 builtin and then its argument prototype would still apply. */
16102char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016103int
16104main ()
16105{
16106__fpu_control ();
16107 ;
16108 return 0;
16109}
16110_ACEOF
16111rm -f conftest.$ac_objext conftest$ac_exeext
16112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16113 (eval $ac_link) 2>&5
16114 ac_status=$?
16115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16116 (exit $ac_status); } &&
16117 { ac_try='test -s conftest$ac_exeext'
16118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16119 (eval $ac_try) 2>&5
16120 ac_status=$?
16121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16122 (exit $ac_status); }; }; then
16123 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016124else
Martin v. Löwis11437992002-04-12 09:54:03 +000016125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016126sed 's/^/| /' conftest.$ac_ext >&5
16127
Martin v. Löwis11437992002-04-12 09:54:03 +000016128ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016129fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016130rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16131LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016132fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016133echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16134echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16135if test $ac_cv_lib_ieee___fpu_control = yes; then
16136 cat >>confdefs.h <<_ACEOF
16137#define HAVE_LIBIEEE 1
16138_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016139
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016140 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016141
Guido van Rossum627b2d71993-12-24 10:39:16 +000016142fi
16143
Michael W. Hudson54241132001-12-07 15:38:26 +000016144
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016145fi
16146
Michael W. Hudson54241132001-12-07 15:38:26 +000016147
Guido van Rossum7f253911997-05-09 02:42:48 +000016148# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016149echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16150echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16151
Guido van Rossum7f253911997-05-09 02:42:48 +000016152# Check whether --with-fpectl or --without-fpectl was given.
16153if test "${with_fpectl+set}" = set; then
16154 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016155
Guido van Rossum7f253911997-05-09 02:42:48 +000016156if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016157then
16158
16159cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016160#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016161_ACEOF
16162
16163 echo "$as_me:$LINENO: result: yes" >&5
16164echo "${ECHO_T}yes" >&6
16165else echo "$as_me:$LINENO: result: no" >&5
16166echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016167fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016168else
Martin v. Löwis11437992002-04-12 09:54:03 +000016169 echo "$as_me:$LINENO: result: no" >&5
16170echo "${ECHO_T}no" >&6
16171fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016172
Guido van Rossum7f43da71994-08-01 12:15:30 +000016173# check for --with-libm=...
16174
Guido van Rossum563e7081996-09-10 18:20:48 +000016175case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016176Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016177BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016178*) LIBM=-lm
16179esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016180echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16181echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16182
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016183# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016184if test "${with_libm+set}" = set; then
16185 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016186
Guido van Rossum7f253911997-05-09 02:42:48 +000016187if test "$withval" = no
16188then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016189 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16190echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016191elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016192then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016193 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16194echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16195else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16196echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16197 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016198fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016199else
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16201echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16202fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016203
16204# check for --with-libc=...
16205
Martin v. Löwis11437992002-04-12 09:54:03 +000016206echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16207echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16208
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016209# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016210if test "${with_libc+set}" = set; then
16211 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016212
Guido van Rossum7f253911997-05-09 02:42:48 +000016213if test "$withval" = no
16214then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016215 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16216echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016217elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016218then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016219 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16220echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16221else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16222echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16223 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016224fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016225else
Martin v. Löwis11437992002-04-12 09:54:03 +000016226 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16227echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16228fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016229
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016230# check for hypot() in math library
16231LIBS_SAVE=$LIBS
16232LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016233
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016234for ac_func in hypot
16235do
Martin v. Löwis11437992002-04-12 09:54:03 +000016236as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16237echo "$as_me:$LINENO: checking for $ac_func" >&5
16238echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16239if eval "test \"\${$as_ac_var+set}\" = set"; then
16240 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016241else
Martin v. Löwis11437992002-04-12 09:54:03 +000016242 cat >conftest.$ac_ext <<_ACEOF
16243#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016244/* confdefs.h. */
16245_ACEOF
16246cat confdefs.h >>conftest.$ac_ext
16247cat >>conftest.$ac_ext <<_ACEOF
16248/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016249/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016250 which can conflict with char $ac_func (); below.
16251 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016252 <limits.h> exists even on freestanding compilers. Under hpux,
16253 including <limits.h> includes <sys/time.h> and causes problems
16254 checking for functions defined therein. */
16255#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016256# include <limits.h>
16257#else
16258# include <assert.h>
16259#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016260/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016261#ifdef __cplusplus
16262extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016263{
Martin v. Löwis11437992002-04-12 09:54:03 +000016264#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016265/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016266 builtin and then its argument prototype would still apply. */
16267char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016268/* The GNU C library defines this for functions which it implements
16269 to always fail with ENOSYS. Some functions are actually named
16270 something starting with __ and the normal name is an alias. */
16271#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16272choke me
16273#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016274char (*f) () = $ac_func;
16275#endif
16276#ifdef __cplusplus
16277}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016278#endif
16279
Skip Montanaro6dead952003-09-25 14:50:04 +000016280int
16281main ()
16282{
16283return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016284 ;
16285 return 0;
16286}
16287_ACEOF
16288rm -f conftest.$ac_objext conftest$ac_exeext
16289if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16290 (eval $ac_link) 2>&5
16291 ac_status=$?
16292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16293 (exit $ac_status); } &&
16294 { ac_try='test -s conftest$ac_exeext'
16295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16296 (eval $ac_try) 2>&5
16297 ac_status=$?
16298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16299 (exit $ac_status); }; }; then
16300 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016301else
Martin v. Löwis11437992002-04-12 09:54:03 +000016302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016303sed 's/^/| /' conftest.$ac_ext >&5
16304
Martin v. Löwis11437992002-04-12 09:54:03 +000016305eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016306fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016307rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016308fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016309echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16310echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16311if test `eval echo '${'$as_ac_var'}'` = yes; then
16312 cat >>confdefs.h <<_ACEOF
16313#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16314_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016315
Michael W. Hudson54241132001-12-07 15:38:26 +000016316else
Martin v. Löwis11437992002-04-12 09:54:03 +000016317 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016318fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016319done
16320
Michael W. Hudson54241132001-12-07 15:38:26 +000016321
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016322LIBS=$LIBS_SAVE
16323
Guido van Rossumef2255b2000-03-10 22:30:29 +000016324# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016325if test "${ac_cv_header_wchar_h+set}" = set; then
16326 echo "$as_me:$LINENO: checking for wchar.h" >&5
16327echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16328if test "${ac_cv_header_wchar_h+set}" = set; then
16329 echo $ECHO_N "(cached) $ECHO_C" >&6
16330fi
16331echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16332echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016333else
Martin v. Löwis11437992002-04-12 09:54:03 +000016334 # Is the header compilable?
16335echo "$as_me:$LINENO: checking wchar.h usability" >&5
16336echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16337cat >conftest.$ac_ext <<_ACEOF
16338#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016339/* confdefs.h. */
16340_ACEOF
16341cat confdefs.h >>conftest.$ac_ext
16342cat >>conftest.$ac_ext <<_ACEOF
16343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016344$ac_includes_default
16345#include <wchar.h>
16346_ACEOF
16347rm -f conftest.$ac_objext
16348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16349 (eval $ac_compile) 2>&5
16350 ac_status=$?
16351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16352 (exit $ac_status); } &&
16353 { ac_try='test -s conftest.$ac_objext'
16354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16355 (eval $ac_try) 2>&5
16356 ac_status=$?
16357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16358 (exit $ac_status); }; }; then
16359 ac_header_compiler=yes
16360else
16361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016362sed 's/^/| /' conftest.$ac_ext >&5
16363
Martin v. Löwis11437992002-04-12 09:54:03 +000016364ac_header_compiler=no
16365fi
16366rm -f conftest.$ac_objext conftest.$ac_ext
16367echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16368echo "${ECHO_T}$ac_header_compiler" >&6
16369
16370# Is the header present?
16371echo "$as_me:$LINENO: checking wchar.h presence" >&5
16372echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16373cat >conftest.$ac_ext <<_ACEOF
16374#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016375/* confdefs.h. */
16376_ACEOF
16377cat confdefs.h >>conftest.$ac_ext
16378cat >>conftest.$ac_ext <<_ACEOF
16379/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016380#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016381_ACEOF
16382if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16383 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16384 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016385 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016386 rm -f conftest.er1
16387 cat conftest.err >&5
16388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16389 (exit $ac_status); } >/dev/null; then
16390 if test -s conftest.err; then
16391 ac_cpp_err=$ac_c_preproc_warn_flag
16392 else
16393 ac_cpp_err=
16394 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016395else
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 ac_cpp_err=yes
16397fi
16398if test -z "$ac_cpp_err"; then
16399 ac_header_preproc=yes
16400else
16401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016402sed 's/^/| /' conftest.$ac_ext >&5
16403
Martin v. Löwis11437992002-04-12 09:54:03 +000016404 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016405fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016406rm -f conftest.err conftest.$ac_ext
16407echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16408echo "${ECHO_T}$ac_header_preproc" >&6
16409
16410# So? What about this header?
16411case $ac_header_compiler:$ac_header_preproc in
16412 yes:no )
16413 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16414echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16415 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016416echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16417 (
16418 cat <<\_ASBOX
16419## ------------------------------------ ##
16420## Report this to bug-autoconf@gnu.org. ##
16421## ------------------------------------ ##
16422_ASBOX
16423 ) |
16424 sed "s/^/$as_me: WARNING: /" >&2
16425 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 no:yes )
16427 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16428echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16429 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16430echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16431 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016432echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16433 (
16434 cat <<\_ASBOX
16435## ------------------------------------ ##
16436## Report this to bug-autoconf@gnu.org. ##
16437## ------------------------------------ ##
16438_ASBOX
16439 ) |
16440 sed "s/^/$as_me: WARNING: /" >&2
16441 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016442esac
16443echo "$as_me:$LINENO: checking for wchar.h" >&5
16444echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16445if test "${ac_cv_header_wchar_h+set}" = set; then
16446 echo $ECHO_N "(cached) $ECHO_C" >&6
16447else
16448 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016450echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16451echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16452
16453fi
16454if test $ac_cv_header_wchar_h = yes; then
16455
16456
16457cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016458#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016459_ACEOF
16460
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016461 wchar_h="yes"
16462
Guido van Rossumef2255b2000-03-10 22:30:29 +000016463else
Martin v. Löwis11437992002-04-12 09:54:03 +000016464 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016465
16466fi
16467
Michael W. Hudson54241132001-12-07 15:38:26 +000016468
Martin v. Löwis11437992002-04-12 09:54:03 +000016469
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016470# determine wchar_t size
16471if test "$wchar_h" = yes
16472then
Martin v. Löwis11437992002-04-12 09:54:03 +000016473 echo "$as_me:$LINENO: checking for wchar_t" >&5
16474echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16475if test "${ac_cv_type_wchar_t+set}" = set; then
16476 echo $ECHO_N "(cached) $ECHO_C" >&6
16477else
16478 cat >conftest.$ac_ext <<_ACEOF
16479#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016480/* confdefs.h. */
16481_ACEOF
16482cat confdefs.h >>conftest.$ac_ext
16483cat >>conftest.$ac_ext <<_ACEOF
16484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016485#include <wchar.h>
16486
Martin v. Löwis11437992002-04-12 09:54:03 +000016487int
16488main ()
16489{
16490if ((wchar_t *) 0)
16491 return 0;
16492if (sizeof (wchar_t))
16493 return 0;
16494 ;
16495 return 0;
16496}
16497_ACEOF
16498rm -f conftest.$ac_objext
16499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16500 (eval $ac_compile) 2>&5
16501 ac_status=$?
16502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16503 (exit $ac_status); } &&
16504 { ac_try='test -s conftest.$ac_objext'
16505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16506 (eval $ac_try) 2>&5
16507 ac_status=$?
16508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16509 (exit $ac_status); }; }; then
16510 ac_cv_type_wchar_t=yes
16511else
16512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016513sed 's/^/| /' conftest.$ac_ext >&5
16514
Martin v. Löwis11437992002-04-12 09:54:03 +000016515ac_cv_type_wchar_t=no
16516fi
16517rm -f conftest.$ac_objext conftest.$ac_ext
16518fi
16519echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16520echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16521
16522echo "$as_me:$LINENO: checking size of wchar_t" >&5
16523echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16524if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16525 echo $ECHO_N "(cached) $ECHO_C" >&6
16526else
16527 if test "$ac_cv_type_wchar_t" = yes; then
16528 # The cast to unsigned long works around a bug in the HP C Compiler
16529 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16530 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16531 # This bug is HP SR number 8606223364.
16532 if test "$cross_compiling" = yes; then
16533 # Depending upon the size, compute the lo and hi bounds.
16534cat >conftest.$ac_ext <<_ACEOF
16535#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016536/* confdefs.h. */
16537_ACEOF
16538cat confdefs.h >>conftest.$ac_ext
16539cat >>conftest.$ac_ext <<_ACEOF
16540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016541#include <wchar.h>
16542
Martin v. Löwis11437992002-04-12 09:54:03 +000016543int
16544main ()
16545{
16546static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16547test_array [0] = 0
16548
16549 ;
16550 return 0;
16551}
16552_ACEOF
16553rm -f conftest.$ac_objext
16554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16555 (eval $ac_compile) 2>&5
16556 ac_status=$?
16557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16558 (exit $ac_status); } &&
16559 { ac_try='test -s conftest.$ac_objext'
16560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16561 (eval $ac_try) 2>&5
16562 ac_status=$?
16563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16564 (exit $ac_status); }; }; then
16565 ac_lo=0 ac_mid=0
16566 while :; do
16567 cat >conftest.$ac_ext <<_ACEOF
16568#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016569/* confdefs.h. */
16570_ACEOF
16571cat confdefs.h >>conftest.$ac_ext
16572cat >>conftest.$ac_ext <<_ACEOF
16573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016574#include <wchar.h>
16575
Martin v. Löwis11437992002-04-12 09:54:03 +000016576int
16577main ()
16578{
16579static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16580test_array [0] = 0
16581
16582 ;
16583 return 0;
16584}
16585_ACEOF
16586rm -f conftest.$ac_objext
16587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16588 (eval $ac_compile) 2>&5
16589 ac_status=$?
16590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16591 (exit $ac_status); } &&
16592 { ac_try='test -s conftest.$ac_objext'
16593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16594 (eval $ac_try) 2>&5
16595 ac_status=$?
16596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16597 (exit $ac_status); }; }; then
16598 ac_hi=$ac_mid; break
16599else
16600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016601sed 's/^/| /' conftest.$ac_ext >&5
16602
Martin v. Löwis11437992002-04-12 09:54:03 +000016603ac_lo=`expr $ac_mid + 1`
16604 if test $ac_lo -le $ac_mid; then
16605 ac_lo= ac_hi=
16606 break
16607 fi
16608 ac_mid=`expr 2 '*' $ac_mid + 1`
16609fi
16610rm -f conftest.$ac_objext conftest.$ac_ext
16611 done
16612else
16613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016614sed 's/^/| /' conftest.$ac_ext >&5
16615
Martin v. Löwis11437992002-04-12 09:54:03 +000016616cat >conftest.$ac_ext <<_ACEOF
16617#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016618/* confdefs.h. */
16619_ACEOF
16620cat confdefs.h >>conftest.$ac_ext
16621cat >>conftest.$ac_ext <<_ACEOF
16622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016623#include <wchar.h>
16624
Martin v. Löwis11437992002-04-12 09:54:03 +000016625int
16626main ()
16627{
16628static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16629test_array [0] = 0
16630
16631 ;
16632 return 0;
16633}
16634_ACEOF
16635rm -f conftest.$ac_objext
16636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16637 (eval $ac_compile) 2>&5
16638 ac_status=$?
16639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16640 (exit $ac_status); } &&
16641 { ac_try='test -s conftest.$ac_objext'
16642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16643 (eval $ac_try) 2>&5
16644 ac_status=$?
16645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16646 (exit $ac_status); }; }; then
16647 ac_hi=-1 ac_mid=-1
16648 while :; do
16649 cat >conftest.$ac_ext <<_ACEOF
16650#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016651/* confdefs.h. */
16652_ACEOF
16653cat confdefs.h >>conftest.$ac_ext
16654cat >>conftest.$ac_ext <<_ACEOF
16655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016656#include <wchar.h>
16657
Martin v. Löwis11437992002-04-12 09:54:03 +000016658int
16659main ()
16660{
16661static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16662test_array [0] = 0
16663
16664 ;
16665 return 0;
16666}
16667_ACEOF
16668rm -f conftest.$ac_objext
16669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16670 (eval $ac_compile) 2>&5
16671 ac_status=$?
16672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16673 (exit $ac_status); } &&
16674 { ac_try='test -s conftest.$ac_objext'
16675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16676 (eval $ac_try) 2>&5
16677 ac_status=$?
16678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16679 (exit $ac_status); }; }; then
16680 ac_lo=$ac_mid; break
16681else
16682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016683sed 's/^/| /' conftest.$ac_ext >&5
16684
Martin v. Löwis11437992002-04-12 09:54:03 +000016685ac_hi=`expr '(' $ac_mid ')' - 1`
16686 if test $ac_mid -le $ac_hi; then
16687 ac_lo= ac_hi=
16688 break
16689 fi
16690 ac_mid=`expr 2 '*' $ac_mid`
16691fi
16692rm -f conftest.$ac_objext conftest.$ac_ext
16693 done
16694else
16695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016696sed 's/^/| /' conftest.$ac_ext >&5
16697
Martin v. Löwis11437992002-04-12 09:54:03 +000016698ac_lo= ac_hi=
16699fi
16700rm -f conftest.$ac_objext conftest.$ac_ext
16701fi
16702rm -f conftest.$ac_objext conftest.$ac_ext
16703# Binary search between lo and hi bounds.
16704while test "x$ac_lo" != "x$ac_hi"; do
16705 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16706 cat >conftest.$ac_ext <<_ACEOF
16707#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016708/* confdefs.h. */
16709_ACEOF
16710cat confdefs.h >>conftest.$ac_ext
16711cat >>conftest.$ac_ext <<_ACEOF
16712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016713#include <wchar.h>
16714
Martin v. Löwis11437992002-04-12 09:54:03 +000016715int
16716main ()
16717{
16718static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16719test_array [0] = 0
16720
16721 ;
16722 return 0;
16723}
16724_ACEOF
16725rm -f conftest.$ac_objext
16726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16727 (eval $ac_compile) 2>&5
16728 ac_status=$?
16729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16730 (exit $ac_status); } &&
16731 { ac_try='test -s conftest.$ac_objext'
16732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16733 (eval $ac_try) 2>&5
16734 ac_status=$?
16735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16736 (exit $ac_status); }; }; then
16737 ac_hi=$ac_mid
16738else
16739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016740sed 's/^/| /' conftest.$ac_ext >&5
16741
Martin v. Löwis11437992002-04-12 09:54:03 +000016742ac_lo=`expr '(' $ac_mid ')' + 1`
16743fi
16744rm -f conftest.$ac_objext conftest.$ac_ext
16745done
16746case $ac_lo in
16747?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016748'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16749See \`config.log' for more details." >&5
16750echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16751See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016752 { (exit 1); exit 1; }; } ;;
16753esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016754else
16755 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016756 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16757See \`config.log' for more details." >&5
16758echo "$as_me: error: cannot run test program while cross compiling
16759See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016760 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016761else
Martin v. Löwis11437992002-04-12 09:54:03 +000016762 cat >conftest.$ac_ext <<_ACEOF
16763#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016764/* confdefs.h. */
16765_ACEOF
16766cat confdefs.h >>conftest.$ac_ext
16767cat >>conftest.$ac_ext <<_ACEOF
16768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016769#include <wchar.h>
16770
16771long longval () { return (long) (sizeof (wchar_t)); }
16772unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016773#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016774#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016775int
16776main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016777{
Martin v. Löwis11437992002-04-12 09:54:03 +000016778
16779 FILE *f = fopen ("conftest.val", "w");
16780 if (! f)
16781 exit (1);
16782 if (((long) (sizeof (wchar_t))) < 0)
16783 {
16784 long i = longval ();
16785 if (i != ((long) (sizeof (wchar_t))))
16786 exit (1);
16787 fprintf (f, "%ld\n", i);
16788 }
16789 else
16790 {
16791 unsigned long i = ulongval ();
16792 if (i != ((long) (sizeof (wchar_t))))
16793 exit (1);
16794 fprintf (f, "%lu\n", i);
16795 }
16796 exit (ferror (f) || fclose (f) != 0);
16797
16798 ;
16799 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016800}
Martin v. Löwis11437992002-04-12 09:54:03 +000016801_ACEOF
16802rm -f conftest$ac_exeext
16803if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16804 (eval $ac_link) 2>&5
16805 ac_status=$?
16806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16807 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16809 (eval $ac_try) 2>&5
16810 ac_status=$?
16811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16812 (exit $ac_status); }; }; then
16813 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016814else
Martin v. Löwis11437992002-04-12 09:54:03 +000016815 echo "$as_me: program exited with status $ac_status" >&5
16816echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016817sed 's/^/| /' conftest.$ac_ext >&5
16818
Martin v. Löwis11437992002-04-12 09:54:03 +000016819( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000016820{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16821See \`config.log' for more details." >&5
16822echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16823See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016824 { (exit 1); exit 1; }; }
16825fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016826rm -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 +000016827fi
16828fi
16829rm -f conftest.val
16830else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016831 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016832fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016834echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16835echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16836cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016837#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016838_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016839
Michael W. Hudson54241132001-12-07 15:38:26 +000016840
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016841fi
16842
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016843echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16844echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16845have_ucs4_tcl=no
16846cat >conftest.$ac_ext <<_ACEOF
16847#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016848/* confdefs.h. */
16849_ACEOF
16850cat confdefs.h >>conftest.$ac_ext
16851cat >>conftest.$ac_ext <<_ACEOF
16852/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016853
16854#include <tcl.h>
16855#if TCL_UTF_MAX != 6
16856# error "NOT UCS4_TCL"
16857#endif
16858int
16859main ()
16860{
16861
16862 ;
16863 return 0;
16864}
16865_ACEOF
16866rm -f conftest.$ac_objext
16867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16868 (eval $ac_compile) 2>&5
16869 ac_status=$?
16870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16871 (exit $ac_status); } &&
16872 { ac_try='test -s conftest.$ac_objext'
16873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16874 (eval $ac_try) 2>&5
16875 ac_status=$?
16876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16877 (exit $ac_status); }; }; then
16878
16879
16880cat >>confdefs.h <<\_ACEOF
16881#define HAVE_UCS4_TCL 1
16882_ACEOF
16883
16884 have_ucs4_tcl=yes
16885
16886else
16887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016888sed 's/^/| /' conftest.$ac_ext >&5
16889
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016890fi
16891rm -f conftest.$ac_objext conftest.$ac_ext
16892echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
16893echo "${ECHO_T}$have_ucs4_tcl" >&6
16894
Skip Montanaro6dead952003-09-25 14:50:04 +000016895# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016896if test "$wchar_h" = yes
16897then
16898 # check whether wchar_t is signed or not
16899 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
16900echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
16901 if test "${ac_cv_wchar_t_signed+set}" = set; then
16902 echo $ECHO_N "(cached) $ECHO_C" >&6
16903else
16904
16905 if test "$cross_compiling" = yes; then
16906 ac_cv_wchar_t_signed=yes
16907else
16908 cat >conftest.$ac_ext <<_ACEOF
16909#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016910/* confdefs.h. */
16911_ACEOF
16912cat confdefs.h >>conftest.$ac_ext
16913cat >>conftest.$ac_ext <<_ACEOF
16914/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016915
16916 #include <wchar.h>
16917 int main()
16918 {
16919 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
16920 }
16921
16922_ACEOF
16923rm -f conftest$ac_exeext
16924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16925 (eval $ac_link) 2>&5
16926 ac_status=$?
16927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16928 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16930 (eval $ac_try) 2>&5
16931 ac_status=$?
16932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16933 (exit $ac_status); }; }; then
16934 ac_cv_wchar_t_signed=yes
16935else
16936 echo "$as_me: program exited with status $ac_status" >&5
16937echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016938sed 's/^/| /' conftest.$ac_ext >&5
16939
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016940( exit $ac_status )
16941ac_cv_wchar_t_signed=no
16942fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016943rm -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 +000016944fi
16945fi
16946
16947 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
16948echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
16949fi
16950
Martin v. Löwis11437992002-04-12 09:54:03 +000016951echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16952echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016953# Check whether --enable-unicode or --disable-unicode was given.
16954if test "${enable_unicode+set}" = set; then
16955 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016956
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016957else
16958 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016959fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016960
16961if test $enable_unicode = yes
16962then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016963 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016964 case "$have_ucs4_tcl" in
16965 yes) enable_unicode="ucs4"
16966 ;;
16967 *) enable_unicode="ucs2"
16968 ;;
16969 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016970fi
16971
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016972
16973
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016974case "$enable_unicode" in
16975ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016976 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016977#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016978_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016979
16980 ;;
16981ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016982 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016983#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016984_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016985
16986 ;;
16987esac
16988
Michael W. Hudson54241132001-12-07 15:38:26 +000016989
Martin v. Löwis11437992002-04-12 09:54:03 +000016990
16991
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016992
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016993if test "$enable_unicode" = "no"
16994then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016995 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016996 echo "$as_me:$LINENO: result: not used" >&5
16997echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016998else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016999 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017000
17001cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017002#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017003_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017004
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017005
17006 # wchar_t is only usable if it maps to an unsigned type
17007 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17008 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017009 then
17010 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017011
Martin v. Löwis11437992002-04-12 09:54:03 +000017012cat >>confdefs.h <<\_ACEOF
17013#define HAVE_USABLE_WCHAR_T 1
17014_ACEOF
17015
17016 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017017#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017018_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017019
17020 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17021 then
17022 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017023 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017024#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017025_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017026
17027 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17028 then
17029 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017030 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017031#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017032_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017033
17034 else
17035 PY_UNICODE_TYPE="no type found"
17036 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017037 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17038echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017039fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017040
17041# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017042echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17043echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17044if test "${ac_cv_c_bigendian+set}" = set; then
17045 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017046else
Martin v. Löwis11437992002-04-12 09:54:03 +000017047 # See if sys/param.h defines the BYTE_ORDER macro.
17048cat >conftest.$ac_ext <<_ACEOF
17049#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017050/* confdefs.h. */
17051_ACEOF
17052cat confdefs.h >>conftest.$ac_ext
17053cat >>conftest.$ac_ext <<_ACEOF
17054/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017055#include <sys/types.h>
17056#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017057
Martin v. Löwis11437992002-04-12 09:54:03 +000017058int
17059main ()
17060{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017061#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17062 bogus endian macros
17063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017064
17065 ;
17066 return 0;
17067}
17068_ACEOF
17069rm -f conftest.$ac_objext
17070if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17071 (eval $ac_compile) 2>&5
17072 ac_status=$?
17073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17074 (exit $ac_status); } &&
17075 { ac_try='test -s conftest.$ac_objext'
17076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17077 (eval $ac_try) 2>&5
17078 ac_status=$?
17079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17080 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017081 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017082cat >conftest.$ac_ext <<_ACEOF
17083#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017084/* confdefs.h. */
17085_ACEOF
17086cat confdefs.h >>conftest.$ac_ext
17087cat >>conftest.$ac_ext <<_ACEOF
17088/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017089#include <sys/types.h>
17090#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017091
Martin v. Löwis11437992002-04-12 09:54:03 +000017092int
17093main ()
17094{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017095#if BYTE_ORDER != BIG_ENDIAN
17096 not big endian
17097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017098
17099 ;
17100 return 0;
17101}
17102_ACEOF
17103rm -f conftest.$ac_objext
17104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17105 (eval $ac_compile) 2>&5
17106 ac_status=$?
17107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17108 (exit $ac_status); } &&
17109 { ac_try='test -s conftest.$ac_objext'
17110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17111 (eval $ac_try) 2>&5
17112 ac_status=$?
17113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17114 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017115 ac_cv_c_bigendian=yes
17116else
Martin v. Löwis11437992002-04-12 09:54:03 +000017117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017118sed 's/^/| /' conftest.$ac_ext >&5
17119
Martin v. Löwis11437992002-04-12 09:54:03 +000017120ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017121fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017122rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017123else
Martin v. Löwis11437992002-04-12 09:54:03 +000017124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017125sed 's/^/| /' conftest.$ac_ext >&5
17126
Martin v. Löwis11437992002-04-12 09:54:03 +000017127# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017128if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017129 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017130 ac_cv_c_bigendian=unknown
17131 cat >conftest.$ac_ext <<_ACEOF
17132#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017133/* confdefs.h. */
17134_ACEOF
17135cat confdefs.h >>conftest.$ac_ext
17136cat >>conftest.$ac_ext <<_ACEOF
17137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017138short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17139short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17140void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17141short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17142short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17143void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017144int
17145main ()
17146{
17147 _ascii (); _ebcdic ();
17148 ;
17149 return 0;
17150}
17151_ACEOF
17152rm -f conftest.$ac_objext
17153if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17154 (eval $ac_compile) 2>&5
17155 ac_status=$?
17156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17157 (exit $ac_status); } &&
17158 { ac_try='test -s conftest.$ac_objext'
17159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17160 (eval $ac_try) 2>&5
17161 ac_status=$?
17162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17163 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017164 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017165 ac_cv_c_bigendian=yes
17166fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017167if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017168 if test "$ac_cv_c_bigendian" = unknown; then
17169 ac_cv_c_bigendian=no
17170 else
17171 # finding both strings is unlikely to happen, but who knows?
17172 ac_cv_c_bigendian=unknown
17173 fi
17174fi
17175else
17176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017177sed 's/^/| /' conftest.$ac_ext >&5
17178
Martin v. Löwis11437992002-04-12 09:54:03 +000017179fi
17180rm -f conftest.$ac_objext conftest.$ac_ext
17181else
17182 cat >conftest.$ac_ext <<_ACEOF
17183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017184/* confdefs.h. */
17185_ACEOF
17186cat confdefs.h >>conftest.$ac_ext
17187cat >>conftest.$ac_ext <<_ACEOF
17188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017189int
17190main ()
17191{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017192 /* Are we little or big endian? From Harbison&Steele. */
17193 union
17194 {
17195 long l;
17196 char c[sizeof (long)];
17197 } u;
17198 u.l = 1;
17199 exit (u.c[sizeof (long) - 1] == 1);
17200}
Martin v. Löwis11437992002-04-12 09:54:03 +000017201_ACEOF
17202rm -f conftest$ac_exeext
17203if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17204 (eval $ac_link) 2>&5
17205 ac_status=$?
17206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17207 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17209 (eval $ac_try) 2>&5
17210 ac_status=$?
17211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17212 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017213 ac_cv_c_bigendian=no
17214else
Martin v. Löwis11437992002-04-12 09:54:03 +000017215 echo "$as_me: program exited with status $ac_status" >&5
17216echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017217sed 's/^/| /' conftest.$ac_ext >&5
17218
Martin v. Löwis11437992002-04-12 09:54:03 +000017219( exit $ac_status )
17220ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017221fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017222rm -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 +000017223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017224fi
17225rm -f conftest.$ac_objext conftest.$ac_ext
17226fi
17227echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17228echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17229case $ac_cv_c_bigendian in
17230 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017231
Martin v. Löwis11437992002-04-12 09:54:03 +000017232cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017233#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017234_ACEOF
17235 ;;
17236 no)
17237 ;;
17238 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017239 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017240presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017241echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017242presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17243 { (exit 1); exit 1; }; } ;;
17244esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017245
Michael W. Hudson54241132001-12-07 15:38:26 +000017246
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017247# Check whether right shifting a negative integer extends the sign bit
17248# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017249echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17250echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17251if test "${ac_cv_rshift_extends_sign+set}" = set; then
17252 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017253else
Martin v. Löwis11437992002-04-12 09:54:03 +000017254
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017255if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017256 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017257else
Martin v. Löwis11437992002-04-12 09:54:03 +000017258 cat >conftest.$ac_ext <<_ACEOF
17259#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017260/* confdefs.h. */
17261_ACEOF
17262cat confdefs.h >>conftest.$ac_ext
17263cat >>conftest.$ac_ext <<_ACEOF
17264/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017265
17266int main()
17267{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017268 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017269}
17270
Martin v. Löwis11437992002-04-12 09:54:03 +000017271_ACEOF
17272rm -f conftest$ac_exeext
17273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17274 (eval $ac_link) 2>&5
17275 ac_status=$?
17276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17277 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17279 (eval $ac_try) 2>&5
17280 ac_status=$?
17281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17282 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017283 ac_cv_rshift_extends_sign=yes
17284else
Martin v. Löwis11437992002-04-12 09:54:03 +000017285 echo "$as_me: program exited with status $ac_status" >&5
17286echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017287sed 's/^/| /' conftest.$ac_ext >&5
17288
Martin v. Löwis11437992002-04-12 09:54:03 +000017289( exit $ac_status )
17290ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017291fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017292rm -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 +000017293fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017294fi
17295
Martin v. Löwis11437992002-04-12 09:54:03 +000017296echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17297echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017298if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017299then
Martin v. Löwis11437992002-04-12 09:54:03 +000017300
17301cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017302#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017303_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017304
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017305fi
17306
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017307# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017308echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17309echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17310if test "${ac_cv_have_getc_unlocked+set}" = set; then
17311 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017312else
Martin v. Löwis11437992002-04-12 09:54:03 +000017313
17314cat >conftest.$ac_ext <<_ACEOF
17315#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017316/* confdefs.h. */
17317_ACEOF
17318cat confdefs.h >>conftest.$ac_ext
17319cat >>conftest.$ac_ext <<_ACEOF
17320/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017321#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017322int
17323main ()
17324{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017325
17326 FILE *f = fopen("/dev/null", "r");
17327 flockfile(f);
17328 getc_unlocked(f);
17329 funlockfile(f);
17330
Martin v. Löwis11437992002-04-12 09:54:03 +000017331 ;
17332 return 0;
17333}
17334_ACEOF
17335rm -f conftest.$ac_objext conftest$ac_exeext
17336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17337 (eval $ac_link) 2>&5
17338 ac_status=$?
17339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17340 (exit $ac_status); } &&
17341 { ac_try='test -s conftest$ac_exeext'
17342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17343 (eval $ac_try) 2>&5
17344 ac_status=$?
17345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17346 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017347 ac_cv_have_getc_unlocked=yes
17348else
Martin v. Löwis11437992002-04-12 09:54:03 +000017349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017350sed 's/^/| /' conftest.$ac_ext >&5
17351
Martin v. Löwis11437992002-04-12 09:54:03 +000017352ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017354rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017355fi
17356
Martin v. Löwis11437992002-04-12 09:54:03 +000017357echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17358echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017359if test "$ac_cv_have_getc_unlocked" = yes
17360then
Martin v. Löwis11437992002-04-12 09:54:03 +000017361
17362cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017363#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017364_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017365
17366fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017367
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017368# check for readline 2.2
17369cat >conftest.$ac_ext <<_ACEOF
17370#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017371/* confdefs.h. */
17372_ACEOF
17373cat confdefs.h >>conftest.$ac_ext
17374cat >>conftest.$ac_ext <<_ACEOF
17375/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017376#include <readline/readline.h>
17377_ACEOF
17378if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17379 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17380 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017381 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017382 rm -f conftest.er1
17383 cat conftest.err >&5
17384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17385 (exit $ac_status); } >/dev/null; then
17386 if test -s conftest.err; then
17387 ac_cpp_err=$ac_c_preproc_warn_flag
17388 else
17389 ac_cpp_err=
17390 fi
17391else
17392 ac_cpp_err=yes
17393fi
17394if test -z "$ac_cpp_err"; then
17395 have_readline=yes
17396else
17397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017398sed 's/^/| /' conftest.$ac_ext >&5
17399
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017400 have_readline=no
17401fi
17402rm -f conftest.err conftest.$ac_ext
17403if test $have_readline = yes
17404then
17405 cat >conftest.$ac_ext <<_ACEOF
17406#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017407/* confdefs.h. */
17408_ACEOF
17409cat confdefs.h >>conftest.$ac_ext
17410cat >>conftest.$ac_ext <<_ACEOF
17411/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017412#include <readline/readline.h>
17413
17414_ACEOF
17415if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017416 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017417
17418cat >>confdefs.h <<\_ACEOF
17419#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17420_ACEOF
17421
17422fi
17423rm -f conftest*
17424
17425fi
17426
Martin v. Löwis0daad592001-09-30 21:09:59 +000017427# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017428echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17429echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17430if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17431 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017432else
Martin v. Löwis11437992002-04-12 09:54:03 +000017433 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017434LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017435cat >conftest.$ac_ext <<_ACEOF
17436#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017437/* confdefs.h. */
17438_ACEOF
17439cat confdefs.h >>conftest.$ac_ext
17440cat >>conftest.$ac_ext <<_ACEOF
17441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017442
Guido van Rossum353ae582001-07-10 16:45:32 +000017443/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017444#ifdef __cplusplus
17445extern "C"
17446#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017447/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 builtin and then its argument prototype would still apply. */
17449char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017450int
17451main ()
17452{
17453rl_pre_input_hook ();
17454 ;
17455 return 0;
17456}
17457_ACEOF
17458rm -f conftest.$ac_objext conftest$ac_exeext
17459if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17460 (eval $ac_link) 2>&5
17461 ac_status=$?
17462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17463 (exit $ac_status); } &&
17464 { ac_try='test -s conftest$ac_exeext'
17465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17466 (eval $ac_try) 2>&5
17467 ac_status=$?
17468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17469 (exit $ac_status); }; }; then
17470 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017471else
Martin v. Löwis11437992002-04-12 09:54:03 +000017472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017473sed 's/^/| /' conftest.$ac_ext >&5
17474
Martin v. Löwis11437992002-04-12 09:54:03 +000017475ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017476fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017477rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17478LIBS=$ac_check_lib_save_LIBS
17479fi
17480echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17481echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17482if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017483
Martin v. Löwis11437992002-04-12 09:54:03 +000017484cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017485#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017486_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017487
Martin v. Löwis0daad592001-09-30 21:09:59 +000017488fi
17489
Michael W. Hudson54241132001-12-07 15:38:26 +000017490
Martin v. Löwis0daad592001-09-30 21:09:59 +000017491# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017492echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17493echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17494if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17495 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017496else
Martin v. Löwis11437992002-04-12 09:54:03 +000017497 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017498LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017499cat >conftest.$ac_ext <<_ACEOF
17500#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017501/* confdefs.h. */
17502_ACEOF
17503cat confdefs.h >>conftest.$ac_ext
17504cat >>conftest.$ac_ext <<_ACEOF
17505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017506
Martin v. Löwis0daad592001-09-30 21:09:59 +000017507/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017508#ifdef __cplusplus
17509extern "C"
17510#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017511/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017512 builtin and then its argument prototype would still apply. */
17513char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017514int
17515main ()
17516{
17517rl_completion_matches ();
17518 ;
17519 return 0;
17520}
17521_ACEOF
17522rm -f conftest.$ac_objext conftest$ac_exeext
17523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17524 (eval $ac_link) 2>&5
17525 ac_status=$?
17526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17527 (exit $ac_status); } &&
17528 { ac_try='test -s conftest$ac_exeext'
17529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17530 (eval $ac_try) 2>&5
17531 ac_status=$?
17532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17533 (exit $ac_status); }; }; then
17534 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017535else
Martin v. Löwis11437992002-04-12 09:54:03 +000017536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017537sed 's/^/| /' conftest.$ac_ext >&5
17538
Martin v. Löwis11437992002-04-12 09:54:03 +000017539ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017540fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017541rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17542LIBS=$ac_check_lib_save_LIBS
17543fi
17544echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17545echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17546if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017547
Martin v. Löwis11437992002-04-12 09:54:03 +000017548cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017549#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017550_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017551
Guido van Rossum353ae582001-07-10 16:45:32 +000017552fi
17553
Jack Jansendd19cf82001-12-06 22:36:17 +000017554
Martin v. Löwis11437992002-04-12 09:54:03 +000017555echo "$as_me:$LINENO: checking for broken nice()" >&5
17556echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17557if test "${ac_cv_broken_nice+set}" = set; then
17558 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017559else
Martin v. Löwis11437992002-04-12 09:54:03 +000017560
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017561if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017562 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017563else
Martin v. Löwis11437992002-04-12 09:54:03 +000017564 cat >conftest.$ac_ext <<_ACEOF
17565#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017566/* confdefs.h. */
17567_ACEOF
17568cat confdefs.h >>conftest.$ac_ext
17569cat >>conftest.$ac_ext <<_ACEOF
17570/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017571
17572int main()
17573{
17574 int val1 = nice(1);
17575 if (val1 != -1 && val1 == nice(2))
17576 exit(0);
17577 exit(1);
17578}
17579
Martin v. Löwis11437992002-04-12 09:54:03 +000017580_ACEOF
17581rm -f conftest$ac_exeext
17582if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17583 (eval $ac_link) 2>&5
17584 ac_status=$?
17585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17586 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17588 (eval $ac_try) 2>&5
17589 ac_status=$?
17590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17591 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017592 ac_cv_broken_nice=yes
17593else
Martin v. Löwis11437992002-04-12 09:54:03 +000017594 echo "$as_me: program exited with status $ac_status" >&5
17595echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017596sed 's/^/| /' conftest.$ac_ext >&5
17597
Martin v. Löwis11437992002-04-12 09:54:03 +000017598( exit $ac_status )
17599ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017600fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017601rm -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 +000017602fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017603fi
17604
Martin v. Löwis11437992002-04-12 09:54:03 +000017605echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17606echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017607if test "$ac_cv_broken_nice" = yes
17608then
Martin v. Löwis11437992002-04-12 09:54:03 +000017609
17610cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017611#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017612_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017613
17614fi
17615
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017616# tzset(3) exists and works like we expect it to
17617echo "$as_me:$LINENO: checking for working tzset()" >&5
17618echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17619if test "${ac_cv_working_tzset+set}" = set; then
17620 echo $ECHO_N "(cached) $ECHO_C" >&6
17621else
17622
17623if test "$cross_compiling" = yes; then
17624 ac_cv_working_tzset=no
17625else
17626 cat >conftest.$ac_ext <<_ACEOF
17627#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017628/* confdefs.h. */
17629_ACEOF
17630cat confdefs.h >>conftest.$ac_ext
17631cat >>conftest.$ac_ext <<_ACEOF
17632/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017633
17634#include <stdlib.h>
17635#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017636#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017637int main()
17638{
Brett Cannon18367812003-09-19 00:59:16 +000017639 /* Note that we need to ensure that not only does tzset(3)
17640 do 'something' with localtime, but it works as documented
17641 in the library reference and as expected by the test suite.
17642
17643 Red Hat 6.2 doesn't understand the southern hemisphere
17644 after New Year's Day; it thinks swaps on that day.
17645 */
17646
17647 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17648 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17649
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017650 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017651 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017652 if (localtime(&groundhogday)->tm_hour != 0)
17653 exit(1);
17654
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017655 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017656 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017657 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017658 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017659
17660 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17661 tzset();
17662 if (localtime(&groundhogday)->tm_hour != 11)
17663 exit(1);
17664 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17665 exit(1);
17666 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17667 exit(1);
17668
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017669 exit(0);
17670}
17671
17672_ACEOF
17673rm -f conftest$ac_exeext
17674if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17675 (eval $ac_link) 2>&5
17676 ac_status=$?
17677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17678 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17680 (eval $ac_try) 2>&5
17681 ac_status=$?
17682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17683 (exit $ac_status); }; }; then
17684 ac_cv_working_tzset=yes
17685else
17686 echo "$as_me: program exited with status $ac_status" >&5
17687echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017688sed 's/^/| /' conftest.$ac_ext >&5
17689
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017690( exit $ac_status )
17691ac_cv_working_tzset=no
17692fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017693rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017694fi
17695fi
17696
17697echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17698echo "${ECHO_T}$ac_cv_working_tzset" >&6
17699if test "$ac_cv_working_tzset" = yes
17700then
17701
17702cat >>confdefs.h <<\_ACEOF
17703#define HAVE_WORKING_TZSET 1
17704_ACEOF
17705
17706fi
17707
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017708# Look for subsecond timestamps in struct stat
17709echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17710echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17711if test "${ac_cv_stat_tv_nsec+set}" = set; then
17712 echo $ECHO_N "(cached) $ECHO_C" >&6
17713else
17714 cat >conftest.$ac_ext <<_ACEOF
17715#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017716/* confdefs.h. */
17717_ACEOF
17718cat confdefs.h >>conftest.$ac_ext
17719cat >>conftest.$ac_ext <<_ACEOF
17720/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017721#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017722int
17723main ()
17724{
17725
17726struct stat st;
17727st.st_mtim.tv_nsec = 1;
17728
17729 ;
17730 return 0;
17731}
17732_ACEOF
17733rm -f conftest.$ac_objext
17734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17735 (eval $ac_compile) 2>&5
17736 ac_status=$?
17737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17738 (exit $ac_status); } &&
17739 { ac_try='test -s conftest.$ac_objext'
17740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17741 (eval $ac_try) 2>&5
17742 ac_status=$?
17743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17744 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017745 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017746else
17747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017748sed 's/^/| /' conftest.$ac_ext >&5
17749
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017750ac_cv_stat_tv_nsec=no
17751fi
17752rm -f conftest.$ac_objext conftest.$ac_ext
17753fi
17754
17755echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17756echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17757if test "$ac_cv_stat_tv_nsec" = yes
17758then
17759
17760cat >>confdefs.h <<\_ACEOF
17761#define HAVE_STAT_TV_NSEC 1
17762_ACEOF
17763
17764fi
17765
Jack Jansen666b1e72001-10-31 12:11:48 +000017766# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017767echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17768echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17769if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17770 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017771else
Martin v. Löwis11437992002-04-12 09:54:03 +000017772 cat >conftest.$ac_ext <<_ACEOF
17773#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017774/* confdefs.h. */
17775_ACEOF
17776cat confdefs.h >>conftest.$ac_ext
17777cat >>conftest.$ac_ext <<_ACEOF
17778/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017779#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017780int
17781main ()
17782{
Jack Jansen666b1e72001-10-31 12:11:48 +000017783
17784 int rtn;
17785 rtn = mvwdelch(0,0,0);
17786
Martin v. Löwis11437992002-04-12 09:54:03 +000017787 ;
17788 return 0;
17789}
17790_ACEOF
17791rm -f conftest.$ac_objext
17792if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17793 (eval $ac_compile) 2>&5
17794 ac_status=$?
17795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17796 (exit $ac_status); } &&
17797 { ac_try='test -s conftest.$ac_objext'
17798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17799 (eval $ac_try) 2>&5
17800 ac_status=$?
17801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17802 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017803 ac_cv_mvwdelch_is_expression=yes
17804else
Martin v. Löwis11437992002-04-12 09:54:03 +000017805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017806sed 's/^/| /' conftest.$ac_ext >&5
17807
Martin v. Löwis11437992002-04-12 09:54:03 +000017808ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017809fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017810rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017811fi
17812
Martin v. Löwis11437992002-04-12 09:54:03 +000017813echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17814echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017815
17816if test "$ac_cv_mvwdelch_is_expression" = yes
17817then
Martin v. Löwis11437992002-04-12 09:54:03 +000017818
17819cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017820#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017821_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017822
17823fi
17824
Martin v. Löwis11437992002-04-12 09:54:03 +000017825echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17826echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17827if test "${ac_cv_window_has_flags+set}" = set; then
17828 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017829else
Martin v. Löwis11437992002-04-12 09:54:03 +000017830 cat >conftest.$ac_ext <<_ACEOF
17831#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017832/* confdefs.h. */
17833_ACEOF
17834cat confdefs.h >>conftest.$ac_ext
17835cat >>conftest.$ac_ext <<_ACEOF
17836/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017837#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017838int
17839main ()
17840{
Jack Jansen666b1e72001-10-31 12:11:48 +000017841
17842 WINDOW *w;
17843 w->_flags = 0;
17844
Martin v. Löwis11437992002-04-12 09:54:03 +000017845 ;
17846 return 0;
17847}
17848_ACEOF
17849rm -f conftest.$ac_objext
17850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17851 (eval $ac_compile) 2>&5
17852 ac_status=$?
17853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17854 (exit $ac_status); } &&
17855 { ac_try='test -s conftest.$ac_objext'
17856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17857 (eval $ac_try) 2>&5
17858 ac_status=$?
17859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17860 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017861 ac_cv_window_has_flags=yes
17862else
Martin v. Löwis11437992002-04-12 09:54:03 +000017863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017864sed 's/^/| /' conftest.$ac_ext >&5
17865
Martin v. Löwis11437992002-04-12 09:54:03 +000017866ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017867fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017868rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017869fi
17870
Martin v. Löwis11437992002-04-12 09:54:03 +000017871echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17872echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017873
Jack Jansen666b1e72001-10-31 12:11:48 +000017874
17875if test "$ac_cv_window_has_flags" = yes
17876then
Martin v. Löwis11437992002-04-12 09:54:03 +000017877
17878cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017879#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017880_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017881
17882fi
17883
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017884echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17885echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17886
17887if test -e /dev/ptmx
17888then
17889 echo "$as_me:$LINENO: result: yes" >&5
17890echo "${ECHO_T}yes" >&6
17891
17892cat >>confdefs.h <<\_ACEOF
17893#define HAVE_DEV_PTMX 1
17894_ACEOF
17895
17896else
17897 echo "$as_me:$LINENO: result: no" >&5
17898echo "${ECHO_T}no" >&6
17899fi
17900
Neal Norwitz865400f2003-03-21 01:42:58 +000017901echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17902echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17903
17904if test -e /dev/ptc
17905then
17906 echo "$as_me:$LINENO: result: yes" >&5
17907echo "${ECHO_T}yes" >&6
17908
17909cat >>confdefs.h <<\_ACEOF
17910#define HAVE_DEV_PTC 1
17911_ACEOF
17912
17913else
17914 echo "$as_me:$LINENO: result: no" >&5
17915echo "${ECHO_T}no" >&6
17916fi
17917
Martin v. Löwis11437992002-04-12 09:54:03 +000017918echo "$as_me:$LINENO: checking for socklen_t" >&5
17919echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17920if test "${ac_cv_type_socklen_t+set}" = set; then
17921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017922else
Martin v. Löwis11437992002-04-12 09:54:03 +000017923 cat >conftest.$ac_ext <<_ACEOF
17924#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017925/* confdefs.h. */
17926_ACEOF
17927cat confdefs.h >>conftest.$ac_ext
17928cat >>conftest.$ac_ext <<_ACEOF
17929/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000017930
17931#ifdef HAVE_SYS_TYPES_H
17932#include <sys/types.h>
17933#endif
17934#ifdef HAVE_SYS_SOCKET_H
17935#include <sys/socket.h>
17936#endif
17937
17938
Martin v. Löwis11437992002-04-12 09:54:03 +000017939int
17940main ()
17941{
17942if ((socklen_t *) 0)
17943 return 0;
17944if (sizeof (socklen_t))
17945 return 0;
17946 ;
17947 return 0;
17948}
17949_ACEOF
17950rm -f conftest.$ac_objext
17951if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17952 (eval $ac_compile) 2>&5
17953 ac_status=$?
17954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17955 (exit $ac_status); } &&
17956 { ac_try='test -s conftest.$ac_objext'
17957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17958 (eval $ac_try) 2>&5
17959 ac_status=$?
17960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17961 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017962 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017963else
Martin v. Löwis11437992002-04-12 09:54:03 +000017964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017965sed 's/^/| /' conftest.$ac_ext >&5
17966
Martin v. Löwis11437992002-04-12 09:54:03 +000017967ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017968fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017969rm -f conftest.$ac_objext conftest.$ac_ext
17970fi
17971echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17972echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17973if test $ac_cv_type_socklen_t = yes; then
17974 :
17975else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017976
Martin v. Löwis01c04012002-11-11 14:58:44 +000017977cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017978#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017979_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017980
17981fi
17982
Michael W. Hudson54241132001-12-07 15:38:26 +000017983
Michael W. Hudson54241132001-12-07 15:38:26 +000017984
17985
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017986for h in `(cd $srcdir;echo Python/thread_*.h)`
17987do
17988 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17989done
17990
Michael W. Hudson54241132001-12-07 15:38:26 +000017991
Jack Jansen0b06be72002-06-21 14:48:38 +000017992SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017993echo "$as_me:$LINENO: checking for build directories" >&5
17994echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017995for dir in $SRCDIRS; do
17996 if test ! -d $dir; then
17997 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017998 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017999done
Martin v. Löwis11437992002-04-12 09:54:03 +000018000echo "$as_me:$LINENO: result: done" >&5
18001echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018002
Guido van Rossum627b2d71993-12-24 10:39:16 +000018003# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018004 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018005
Martin v. Löwis11437992002-04-12 09:54:03 +000018006cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018007# This file is a shell script that caches the results of configure
18008# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018009# scripts and configure runs, see configure's option --config-cache.
18010# It is not useful on other systems. If it contains results you don't
18011# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018012#
Martin v. Löwis11437992002-04-12 09:54:03 +000018013# config.status only pays attention to the cache file if you give it
18014# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018015#
Skip Montanaro6dead952003-09-25 14:50:04 +000018016# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018017# loading this file, other *unset* `ac_cv_foo' will be assigned the
18018# following values.
18019
18020_ACEOF
18021
Guido van Rossumf78abae1997-01-21 22:02:36 +000018022# The following way of writing the cache mishandles newlines in values,
18023# but we know of no workaround that is simple, portable, and efficient.
18024# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018025# Ultrix sh set writes to stderr and can't be redirected directly,
18026# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018027{
18028 (set) 2>&1 |
18029 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18030 *ac_space=\ *)
18031 # `set' does not quote correctly, so add quotes (double-quote
18032 # substitution turns \\\\ into \\, and sed turns \\ into \).
18033 sed -n \
18034 "s/'/'\\\\''/g;
18035 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18036 ;;
18037 *)
18038 # `set' quotes correctly as required by POSIX, so do not add quotes.
18039 sed -n \
18040 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18041 ;;
18042 esac;
18043} |
18044 sed '
18045 t clear
18046 : clear
18047 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18048 t end
18049 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18050 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018051if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018052 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018053 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18054 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018055 else
18056 echo "not updating unwritable cache $cache_file"
18057 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018058fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018059rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018060
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018061test "x$prefix" = xNONE && prefix=$ac_default_prefix
18062# Let make expand exec_prefix.
18063test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018064
Martin v. Löwis11437992002-04-12 09:54:03 +000018065# VPATH may cause trouble with some makes, so we remove $(srcdir),
18066# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18067# trailing colons and then remove the whole line if VPATH becomes empty
18068# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018069if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018070 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18071s/:*\$(srcdir):*/:/;
18072s/:*\${srcdir}:*/:/;
18073s/:*@srcdir@:*/:/;
18074s/^\([^=]*=[ ]*\):*/\1/;
18075s/:*$//;
18076s/^[^=]*=[ ]*$//;
18077}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018078fi
18079
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018080DEFS=-DHAVE_CONFIG_H
18081
Skip Montanaro6dead952003-09-25 14:50:04 +000018082ac_libobjs=
18083ac_ltlibobjs=
18084for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18085 # 1. Remove the extension, and $U if already installed.
18086 ac_i=`echo "$ac_i" |
18087 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18088 # 2. Add them.
18089 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18090 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18091done
18092LIBOBJS=$ac_libobjs
18093
18094LTLIBOBJS=$ac_ltlibobjs
18095
18096
Martin v. Löwis11437992002-04-12 09:54:03 +000018097
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018098: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018099ac_clean_files_save=$ac_clean_files
18100ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18101{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18102echo "$as_me: creating $CONFIG_STATUS" >&6;}
18103cat >$CONFIG_STATUS <<_ACEOF
18104#! $SHELL
18105# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018106# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018107# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018108# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018109
Martin v. Löwis11437992002-04-12 09:54:03 +000018110debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018111ac_cs_recheck=false
18112ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018113SHELL=\${CONFIG_SHELL-$SHELL}
18114_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018115
Martin v. Löwis11437992002-04-12 09:54:03 +000018116cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018117## --------------------- ##
18118## M4sh Initialization. ##
18119## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018120
Martin v. Löwis11437992002-04-12 09:54:03 +000018121# Be Bourne compatible
18122if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18123 emulate sh
18124 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018125 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18126 # is contrary to our usage. Disable this feature.
18127 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018128elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18129 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018130fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018131
Martin v. Löwis11437992002-04-12 09:54:03 +000018132# Support unset when possible.
18133if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18134 as_unset=unset
18135else
18136 as_unset=false
18137fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018138
Skip Montanaro6dead952003-09-25 14:50:04 +000018139
18140# Work around bugs in pre-3.0 UWIN ksh.
18141$as_unset ENV MAIL MAILPATH
18142PS1='$ '
18143PS2='> '
18144PS4='+ '
18145
18146# NLS nuisances.
18147for as_var in \
18148 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18149 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18150 LC_TELEPHONE LC_TIME
18151do
18152 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18153 eval $as_var=C; export $as_var
18154 else
18155 $as_unset $as_var
18156 fi
18157done
18158
18159# Required to use basename.
18160if expr a : '\(a\)' >/dev/null 2>&1; then
18161 as_expr=expr
18162else
18163 as_expr=false
18164fi
18165
18166if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18167 as_basename=basename
18168else
18169 as_basename=false
18170fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018171
18172
18173# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018174as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018175$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18176 X"$0" : 'X\(//\)$' \| \
18177 X"$0" : 'X\(/\)$' \| \
18178 . : '\(.\)' 2>/dev/null ||
18179echo X/"$0" |
18180 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18181 /^X\/\(\/\/\)$/{ s//\1/; q; }
18182 /^X\/\(\/\).*/{ s//\1/; q; }
18183 s/.*/./; q'`
18184
Skip Montanaro6dead952003-09-25 14:50:04 +000018185
Martin v. Löwis11437992002-04-12 09:54:03 +000018186# PATH needs CR, and LINENO needs CR and PATH.
18187# Avoid depending upon Character Ranges.
18188as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18189as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18190as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18191as_cr_digits='0123456789'
18192as_cr_alnum=$as_cr_Letters$as_cr_digits
18193
18194# The user is always right.
18195if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018196 echo "#! /bin/sh" >conf$$.sh
18197 echo "exit 0" >>conf$$.sh
18198 chmod +x conf$$.sh
18199 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018200 PATH_SEPARATOR=';'
18201 else
18202 PATH_SEPARATOR=:
18203 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018204 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018205fi
18206
18207
18208 as_lineno_1=$LINENO
18209 as_lineno_2=$LINENO
18210 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18211 test "x$as_lineno_1" != "x$as_lineno_2" &&
18212 test "x$as_lineno_3" = "x$as_lineno_2" || {
18213 # Find who we are. Look in the path if we contain no path at all
18214 # relative or not.
18215 case $0 in
18216 *[\\/]* ) as_myself=$0 ;;
18217 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18218for as_dir in $PATH
18219do
18220 IFS=$as_save_IFS
18221 test -z "$as_dir" && as_dir=.
18222 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18223done
18224
18225 ;;
18226 esac
18227 # We did not find ourselves, most probably we were run as `sh COMMAND'
18228 # in which case we are not to be found in the path.
18229 if test "x$as_myself" = x; then
18230 as_myself=$0
18231 fi
18232 if test ! -f "$as_myself"; then
18233 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18234echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18235 { (exit 1); exit 1; }; }
18236 fi
18237 case $CONFIG_SHELL in
18238 '')
18239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18240for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18241do
18242 IFS=$as_save_IFS
18243 test -z "$as_dir" && as_dir=.
18244 for as_base in sh bash ksh sh5; do
18245 case $as_dir in
18246 /*)
18247 if ("$as_dir/$as_base" -c '
18248 as_lineno_1=$LINENO
18249 as_lineno_2=$LINENO
18250 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18251 test "x$as_lineno_1" != "x$as_lineno_2" &&
18252 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018253 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18254 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018255 CONFIG_SHELL=$as_dir/$as_base
18256 export CONFIG_SHELL
18257 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18258 fi;;
18259 esac
18260 done
18261done
18262;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018263 esac
18264
Martin v. Löwis11437992002-04-12 09:54:03 +000018265 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18266 # uniformly replaced by the line number. The first 'sed' inserts a
18267 # line-number line before each line; the second 'sed' does the real
18268 # work. The second script uses 'N' to pair each line-number line
18269 # with the numbered line, and appends trailing '-' during
18270 # substitution so that $LINENO is not a special case at line end.
18271 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18272 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18273 sed '=' <$as_myself |
18274 sed '
18275 N
18276 s,$,-,
18277 : loop
18278 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18279 t loop
18280 s,-$,,
18281 s,^['$as_cr_digits']*\n,,
18282 ' >$as_me.lineno &&
18283 chmod +x $as_me.lineno ||
18284 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18285echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18286 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018287
Martin v. Löwis11437992002-04-12 09:54:03 +000018288 # Don't try to exec as it changes $[0], causing all sort of problems
18289 # (the dirname of $[0] is not the place where we might find the
18290 # original and so on. Autoconf is especially sensible to this).
18291 . ./$as_me.lineno
18292 # Exit status is that of the last command.
18293 exit
18294}
18295
18296
18297case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18298 *c*,-n*) ECHO_N= ECHO_C='
18299' ECHO_T=' ' ;;
18300 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18301 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18302esac
18303
18304if expr a : '\(a\)' >/dev/null 2>&1; then
18305 as_expr=expr
18306else
18307 as_expr=false
18308fi
18309
18310rm -f conf$$ conf$$.exe conf$$.file
18311echo >conf$$.file
18312if ln -s conf$$.file conf$$ 2>/dev/null; then
18313 # We could just check for DJGPP; but this test a) works b) is more generic
18314 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18315 if test -f conf$$.exe; then
18316 # Don't use ln at all; we don't have any links
18317 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018318 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018319 as_ln_s='ln -s'
18320 fi
18321elif ln conf$$.file conf$$ 2>/dev/null; then
18322 as_ln_s=ln
18323else
18324 as_ln_s='cp -p'
18325fi
18326rm -f conf$$ conf$$.exe conf$$.file
18327
Skip Montanaro6dead952003-09-25 14:50:04 +000018328if mkdir -p . 2>/dev/null; then
18329 as_mkdir_p=:
18330else
18331 as_mkdir_p=false
18332fi
18333
Martin v. Löwis11437992002-04-12 09:54:03 +000018334as_executable_p="test -f"
18335
18336# Sed expression to map a string onto a valid CPP name.
18337as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18338
18339# Sed expression to map a string onto a valid variable name.
18340as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18341
18342
18343# IFS
18344# We need space, tab and new line, in precisely that order.
18345as_nl='
18346'
18347IFS=" $as_nl"
18348
18349# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018350$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018351
18352exec 6>&1
18353
18354# Open the log real soon, to keep \$[0] and so on meaningful, and to
18355# report actual input values of CONFIG_FILES etc. instead of their
18356# values after options handling. Logging --version etc. is OK.
18357exec 5>>config.log
18358{
18359 echo
18360 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18361## Running $as_me. ##
18362_ASBOX
18363} >&5
18364cat >&5 <<_CSEOF
18365
Fred Drake9bd44622003-07-30 17:39:48 +000018366This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000018367generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018368
18369 CONFIG_FILES = $CONFIG_FILES
18370 CONFIG_HEADERS = $CONFIG_HEADERS
18371 CONFIG_LINKS = $CONFIG_LINKS
18372 CONFIG_COMMANDS = $CONFIG_COMMANDS
18373 $ $0 $@
18374
18375_CSEOF
18376echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18377echo >&5
18378_ACEOF
18379
18380# Files that config.status was made for.
18381if test -n "$ac_config_files"; then
18382 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18383fi
18384
18385if test -n "$ac_config_headers"; then
18386 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18387fi
18388
18389if test -n "$ac_config_links"; then
18390 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18391fi
18392
18393if test -n "$ac_config_commands"; then
18394 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18395fi
18396
18397cat >>$CONFIG_STATUS <<\_ACEOF
18398
18399ac_cs_usage="\
18400\`$as_me' instantiates files from templates according to the
18401current configuration.
18402
18403Usage: $0 [OPTIONS] [FILE]...
18404
18405 -h, --help print this help, then exit
18406 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018407 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018408 -d, --debug don't remove temporary files
18409 --recheck update $as_me by reconfiguring in the same conditions
18410 --file=FILE[:TEMPLATE]
18411 instantiate the configuration file FILE
18412 --header=FILE[:TEMPLATE]
18413 instantiate the configuration header FILE
18414
18415Configuration files:
18416$config_files
18417
18418Configuration headers:
18419$config_headers
18420
18421Report bugs to <bug-autoconf@gnu.org>."
18422_ACEOF
18423
18424cat >>$CONFIG_STATUS <<_ACEOF
18425ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018426python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000018427configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018428 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18429
18430Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18431Free Software Foundation, Inc.
18432This config.status script is free software; the Free Software Foundation
18433gives unlimited permission to copy, distribute and modify it."
18434srcdir=$srcdir
18435INSTALL="$INSTALL"
18436_ACEOF
18437
18438cat >>$CONFIG_STATUS <<\_ACEOF
18439# If no file are specified by the user, then we need to provide default
18440# value. By we need to know if files were specified by the user.
18441ac_need_defaults=:
18442while test $# != 0
18443do
18444 case $1 in
18445 --*=*)
18446 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18447 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018448 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018449 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018450 -*)
18451 ac_option=$1
18452 ac_optarg=$2
18453 ac_shift=shift
18454 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018455 *) # This is not an option, so the user has probably given explicit
18456 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018457 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018458 ac_need_defaults=false;;
18459 esac
18460
Skip Montanaro6dead952003-09-25 14:50:04 +000018461 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018462 # Handling of the options.
18463_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018464cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018465 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18466 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018467 --version | --vers* | -V )
18468 echo "$ac_cs_version"; exit 0 ;;
18469 --he | --h)
18470 # Conflict between --help and --header
18471 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18472Try \`$0 --help' for more information." >&5
18473echo "$as_me: error: ambiguous option: $1
18474Try \`$0 --help' for more information." >&2;}
18475 { (exit 1); exit 1; }; };;
18476 --help | --hel | -h )
18477 echo "$ac_cs_usage"; exit 0 ;;
18478 --debug | --d* | -d )
18479 debug=: ;;
18480 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018481 $ac_shift
18482 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018483 ac_need_defaults=false;;
18484 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018485 $ac_shift
18486 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018487 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018488 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18489 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18490 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018491
18492 # This is an error.
18493 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18494Try \`$0 --help' for more information." >&5
18495echo "$as_me: error: unrecognized option: $1
18496Try \`$0 --help' for more information." >&2;}
18497 { (exit 1); exit 1; }; } ;;
18498
18499 *) ac_config_targets="$ac_config_targets $1" ;;
18500
18501 esac
18502 shift
18503done
18504
Skip Montanaro6dead952003-09-25 14:50:04 +000018505ac_configure_extra_args=
18506
18507if $ac_cs_silent; then
18508 exec 6>/dev/null
18509 ac_configure_extra_args="$ac_configure_extra_args --silent"
18510fi
18511
18512_ACEOF
18513cat >>$CONFIG_STATUS <<_ACEOF
18514if \$ac_cs_recheck; then
18515 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18516 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18517fi
18518
Martin v. Löwis11437992002-04-12 09:54:03 +000018519_ACEOF
18520
18521
18522
18523
18524
18525cat >>$CONFIG_STATUS <<\_ACEOF
18526for ac_config_target in $ac_config_targets
18527do
18528 case "$ac_config_target" in
18529 # Handling of arguments.
18530 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18531 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18532 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18533 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18534echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18535 { (exit 1); exit 1; }; };;
18536 esac
18537done
18538
18539# If the user did not use the arguments to specify the items to instantiate,
18540# then the envvar interface is used. Set only those that are not.
18541# We use the long form for the default assignment because of an extremely
18542# bizarre bug on SunOS 4.1.3.
18543if $ac_need_defaults; then
18544 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18545 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18546fi
18547
Skip Montanaro6dead952003-09-25 14:50:04 +000018548# Have a temporary directory for convenience. Make it in the build tree
18549# simply because there is no reason to put it here, and in addition,
18550# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018551# Create a temporary directory, and hook for its removal unless debugging.
18552$debug ||
18553{
18554 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18555 trap '{ (exit 1); exit 1; }' 1 2 13 15
18556}
18557
18558# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018559
Martin v. Löwis11437992002-04-12 09:54:03 +000018560{
Skip Montanaro6dead952003-09-25 14:50:04 +000018561 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018562 test -n "$tmp" && test -d "$tmp"
18563} ||
18564{
Skip Montanaro6dead952003-09-25 14:50:04 +000018565 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018566 (umask 077 && mkdir $tmp)
18567} ||
18568{
Skip Montanaro6dead952003-09-25 14:50:04 +000018569 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018570 { (exit 1); exit 1; }
18571}
18572
18573_ACEOF
18574
18575cat >>$CONFIG_STATUS <<_ACEOF
18576
18577#
18578# CONFIG_FILES section.
18579#
18580
18581# No need to generate the scripts if there are no CONFIG_FILES.
18582# This happens for instance when ./config.status config.h
18583if test -n "\$CONFIG_FILES"; then
18584 # Protect against being on the right side of a sed subst in config.status.
18585 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18586 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18587s,@SHELL@,$SHELL,;t t
18588s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18589s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18590s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18591s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18592s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18593s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18594s,@exec_prefix@,$exec_prefix,;t t
18595s,@prefix@,$prefix,;t t
18596s,@program_transform_name@,$program_transform_name,;t t
18597s,@bindir@,$bindir,;t t
18598s,@sbindir@,$sbindir,;t t
18599s,@libexecdir@,$libexecdir,;t t
18600s,@datadir@,$datadir,;t t
18601s,@sysconfdir@,$sysconfdir,;t t
18602s,@sharedstatedir@,$sharedstatedir,;t t
18603s,@localstatedir@,$localstatedir,;t t
18604s,@libdir@,$libdir,;t t
18605s,@includedir@,$includedir,;t t
18606s,@oldincludedir@,$oldincludedir,;t t
18607s,@infodir@,$infodir,;t t
18608s,@mandir@,$mandir,;t t
18609s,@build_alias@,$build_alias,;t t
18610s,@host_alias@,$host_alias,;t t
18611s,@target_alias@,$target_alias,;t t
18612s,@DEFS@,$DEFS,;t t
18613s,@ECHO_C@,$ECHO_C,;t t
18614s,@ECHO_N@,$ECHO_N,;t t
18615s,@ECHO_T@,$ECHO_T,;t t
18616s,@LIBS@,$LIBS,;t t
18617s,@VERSION@,$VERSION,;t t
18618s,@SOVERSION@,$SOVERSION,;t t
18619s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18620s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18621s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18622s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18623s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18624s,@MACHDEP@,$MACHDEP,;t t
18625s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018626s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018627s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018628s,@CXX@,$CXX,;t t
18629s,@MAINOBJ@,$MAINOBJ,;t t
18630s,@EXEEXT@,$EXEEXT,;t t
18631s,@CC@,$CC,;t t
18632s,@CFLAGS@,$CFLAGS,;t t
18633s,@LDFLAGS@,$LDFLAGS,;t t
18634s,@CPPFLAGS@,$CPPFLAGS,;t t
18635s,@ac_ct_CC@,$ac_ct_CC,;t t
18636s,@OBJEXT@,$OBJEXT,;t t
18637s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018638s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018639s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18640s,@LIBRARY@,$LIBRARY,;t t
18641s,@LDLIBRARY@,$LDLIBRARY,;t t
18642s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18643s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18644s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18645s,@INSTSONAME@,$INSTSONAME,;t t
18646s,@RUNSHARED@,$RUNSHARED,;t t
18647s,@LINKCC@,$LINKCC,;t t
18648s,@RANLIB@,$RANLIB,;t t
18649s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18650s,@AR@,$AR,;t t
18651s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18652s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18653s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18654s,@LN@,$LN,;t t
18655s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018656s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018657s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18658s,@SO@,$SO,;t t
18659s,@LDSHARED@,$LDSHARED,;t t
18660s,@BLDSHARED@,$BLDSHARED,;t t
18661s,@CCSHARED@,$CCSHARED,;t t
18662s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18663s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018664s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018665s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18666s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18667s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18668s,@LDLAST@,$LDLAST,;t t
18669s,@THREADOBJ@,$THREADOBJ,;t t
18670s,@DLINCLDIR@,$DLINCLDIR,;t t
18671s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18672s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018673s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018674s,@LIBOBJS@,$LIBOBJS,;t t
18675s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18676s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18677s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18678s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18679s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18680s,@LIBM@,$LIBM,;t t
18681s,@LIBC@,$LIBC,;t t
18682s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18683s,@THREADHEADERS@,$THREADHEADERS,;t t
18684s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018685s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018686CEOF
18687
18688_ACEOF
18689
18690 cat >>$CONFIG_STATUS <<\_ACEOF
18691 # Split the substitutions into bite-sized pieces for seds with
18692 # small command number limits, like on Digital OSF/1 and HP-UX.
18693 ac_max_sed_lines=48
18694 ac_sed_frag=1 # Number of current file.
18695 ac_beg=1 # First line for current file.
18696 ac_end=$ac_max_sed_lines # Line after last line for current file.
18697 ac_more_lines=:
18698 ac_sed_cmds=
18699 while $ac_more_lines; do
18700 if test $ac_beg -gt 1; then
18701 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18702 else
18703 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18704 fi
18705 if test ! -s $tmp/subs.frag; then
18706 ac_more_lines=false
18707 else
18708 # The purpose of the label and of the branching condition is to
18709 # speed up the sed processing (if there are no `@' at all, there
18710 # is no need to browse any of the substitutions).
18711 # These are the two extra sed commands mentioned above.
18712 (echo ':t
18713 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18714 if test -z "$ac_sed_cmds"; then
18715 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18716 else
18717 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18718 fi
18719 ac_sed_frag=`expr $ac_sed_frag + 1`
18720 ac_beg=$ac_end
18721 ac_end=`expr $ac_end + $ac_max_sed_lines`
18722 fi
18723 done
18724 if test -z "$ac_sed_cmds"; then
18725 ac_sed_cmds=cat
18726 fi
18727fi # test -n "$CONFIG_FILES"
18728
18729_ACEOF
18730cat >>$CONFIG_STATUS <<\_ACEOF
18731for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18732 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18733 case $ac_file in
18734 - | *:- | *:-:* ) # input from stdin
18735 cat >$tmp/stdin
18736 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18737 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18738 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18739 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18740 * ) ac_file_in=$ac_file.in ;;
18741 esac
18742
18743 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18744 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18745$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18746 X"$ac_file" : 'X\(//\)[^/]' \| \
18747 X"$ac_file" : 'X\(//\)$' \| \
18748 X"$ac_file" : 'X\(/\)' \| \
18749 . : '\(.\)' 2>/dev/null ||
18750echo X"$ac_file" |
18751 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18752 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18753 /^X\(\/\/\)$/{ s//\1/; q; }
18754 /^X\(\/\).*/{ s//\1/; q; }
18755 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018756 { if $as_mkdir_p; then
18757 mkdir -p "$ac_dir"
18758 else
18759 as_dir="$ac_dir"
18760 as_dirs=
18761 while test ! -d "$as_dir"; do
18762 as_dirs="$as_dir $as_dirs"
18763 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18764$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18765 X"$as_dir" : 'X\(//\)[^/]' \| \
18766 X"$as_dir" : 'X\(//\)$' \| \
18767 X"$as_dir" : 'X\(/\)' \| \
18768 . : '\(.\)' 2>/dev/null ||
18769echo X"$as_dir" |
18770 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18771 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18772 /^X\(\/\/\)$/{ s//\1/; q; }
18773 /^X\(\/\).*/{ s//\1/; q; }
18774 s/.*/./; q'`
18775 done
18776 test ! -n "$as_dirs" || mkdir $as_dirs
18777 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18778echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18779 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018780
18781 ac_builddir=.
18782
18783if test "$ac_dir" != .; then
18784 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18785 # A "../" for each directory in $ac_dir_suffix.
18786 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18787else
18788 ac_dir_suffix= ac_top_builddir=
18789fi
18790
18791case $srcdir in
18792 .) # No --srcdir option. We are building in place.
18793 ac_srcdir=.
18794 if test -z "$ac_top_builddir"; then
18795 ac_top_srcdir=.
18796 else
18797 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18798 fi ;;
18799 [\\/]* | ?:[\\/]* ) # Absolute path.
18800 ac_srcdir=$srcdir$ac_dir_suffix;
18801 ac_top_srcdir=$srcdir ;;
18802 *) # Relative path.
18803 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18804 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18805esac
18806# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18807# absolute.
18808ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018809ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018810ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18811ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18812
18813
18814 case $INSTALL in
18815 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18816 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18817 esac
18818
18819 if test x"$ac_file" != x-; then
18820 { echo "$as_me:$LINENO: creating $ac_file" >&5
18821echo "$as_me: creating $ac_file" >&6;}
18822 rm -f "$ac_file"
18823 fi
18824 # Let's still pretend it is `configure' which instantiates (i.e., don't
18825 # use $as_me), people would be surprised to read:
18826 # /* config.h. Generated by config.status. */
18827 if test x"$ac_file" = x-; then
18828 configure_input=
18829 else
18830 configure_input="$ac_file. "
18831 fi
18832 configure_input=$configure_input"Generated from `echo $ac_file_in |
18833 sed 's,.*/,,'` by configure."
18834
18835 # First look for the input files in the build tree, otherwise in the
18836 # src tree.
18837 ac_file_inputs=`IFS=:
18838 for f in $ac_file_in; do
18839 case $f in
18840 -) echo $tmp/stdin ;;
18841 [\\/$]*)
18842 # Absolute (can't be DOS-style, as IFS=:)
18843 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18844echo "$as_me: error: cannot find input file: $f" >&2;}
18845 { (exit 1); exit 1; }; }
18846 echo $f;;
18847 *) # Relative
18848 if test -f "$f"; then
18849 # Build tree
18850 echo $f
18851 elif test -f "$srcdir/$f"; then
18852 # Source tree
18853 echo $srcdir/$f
18854 else
18855 # /dev/null tree
18856 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18857echo "$as_me: error: cannot find input file: $f" >&2;}
18858 { (exit 1); exit 1; }; }
18859 fi;;
18860 esac
18861 done` || { (exit 1); exit 1; }
18862_ACEOF
18863cat >>$CONFIG_STATUS <<_ACEOF
18864 sed "$ac_vpsub
18865$extrasub
18866_ACEOF
18867cat >>$CONFIG_STATUS <<\_ACEOF
18868:t
18869/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18870s,@configure_input@,$configure_input,;t t
18871s,@srcdir@,$ac_srcdir,;t t
18872s,@abs_srcdir@,$ac_abs_srcdir,;t t
18873s,@top_srcdir@,$ac_top_srcdir,;t t
18874s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18875s,@builddir@,$ac_builddir,;t t
18876s,@abs_builddir@,$ac_abs_builddir,;t t
18877s,@top_builddir@,$ac_top_builddir,;t t
18878s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18879s,@INSTALL@,$ac_INSTALL,;t t
18880" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18881 rm -f $tmp/stdin
18882 if test x"$ac_file" != x-; then
18883 mv $tmp/out $ac_file
18884 else
18885 cat $tmp/out
18886 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018887 fi
18888
Martin v. Löwis11437992002-04-12 09:54:03 +000018889done
18890_ACEOF
18891cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018892
Martin v. Löwis11437992002-04-12 09:54:03 +000018893#
18894# CONFIG_HEADER section.
18895#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018896
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018897# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18898# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018899#
18900# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018901ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18902ac_dB='[ ].*$,\1#\2'
18903ac_dC=' '
18904ac_dD=',;t'
18905# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18906ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18907ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018908ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018909ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018910
Martin v. Löwis11437992002-04-12 09:54:03 +000018911for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018912 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018913 case $ac_file in
18914 - | *:- | *:-:* ) # input from stdin
18915 cat >$tmp/stdin
18916 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18917 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18918 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18919 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18920 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018921 esac
18922
Martin v. Löwis11437992002-04-12 09:54:03 +000018923 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18924echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018925
Martin v. Löwis11437992002-04-12 09:54:03 +000018926 # First look for the input files in the build tree, otherwise in the
18927 # src tree.
18928 ac_file_inputs=`IFS=:
18929 for f in $ac_file_in; do
18930 case $f in
18931 -) echo $tmp/stdin ;;
18932 [\\/$]*)
18933 # Absolute (can't be DOS-style, as IFS=:)
18934 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18935echo "$as_me: error: cannot find input file: $f" >&2;}
18936 { (exit 1); exit 1; }; }
18937 echo $f;;
18938 *) # Relative
18939 if test -f "$f"; then
18940 # Build tree
18941 echo $f
18942 elif test -f "$srcdir/$f"; then
18943 # Source tree
18944 echo $srcdir/$f
18945 else
18946 # /dev/null tree
18947 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18948echo "$as_me: error: cannot find input file: $f" >&2;}
18949 { (exit 1); exit 1; }; }
18950 fi;;
18951 esac
18952 done` || { (exit 1); exit 1; }
18953 # Remove the trailing spaces.
18954 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018955
Martin v. Löwis11437992002-04-12 09:54:03 +000018956_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018957
Martin v. Löwis11437992002-04-12 09:54:03 +000018958# Transform confdefs.h into two sed scripts, `conftest.defines' and
18959# `conftest.undefs', that substitutes the proper values into
18960# config.h.in to produce config.h. The first handles `#define'
18961# templates, and the second `#undef' templates.
18962# And first: Protect against being on the right side of a sed subst in
18963# config.status. Protect against being in an unquoted here document
18964# in config.status.
18965rm -f conftest.defines conftest.undefs
18966# Using a here document instead of a string reduces the quoting nightmare.
18967# Putting comments in sed scripts is not portable.
18968#
18969# `end' is used to avoid that the second main sed command (meant for
18970# 0-ary CPP macros) applies to n-ary macro definitions.
18971# See the Autoconf documentation for `clear'.
18972cat >confdef2sed.sed <<\_ACEOF
18973s/[\\&,]/\\&/g
18974s,[\\$`],\\&,g
18975t clear
18976: clear
18977s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18978t end
18979s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18980: end
18981_ACEOF
18982# If some macros were called several times there might be several times
18983# the same #defines, which is useless. Nevertheless, we may not want to
18984# sort them, since we want the *last* AC-DEFINE to be honored.
18985uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18986sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18987rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018988
18989# This sed command replaces #undef with comments. This is necessary, for
18990# example, in the case of _POSIX_SOURCE, which is predefined and required
18991# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018992cat >>conftest.undefs <<\_ACEOF
18993s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18994_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018995
Martin v. Löwis11437992002-04-12 09:54:03 +000018996# Break up conftest.defines because some shells have a limit on the size
18997# of here documents, and old seds have small limits too (100 cmds).
18998echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000018999echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019000echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19001echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019002rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019003while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019004do
Martin v. Löwis11437992002-04-12 09:54:03 +000019005 # Write a limited-size here document to $tmp/defines.sed.
19006 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19007 # Speed up: don't consider the non `#define' lines.
19008 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19009 # Work around the forget-to-reset-the-flag bug.
19010 echo 't clr' >>$CONFIG_STATUS
19011 echo ': clr' >>$CONFIG_STATUS
19012 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019013 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019014 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19015 rm -f $tmp/in
19016 mv $tmp/out $tmp/in
19017' >>$CONFIG_STATUS
19018 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19019 rm -f conftest.defines
19020 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019021done
Martin v. Löwis11437992002-04-12 09:54:03 +000019022rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019023echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019024echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019025
Martin v. Löwis11437992002-04-12 09:54:03 +000019026# Break up conftest.undefs because some shells have a limit on the size
19027# of here documents, and old seds have small limits too (100 cmds).
19028echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19029rm -f conftest.tail
19030while grep . conftest.undefs >/dev/null
19031do
19032 # Write a limited-size here document to $tmp/undefs.sed.
19033 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19034 # Speed up: don't consider the non `#undef'
19035 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19036 # Work around the forget-to-reset-the-flag bug.
19037 echo 't clr' >>$CONFIG_STATUS
19038 echo ': clr' >>$CONFIG_STATUS
19039 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19040 echo 'CEOF
19041 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19042 rm -f $tmp/in
19043 mv $tmp/out $tmp/in
19044' >>$CONFIG_STATUS
19045 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19046 rm -f conftest.undefs
19047 mv conftest.tail conftest.undefs
19048done
19049rm -f conftest.undefs
19050
19051cat >>$CONFIG_STATUS <<\_ACEOF
19052 # Let's still pretend it is `configure' which instantiates (i.e., don't
19053 # use $as_me), people would be surprised to read:
19054 # /* config.h. Generated by config.status. */
19055 if test x"$ac_file" = x-; then
19056 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019057 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019058 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019059 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019060 cat $tmp/in >>$tmp/config.h
19061 rm -f $tmp/in
19062 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019063 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019064 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19065echo "$as_me: $ac_file is unchanged" >&6;}
19066 else
19067 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19068$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19069 X"$ac_file" : 'X\(//\)[^/]' \| \
19070 X"$ac_file" : 'X\(//\)$' \| \
19071 X"$ac_file" : 'X\(/\)' \| \
19072 . : '\(.\)' 2>/dev/null ||
19073echo X"$ac_file" |
19074 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19075 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19076 /^X\(\/\/\)$/{ s//\1/; q; }
19077 /^X\(\/\).*/{ s//\1/; q; }
19078 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019079 { if $as_mkdir_p; then
19080 mkdir -p "$ac_dir"
19081 else
19082 as_dir="$ac_dir"
19083 as_dirs=
19084 while test ! -d "$as_dir"; do
19085 as_dirs="$as_dir $as_dirs"
19086 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19087$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19088 X"$as_dir" : 'X\(//\)[^/]' \| \
19089 X"$as_dir" : 'X\(//\)$' \| \
19090 X"$as_dir" : 'X\(/\)' \| \
19091 . : '\(.\)' 2>/dev/null ||
19092echo X"$as_dir" |
19093 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19094 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19095 /^X\(\/\/\)$/{ s//\1/; q; }
19096 /^X\(\/\).*/{ s//\1/; q; }
19097 s/.*/./; q'`
19098 done
19099 test ! -n "$as_dirs" || mkdir $as_dirs
19100 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19101echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19102 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019103
Martin v. Löwis11437992002-04-12 09:54:03 +000019104 rm -f $ac_file
19105 mv $tmp/config.h $ac_file
19106 fi
19107 else
19108 cat $tmp/config.h
19109 rm -f $tmp/config.h
19110 fi
19111done
19112_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019113
Martin v. Löwis11437992002-04-12 09:54:03 +000019114cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019115
Martin v. Löwis11437992002-04-12 09:54:03 +000019116{ (exit 0); exit 0; }
19117_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019118chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019119ac_clean_files=$ac_clean_files_save
19120
19121
19122# configure is writing to config.log, and then calls config.status.
19123# config.status does its own redirection, appending to config.log.
19124# Unfortunately, on DOS this fails, as config.log is still kept open
19125# by configure, so config.status won't be able to write to it; its
19126# output is simply discarded. So we exec the FD to /dev/null,
19127# effectively closing config.log, so it can be properly (re)opened and
19128# appended to by config.status. When coming back to configure, we
19129# need to make the FD available again.
19130if test "$no_create" != yes; then
19131 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019132 ac_config_status_args=
19133 test "$silent" = yes &&
19134 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019135 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019136 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019137 exec 5>>config.log
19138 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19139 # would make configure fail if this is the last instruction.
19140 $ac_cs_success || { (exit 1); exit 1; }
19141fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019142
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019143
19144echo "creating Setup"
19145if test ! -f Modules/Setup
19146then
19147 cp $srcdir/Modules/Setup.dist Modules/Setup
19148fi
19149
19150echo "creating Setup.local"
19151if test ! -f Modules/Setup.local
19152then
19153 echo "# Edit this file for local setup changes" >Modules/Setup.local
19154fi
19155
19156echo "creating Makefile"
19157$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19158 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019159 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019160mv config.c Modules