blob: a5ffac8ed391ce6e250a0474deef176ed1c1722b [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Skip Montanarodb608052004-02-07 13:53:46 +00002# From configure.in Revision: 1.450 .
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
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000869 --with(out)-doc-strings disable/enable documentation strings
870 --with(out)-pymalloc disable/enable specialized mallocs
871 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000872 --with-fpectl enable SIGFPE catching
873 --with-libm=STRING math library
874 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000875
876Some influential environment variables:
877 CC C compiler command
878 CFLAGS C compiler flags
879 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
880 nonstandard directory <lib dir>
881 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
882 headers in a nonstandard directory <include dir>
883 CPP C preprocessor
884
885Use these variables to override the choices made by `configure' or to help
886it to find libraries and programs with nonstandard names/locations.
887
888_ACEOF
889fi
890
891if test "$ac_init_help" = "recursive"; then
892 # If there are subdirs, report their specific --help.
893 ac_popdir=`pwd`
894 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
895 test -d $ac_dir || continue
896 ac_builddir=.
897
898if test "$ac_dir" != .; then
899 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
900 # A "../" for each directory in $ac_dir_suffix.
901 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
902else
903 ac_dir_suffix= ac_top_builddir=
904fi
905
906case $srcdir in
907 .) # No --srcdir option. We are building in place.
908 ac_srcdir=.
909 if test -z "$ac_top_builddir"; then
910 ac_top_srcdir=.
911 else
912 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
913 fi ;;
914 [\\/]* | ?:[\\/]* ) # Absolute path.
915 ac_srcdir=$srcdir$ac_dir_suffix;
916 ac_top_srcdir=$srcdir ;;
917 *) # Relative path.
918 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
919 ac_top_srcdir=$ac_top_builddir$srcdir ;;
920esac
921# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
922# absolute.
923ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +0000924ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000925ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
926ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
927
928 cd $ac_dir
929 # Check for guested configure; otherwise get Cygnus style configure.
930 if test -f $ac_srcdir/configure.gnu; then
931 echo
932 $SHELL $ac_srcdir/configure.gnu --help=recursive
933 elif test -f $ac_srcdir/configure; then
934 echo
935 $SHELL $ac_srcdir/configure --help=recursive
936 elif test -f $ac_srcdir/configure.ac ||
937 test -f $ac_srcdir/configure.in; then
938 echo
939 $ac_configure --help
940 else
941 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
942 fi
943 cd $ac_popdir
944 done
945fi
946
947test -n "$ac_init_help" && exit 0
948if $ac_init_version; then
949 cat <<\_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000950python configure 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +0000951generated by GNU Autoconf 2.57
Martin v. Löwis11437992002-04-12 09:54:03 +0000952
953Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
954Free Software Foundation, Inc.
955This configure script is free software; the Free Software Foundation
956gives unlimited permission to copy, distribute and modify it.
957_ACEOF
958 exit 0
959fi
960exec 5>config.log
961cat >&5 <<_ACEOF
962This file contains any messages produced by compilers while
963running configure, to aid debugging if configure makes a mistake.
964
Fred Drake9bd44622003-07-30 17:39:48 +0000965It was created by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +0000966generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000967
968 $ $0 $@
969
970_ACEOF
971{
972cat <<_ASUNAME
973## --------- ##
974## Platform. ##
975## --------- ##
976
977hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
978uname -m = `(uname -m) 2>/dev/null || echo unknown`
979uname -r = `(uname -r) 2>/dev/null || echo unknown`
980uname -s = `(uname -s) 2>/dev/null || echo unknown`
981uname -v = `(uname -v) 2>/dev/null || echo unknown`
982
983/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
984/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
985
986/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
987/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
988/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
989hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
990/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
991/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
992/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
993
994_ASUNAME
995
996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
997for as_dir in $PATH
998do
999 IFS=$as_save_IFS
1000 test -z "$as_dir" && as_dir=.
1001 echo "PATH: $as_dir"
1002done
1003
1004} >&5
1005
1006cat >&5 <<_ACEOF
1007
1008
1009## ----------- ##
1010## Core tests. ##
1011## ----------- ##
1012
1013_ACEOF
1014
1015
1016# Keep a trace of the command line.
1017# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001018# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001019# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001020# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001021ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001022ac_configure_args0=
1023ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001024ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001025ac_must_keep_next=false
1026for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001027do
Skip Montanaro6dead952003-09-25 14:50:04 +00001028 for ac_arg
1029 do
1030 case $ac_arg in
1031 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1032 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1033 | -silent | --silent | --silen | --sile | --sil)
1034 continue ;;
1035 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1036 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1037 esac
1038 case $ac_pass in
1039 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1040 2)
1041 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1042 if test $ac_must_keep_next = true; then
1043 ac_must_keep_next=false # Got value, back to normal.
1044 else
1045 case $ac_arg in
1046 *=* | --config-cache | -C | -disable-* | --disable-* \
1047 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1048 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1049 | -with-* | --with-* | -without-* | --without-* | --x)
1050 case "$ac_configure_args0 " in
1051 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1052 esac
1053 ;;
1054 -* ) ac_must_keep_next=true ;;
1055 esac
1056 fi
1057 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1058 # Get rid of the leading space.
1059 ac_sep=" "
1060 ;;
1061 esac
1062 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001063done
Skip Montanaro6dead952003-09-25 14:50:04 +00001064$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1065$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 +00001066
1067# When interrupted or exit'd, cleanup temporary files, and complete
1068# config.log. We remove comments because anyway the quotes in there
1069# would cause problems or look ugly.
1070# WARNING: Be sure not to use single quotes in there, as some shells,
1071# such as our DU 5.0 friend, will then `close' the trap.
1072trap 'exit_status=$?
1073 # Save into config.log some information that might help in debugging.
1074 {
1075 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001076
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 cat <<\_ASBOX
1078## ---------------- ##
1079## Cache variables. ##
1080## ---------------- ##
1081_ASBOX
1082 echo
1083 # The following way of writing the cache mishandles newlines in values,
1084{
1085 (set) 2>&1 |
1086 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1087 *ac_space=\ *)
1088 sed -n \
1089 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1090 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1091 ;;
1092 *)
1093 sed -n \
1094 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1095 ;;
1096 esac;
1097}
1098 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001099
1100 cat <<\_ASBOX
1101## ----------------- ##
1102## Output variables. ##
1103## ----------------- ##
1104_ASBOX
1105 echo
1106 for ac_var in $ac_subst_vars
1107 do
1108 eval ac_val=$`echo $ac_var`
1109 echo "$ac_var='"'"'$ac_val'"'"'"
1110 done | sort
1111 echo
1112
1113 if test -n "$ac_subst_files"; then
1114 cat <<\_ASBOX
1115## ------------- ##
1116## Output files. ##
1117## ------------- ##
1118_ASBOX
1119 echo
1120 for ac_var in $ac_subst_files
1121 do
1122 eval ac_val=$`echo $ac_var`
1123 echo "$ac_var='"'"'$ac_val'"'"'"
1124 done | sort
1125 echo
1126 fi
1127
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 if test -s confdefs.h; then
1129 cat <<\_ASBOX
1130## ----------- ##
1131## confdefs.h. ##
1132## ----------- ##
1133_ASBOX
1134 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001135 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 echo
1137 fi
1138 test "$ac_signal" != 0 &&
1139 echo "$as_me: caught signal $ac_signal"
1140 echo "$as_me: exit $exit_status"
1141 } >&5
1142 rm -f core core.* *.core &&
1143 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1144 exit $exit_status
1145 ' 0
1146for ac_signal in 1 2 13 15; do
1147 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1148done
1149ac_signal=0
1150
1151# confdefs.h avoids OS command line length limits that DEFS can exceed.
1152rm -rf conftest* confdefs.h
1153# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1154echo >confdefs.h
1155
1156# Predefined preprocessor variables.
1157
1158cat >>confdefs.h <<_ACEOF
1159#define PACKAGE_NAME "$PACKAGE_NAME"
1160_ACEOF
1161
1162
1163cat >>confdefs.h <<_ACEOF
1164#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1165_ACEOF
1166
1167
1168cat >>confdefs.h <<_ACEOF
1169#define PACKAGE_VERSION "$PACKAGE_VERSION"
1170_ACEOF
1171
1172
1173cat >>confdefs.h <<_ACEOF
1174#define PACKAGE_STRING "$PACKAGE_STRING"
1175_ACEOF
1176
1177
1178cat >>confdefs.h <<_ACEOF
1179#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1180_ACEOF
1181
1182
1183# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001184# Prefer explicitly selected file to automatically selected ones.
1185if test -z "$CONFIG_SITE"; then
1186 if test "x$prefix" != xNONE; then
1187 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1188 else
1189 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1190 fi
1191fi
1192for ac_site_file in $CONFIG_SITE; do
1193 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1195echo "$as_me: loading site script $ac_site_file" >&6;}
1196 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197 . "$ac_site_file"
1198 fi
1199done
1200
1201if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 # Some versions of bash will fail to source /dev/null (special
1203 # files actually), so we avoid doing that.
1204 if test -f "$cache_file"; then
1205 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1206echo "$as_me: loading cache $cache_file" >&6;}
1207 case $cache_file in
1208 [\\/]* | ?:[\\/]* ) . $cache_file;;
1209 *) . ./$cache_file;;
1210 esac
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1214echo "$as_me: creating cache $cache_file" >&6;}
1215 >$cache_file
1216fi
1217
1218# Check that the precious variables saved in the cache have kept the same
1219# value.
1220ac_cache_corrupted=false
1221for ac_var in `(set) 2>&1 |
1222 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1223 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1224 eval ac_new_set=\$ac_env_${ac_var}_set
1225 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1226 eval ac_new_val="\$ac_env_${ac_var}_value"
1227 case $ac_old_set,$ac_new_set in
1228 set,)
1229 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1230echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1231 ac_cache_corrupted=: ;;
1232 ,set)
1233 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1234echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1235 ac_cache_corrupted=: ;;
1236 ,);;
1237 *)
1238 if test "x$ac_old_val" != "x$ac_new_val"; then
1239 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1240echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1241 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1242echo "$as_me: former value: $ac_old_val" >&2;}
1243 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1244echo "$as_me: current value: $ac_new_val" >&2;}
1245 ac_cache_corrupted=:
1246 fi;;
1247 esac
1248 # Pass precious variables to config.status.
1249 if test "$ac_new_set" = set; then
1250 case $ac_new_val in
1251 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1252 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1253 *) ac_arg=$ac_var=$ac_new_val ;;
1254 esac
1255 case " $ac_configure_args " in
1256 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1257 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1258 esac
1259 fi
1260done
1261if $ac_cache_corrupted; then
1262 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1263echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1264 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1265echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1266 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001267fi
1268
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001271ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1272ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1273ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275
Michael W. Hudson54241132001-12-07 15:38:26 +00001276
1277
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278
Martin v. Löwis11437992002-04-12 09:54:03 +00001279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
Martin v. Löwis88afe662002-10-26 13:47:44 +00001292
1293
1294
1295
1296
1297
1298
1299
1300
Skip Montanaro6dead952003-09-25 14:50:04 +00001301
1302 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001303
1304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305
1306
1307
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001308
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001309
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001310# We don't use PACKAGE_ variables, and they cause conflicts
1311# with other autoconf-based packages that include Python.h
1312grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1313rm confdefs.h
1314mv confdefs.h.new confdefs.h
1315
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001316
Fred Drake9bd44622003-07-30 17:39:48 +00001317VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001318
Martin v. Löwis1142de32002-03-29 16:28:31 +00001319
1320SOVERSION=1.0
1321
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001322# The later defininition of _XOPEN_SOURCE disables certain features
1323# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1324
1325cat >>confdefs.h <<\_ACEOF
1326#define _GNU_SOURCE 1
1327_ACEOF
1328
1329
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001330# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1331# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1332# them.
1333
1334cat >>confdefs.h <<\_ACEOF
1335#define _NETBSD_SOURCE 1
1336_ACEOF
1337
1338
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001339# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1340# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1341# them.
1342
1343cat >>confdefs.h <<\_ACEOF
1344#define __BSD_VISIBLE 1
1345_ACEOF
1346
1347
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001348define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001349
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001350# Arguments passed to configure.
1351
1352CONFIG_ARGS="$ac_configure_args"
1353
Jack Jansene578a632001-08-15 01:27:14 +00001354# Check whether --enable-framework or --disable-framework was given.
1355if test "${enable_framework+set}" = set; then
1356 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001357
Jack Jansene578a632001-08-15 01:27:14 +00001358 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001359 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001360 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001361 esac
1362 case $enableval in
1363 no)
1364 PYTHONFRAMEWORK=
1365 PYTHONFRAMEWORKDIR=no-framework
1366 PYTHONFRAMEWORKPREFIX=
1367 PYTHONFRAMEWORKINSTALLDIR=
1368 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001369 ;;
1370 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001371 PYTHONFRAMEWORK=Python
1372 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001373 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001374 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1375 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001376 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001377
Guido van Rossum563e7081996-09-10 18:20:48 +00001378else
Martin v. Löwis11437992002-04-12 09:54:03 +00001379
Jack Jansene578a632001-08-15 01:27:14 +00001380 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001381 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001382 PYTHONFRAMEWORKPREFIX=
1383 PYTHONFRAMEWORKINSTALLDIR=
1384 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001385
Martin v. Löwis11437992002-04-12 09:54:03 +00001386fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001387
1388
1389
1390
Jack Jansene578a632001-08-15 01:27:14 +00001391
1392##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001393## AC_HELP_STRING(--with-dyld,
1394## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001395##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001396# Set name for machine-dependent library files
1397
Martin v. Löwis11437992002-04-12 09:54:03 +00001398echo "$as_me:$LINENO: checking MACHDEP" >&5
1399echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001400if test -z "$MACHDEP"
1401then
Guido van Rossum563e7081996-09-10 18:20:48 +00001402 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001403 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1404 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001405 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001406 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001407 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001408 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001409 ac_md_system=`echo $ac_sys_system |
1410 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1411 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001412 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001413 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001414
Guido van Rossum07397971997-04-29 21:49:50 +00001415 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001416 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001417 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001418 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001419 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001420 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001421 esac
1422fi
Guido van Rossum91922671997-10-09 20:24:13 +00001423
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001424# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1425# disable features if it is defined, without any means to access these
1426# features as extensions. For these systems, we skip the definition of
1427# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1428# some feature, make sure there is no alternative way to access this
1429# feature. Also, when using wildcards, make sure you have verified the
1430# need for not defining _XOPEN_SOURCE on all systems matching the
1431# wildcard, and that the wildcard does not include future systems
1432# (which may remove their limitations).
1433case $ac_sys_system/$ac_sys_release in
1434 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1435 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001436 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1437 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001438 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001439 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1440 # of union __?sigval. Reported by Stuart Bishop.
1441 SunOS/5.6)
1442 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001443 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1444 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1445 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1446 define_xopen_source=no;;
1447 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001448 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001449 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001450 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001451 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1452 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1453 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1454 # This should hopefully be fixed in FreeBSD 4.9
1455 FreeBSD/4.8* | Darwin/6* )
1456 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001457 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1458 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1459 # has another value. By not (re)defining it, the defaults come in place.
1460 AIX/4)
1461 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001462esac
1463
1464if test $define_xopen_source = yes
1465then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001466
1467cat >>confdefs.h <<\_ACEOF
1468#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001469_ACEOF
1470
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001471
1472 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1473 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1474 # several APIs are not declared. Since this is also needed in some
1475 # cases for HP-UX, we define it globally.
1476
1477
1478cat >>confdefs.h <<\_ACEOF
1479#define _XOPEN_SOURCE_EXTENDED 1
1480_ACEOF
1481
1482
1483cat >>confdefs.h <<\_ACEOF
1484#define _POSIX_C_SOURCE 200112L
1485_ACEOF
1486
1487
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001488fi
1489
Guido van Rossum91922671997-10-09 20:24:13 +00001490#
1491# SGI compilers allow the specification of the both the ABI and the
1492# ISA on the command line. Depending on the values of these switches,
1493# different and often incompatable code will be generated.
1494#
1495# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1496# thus supply support for various ABI/ISA combinations. The MACHDEP
1497# variable is also adjusted.
1498#
1499
1500if test ! -z "$SGI_ABI"
1501then
1502 CC="cc $SGI_ABI"
1503 LDFLAGS="$SGI_ABI $LDFLAGS"
1504 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1505fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001506echo "$as_me:$LINENO: result: $MACHDEP" >&5
1507echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001508
Jack Jansen83f898c2002-12-30 22:23:40 +00001509# And add extra plat-mac for darwin
1510
Jack Jansen7b59b422003-03-17 15:44:10 +00001511
Jack Jansen83f898c2002-12-30 22:23:40 +00001512echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1513echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1514if test -z "$EXTRAPLATDIR"
1515then
1516 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001517 darwin)
1518 EXTRAPLATDIR="\$(PLATMACDIRS)"
1519 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1520 ;;
1521 *)
1522 EXTRAPLATDIR=""
1523 EXTRAMACHDEPPATH=""
1524 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001525 esac
1526fi
1527echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1528echo "${ECHO_T}$EXTRAPLATDIR" >&6
1529
Guido van Rossum627b2d71993-12-24 10:39:16 +00001530# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001531
1532# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1533# for debug/optimization stuff. BASECFLAGS is for flags that are required
1534# just to get things to compile and link. Users are free to override OPT
1535# when running configure or make. The build should not break if they do.
1536# BASECFLAGS should generally not be messed with, however.
1537
1538# XXX shouldn't some/most/all of this code be merged with the stuff later
1539# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001540echo "$as_me:$LINENO: checking for --without-gcc" >&5
1541echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1542
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001543# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001544if test "${with_gcc+set}" = set; then
1545 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
Guido van Rossum7f43da71994-08-01 12:15:30 +00001547 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001548 no) CC=cc
1549 without_gcc=yes;;
1550 yes) CC=gcc
1551 without_gcc=no;;
1552 *) CC=$withval
1553 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001554 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001555else
Martin v. Löwis11437992002-04-12 09:54:03 +00001556
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001557 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001558 AIX*) CC=cc_r
1559 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001560 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001561 case $BE_HOST_CPU in
1562 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001563 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001564 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001565 BASECFLAGS="$BASECFLAGS -export pragma"
1566 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001567 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001568 ;;
1569 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001570 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001571 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001572 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001573 ;;
1574 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1576echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1577 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001578 ;;
1579 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001580 AR="\$(srcdir)/Modules/ar_beos"
1581 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001582 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001583 Monterey*)
1584 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001585 without_gcc=;;
1586 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001587 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001588fi;
1589echo "$as_me:$LINENO: result: $without_gcc" >&5
1590echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001591
1592
Guido van Rossum95012191999-12-16 17:50:52 +00001593
Fred Drakea1a84e72001-03-06 05:52:16 +00001594MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001595echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1596echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1597
Guido van Rossum95012191999-12-16 17:50:52 +00001598# Check whether --with-cxx or --without-cxx was given.
1599if test "${with_cxx+set}" = set; then
1600 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001601
Martin v. Löwis22352952000-12-13 17:37:02 +00001602 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001603 case $withval in
1604 no) CXX=
1605 with_cxx=no;;
1606 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001607 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001608 with_cxx=$withval;;
1609 esac
1610else
Martin v. Löwis11437992002-04-12 09:54:03 +00001611
Guido van Rossum95012191999-12-16 17:50:52 +00001612 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001613 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001614
Martin v. Löwis11437992002-04-12 09:54:03 +00001615fi;
1616echo "$as_me:$LINENO: result: $with_cxx" >&5
1617echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001618
1619if test "$with_cxx" = "yes"
1620then
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1622echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1623 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001624fi
1625
1626
1627
1628
Martin v. Löwis11437992002-04-12 09:54:03 +00001629if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001630then
1631 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1632do
Martin v. Löwis11437992002-04-12 09:54:03 +00001633 # 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 +00001634set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001635echo "$as_me:$LINENO: checking for $ac_word" >&5
1636echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1637if test "${ac_cv_prog_CXX+set}" = set; then
1638 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001639else
1640 if test -n "$CXX"; then
1641 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1642else
Martin v. Löwis11437992002-04-12 09:54:03 +00001643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1644for as_dir in $PATH
1645do
1646 IFS=$as_save_IFS
1647 test -z "$as_dir" && as_dir=.
1648 for ac_exec_ext in '' $ac_executable_extensions; do
1649 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1650 ac_cv_prog_CXX="$ac_prog"
1651 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1652 break 2
1653 fi
1654done
1655done
1656
Martin v. Löwis22352952000-12-13 17:37:02 +00001657fi
1658fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001659CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001660if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 echo "$as_me:$LINENO: result: $CXX" >&5
1662echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001663else
Martin v. Löwis11437992002-04-12 09:54:03 +00001664 echo "$as_me:$LINENO: result: no" >&5
1665echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001666fi
1667
Martin v. Löwis11437992002-04-12 09:54:03 +00001668 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001669done
1670test -n "$CXX" || CXX="notfound"
1671
1672 if test "$CXX" = "notfound"
1673 then
1674 CXX=
1675 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001676 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001677ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001678ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1679ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1680ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1681 cat >conftest.$ac_ext <<_ACEOF
1682#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001683/* confdefs.h. */
1684_ACEOF
1685cat confdefs.h >>conftest.$ac_ext
1686cat >>conftest.$ac_ext <<_ACEOF
1687/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001688
Martin v. Löwis11437992002-04-12 09:54:03 +00001689int
1690main ()
1691{
Michael W. Hudson54241132001-12-07 15:38:26 +00001692
Martin v. Löwis11437992002-04-12 09:54:03 +00001693 ;
1694 return 0;
1695}
1696_ACEOF
1697ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001698ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001699# Try to create an executable without -o first, disregard a.out.
1700# It will help us diagnose broken compilers, and finding out an intuition
1701# of exeext.
1702echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1703echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1704ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1705if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1706 (eval $ac_link_default) 2>&5
1707 ac_status=$?
1708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1709 (exit $ac_status); }; then
1710 # Find the output, starting from the most likely. This scheme is
1711# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1712# resort.
1713
1714# Be careful to initialize this variable, since it used to be cached.
1715# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1716ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001717# b.out is created by i960 compilers.
1718for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1719do
1720 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001721 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001722 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1723 ;;
1724 conftest.$ac_ext )
1725 # This is the source file.
1726 ;;
1727 [ab].out )
1728 # We found the default executable, but exeext='' is most
1729 # certainly right.
1730 break;;
1731 *.* )
1732 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1733 # FIXME: I believe we export ac_cv_exeext for Libtool,
1734 # but it would be cool to find out if it's true. Does anybody
1735 # maintain Libtool? --akim.
1736 export ac_cv_exeext
1737 break;;
1738 * )
1739 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 esac
1741done
1742else
1743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001744sed 's/^/| /' conftest.$ac_ext >&5
1745
1746{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1747See \`config.log' for more details." >&5
1748echo "$as_me: error: C++ compiler cannot create executables
1749See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001750 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001751fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001752
1753ac_exeext=$ac_cv_exeext
1754echo "$as_me:$LINENO: result: $ac_file" >&5
1755echo "${ECHO_T}$ac_file" >&6
1756
1757# Check the compiler produces executables we can run. If not, either
1758# the compiler is broken, or we cross compile.
1759echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1760echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1761# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1762# If not cross compiling, check that we can run a simple program.
1763if test "$cross_compiling" != yes; then
1764 if { ac_try='./$ac_file'
1765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1766 (eval $ac_try) 2>&5
1767 ac_status=$?
1768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1769 (exit $ac_status); }; }; then
1770 cross_compiling=no
1771 else
1772 if test "$cross_compiling" = maybe; then
1773 cross_compiling=yes
1774 else
1775 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001776If you meant to cross compile, use \`--host'.
1777See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001778echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001779If you meant to cross compile, use \`--host'.
1780See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001781 { (exit 1); exit 1; }; }
1782 fi
1783 fi
1784fi
1785echo "$as_me:$LINENO: result: yes" >&5
1786echo "${ECHO_T}yes" >&6
1787
Skip Montanaro6dead952003-09-25 14:50:04 +00001788rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001789ac_clean_files=$ac_clean_files_save
1790# Check the compiler produces executables we can run. If not, either
1791# the compiler is broken, or we cross compile.
1792echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1793echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1794echo "$as_me:$LINENO: result: $cross_compiling" >&5
1795echo "${ECHO_T}$cross_compiling" >&6
1796
1797echo "$as_me:$LINENO: checking for suffix of executables" >&5
1798echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1800 (eval $ac_link) 2>&5
1801 ac_status=$?
1802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1803 (exit $ac_status); }; then
1804 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1805# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1806# work properly (i.e., refer to `conftest.exe'), while it won't with
1807# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001808for ac_file in conftest.exe conftest conftest.*; do
1809 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001810 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001811 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001812 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1813 export ac_cv_exeext
1814 break;;
1815 * ) break;;
1816 esac
1817done
1818else
Skip Montanaro6dead952003-09-25 14:50:04 +00001819 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1820See \`config.log' for more details." >&5
1821echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1822See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 { (exit 1); exit 1; }; }
1824fi
1825
1826rm -f conftest$ac_cv_exeext
1827echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1828echo "${ECHO_T}$ac_cv_exeext" >&6
1829
1830rm -f conftest.$ac_ext
1831EXEEXT=$ac_cv_exeext
1832ac_exeext=$EXEEXT
1833
1834 ac_ext=c
1835ac_cpp='$CPP $CPPFLAGS'
1836ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1837ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1838ac_compiler_gnu=$ac_cv_c_compiler_gnu
1839
1840
Martin v. Löwis22352952000-12-13 17:37:02 +00001841
1842 fi
1843fi
1844
Guido van Rossum8b131c51995-03-09 14:10:13 +00001845# If the user switches compilers, we can't believe the cache
1846if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1847then
Martin v. Löwis11437992002-04-12 09:54:03 +00001848 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1849(it is also a good idea to do 'make clean' before compiling)" >&5
1850echo "$as_me: error: cached CC is different -- throw away $cache_file
1851(it is also a good idea to do 'make clean' before compiling)" >&2;}
1852 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001853fi
1854
Martin v. Löwis11437992002-04-12 09:54:03 +00001855ac_ext=c
1856ac_cpp='$CPP $CPPFLAGS'
1857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1859ac_compiler_gnu=$ac_cv_c_compiler_gnu
1860if test -n "$ac_tool_prefix"; then
1861 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1862set dummy ${ac_tool_prefix}gcc; ac_word=$2
1863echo "$as_me:$LINENO: checking for $ac_word" >&5
1864echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1865if test "${ac_cv_prog_CC+set}" = set; then
1866 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001867else
1868 if test -n "$CC"; then
1869 ac_cv_prog_CC="$CC" # Let the user override the test.
1870else
Martin v. Löwis11437992002-04-12 09:54:03 +00001871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1872for as_dir in $PATH
1873do
1874 IFS=$as_save_IFS
1875 test -z "$as_dir" && as_dir=.
1876 for ac_exec_ext in '' $ac_executable_extensions; do
1877 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1878 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1879 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1880 break 2
1881 fi
1882done
1883done
1884
Jack Jansendd19cf82001-12-06 22:36:17 +00001885fi
1886fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001887CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001888if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001889 echo "$as_me:$LINENO: result: $CC" >&5
1890echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001891else
Martin v. Löwis11437992002-04-12 09:54:03 +00001892 echo "$as_me:$LINENO: result: no" >&5
1893echo "${ECHO_T}no" >&6
1894fi
1895
1896fi
1897if test -z "$ac_cv_prog_CC"; then
1898 ac_ct_CC=$CC
1899 # Extract the first word of "gcc", so it can be a program name with args.
1900set dummy gcc; ac_word=$2
1901echo "$as_me:$LINENO: checking for $ac_word" >&5
1902echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1903if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1904 echo $ECHO_N "(cached) $ECHO_C" >&6
1905else
1906 if test -n "$ac_ct_CC"; then
1907 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1908else
1909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1910for as_dir in $PATH
1911do
1912 IFS=$as_save_IFS
1913 test -z "$as_dir" && as_dir=.
1914 for ac_exec_ext in '' $ac_executable_extensions; do
1915 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1916 ac_cv_prog_ac_ct_CC="gcc"
1917 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1918 break 2
1919 fi
1920done
1921done
1922
1923fi
1924fi
1925ac_ct_CC=$ac_cv_prog_ac_ct_CC
1926if test -n "$ac_ct_CC"; then
1927 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1928echo "${ECHO_T}$ac_ct_CC" >&6
1929else
1930 echo "$as_me:$LINENO: result: no" >&5
1931echo "${ECHO_T}no" >&6
1932fi
1933
1934 CC=$ac_ct_CC
1935else
1936 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001937fi
1938
Jack Jansendd19cf82001-12-06 22:36:17 +00001939if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001940 if test -n "$ac_tool_prefix"; then
1941 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1942set dummy ${ac_tool_prefix}cc; ac_word=$2
1943echo "$as_me:$LINENO: checking for $ac_word" >&5
1944echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1945if test "${ac_cv_prog_CC+set}" = set; then
1946 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001947else
1948 if test -n "$CC"; then
1949 ac_cv_prog_CC="$CC" # Let the user override the test.
1950else
Martin v. Löwis11437992002-04-12 09:54:03 +00001951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1952for as_dir in $PATH
1953do
1954 IFS=$as_save_IFS
1955 test -z "$as_dir" && as_dir=.
1956 for ac_exec_ext in '' $ac_executable_extensions; do
1957 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1958 ac_cv_prog_CC="${ac_tool_prefix}cc"
1959 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1960 break 2
1961 fi
1962done
1963done
1964
1965fi
1966fi
1967CC=$ac_cv_prog_CC
1968if test -n "$CC"; then
1969 echo "$as_me:$LINENO: result: $CC" >&5
1970echo "${ECHO_T}$CC" >&6
1971else
1972 echo "$as_me:$LINENO: result: no" >&5
1973echo "${ECHO_T}no" >&6
1974fi
1975
1976fi
1977if test -z "$ac_cv_prog_CC"; then
1978 ac_ct_CC=$CC
1979 # Extract the first word of "cc", so it can be a program name with args.
1980set dummy cc; ac_word=$2
1981echo "$as_me:$LINENO: checking for $ac_word" >&5
1982echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1983if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1984 echo $ECHO_N "(cached) $ECHO_C" >&6
1985else
1986 if test -n "$ac_ct_CC"; then
1987 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1988else
1989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1990for as_dir in $PATH
1991do
1992 IFS=$as_save_IFS
1993 test -z "$as_dir" && as_dir=.
1994 for ac_exec_ext in '' $ac_executable_extensions; do
1995 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1996 ac_cv_prog_ac_ct_CC="cc"
1997 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1998 break 2
1999 fi
2000done
2001done
2002
2003fi
2004fi
2005ac_ct_CC=$ac_cv_prog_ac_ct_CC
2006if test -n "$ac_ct_CC"; then
2007 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2008echo "${ECHO_T}$ac_ct_CC" >&6
2009else
2010 echo "$as_me:$LINENO: result: no" >&5
2011echo "${ECHO_T}no" >&6
2012fi
2013
2014 CC=$ac_ct_CC
2015else
2016 CC="$ac_cv_prog_CC"
2017fi
2018
2019fi
2020if test -z "$CC"; then
2021 # Extract the first word of "cc", so it can be a program name with args.
2022set dummy cc; ac_word=$2
2023echo "$as_me:$LINENO: checking for $ac_word" >&5
2024echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2025if test "${ac_cv_prog_CC+set}" = set; then
2026 echo $ECHO_N "(cached) $ECHO_C" >&6
2027else
2028 if test -n "$CC"; then
2029 ac_cv_prog_CC="$CC" # Let the user override the test.
2030else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002031 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2033for as_dir in $PATH
2034do
2035 IFS=$as_save_IFS
2036 test -z "$as_dir" && as_dir=.
2037 for ac_exec_ext in '' $ac_executable_extensions; do
2038 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2039 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2040 ac_prog_rejected=yes
2041 continue
2042 fi
2043 ac_cv_prog_CC="cc"
2044 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2045 break 2
2046 fi
2047done
2048done
2049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002050if test $ac_prog_rejected = yes; then
2051 # We found a bogon in the path, so make sure we never use it.
2052 set dummy $ac_cv_prog_CC
2053 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002054 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002055 # We chose a different compiler from the bogus one.
2056 # However, it has the same basename, so the bogon will be chosen
2057 # first if we set CC to just the basename; use the full file name.
2058 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002059 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002060 fi
2061fi
2062fi
2063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002064CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002065if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002066 echo "$as_me:$LINENO: result: $CC" >&5
2067echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002068else
Martin v. Löwis11437992002-04-12 09:54:03 +00002069 echo "$as_me:$LINENO: result: no" >&5
2070echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002071fi
2072
Martin v. Löwis11437992002-04-12 09:54:03 +00002073fi
2074if test -z "$CC"; then
2075 if test -n "$ac_tool_prefix"; then
2076 for ac_prog in cl
2077 do
2078 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2079set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2080echo "$as_me:$LINENO: checking for $ac_word" >&5
2081echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2082if test "${ac_cv_prog_CC+set}" = set; then
2083 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002084else
2085 if test -n "$CC"; then
2086 ac_cv_prog_CC="$CC" # Let the user override the test.
2087else
Martin v. Löwis11437992002-04-12 09:54:03 +00002088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2089for as_dir in $PATH
2090do
2091 IFS=$as_save_IFS
2092 test -z "$as_dir" && as_dir=.
2093 for ac_exec_ext in '' $ac_executable_extensions; do
2094 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2095 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2096 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2097 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002098 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002099done
2100done
2101
2102fi
2103fi
2104CC=$ac_cv_prog_CC
2105if test -n "$CC"; then
2106 echo "$as_me:$LINENO: result: $CC" >&5
2107echo "${ECHO_T}$CC" >&6
2108else
2109 echo "$as_me:$LINENO: result: no" >&5
2110echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002111fi
2112
Martin v. Löwis11437992002-04-12 09:54:03 +00002113 test -n "$CC" && break
2114 done
2115fi
2116if test -z "$CC"; then
2117 ac_ct_CC=$CC
2118 for ac_prog in cl
2119do
2120 # Extract the first word of "$ac_prog", so it can be a program name with args.
2121set dummy $ac_prog; ac_word=$2
2122echo "$as_me:$LINENO: checking for $ac_word" >&5
2123echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2124if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2125 echo $ECHO_N "(cached) $ECHO_C" >&6
2126else
2127 if test -n "$ac_ct_CC"; then
2128 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2129else
2130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2131for as_dir in $PATH
2132do
2133 IFS=$as_save_IFS
2134 test -z "$as_dir" && as_dir=.
2135 for ac_exec_ext in '' $ac_executable_extensions; do
2136 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2137 ac_cv_prog_ac_ct_CC="$ac_prog"
2138 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2139 break 2
2140 fi
2141done
2142done
Jack Jansendd19cf82001-12-06 22:36:17 +00002143
Martin v. Löwis11437992002-04-12 09:54:03 +00002144fi
2145fi
2146ac_ct_CC=$ac_cv_prog_ac_ct_CC
2147if test -n "$ac_ct_CC"; then
2148 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2149echo "${ECHO_T}$ac_ct_CC" >&6
2150else
2151 echo "$as_me:$LINENO: result: no" >&5
2152echo "${ECHO_T}no" >&6
2153fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002154
Martin v. Löwis11437992002-04-12 09:54:03 +00002155 test -n "$ac_ct_CC" && break
2156done
Michael W. Hudson54241132001-12-07 15:38:26 +00002157
Martin v. Löwis11437992002-04-12 09:54:03 +00002158 CC=$ac_ct_CC
2159fi
2160
2161fi
2162
2163
Skip Montanaro6dead952003-09-25 14:50:04 +00002164test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2165See \`config.log' for more details." >&5
2166echo "$as_me: error: no acceptable C compiler found in \$PATH
2167See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002168 { (exit 1); exit 1; }; }
2169
2170# Provide some information about the compiler.
2171echo "$as_me:$LINENO:" \
2172 "checking for C compiler version" >&5
2173ac_compiler=`set X $ac_compile; echo $2`
2174{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2175 (eval $ac_compiler --version </dev/null >&5) 2>&5
2176 ac_status=$?
2177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178 (exit $ac_status); }
2179{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2180 (eval $ac_compiler -v </dev/null >&5) 2>&5
2181 ac_status=$?
2182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2183 (exit $ac_status); }
2184{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2185 (eval $ac_compiler -V </dev/null >&5) 2>&5
2186 ac_status=$?
2187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2188 (exit $ac_status); }
2189
2190cat >conftest.$ac_ext <<_ACEOF
2191#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002192/* confdefs.h. */
2193_ACEOF
2194cat confdefs.h >>conftest.$ac_ext
2195cat >>conftest.$ac_ext <<_ACEOF
2196/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002197
Martin v. Löwis11437992002-04-12 09:54:03 +00002198int
2199main ()
2200{
2201
2202 ;
2203 return 0;
2204}
2205_ACEOF
2206ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002207ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002208# Try to create an executable without -o first, disregard a.out.
2209# It will help us diagnose broken compilers, and finding out an intuition
2210# of exeext.
2211echo "$as_me:$LINENO: checking for C compiler default output" >&5
2212echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2213ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2214if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2215 (eval $ac_link_default) 2>&5
2216 ac_status=$?
2217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2218 (exit $ac_status); }; then
2219 # Find the output, starting from the most likely. This scheme is
2220# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2221# resort.
2222
2223# Be careful to initialize this variable, since it used to be cached.
2224# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2225ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002226# b.out is created by i960 compilers.
2227for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2228do
2229 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002230 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002231 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2232 ;;
2233 conftest.$ac_ext )
2234 # This is the source file.
2235 ;;
2236 [ab].out )
2237 # We found the default executable, but exeext='' is most
2238 # certainly right.
2239 break;;
2240 *.* )
2241 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2242 # FIXME: I believe we export ac_cv_exeext for Libtool,
2243 # but it would be cool to find out if it's true. Does anybody
2244 # maintain Libtool? --akim.
2245 export ac_cv_exeext
2246 break;;
2247 * )
2248 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002249 esac
2250done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002251else
Martin v. Löwis11437992002-04-12 09:54:03 +00002252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002253sed 's/^/| /' conftest.$ac_ext >&5
2254
2255{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2256See \`config.log' for more details." >&5
2257echo "$as_me: error: C compiler cannot create executables
2258See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002259 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002260fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002261
Martin v. Löwis11437992002-04-12 09:54:03 +00002262ac_exeext=$ac_cv_exeext
2263echo "$as_me:$LINENO: result: $ac_file" >&5
2264echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002265
Martin v. Löwis11437992002-04-12 09:54:03 +00002266# Check the compiler produces executables we can run. If not, either
2267# the compiler is broken, or we cross compile.
2268echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2269echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2270# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2271# If not cross compiling, check that we can run a simple program.
2272if test "$cross_compiling" != yes; then
2273 if { ac_try='./$ac_file'
2274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2275 (eval $ac_try) 2>&5
2276 ac_status=$?
2277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2278 (exit $ac_status); }; }; then
2279 cross_compiling=no
2280 else
2281 if test "$cross_compiling" = maybe; then
2282 cross_compiling=yes
2283 else
2284 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002285If you meant to cross compile, use \`--host'.
2286See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002287echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002288If you meant to cross compile, use \`--host'.
2289See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002290 { (exit 1); exit 1; }; }
2291 fi
2292 fi
2293fi
2294echo "$as_me:$LINENO: result: yes" >&5
2295echo "${ECHO_T}yes" >&6
2296
Skip Montanaro6dead952003-09-25 14:50:04 +00002297rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002298ac_clean_files=$ac_clean_files_save
2299# Check the compiler produces executables we can run. If not, either
2300# the compiler is broken, or we cross compile.
2301echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2302echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2303echo "$as_me:$LINENO: result: $cross_compiling" >&5
2304echo "${ECHO_T}$cross_compiling" >&6
2305
2306echo "$as_me:$LINENO: checking for suffix of executables" >&5
2307echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2308if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2309 (eval $ac_link) 2>&5
2310 ac_status=$?
2311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2312 (exit $ac_status); }; then
2313 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2314# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2315# work properly (i.e., refer to `conftest.exe'), while it won't with
2316# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002317for ac_file in conftest.exe conftest conftest.*; do
2318 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002319 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002320 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002321 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2322 export ac_cv_exeext
2323 break;;
2324 * ) break;;
2325 esac
2326done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002327else
Skip Montanaro6dead952003-09-25 14:50:04 +00002328 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2329See \`config.log' for more details." >&5
2330echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2331See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002332 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002333fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002334
Martin v. Löwis11437992002-04-12 09:54:03 +00002335rm -f conftest$ac_cv_exeext
2336echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2337echo "${ECHO_T}$ac_cv_exeext" >&6
2338
2339rm -f conftest.$ac_ext
2340EXEEXT=$ac_cv_exeext
2341ac_exeext=$EXEEXT
2342echo "$as_me:$LINENO: checking for suffix of object files" >&5
2343echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2344if test "${ac_cv_objext+set}" = set; then
2345 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002346else
Martin v. Löwis11437992002-04-12 09:54:03 +00002347 cat >conftest.$ac_ext <<_ACEOF
2348#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002349/* confdefs.h. */
2350_ACEOF
2351cat confdefs.h >>conftest.$ac_ext
2352cat >>conftest.$ac_ext <<_ACEOF
2353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002354
Martin v. Löwis11437992002-04-12 09:54:03 +00002355int
2356main ()
2357{
2358
2359 ;
2360 return 0;
2361}
2362_ACEOF
2363rm -f conftest.o conftest.obj
2364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2365 (eval $ac_compile) 2>&5
2366 ac_status=$?
2367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2368 (exit $ac_status); }; then
2369 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2370 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002371 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002372 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2373 break;;
2374 esac
2375done
2376else
2377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002378sed 's/^/| /' conftest.$ac_ext >&5
2379
2380{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2381See \`config.log' for more details." >&5
2382echo "$as_me: error: cannot compute suffix of object files: cannot compile
2383See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002384 { (exit 1); exit 1; }; }
2385fi
2386
2387rm -f conftest.$ac_cv_objext conftest.$ac_ext
2388fi
2389echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2390echo "${ECHO_T}$ac_cv_objext" >&6
2391OBJEXT=$ac_cv_objext
2392ac_objext=$OBJEXT
2393echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2394echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2395if test "${ac_cv_c_compiler_gnu+set}" = set; then
2396 echo $ECHO_N "(cached) $ECHO_C" >&6
2397else
2398 cat >conftest.$ac_ext <<_ACEOF
2399#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002400/* confdefs.h. */
2401_ACEOF
2402cat confdefs.h >>conftest.$ac_ext
2403cat >>conftest.$ac_ext <<_ACEOF
2404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002405
Martin v. Löwis11437992002-04-12 09:54:03 +00002406int
2407main ()
2408{
2409#ifndef __GNUC__
2410 choke me
2411#endif
2412
2413 ;
2414 return 0;
2415}
2416_ACEOF
2417rm -f conftest.$ac_objext
2418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2419 (eval $ac_compile) 2>&5
2420 ac_status=$?
2421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2422 (exit $ac_status); } &&
2423 { ac_try='test -s conftest.$ac_objext'
2424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2425 (eval $ac_try) 2>&5
2426 ac_status=$?
2427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2428 (exit $ac_status); }; }; then
2429 ac_compiler_gnu=yes
2430else
2431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002432sed 's/^/| /' conftest.$ac_ext >&5
2433
Martin v. Löwis11437992002-04-12 09:54:03 +00002434ac_compiler_gnu=no
2435fi
2436rm -f conftest.$ac_objext conftest.$ac_ext
2437ac_cv_c_compiler_gnu=$ac_compiler_gnu
2438
2439fi
2440echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2441echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2442GCC=`test $ac_compiler_gnu = yes && echo yes`
2443ac_test_CFLAGS=${CFLAGS+set}
2444ac_save_CFLAGS=$CFLAGS
2445CFLAGS="-g"
2446echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2447echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2448if test "${ac_cv_prog_cc_g+set}" = set; then
2449 echo $ECHO_N "(cached) $ECHO_C" >&6
2450else
2451 cat >conftest.$ac_ext <<_ACEOF
2452#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002453/* confdefs.h. */
2454_ACEOF
2455cat confdefs.h >>conftest.$ac_ext
2456cat >>conftest.$ac_ext <<_ACEOF
2457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002458
Martin v. Löwis11437992002-04-12 09:54:03 +00002459int
2460main ()
2461{
2462
2463 ;
2464 return 0;
2465}
2466_ACEOF
2467rm -f conftest.$ac_objext
2468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2469 (eval $ac_compile) 2>&5
2470 ac_status=$?
2471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2472 (exit $ac_status); } &&
2473 { ac_try='test -s conftest.$ac_objext'
2474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2475 (eval $ac_try) 2>&5
2476 ac_status=$?
2477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2478 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002479 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002480else
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002482sed 's/^/| /' conftest.$ac_ext >&5
2483
Martin v. Löwis11437992002-04-12 09:54:03 +00002484ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002485fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002486rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002488echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2489echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002490if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002491 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002492elif test $ac_cv_prog_cc_g = yes; then
2493 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002494 CFLAGS="-g -O2"
2495 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002496 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002497 fi
2498else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002499 if test "$GCC" = yes; then
2500 CFLAGS="-O2"
2501 else
2502 CFLAGS=
2503 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002504fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002505echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2506echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2507if test "${ac_cv_prog_cc_stdc+set}" = set; then
2508 echo $ECHO_N "(cached) $ECHO_C" >&6
2509else
2510 ac_cv_prog_cc_stdc=no
2511ac_save_CC=$CC
2512cat >conftest.$ac_ext <<_ACEOF
2513#line $LINENO "configure"
2514/* confdefs.h. */
2515_ACEOF
2516cat confdefs.h >>conftest.$ac_ext
2517cat >>conftest.$ac_ext <<_ACEOF
2518/* end confdefs.h. */
2519#include <stdarg.h>
2520#include <stdio.h>
2521#include <sys/types.h>
2522#include <sys/stat.h>
2523/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2524struct buf { int x; };
2525FILE * (*rcsopen) (struct buf *, struct stat *, int);
2526static char *e (p, i)
2527 char **p;
2528 int i;
2529{
2530 return p[i];
2531}
2532static char *f (char * (*g) (char **, int), char **p, ...)
2533{
2534 char *s;
2535 va_list v;
2536 va_start (v,p);
2537 s = g (p, va_arg (v,int));
2538 va_end (v);
2539 return s;
2540}
2541int test (int i, double x);
2542struct s1 {int (*f) (int a);};
2543struct s2 {int (*f) (double a);};
2544int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2545int argc;
2546char **argv;
2547int
2548main ()
2549{
2550return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2551 ;
2552 return 0;
2553}
2554_ACEOF
2555# Don't try gcc -ansi; that turns off useful extensions and
2556# breaks some systems' header files.
2557# AIX -qlanglvl=ansi
2558# Ultrix and OSF/1 -std1
2559# HP-UX 10.20 and later -Ae
2560# HP-UX older versions -Aa -D_HPUX_SOURCE
2561# SVR4 -Xc -D__EXTENSIONS__
2562for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2563do
2564 CC="$ac_save_CC $ac_arg"
2565 rm -f conftest.$ac_objext
2566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2567 (eval $ac_compile) 2>&5
2568 ac_status=$?
2569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570 (exit $ac_status); } &&
2571 { ac_try='test -s conftest.$ac_objext'
2572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2573 (eval $ac_try) 2>&5
2574 ac_status=$?
2575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2576 (exit $ac_status); }; }; then
2577 ac_cv_prog_cc_stdc=$ac_arg
2578break
2579else
2580 echo "$as_me: failed program was:" >&5
2581sed 's/^/| /' conftest.$ac_ext >&5
2582
2583fi
2584rm -f conftest.$ac_objext
2585done
2586rm -f conftest.$ac_ext conftest.$ac_objext
2587CC=$ac_save_CC
2588
2589fi
2590
2591case "x$ac_cv_prog_cc_stdc" in
2592 x|xno)
2593 echo "$as_me:$LINENO: result: none needed" >&5
2594echo "${ECHO_T}none needed" >&6 ;;
2595 *)
2596 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2597echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2598 CC="$CC $ac_cv_prog_cc_stdc" ;;
2599esac
2600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601# Some people use a C++ compiler to compile C. Since we use `exit',
2602# in C++ we need to declare it. In case someone uses the same compiler
2603# for both compiling C and C++ we need to have the C++ compiler decide
2604# the declaration of exit, since it's the most demanding environment.
2605cat >conftest.$ac_ext <<_ACEOF
2606#ifndef __cplusplus
2607 choke me
2608#endif
2609_ACEOF
2610rm -f conftest.$ac_objext
2611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2612 (eval $ac_compile) 2>&5
2613 ac_status=$?
2614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2615 (exit $ac_status); } &&
2616 { ac_try='test -s conftest.$ac_objext'
2617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2618 (eval $ac_try) 2>&5
2619 ac_status=$?
2620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2621 (exit $ac_status); }; }; then
2622 for ac_declaration in \
2623 ''\
2624 '#include <stdlib.h>' \
2625 'extern "C" void std::exit (int) throw (); using std::exit;' \
2626 'extern "C" void std::exit (int); using std::exit;' \
2627 'extern "C" void exit (int) throw ();' \
2628 'extern "C" void exit (int);' \
2629 'void exit (int);'
2630do
2631 cat >conftest.$ac_ext <<_ACEOF
2632#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002633/* confdefs.h. */
2634_ACEOF
2635cat confdefs.h >>conftest.$ac_ext
2636cat >>conftest.$ac_ext <<_ACEOF
2637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002638#include <stdlib.h>
2639$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002640int
2641main ()
2642{
2643exit (42);
2644 ;
2645 return 0;
2646}
2647_ACEOF
2648rm -f conftest.$ac_objext
2649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2650 (eval $ac_compile) 2>&5
2651 ac_status=$?
2652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2653 (exit $ac_status); } &&
2654 { ac_try='test -s conftest.$ac_objext'
2655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2656 (eval $ac_try) 2>&5
2657 ac_status=$?
2658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2659 (exit $ac_status); }; }; then
2660 :
2661else
2662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002663sed 's/^/| /' conftest.$ac_ext >&5
2664
Martin v. Löwis11437992002-04-12 09:54:03 +00002665continue
2666fi
2667rm -f conftest.$ac_objext conftest.$ac_ext
2668 cat >conftest.$ac_ext <<_ACEOF
2669#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002670/* confdefs.h. */
2671_ACEOF
2672cat confdefs.h >>conftest.$ac_ext
2673cat >>conftest.$ac_ext <<_ACEOF
2674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002675$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002676int
2677main ()
2678{
2679exit (42);
2680 ;
2681 return 0;
2682}
2683_ACEOF
2684rm -f conftest.$ac_objext
2685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2686 (eval $ac_compile) 2>&5
2687 ac_status=$?
2688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2689 (exit $ac_status); } &&
2690 { ac_try='test -s conftest.$ac_objext'
2691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2692 (eval $ac_try) 2>&5
2693 ac_status=$?
2694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2695 (exit $ac_status); }; }; then
2696 break
2697else
2698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002699sed 's/^/| /' conftest.$ac_ext >&5
2700
Martin v. Löwis11437992002-04-12 09:54:03 +00002701fi
2702rm -f conftest.$ac_objext conftest.$ac_ext
2703done
2704rm -f conftest*
2705if test -n "$ac_declaration"; then
2706 echo '#ifdef __cplusplus' >>confdefs.h
2707 echo $ac_declaration >>confdefs.h
2708 echo '#endif' >>confdefs.h
2709fi
2710
2711else
2712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002713sed 's/^/| /' conftest.$ac_ext >&5
2714
Martin v. Löwis11437992002-04-12 09:54:03 +00002715fi
2716rm -f conftest.$ac_objext conftest.$ac_ext
2717ac_ext=c
2718ac_cpp='$CPP $CPPFLAGS'
2719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2721ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002723
2724# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002725
2726ac_ext=c
2727ac_cpp='$CPP $CPPFLAGS'
2728ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2729ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2730ac_compiler_gnu=$ac_cv_c_compiler_gnu
2731echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2732echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002733# On Suns, sometimes $CPP names a directory.
2734if test -n "$CPP" && test -d "$CPP"; then
2735 CPP=
2736fi
2737if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 if test "${ac_cv_prog_CPP+set}" = set; then
2739 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002740else
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 # Double quotes because CPP needs to be expanded
2742 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2743 do
2744 ac_preproc_ok=false
2745for ac_c_preproc_warn_flag in '' yes
2746do
2747 # Use a header file that comes with gcc, so configuring glibc
2748 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2750 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002751 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 # not just through cpp. "Syntax error" is here to catch this case.
2753 cat >conftest.$ac_ext <<_ACEOF
2754#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002755/* confdefs.h. */
2756_ACEOF
2757cat confdefs.h >>conftest.$ac_ext
2758cat >>conftest.$ac_ext <<_ACEOF
2759/* end confdefs.h. */
2760#ifdef __STDC__
2761# include <limits.h>
2762#else
2763# include <assert.h>
2764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 Syntax error
2766_ACEOF
2767if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2768 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2769 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002770 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002771 rm -f conftest.er1
2772 cat conftest.err >&5
2773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2774 (exit $ac_status); } >/dev/null; then
2775 if test -s conftest.err; then
2776 ac_cpp_err=$ac_c_preproc_warn_flag
2777 else
2778 ac_cpp_err=
2779 fi
2780else
2781 ac_cpp_err=yes
2782fi
2783if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002784 :
2785else
Martin v. Löwis11437992002-04-12 09:54:03 +00002786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002787sed 's/^/| /' conftest.$ac_ext >&5
2788
Martin v. Löwis11437992002-04-12 09:54:03 +00002789 # Broken: fails on valid input.
2790continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002791fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002792rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002793
Martin v. Löwis11437992002-04-12 09:54:03 +00002794 # OK, works on sane cases. Now check whether non-existent headers
2795 # can be detected and how.
2796 cat >conftest.$ac_ext <<_ACEOF
2797#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002798/* confdefs.h. */
2799_ACEOF
2800cat confdefs.h >>conftest.$ac_ext
2801cat >>conftest.$ac_ext <<_ACEOF
2802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002803#include <ac_nonexistent.h>
2804_ACEOF
2805if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2806 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2807 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002808 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002809 rm -f conftest.er1
2810 cat conftest.err >&5
2811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2812 (exit $ac_status); } >/dev/null; then
2813 if test -s conftest.err; then
2814 ac_cpp_err=$ac_c_preproc_warn_flag
2815 else
2816 ac_cpp_err=
2817 fi
2818else
2819 ac_cpp_err=yes
2820fi
2821if test -z "$ac_cpp_err"; then
2822 # Broken: success on invalid input.
2823continue
2824else
2825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002826sed 's/^/| /' conftest.$ac_ext >&5
2827
Martin v. Löwis11437992002-04-12 09:54:03 +00002828 # Passes both tests.
2829ac_preproc_ok=:
2830break
2831fi
2832rm -f conftest.err conftest.$ac_ext
2833
2834done
2835# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2836rm -f conftest.err conftest.$ac_ext
2837if $ac_preproc_ok; then
2838 break
2839fi
2840
2841 done
2842 ac_cv_prog_CPP=$CPP
2843
2844fi
2845 CPP=$ac_cv_prog_CPP
2846else
2847 ac_cv_prog_CPP=$CPP
2848fi
2849echo "$as_me:$LINENO: result: $CPP" >&5
2850echo "${ECHO_T}$CPP" >&6
2851ac_preproc_ok=false
2852for ac_c_preproc_warn_flag in '' yes
2853do
2854 # Use a header file that comes with gcc, so configuring glibc
2855 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002856 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2857 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002858 # On the NeXT, cc -E runs the code through the compiler's parser,
2859 # not just through cpp. "Syntax error" is here to catch this case.
2860 cat >conftest.$ac_ext <<_ACEOF
2861#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002862/* confdefs.h. */
2863_ACEOF
2864cat confdefs.h >>conftest.$ac_ext
2865cat >>conftest.$ac_ext <<_ACEOF
2866/* end confdefs.h. */
2867#ifdef __STDC__
2868# include <limits.h>
2869#else
2870# include <assert.h>
2871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 Syntax error
2873_ACEOF
2874if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2875 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2876 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002877 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002878 rm -f conftest.er1
2879 cat conftest.err >&5
2880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2881 (exit $ac_status); } >/dev/null; then
2882 if test -s conftest.err; then
2883 ac_cpp_err=$ac_c_preproc_warn_flag
2884 else
2885 ac_cpp_err=
2886 fi
2887else
2888 ac_cpp_err=yes
2889fi
2890if test -z "$ac_cpp_err"; then
2891 :
2892else
2893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002894sed 's/^/| /' conftest.$ac_ext >&5
2895
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 # Broken: fails on valid input.
2897continue
2898fi
2899rm -f conftest.err conftest.$ac_ext
2900
2901 # OK, works on sane cases. Now check whether non-existent headers
2902 # can be detected and how.
2903 cat >conftest.$ac_ext <<_ACEOF
2904#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002905/* confdefs.h. */
2906_ACEOF
2907cat confdefs.h >>conftest.$ac_ext
2908cat >>conftest.$ac_ext <<_ACEOF
2909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002910#include <ac_nonexistent.h>
2911_ACEOF
2912if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2913 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2914 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002915 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002916 rm -f conftest.er1
2917 cat conftest.err >&5
2918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2919 (exit $ac_status); } >/dev/null; then
2920 if test -s conftest.err; then
2921 ac_cpp_err=$ac_c_preproc_warn_flag
2922 else
2923 ac_cpp_err=
2924 fi
2925else
2926 ac_cpp_err=yes
2927fi
2928if test -z "$ac_cpp_err"; then
2929 # Broken: success on invalid input.
2930continue
2931else
2932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002933sed 's/^/| /' conftest.$ac_ext >&5
2934
Martin v. Löwis11437992002-04-12 09:54:03 +00002935 # Passes both tests.
2936ac_preproc_ok=:
2937break
2938fi
2939rm -f conftest.err conftest.$ac_ext
2940
2941done
2942# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2943rm -f conftest.err conftest.$ac_ext
2944if $ac_preproc_ok; then
2945 :
2946else
Skip Montanaro6dead952003-09-25 14:50:04 +00002947 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2948See \`config.log' for more details." >&5
2949echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2950See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002951 { (exit 1); exit 1; }; }
2952fi
2953
2954ac_ext=c
2955ac_cpp='$CPP $CPPFLAGS'
2956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2958ac_compiler_gnu=$ac_cv_c_compiler_gnu
2959
2960
Skip Montanaro6dead952003-09-25 14:50:04 +00002961echo "$as_me:$LINENO: checking for egrep" >&5
2962echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2963if test "${ac_cv_prog_egrep+set}" = set; then
2964 echo $ECHO_N "(cached) $ECHO_C" >&6
2965else
2966 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2967 then ac_cv_prog_egrep='grep -E'
2968 else ac_cv_prog_egrep='egrep'
2969 fi
2970fi
2971echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2972echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2973 EGREP=$ac_cv_prog_egrep
2974
2975
Martin v. Löwis11437992002-04-12 09:54:03 +00002976
2977echo "$as_me:$LINENO: checking for AIX" >&5
2978echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2979cat >conftest.$ac_ext <<_ACEOF
2980#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002981/* confdefs.h. */
2982_ACEOF
2983cat confdefs.h >>conftest.$ac_ext
2984cat >>conftest.$ac_ext <<_ACEOF
2985/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002986#ifdef _AIX
2987 yes
2988#endif
2989
Martin v. Löwis11437992002-04-12 09:54:03 +00002990_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002991if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002992 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002993 echo "$as_me:$LINENO: result: yes" >&5
2994echo "${ECHO_T}yes" >&6
2995cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002996#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002997_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998
2999else
Martin v. Löwis11437992002-04-12 09:54:03 +00003000 echo "$as_me:$LINENO: result: no" >&5
3001echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003002fi
3003rm -f conftest*
3004
Michael W. Hudson54241132001-12-07 15:38:26 +00003005
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003006
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003007# Check for unsupported systems
3008case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003009Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003010 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3011 echo See README for details.
3012 exit 1;;
3013esac
3014
Michael W. Hudson54241132001-12-07 15:38:26 +00003015
Martin v. Löwis11437992002-04-12 09:54:03 +00003016echo "$as_me:$LINENO: checking for --with-suffix" >&5
3017echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003018
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003019# Check whether --with-suffix or --without-suffix was given.
3020if test "${with_suffix+set}" = set; then
3021 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003022
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003023 case $withval in
3024 no) EXEEXT=;;
3025 yes) EXEEXT=.exe;;
3026 *) EXEEXT=$withval;;
3027 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003028fi;
3029echo "$as_me:$LINENO: result: $EXEEXT" >&5
3030echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003031
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003032# Test whether we're running on a non-case-sensitive system, in which
3033# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003034
Martin v. Löwis11437992002-04-12 09:54:03 +00003035echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3036echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003037if test ! -d CaseSensitiveTestDir; then
3038mkdir CaseSensitiveTestDir
3039fi
3040
3041if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003042then
Martin v. Löwis11437992002-04-12 09:54:03 +00003043 echo "$as_me:$LINENO: result: yes" >&5
3044echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003045 BUILDEXEEXT=.exe
3046else
Martin v. Löwis11437992002-04-12 09:54:03 +00003047 echo "$as_me:$LINENO: result: no" >&5
3048echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003049 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003050fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003051rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003052
Guido van Rossumdd997f71998-10-07 19:58:26 +00003053case $MACHDEP in
3054bsdos*)
3055 case $CC in
3056 gcc) CC="$CC -D_HAVE_BSDI";;
3057 esac;;
3058esac
3059
Guido van Rossum24b1e751997-08-21 02:29:16 +00003060case $ac_sys_system in
3061hp*|HP*)
3062 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003063 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003064 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003065Monterey*)
3066 case $CC in
3067 cc) CC="$CC -Wl,-Bexport";;
3068 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003069SunOS*)
3070 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003071
3072cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003073#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003074_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003075
3076 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003077esac
3078
Michael W. Hudson54241132001-12-07 15:38:26 +00003079
3080
Martin v. Löwis11437992002-04-12 09:54:03 +00003081echo "$as_me:$LINENO: checking LIBRARY" >&5
3082echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003083if test -z "$LIBRARY"
3084then
3085 LIBRARY='libpython$(VERSION).a'
3086fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003087echo "$as_me:$LINENO: result: $LIBRARY" >&5
3088echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003089
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003090# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003091# name of the library into which to insert object files). BLDLIBRARY is also
3092# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3093# is blank as the main program is not linked directly against LDLIBRARY.
3094# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3095# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3096# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3097# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003098#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003099# RUNSHARED is used to run shared python without installed libraries
3100#
3101# INSTSONAME is the name of the shared library that will be use to install
3102# on the system - some systems like version suffix, others don't
3103
3104
Michael W. Hudson54241132001-12-07 15:38:26 +00003105
3106
3107
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003108
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003109LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003110BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003111INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003112DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003113LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003114RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003115
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003116# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003117# If CXX is set, and if it is needed to link a main function that was
3118# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3119# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003120# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003121# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003122
Martin v. Löwis11437992002-04-12 09:54:03 +00003123echo "$as_me:$LINENO: checking LINKCC" >&5
3124echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003125if test -z "$LINKCC"
3126then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003127 if test -z "$CXX"; then
3128 LINKCC="\$(PURIFY) \$(CC)"
3129 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003130 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003131 $CXX -c conftest.$ac_ext 2>&5
3132 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3133 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3134 then
3135 LINKCC="\$(PURIFY) \$(CC)"
3136 else
3137 LINKCC="\$(PURIFY) \$(CXX)"
3138 fi
3139 rm -fr conftest*
3140 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003141 case $ac_sys_system in
3142 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003143 exp_extra="\"\""
3144 if test $ac_sys_release -ge 5 -o \
3145 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3146 exp_extra="."
3147 fi
3148 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003149 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003150 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003151 esac
3152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003153echo "$as_me:$LINENO: result: $LINKCC" >&5
3154echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003155
Martin v. Löwis11437992002-04-12 09:54:03 +00003156echo "$as_me:$LINENO: checking for --enable-shared" >&5
3157echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003158# Check whether --enable-shared or --disable-shared was given.
3159if test "${enable_shared+set}" = set; then
3160 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003161
Martin v. Löwis11437992002-04-12 09:54:03 +00003162fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003163
3164if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003165then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003166 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003167 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003168 enable_shared="yes";;
3169 *)
3170 enable_shared="no";;
3171 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003172fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003173echo "$as_me:$LINENO: result: $enable_shared" >&5
3174echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003175
3176
Martin v. Löwis11437992002-04-12 09:54:03 +00003177echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3178echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003179
Guido van Rossumb8552162001-09-05 14:58:11 +00003180# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3181# library that we build, but we do not want to link against it (we
3182# will find it with a -framework option). For this reason there is an
3183# extra variable BLDLIBRARY against which Python and the extension
3184# modules are linked, BLDLIBRARY. This is normally the same as
3185# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003186if test "$enable_framework"
3187then
3188 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003189 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003190 BLDLIBRARY=''
3191else
3192 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003193fi
Jack Jansene578a632001-08-15 01:27:14 +00003194
Martin v. Löwis1142de32002-03-29 16:28:31 +00003195# Other platforms follow
3196if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003197
3198cat >>confdefs.h <<\_ACEOF
3199#define Py_ENABLE_SHARED 1
3200_ACEOF
3201
Martin v. Löwis1142de32002-03-29 16:28:31 +00003202 case $ac_sys_system in
3203 BeOS*)
3204 LDLIBRARY='libpython$(VERSION).so'
3205 ;;
3206 CYGWIN*)
3207 LDLIBRARY='libpython$(VERSION).dll.a'
3208 DLLLIBRARY='libpython$(VERSION).dll'
3209 ;;
3210 SunOS*)
3211 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003212 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003213 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003214 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003215 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003216 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003217 LDLIBRARY='libpython$(VERSION).so'
3218 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003219 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003220 INSTSONAME="$LDLIBRARY".$SOVERSION
3221 ;;
3222 hp*|HP*)
3223 LDLIBRARY='libpython$(VERSION).sl'
3224 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003225 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003226 ;;
3227 OSF*)
3228 LDLIBRARY='libpython$(VERSION).so'
3229 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003230 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003231 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003232 atheos*)
3233 LDLIBRARY='libpython$(VERSION).so'
3234 BLDLIBRARY='-L. -lpython$(VERSION)'
3235 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3236 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003237 esac
Jason Tishler30765592003-09-04 11:04:06 +00003238else # shared is disabled
3239 case $ac_sys_system in
3240 CYGWIN*)
3241 BLDLIBRARY='$(LIBRARY)'
3242 LDLIBRARY='libpython$(VERSION).dll.a'
3243 ;;
3244 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003245fi
3246
Martin v. Löwis11437992002-04-12 09:54:03 +00003247echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3248echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003249
Martin v. Löwis11437992002-04-12 09:54:03 +00003250if test -n "$ac_tool_prefix"; then
3251 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3252set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3253echo "$as_me:$LINENO: checking for $ac_word" >&5
3254echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3255if test "${ac_cv_prog_RANLIB+set}" = set; then
3256 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257else
3258 if test -n "$RANLIB"; then
3259 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3260else
Martin v. Löwis11437992002-04-12 09:54:03 +00003261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3262for as_dir in $PATH
3263do
3264 IFS=$as_save_IFS
3265 test -z "$as_dir" && as_dir=.
3266 for ac_exec_ext in '' $ac_executable_extensions; do
3267 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3268 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3269 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3270 break 2
3271 fi
3272done
3273done
3274
Guido van Rossum627b2d71993-12-24 10:39:16 +00003275fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003277RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003278if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003279 echo "$as_me:$LINENO: result: $RANLIB" >&5
3280echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003281else
Martin v. Löwis11437992002-04-12 09:54:03 +00003282 echo "$as_me:$LINENO: result: no" >&5
3283echo "${ECHO_T}no" >&6
3284fi
3285
3286fi
3287if test -z "$ac_cv_prog_RANLIB"; then
3288 ac_ct_RANLIB=$RANLIB
3289 # Extract the first word of "ranlib", so it can be a program name with args.
3290set dummy ranlib; ac_word=$2
3291echo "$as_me:$LINENO: checking for $ac_word" >&5
3292echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3293if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3294 echo $ECHO_N "(cached) $ECHO_C" >&6
3295else
3296 if test -n "$ac_ct_RANLIB"; then
3297 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3298else
3299as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3300for as_dir in $PATH
3301do
3302 IFS=$as_save_IFS
3303 test -z "$as_dir" && as_dir=.
3304 for ac_exec_ext in '' $ac_executable_extensions; do
3305 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3306 ac_cv_prog_ac_ct_RANLIB="ranlib"
3307 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3308 break 2
3309 fi
3310done
3311done
3312
3313 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3314fi
3315fi
3316ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3317if test -n "$ac_ct_RANLIB"; then
3318 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3319echo "${ECHO_T}$ac_ct_RANLIB" >&6
3320else
3321 echo "$as_me:$LINENO: result: no" >&5
3322echo "${ECHO_T}no" >&6
3323fi
3324
3325 RANLIB=$ac_ct_RANLIB
3326else
3327 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003329
3330
Guido van Rossum7f43da71994-08-01 12:15:30 +00003331for ac_prog in ar aal
3332do
Martin v. Löwis11437992002-04-12 09:54:03 +00003333 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003334set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003335echo "$as_me:$LINENO: checking for $ac_word" >&5
3336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3337if test "${ac_cv_prog_AR+set}" = set; then
3338 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003339else
3340 if test -n "$AR"; then
3341 ac_cv_prog_AR="$AR" # Let the user override the test.
3342else
Martin v. Löwis11437992002-04-12 09:54:03 +00003343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3344for as_dir in $PATH
3345do
3346 IFS=$as_save_IFS
3347 test -z "$as_dir" && as_dir=.
3348 for ac_exec_ext in '' $ac_executable_extensions; do
3349 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3350 ac_cv_prog_AR="$ac_prog"
3351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3352 break 2
3353 fi
3354done
3355done
3356
Guido van Rossum7f43da71994-08-01 12:15:30 +00003357fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003359AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003361 echo "$as_me:$LINENO: result: $AR" >&5
3362echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003363else
Martin v. Löwis11437992002-04-12 09:54:03 +00003364 echo "$as_me:$LINENO: result: no" >&5
3365echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003366fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003367
Martin v. Löwis11437992002-04-12 09:54:03 +00003368 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003369done
3370test -n "$AR" || AR="ar"
3371
Michael W. Hudson54241132001-12-07 15:38:26 +00003372
Neil Schemenauera42c8272001-03-31 00:01:55 +00003373case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003374bsdos*|hp*|HP*)
3375 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003376 if test -z "$INSTALL"
3377 then
3378 INSTALL="${srcdir}/install-sh -c"
3379 fi
3380esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003381ac_aux_dir=
3382for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3383 if test -f $ac_dir/install-sh; then
3384 ac_aux_dir=$ac_dir
3385 ac_install_sh="$ac_aux_dir/install-sh -c"
3386 break
3387 elif test -f $ac_dir/install.sh; then
3388 ac_aux_dir=$ac_dir
3389 ac_install_sh="$ac_aux_dir/install.sh -c"
3390 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003391 elif test -f $ac_dir/shtool; then
3392 ac_aux_dir=$ac_dir
3393 ac_install_sh="$ac_aux_dir/shtool install -c"
3394 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003395 fi
3396done
3397if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3399echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3400 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003401fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003402ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3403ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3404ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003405
3406# Find a good install program. We prefer a C program (faster),
3407# so one script is as good as another. But avoid the broken or
3408# incompatible versions:
3409# SysV /etc/install, /usr/sbin/install
3410# SunOS /usr/etc/install
3411# IRIX /sbin/install
3412# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003413# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003414# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3415# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3416# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3417# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003418echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3419echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003420if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003421if test "${ac_cv_path_install+set}" = set; then
3422 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003423else
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3425for as_dir in $PATH
3426do
3427 IFS=$as_save_IFS
3428 test -z "$as_dir" && as_dir=.
3429 # Account for people who put trailing slashes in PATH elements.
3430case $as_dir/ in
3431 ./ | .// | /cC/* | \
3432 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3433 /usr/ucb/* ) ;;
3434 *)
3435 # OSF1 and SCO ODT 3.0 have their own names for install.
3436 # Don't use installbsd from OSF since it installs stuff as root
3437 # by default.
3438 for ac_prog in ginstall scoinst install; do
3439 for ac_exec_ext in '' $ac_executable_extensions; do
3440 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3441 if test $ac_prog = install &&
3442 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3443 # AIX install. It has an incompatible calling convention.
3444 :
3445 elif test $ac_prog = install &&
3446 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3447 # program-specific install script used by HP pwplus--don't use.
3448 :
3449 else
3450 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3451 break 3
3452 fi
3453 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003454 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003455 done
3456 ;;
3457esac
3458done
3459
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003460
3461fi
3462 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003463 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003464 else
3465 # As a last resort, use the slow shell script. We don't cache a
3466 # path for INSTALL within a source directory, because that will
3467 # break other packages using the cache if that directory is
3468 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003470 fi
3471fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003472echo "$as_me:$LINENO: result: $INSTALL" >&5
3473echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003474
3475# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3476# It thinks the first close brace ends the variable substitution.
3477test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3478
Martin v. Löwis11437992002-04-12 09:54:03 +00003479test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003480
3481test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3482
Michael W. Hudson54241132001-12-07 15:38:26 +00003483
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003484# Not every filesystem supports hard links
3485
3486if test -z "$LN" ; then
3487 case $ac_sys_system in
3488 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003489 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003490 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003491 *) LN=ln;;
3492 esac
3493fi
3494
Fred Drake109d9862001-07-11 06:27:56 +00003495# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003496echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3497echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3498
Fred Drake109d9862001-07-11 06:27:56 +00003499# Check whether --with-pydebug or --without-pydebug was given.
3500if test "${with_pydebug+set}" = set; then
3501 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003502
Fred Drake109d9862001-07-11 06:27:56 +00003503if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003504then
3505
3506cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003507#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003508_ACEOF
3509
3510 echo "$as_me:$LINENO: result: yes" >&5
3511echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003512 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003513else echo "$as_me:$LINENO: result: no" >&5
3514echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003515fi
3516else
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 echo "$as_me:$LINENO: result: no" >&5
3518echo "${ECHO_T}no" >&6
3519fi;
Fred Drake109d9862001-07-11 06:27:56 +00003520
Skip Montanarodecc6a42003-01-01 20:07:49 +00003521# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3522# merged with this chunk of code?
3523
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003524# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003525# ------------------------
3526# (The following bit of code is complicated enough - please keep things
3527# indented properly. Just pretend you're editing Python code. ;-)
3528
3529# There are two parallel sets of case statements below, one that checks to
3530# see if OPT was set and one that does BASECFLAGS setting based upon
3531# compiler and platform. BASECFLAGS tweaks need to be made even if the
3532# user set OPT.
3533
3534# tweak OPT based on compiler and platform, only if the user didn't set
3535# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003536
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003537if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003538then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003539 case $GCC in
3540 yes)
3541 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003542 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003543 if test "$Py_DEBUG" = 'true' ; then
3544 # Optimization messes up debuggers, so turn it off for
3545 # debug builds.
3546 OPT="-g -Wall -Wstrict-prototypes"
3547 else
3548 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003549 fi
3550 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003551 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003552 OPT="-O3 -Wall -Wstrict-prototypes"
3553 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003554 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003555 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003556 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3557 ;;
3558 esac
Fred Drake109d9862001-07-11 06:27:56 +00003559 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003560
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003561 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003562 OPT="-O"
3563 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003564 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003565
3566 # The current (beta) Monterey compiler dies with optimizations
3567 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003568 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003569 Monterey*)
3570 OPT=""
3571 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003572 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003573
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003574fi
3575
Skip Montanarodecc6a42003-01-01 20:07:49 +00003576
3577# tweak BASECFLAGS based on compiler and platform
3578case $GCC in
3579yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003580 # Python violates C99 rules, by casting between incompatible
3581 # pointer types. GCC may generate bad code as a result of that,
3582 # so use -fno-strict-aliasing if supported.
3583 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3584echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3585 ac_save_cc="$CC"
3586 CC="$CC -fno-strict-aliasing"
3587 if test "$cross_compiling" = yes; then
3588 ac_cv_no_strict_aliasing_ok=no
3589else
3590 cat >conftest.$ac_ext <<_ACEOF
3591#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003592/* confdefs.h. */
3593_ACEOF
3594cat confdefs.h >>conftest.$ac_ext
3595cat >>conftest.$ac_ext <<_ACEOF
3596/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003597int main() { return 0; }
3598_ACEOF
3599rm -f conftest$ac_exeext
3600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3601 (eval $ac_link) 2>&5
3602 ac_status=$?
3603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3606 (eval $ac_try) 2>&5
3607 ac_status=$?
3608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3609 (exit $ac_status); }; }; then
3610 ac_cv_no_strict_aliasing_ok=yes
3611else
3612 echo "$as_me: program exited with status $ac_status" >&5
3613echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003614sed 's/^/| /' conftest.$ac_ext >&5
3615
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003616( exit $ac_status )
3617ac_cv_no_strict_aliasing_ok=no
3618fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003619rm -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 +00003620fi
3621 CC="$ac_save_cc"
3622 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3623echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3624 if test $ac_cv_no_strict_aliasing_ok = yes
3625 then
3626 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3627 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003628 case $ac_sys_system in
3629 SCO_SV*)
3630 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3631 ;;
3632 # is there any other compiler on Darwin besides gcc?
3633 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003634 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003635 ;;
3636 esac
3637 ;;
3638
3639*)
3640 case $ac_sys_system in
3641 OpenUNIX*|UnixWare*)
3642 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3643 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003644 OSF*)
3645 BASECFLAGS="$BASECFLAGS -ieee -std"
3646 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003647 SCO_SV*)
3648 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3649 ;;
3650 esac
3651 ;;
3652esac
3653
Fred Drakee1ceaa02001-12-04 20:55:47 +00003654if test "$Py_DEBUG" = 'true'; then
3655 :
3656else
3657 OPT="-DNDEBUG $OPT"
3658fi
3659
Guido van Rossum563e7081996-09-10 18:20:48 +00003660if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003661then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003662 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003663fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003664
Martin v. Löwis11437992002-04-12 09:54:03 +00003665echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3666echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3667if test "${ac_cv_opt_olimit_ok+set}" = set; then
3668 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003669else
3670 ac_save_cc="$CC"
3671CC="$CC -OPT:Olimit=0"
3672if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003673 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003674else
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 cat >conftest.$ac_ext <<_ACEOF
3676#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003677/* confdefs.h. */
3678_ACEOF
3679cat confdefs.h >>conftest.$ac_ext
3680cat >>conftest.$ac_ext <<_ACEOF
3681/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003682int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683_ACEOF
3684rm -f conftest$ac_exeext
3685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3686 (eval $ac_link) 2>&5
3687 ac_status=$?
3688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3689 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3691 (eval $ac_try) 2>&5
3692 ac_status=$?
3693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3694 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003695 ac_cv_opt_olimit_ok=yes
3696else
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 echo "$as_me: program exited with status $ac_status" >&5
3698echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003699sed 's/^/| /' conftest.$ac_ext >&5
3700
Martin v. Löwis11437992002-04-12 09:54:03 +00003701( exit $ac_status )
3702ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003703fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003704rm -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 +00003705fi
Guido van Rossum91922671997-10-09 20:24:13 +00003706CC="$ac_save_cc"
3707fi
3708
Martin v. Löwis11437992002-04-12 09:54:03 +00003709echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3710echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003711if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003712 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003713 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3714 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3715 # environment?
3716 Darwin*)
3717 ;;
3718 *)
3719 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3720 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003721 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003722else
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3724echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3725 if test "${ac_cv_olimit_ok+set}" = set; then
3726 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003727else
3728 ac_save_cc="$CC"
3729 CC="$CC -Olimit 1500"
3730 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003731 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003732else
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 cat >conftest.$ac_ext <<_ACEOF
3734#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003735/* confdefs.h. */
3736_ACEOF
3737cat confdefs.h >>conftest.$ac_ext
3738cat >>conftest.$ac_ext <<_ACEOF
3739/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003740int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003741_ACEOF
3742rm -f conftest$ac_exeext
3743if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3744 (eval $ac_link) 2>&5
3745 ac_status=$?
3746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3747 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3749 (eval $ac_try) 2>&5
3750 ac_status=$?
3751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3752 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003753 ac_cv_olimit_ok=yes
3754else
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 echo "$as_me: program exited with status $ac_status" >&5
3756echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003757sed 's/^/| /' conftest.$ac_ext >&5
3758
Martin v. Löwis11437992002-04-12 09:54:03 +00003759( exit $ac_status )
3760ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003761fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003762rm -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 +00003763fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003764 CC="$ac_save_cc"
3765fi
3766
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3768echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003769 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003770 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003771 fi
3772fi
3773
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003774# On some compilers, pthreads are available without further options
3775# (e.g. MacOS X). On some of these systems, the compiler will not
3776# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3777# So we have to see first whether pthreads are available without
3778# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003779echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3780echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3781if test "${ac_cv_pthread_is_default+set}" = set; then
3782 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003783else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003784 if test "$cross_compiling" = yes; then
3785 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003786else
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 cat >conftest.$ac_ext <<_ACEOF
3788#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003789/* confdefs.h. */
3790_ACEOF
3791cat confdefs.h >>conftest.$ac_ext
3792cat >>conftest.$ac_ext <<_ACEOF
3793/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003794
Martin v. Löwis130fb172001-07-19 11:00:41 +00003795#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003796
3797void* routine(void* p){return NULL;}
3798
3799int main(){
3800 pthread_t p;
3801 if(pthread_create(&p,NULL,routine,NULL)!=0)
3802 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003803 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003804 return 0;
3805}
3806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807_ACEOF
3808rm -f conftest$ac_exeext
3809if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3810 (eval $ac_link) 2>&5
3811 ac_status=$?
3812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3813 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3815 (eval $ac_try) 2>&5
3816 ac_status=$?
3817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3818 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003819
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003820 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003821 ac_cv_kthread=no
3822 ac_cv_pthread=no
3823
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003824else
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 echo "$as_me: program exited with status $ac_status" >&5
3826echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003827sed 's/^/| /' conftest.$ac_ext >&5
3828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829( exit $ac_status )
3830ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003831fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003832rm -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 +00003833fi
3834
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003835fi
3836
Martin v. Löwis11437992002-04-12 09:54:03 +00003837echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3838echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003839
Michael W. Hudson54241132001-12-07 15:38:26 +00003840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003842then
3843 ac_cv_kpthread=no
3844else
3845# -Kpthread, if available, provides the right #defines
3846# and linker options to make pthread_create available
3847# Some compilers won't report that they do not support -Kpthread,
3848# so we need to run a program to see whether it really made the
3849# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003850echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3851echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3852if test "${ac_cv_kpthread+set}" = set; then
3853 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003854else
3855 ac_save_cc="$CC"
3856CC="$CC -Kpthread"
3857if test "$cross_compiling" = yes; then
3858 ac_cv_kpthread=no
3859else
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 cat >conftest.$ac_ext <<_ACEOF
3861#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003862/* confdefs.h. */
3863_ACEOF
3864cat confdefs.h >>conftest.$ac_ext
3865cat >>conftest.$ac_ext <<_ACEOF
3866/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003867
3868#include <pthread.h>
3869
3870void* routine(void* p){return NULL;}
3871
3872int main(){
3873 pthread_t p;
3874 if(pthread_create(&p,NULL,routine,NULL)!=0)
3875 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003876 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003877 return 0;
3878}
3879
Martin v. Löwis11437992002-04-12 09:54:03 +00003880_ACEOF
3881rm -f conftest$ac_exeext
3882if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3883 (eval $ac_link) 2>&5
3884 ac_status=$?
3885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3888 (eval $ac_try) 2>&5
3889 ac_status=$?
3890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3891 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003892 ac_cv_kpthread=yes
3893else
Martin v. Löwis11437992002-04-12 09:54:03 +00003894 echo "$as_me: program exited with status $ac_status" >&5
3895echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003896sed 's/^/| /' conftest.$ac_ext >&5
3897
Martin v. Löwis11437992002-04-12 09:54:03 +00003898( exit $ac_status )
3899ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003900fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003901rm -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 +00003902fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003903CC="$ac_save_cc"
3904fi
3905
Martin v. Löwis11437992002-04-12 09:54:03 +00003906echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3907echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003908fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003909
Skip Montanarod8d39a02003-07-10 20:44:10 +00003910if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003911then
3912# -Kthread, if available, provides the right #defines
3913# and linker options to make pthread_create available
3914# Some compilers won't report that they do not support -Kthread,
3915# so we need to run a program to see whether it really made the
3916# function available.
3917echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3918echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3919if test "${ac_cv_kthread+set}" = set; then
3920 echo $ECHO_N "(cached) $ECHO_C" >&6
3921else
3922 ac_save_cc="$CC"
3923CC="$CC -Kthread"
3924if test "$cross_compiling" = yes; then
3925 ac_cv_kthread=no
3926else
3927 cat >conftest.$ac_ext <<_ACEOF
3928#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003929/* confdefs.h. */
3930_ACEOF
3931cat confdefs.h >>conftest.$ac_ext
3932cat >>conftest.$ac_ext <<_ACEOF
3933/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003934
3935#include <pthread.h>
3936
3937void* routine(void* p){return NULL;}
3938
3939int main(){
3940 pthread_t p;
3941 if(pthread_create(&p,NULL,routine,NULL)!=0)
3942 return 1;
3943 (void)pthread_detach(p);
3944 return 0;
3945}
3946
3947_ACEOF
3948rm -f conftest$ac_exeext
3949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3950 (eval $ac_link) 2>&5
3951 ac_status=$?
3952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3953 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3955 (eval $ac_try) 2>&5
3956 ac_status=$?
3957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3958 (exit $ac_status); }; }; then
3959 ac_cv_kthread=yes
3960else
3961 echo "$as_me: program exited with status $ac_status" >&5
3962echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003963sed 's/^/| /' conftest.$ac_ext >&5
3964
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003965( exit $ac_status )
3966ac_cv_kthread=no
3967fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003968rm -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 +00003969fi
3970CC="$ac_save_cc"
3971fi
3972
3973echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3974echo "${ECHO_T}$ac_cv_kthread" >&6
3975fi
3976
Skip Montanarod8d39a02003-07-10 20:44:10 +00003977if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003978then
3979# -pthread, if available, provides the right #defines
3980# and linker options to make pthread_create available
3981# Some compilers won't report that they do not support -pthread,
3982# so we need to run a program to see whether it really made the
3983# function available.
3984echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3985echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3986if test "${ac_cv_thread+set}" = set; then
3987 echo $ECHO_N "(cached) $ECHO_C" >&6
3988else
3989 ac_save_cc="$CC"
3990CC="$CC -pthread"
3991if test "$cross_compiling" = yes; then
3992 ac_cv_pthread=no
3993else
3994 cat >conftest.$ac_ext <<_ACEOF
3995#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003996/* confdefs.h. */
3997_ACEOF
3998cat confdefs.h >>conftest.$ac_ext
3999cat >>conftest.$ac_ext <<_ACEOF
4000/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004001
4002#include <pthread.h>
4003
4004void* routine(void* p){return NULL;}
4005
4006int main(){
4007 pthread_t p;
4008 if(pthread_create(&p,NULL,routine,NULL)!=0)
4009 return 1;
4010 (void)pthread_detach(p);
4011 return 0;
4012}
4013
4014_ACEOF
4015rm -f conftest$ac_exeext
4016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4017 (eval $ac_link) 2>&5
4018 ac_status=$?
4019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4022 (eval $ac_try) 2>&5
4023 ac_status=$?
4024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4025 (exit $ac_status); }; }; then
4026 ac_cv_pthread=yes
4027else
4028 echo "$as_me: program exited with status $ac_status" >&5
4029echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004030sed 's/^/| /' conftest.$ac_ext >&5
4031
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004032( exit $ac_status )
4033ac_cv_pthread=no
4034fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004035rm -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 +00004036fi
4037CC="$ac_save_cc"
4038fi
4039
4040echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4041echo "${ECHO_T}$ac_cv_pthread" >&6
4042fi
4043
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004044# If we have set a CC compiler flag for thread support then
4045# check if it works for CXX, too.
4046ac_cv_cxx_thread=no
4047if test ! -z "$CXX"
4048then
4049echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4050echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4051ac_save_cxx="$CXX"
4052
4053if test "$ac_cv_kpthread" = "yes"
4054then
4055 CXX="$CXX -Kpthread"
4056 ac_cv_cxx_thread=yes
4057elif test "$ac_cv_kthread" = "yes"
4058then
4059 CXX="$CXX -Kthread"
4060 ac_cv_cxx_thread=yes
4061elif test "$ac_cv_pthread" = "yes"
4062then
4063 CXX="$CXX -pthread"
4064 ac_cv_cxx_thread=yes
4065fi
4066
4067if test $ac_cv_cxx_thread = yes
4068then
4069 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4070 $CXX -c conftest.$ac_ext 2>&5
4071 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4072 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4073 then
4074 ac_cv_cxx_thread=yes
4075 else
4076 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004077 fi
4078 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004079fi
4080fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004081CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004082echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4083echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4084
Michael W. Hudson54241132001-12-07 15:38:26 +00004085
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004086# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004087echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4088echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4089if test "${ac_cv_header_stdc+set}" = set; then
4090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004091else
Martin v. Löwis11437992002-04-12 09:54:03 +00004092 cat >conftest.$ac_ext <<_ACEOF
4093#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004094/* confdefs.h. */
4095_ACEOF
4096cat confdefs.h >>conftest.$ac_ext
4097cat >>conftest.$ac_ext <<_ACEOF
4098/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004099#include <stdlib.h>
4100#include <stdarg.h>
4101#include <string.h>
4102#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004103
Skip Montanaro6dead952003-09-25 14:50:04 +00004104int
4105main ()
4106{
4107
4108 ;
4109 return 0;
4110}
Martin v. Löwis11437992002-04-12 09:54:03 +00004111_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004112rm -f conftest.$ac_objext
4113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4114 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004115 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004117 (exit $ac_status); } &&
4118 { ac_try='test -s conftest.$ac_objext'
4119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4120 (eval $ac_try) 2>&5
4121 ac_status=$?
4122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4123 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124 ac_cv_header_stdc=yes
4125else
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004127sed 's/^/| /' conftest.$ac_ext >&5
4128
4129ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004130fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004131rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004132
4133if test $ac_cv_header_stdc = yes; then
4134 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 cat >conftest.$ac_ext <<_ACEOF
4136#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004137/* confdefs.h. */
4138_ACEOF
4139cat confdefs.h >>conftest.$ac_ext
4140cat >>conftest.$ac_ext <<_ACEOF
4141/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004142#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004143
4144_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004146 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147 :
4148else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149 ac_cv_header_stdc=no
4150fi
4151rm -f conftest*
4152
4153fi
4154
4155if test $ac_cv_header_stdc = yes; then
4156 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 cat >conftest.$ac_ext <<_ACEOF
4158#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004159/* confdefs.h. */
4160_ACEOF
4161cat confdefs.h >>conftest.$ac_ext
4162cat >>conftest.$ac_ext <<_ACEOF
4163/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004165
4166_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004168 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169 :
4170else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171 ac_cv_header_stdc=no
4172fi
4173rm -f conftest*
4174
4175fi
4176
4177if test $ac_cv_header_stdc = yes; then
4178 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004179 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004180 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004181else
Martin v. Löwis11437992002-04-12 09:54:03 +00004182 cat >conftest.$ac_ext <<_ACEOF
4183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004184/* confdefs.h. */
4185_ACEOF
4186cat confdefs.h >>conftest.$ac_ext
4187cat >>conftest.$ac_ext <<_ACEOF
4188/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004189#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004190#if ((' ' & 0x0FF) == 0x020)
4191# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4192# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4193#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004194# define ISLOWER(c) \
4195 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 || ('j' <= (c) && (c) <= 'r') \
4197 || ('s' <= (c) && (c) <= 'z'))
4198# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4199#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004200
Martin v. Löwis11437992002-04-12 09:54:03 +00004201#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4202int
4203main ()
4204{
4205 int i;
4206 for (i = 0; i < 256; i++)
4207 if (XOR (islower (i), ISLOWER (i))
4208 || toupper (i) != TOUPPER (i))
4209 exit(2);
4210 exit (0);
4211}
4212_ACEOF
4213rm -f conftest$ac_exeext
4214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4215 (eval $ac_link) 2>&5
4216 ac_status=$?
4217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4220 (eval $ac_try) 2>&5
4221 ac_status=$?
4222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4223 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004224 :
4225else
Martin v. Löwis11437992002-04-12 09:54:03 +00004226 echo "$as_me: program exited with status $ac_status" >&5
4227echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004228sed 's/^/| /' conftest.$ac_ext >&5
4229
Martin v. Löwis11437992002-04-12 09:54:03 +00004230( exit $ac_status )
4231ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004232fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004233rm -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 +00004234fi
4235fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004236fi
4237echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4238echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004239if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004240
4241cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004243_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004244
4245fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246
Skip Montanarob9820a32004-01-17 00:16:12 +00004247# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4258 inttypes.h stdint.h unistd.h
4259do
4260as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4261echo "$as_me:$LINENO: checking for $ac_header" >&5
4262echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4263if eval "test \"\${$as_ac_Header+set}\" = set"; then
4264 echo $ECHO_N "(cached) $ECHO_C" >&6
4265else
4266 cat >conftest.$ac_ext <<_ACEOF
4267#line $LINENO "configure"
4268/* confdefs.h. */
4269_ACEOF
4270cat confdefs.h >>conftest.$ac_ext
4271cat >>conftest.$ac_ext <<_ACEOF
4272/* end confdefs.h. */
4273$ac_includes_default
4274
4275#include <$ac_header>
4276_ACEOF
4277rm -f conftest.$ac_objext
4278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4279 (eval $ac_compile) 2>&5
4280 ac_status=$?
4281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4282 (exit $ac_status); } &&
4283 { ac_try='test -s conftest.$ac_objext'
4284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4285 (eval $ac_try) 2>&5
4286 ac_status=$?
4287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4288 (exit $ac_status); }; }; then
4289 eval "$as_ac_Header=yes"
4290else
4291 echo "$as_me: failed program was:" >&5
4292sed 's/^/| /' conftest.$ac_ext >&5
4293
4294eval "$as_ac_Header=no"
4295fi
4296rm -f conftest.$ac_objext conftest.$ac_ext
4297fi
4298echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4299echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4300if test `eval echo '${'$as_ac_Header'}'` = yes; then
4301 cat >>confdefs.h <<_ACEOF
4302#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4303_ACEOF
4304
4305fi
4306
4307done
4308
4309
Martin v. Löwis11437992002-04-12 09:54:03 +00004310
4311
4312
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
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004347
Barry Warsawfe33b792003-01-07 22:42:49 +00004348
Neal Norwitz82251032003-05-23 14:35:24 +00004349
Martin v. Löwis12af0482004-01-31 12:34:17 +00004350
Hye-Shik Chang81268602004-02-02 06:05:24 +00004351
Martin v. Löwis11437992002-04-12 09:54:03 +00004352for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004353libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004354signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4355unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004356sys/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 +00004357sys/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 +00004358sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004359sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4360bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004361do
Martin v. Löwis11437992002-04-12 09:54:03 +00004362as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4363if eval "test \"\${$as_ac_Header+set}\" = set"; then
4364 echo "$as_me:$LINENO: checking for $ac_header" >&5
4365echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4366if eval "test \"\${$as_ac_Header+set}\" = set"; then
4367 echo $ECHO_N "(cached) $ECHO_C" >&6
4368fi
4369echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4370echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004371else
Martin v. Löwis11437992002-04-12 09:54:03 +00004372 # Is the header compilable?
4373echo "$as_me:$LINENO: checking $ac_header usability" >&5
4374echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4375cat >conftest.$ac_ext <<_ACEOF
4376#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004377/* confdefs.h. */
4378_ACEOF
4379cat confdefs.h >>conftest.$ac_ext
4380cat >>conftest.$ac_ext <<_ACEOF
4381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004382$ac_includes_default
4383#include <$ac_header>
4384_ACEOF
4385rm -f conftest.$ac_objext
4386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4387 (eval $ac_compile) 2>&5
4388 ac_status=$?
4389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4390 (exit $ac_status); } &&
4391 { ac_try='test -s conftest.$ac_objext'
4392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4393 (eval $ac_try) 2>&5
4394 ac_status=$?
4395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4396 (exit $ac_status); }; }; then
4397 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004398else
Martin v. Löwis11437992002-04-12 09:54:03 +00004399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004400sed 's/^/| /' conftest.$ac_ext >&5
4401
Martin v. Löwis11437992002-04-12 09:54:03 +00004402ac_header_compiler=no
4403fi
4404rm -f conftest.$ac_objext conftest.$ac_ext
4405echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4406echo "${ECHO_T}$ac_header_compiler" >&6
4407
4408# Is the header present?
4409echo "$as_me:$LINENO: checking $ac_header presence" >&5
4410echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4411cat >conftest.$ac_ext <<_ACEOF
4412#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004413/* confdefs.h. */
4414_ACEOF
4415cat confdefs.h >>conftest.$ac_ext
4416cat >>conftest.$ac_ext <<_ACEOF
4417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004418#include <$ac_header>
4419_ACEOF
4420if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4421 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4422 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004423 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004424 rm -f conftest.er1
4425 cat conftest.err >&5
4426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4427 (exit $ac_status); } >/dev/null; then
4428 if test -s conftest.err; then
4429 ac_cpp_err=$ac_c_preproc_warn_flag
4430 else
4431 ac_cpp_err=
4432 fi
4433else
4434 ac_cpp_err=yes
4435fi
4436if test -z "$ac_cpp_err"; then
4437 ac_header_preproc=yes
4438else
4439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004440sed 's/^/| /' conftest.$ac_ext >&5
4441
Martin v. Löwis11437992002-04-12 09:54:03 +00004442 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004443fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004444rm -f conftest.err conftest.$ac_ext
4445echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4446echo "${ECHO_T}$ac_header_preproc" >&6
4447
4448# So? What about this header?
4449case $ac_header_compiler:$ac_header_preproc in
4450 yes:no )
4451 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4452echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4453 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004454echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4455 (
4456 cat <<\_ASBOX
4457## ------------------------------------ ##
4458## Report this to bug-autoconf@gnu.org. ##
4459## ------------------------------------ ##
4460_ASBOX
4461 ) |
4462 sed "s/^/$as_me: WARNING: /" >&2
4463 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004464 no:yes )
4465 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4466echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4467 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4468echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4469 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004470echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4471 (
4472 cat <<\_ASBOX
4473## ------------------------------------ ##
4474## Report this to bug-autoconf@gnu.org. ##
4475## ------------------------------------ ##
4476_ASBOX
4477 ) |
4478 sed "s/^/$as_me: WARNING: /" >&2
4479 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004480esac
4481echo "$as_me:$LINENO: checking for $ac_header" >&5
4482echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4483if eval "test \"\${$as_ac_Header+set}\" = set"; then
4484 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004485else
Martin v. Löwis11437992002-04-12 09:54:03 +00004486 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004488echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4489echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4490
4491fi
4492if test `eval echo '${'$as_ac_Header'}'` = yes; then
4493 cat >>confdefs.h <<_ACEOF
4494#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4495_ACEOF
4496
4497fi
4498
Guido van Rossum627b2d71993-12-24 10:39:16 +00004499done
4500
Martin v. Löwis11437992002-04-12 09:54:03 +00004501
4502
4503
4504
4505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004506ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004507for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4508 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4509echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4510echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4511if eval "test \"\${$as_ac_Header+set}\" = set"; then
4512 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004513else
Martin v. Löwis11437992002-04-12 09:54:03 +00004514 cat >conftest.$ac_ext <<_ACEOF
4515#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004516/* confdefs.h. */
4517_ACEOF
4518cat confdefs.h >>conftest.$ac_ext
4519cat >>conftest.$ac_ext <<_ACEOF
4520/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004521#include <sys/types.h>
4522#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004523
Martin v. Löwis11437992002-04-12 09:54:03 +00004524int
4525main ()
4526{
4527if ((DIR *) 0)
4528return 0;
4529 ;
4530 return 0;
4531}
4532_ACEOF
4533rm -f conftest.$ac_objext
4534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4535 (eval $ac_compile) 2>&5
4536 ac_status=$?
4537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4538 (exit $ac_status); } &&
4539 { ac_try='test -s conftest.$ac_objext'
4540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4541 (eval $ac_try) 2>&5
4542 ac_status=$?
4543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4544 (exit $ac_status); }; }; then
4545 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004546else
Martin v. Löwis11437992002-04-12 09:54:03 +00004547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004548sed 's/^/| /' conftest.$ac_ext >&5
4549
Martin v. Löwis11437992002-04-12 09:54:03 +00004550eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004551fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004552rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004554echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4555echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4556if test `eval echo '${'$as_ac_Header'}'` = yes; then
4557 cat >>confdefs.h <<_ACEOF
4558#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4559_ACEOF
4560
4561ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004562fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004563
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004564done
4565# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4566if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004567 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4568echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4569if test "${ac_cv_search_opendir+set}" = set; then
4570 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004571else
Martin v. Löwis11437992002-04-12 09:54:03 +00004572 ac_func_search_save_LIBS=$LIBS
4573ac_cv_search_opendir=no
4574cat >conftest.$ac_ext <<_ACEOF
4575#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004576/* confdefs.h. */
4577_ACEOF
4578cat confdefs.h >>conftest.$ac_ext
4579cat >>conftest.$ac_ext <<_ACEOF
4580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004581
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004582/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004583#ifdef __cplusplus
4584extern "C"
4585#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004586/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004587 builtin and then its argument prototype would still apply. */
4588char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004589int
4590main ()
4591{
4592opendir ();
4593 ;
4594 return 0;
4595}
4596_ACEOF
4597rm -f conftest.$ac_objext conftest$ac_exeext
4598if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4599 (eval $ac_link) 2>&5
4600 ac_status=$?
4601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602 (exit $ac_status); } &&
4603 { ac_try='test -s conftest$ac_exeext'
4604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4605 (eval $ac_try) 2>&5
4606 ac_status=$?
4607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4608 (exit $ac_status); }; }; then
4609 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610else
Martin v. Löwis11437992002-04-12 09:54:03 +00004611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004612sed 's/^/| /' conftest.$ac_ext >&5
4613
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004614fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004615rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4616if test "$ac_cv_search_opendir" = no; then
4617 for ac_lib in dir; do
4618 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4619 cat >conftest.$ac_ext <<_ACEOF
4620#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004621/* confdefs.h. */
4622_ACEOF
4623cat confdefs.h >>conftest.$ac_ext
4624cat >>conftest.$ac_ext <<_ACEOF
4625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004627/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004628#ifdef __cplusplus
4629extern "C"
4630#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004631/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004632 builtin and then its argument prototype would still apply. */
4633char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004634int
4635main ()
4636{
4637opendir ();
4638 ;
4639 return 0;
4640}
4641_ACEOF
4642rm -f conftest.$ac_objext conftest$ac_exeext
4643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4644 (eval $ac_link) 2>&5
4645 ac_status=$?
4646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4647 (exit $ac_status); } &&
4648 { ac_try='test -s conftest$ac_exeext'
4649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4650 (eval $ac_try) 2>&5
4651 ac_status=$?
4652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4653 (exit $ac_status); }; }; then
4654 ac_cv_search_opendir="-l$ac_lib"
4655break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004656else
Martin v. Löwis11437992002-04-12 09:54:03 +00004657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004658sed 's/^/| /' conftest.$ac_ext >&5
4659
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004660fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004661rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4662 done
4663fi
4664LIBS=$ac_func_search_save_LIBS
4665fi
4666echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4667echo "${ECHO_T}$ac_cv_search_opendir" >&6
4668if test "$ac_cv_search_opendir" != no; then
4669 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004670
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004671fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004672
Michael W. Hudson54241132001-12-07 15:38:26 +00004673else
Martin v. Löwis11437992002-04-12 09:54:03 +00004674 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4675echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4676if test "${ac_cv_search_opendir+set}" = set; then
4677 echo $ECHO_N "(cached) $ECHO_C" >&6
4678else
4679 ac_func_search_save_LIBS=$LIBS
4680ac_cv_search_opendir=no
4681cat >conftest.$ac_ext <<_ACEOF
4682#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004683/* confdefs.h. */
4684_ACEOF
4685cat confdefs.h >>conftest.$ac_ext
4686cat >>conftest.$ac_ext <<_ACEOF
4687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004688
4689/* Override any gcc2 internal prototype to avoid an error. */
4690#ifdef __cplusplus
4691extern "C"
4692#endif
4693/* We use char because int might match the return type of a gcc2
4694 builtin and then its argument prototype would still apply. */
4695char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004696int
4697main ()
4698{
4699opendir ();
4700 ;
4701 return 0;
4702}
4703_ACEOF
4704rm -f conftest.$ac_objext conftest$ac_exeext
4705if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4706 (eval $ac_link) 2>&5
4707 ac_status=$?
4708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4709 (exit $ac_status); } &&
4710 { ac_try='test -s conftest$ac_exeext'
4711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4712 (eval $ac_try) 2>&5
4713 ac_status=$?
4714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4715 (exit $ac_status); }; }; then
4716 ac_cv_search_opendir="none required"
4717else
4718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004719sed 's/^/| /' conftest.$ac_ext >&5
4720
Martin v. Löwis11437992002-04-12 09:54:03 +00004721fi
4722rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4723if test "$ac_cv_search_opendir" = no; then
4724 for ac_lib in x; do
4725 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4726 cat >conftest.$ac_ext <<_ACEOF
4727#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004728/* confdefs.h. */
4729_ACEOF
4730cat confdefs.h >>conftest.$ac_ext
4731cat >>conftest.$ac_ext <<_ACEOF
4732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004733
4734/* Override any gcc2 internal prototype to avoid an error. */
4735#ifdef __cplusplus
4736extern "C"
4737#endif
4738/* We use char because int might match the return type of a gcc2
4739 builtin and then its argument prototype would still apply. */
4740char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004741int
4742main ()
4743{
4744opendir ();
4745 ;
4746 return 0;
4747}
4748_ACEOF
4749rm -f conftest.$ac_objext conftest$ac_exeext
4750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4751 (eval $ac_link) 2>&5
4752 ac_status=$?
4753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4754 (exit $ac_status); } &&
4755 { ac_try='test -s conftest$ac_exeext'
4756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4757 (eval $ac_try) 2>&5
4758 ac_status=$?
4759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4760 (exit $ac_status); }; }; then
4761 ac_cv_search_opendir="-l$ac_lib"
4762break
4763else
4764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004765sed 's/^/| /' conftest.$ac_ext >&5
4766
Martin v. Löwis11437992002-04-12 09:54:03 +00004767fi
4768rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4769 done
4770fi
4771LIBS=$ac_func_search_save_LIBS
4772fi
4773echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4774echo "${ECHO_T}$ac_cv_search_opendir" >&6
4775if test "$ac_cv_search_opendir" != no; then
4776 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4777
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004778fi
4779
4780fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004781
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004782echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4783echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4784if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4785 echo $ECHO_N "(cached) $ECHO_C" >&6
4786else
4787 cat >conftest.$ac_ext <<_ACEOF
4788#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004789/* confdefs.h. */
4790_ACEOF
4791cat confdefs.h >>conftest.$ac_ext
4792cat >>conftest.$ac_ext <<_ACEOF
4793/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004794#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004795int
4796main ()
4797{
4798return makedev(0, 0);
4799 ;
4800 return 0;
4801}
4802_ACEOF
4803rm -f conftest.$ac_objext conftest$ac_exeext
4804if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4805 (eval $ac_link) 2>&5
4806 ac_status=$?
4807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808 (exit $ac_status); } &&
4809 { ac_try='test -s conftest$ac_exeext'
4810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4811 (eval $ac_try) 2>&5
4812 ac_status=$?
4813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4814 (exit $ac_status); }; }; then
4815 ac_cv_header_sys_types_h_makedev=yes
4816else
4817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004818sed 's/^/| /' conftest.$ac_ext >&5
4819
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004820ac_cv_header_sys_types_h_makedev=no
4821fi
4822rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4823
4824fi
4825echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4826echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4827
4828if test $ac_cv_header_sys_types_h_makedev = no; then
4829if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4830 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4831echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4832if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4833 echo $ECHO_N "(cached) $ECHO_C" >&6
4834fi
4835echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4836echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4837else
4838 # Is the header compilable?
4839echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4840echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4841cat >conftest.$ac_ext <<_ACEOF
4842#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004843/* confdefs.h. */
4844_ACEOF
4845cat confdefs.h >>conftest.$ac_ext
4846cat >>conftest.$ac_ext <<_ACEOF
4847/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004848$ac_includes_default
4849#include <sys/mkdev.h>
4850_ACEOF
4851rm -f conftest.$ac_objext
4852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4853 (eval $ac_compile) 2>&5
4854 ac_status=$?
4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4856 (exit $ac_status); } &&
4857 { ac_try='test -s conftest.$ac_objext'
4858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4859 (eval $ac_try) 2>&5
4860 ac_status=$?
4861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862 (exit $ac_status); }; }; then
4863 ac_header_compiler=yes
4864else
4865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004866sed 's/^/| /' conftest.$ac_ext >&5
4867
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004868ac_header_compiler=no
4869fi
4870rm -f conftest.$ac_objext conftest.$ac_ext
4871echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4872echo "${ECHO_T}$ac_header_compiler" >&6
4873
4874# Is the header present?
4875echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4876echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4877cat >conftest.$ac_ext <<_ACEOF
4878#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004879/* confdefs.h. */
4880_ACEOF
4881cat confdefs.h >>conftest.$ac_ext
4882cat >>conftest.$ac_ext <<_ACEOF
4883/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004884#include <sys/mkdev.h>
4885_ACEOF
4886if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4887 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4888 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004889 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004890 rm -f conftest.er1
4891 cat conftest.err >&5
4892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4893 (exit $ac_status); } >/dev/null; then
4894 if test -s conftest.err; then
4895 ac_cpp_err=$ac_c_preproc_warn_flag
4896 else
4897 ac_cpp_err=
4898 fi
4899else
4900 ac_cpp_err=yes
4901fi
4902if test -z "$ac_cpp_err"; then
4903 ac_header_preproc=yes
4904else
4905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004906sed 's/^/| /' conftest.$ac_ext >&5
4907
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004908 ac_header_preproc=no
4909fi
4910rm -f conftest.err conftest.$ac_ext
4911echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4912echo "${ECHO_T}$ac_header_preproc" >&6
4913
4914# So? What about this header?
4915case $ac_header_compiler:$ac_header_preproc in
4916 yes:no )
4917 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4918echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4919 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004920echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4921 (
4922 cat <<\_ASBOX
4923## ------------------------------------ ##
4924## Report this to bug-autoconf@gnu.org. ##
4925## ------------------------------------ ##
4926_ASBOX
4927 ) |
4928 sed "s/^/$as_me: WARNING: /" >&2
4929 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004930 no:yes )
4931 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4932echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4933 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4934echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4935 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004936echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4937 (
4938 cat <<\_ASBOX
4939## ------------------------------------ ##
4940## Report this to bug-autoconf@gnu.org. ##
4941## ------------------------------------ ##
4942_ASBOX
4943 ) |
4944 sed "s/^/$as_me: WARNING: /" >&2
4945 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004946esac
4947echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4948echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4949if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4950 echo $ECHO_N "(cached) $ECHO_C" >&6
4951else
4952 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4953fi
4954echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4955echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4956
4957fi
4958if test $ac_cv_header_sys_mkdev_h = yes; then
4959
4960cat >>confdefs.h <<\_ACEOF
4961#define MAJOR_IN_MKDEV 1
4962_ACEOF
4963
4964fi
4965
4966
4967
4968 if test $ac_cv_header_sys_mkdev_h = no; then
4969 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4970 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4971echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4972if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4973 echo $ECHO_N "(cached) $ECHO_C" >&6
4974fi
4975echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4976echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4977else
4978 # Is the header compilable?
4979echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4980echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4981cat >conftest.$ac_ext <<_ACEOF
4982#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004983/* confdefs.h. */
4984_ACEOF
4985cat confdefs.h >>conftest.$ac_ext
4986cat >>conftest.$ac_ext <<_ACEOF
4987/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004988$ac_includes_default
4989#include <sys/sysmacros.h>
4990_ACEOF
4991rm -f conftest.$ac_objext
4992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4993 (eval $ac_compile) 2>&5
4994 ac_status=$?
4995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4996 (exit $ac_status); } &&
4997 { ac_try='test -s conftest.$ac_objext'
4998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4999 (eval $ac_try) 2>&5
5000 ac_status=$?
5001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5002 (exit $ac_status); }; }; then
5003 ac_header_compiler=yes
5004else
5005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005006sed 's/^/| /' conftest.$ac_ext >&5
5007
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005008ac_header_compiler=no
5009fi
5010rm -f conftest.$ac_objext conftest.$ac_ext
5011echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5012echo "${ECHO_T}$ac_header_compiler" >&6
5013
5014# Is the header present?
5015echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5016echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5017cat >conftest.$ac_ext <<_ACEOF
5018#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005019/* confdefs.h. */
5020_ACEOF
5021cat confdefs.h >>conftest.$ac_ext
5022cat >>conftest.$ac_ext <<_ACEOF
5023/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005024#include <sys/sysmacros.h>
5025_ACEOF
5026if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5027 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5028 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005029 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005030 rm -f conftest.er1
5031 cat conftest.err >&5
5032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5033 (exit $ac_status); } >/dev/null; then
5034 if test -s conftest.err; then
5035 ac_cpp_err=$ac_c_preproc_warn_flag
5036 else
5037 ac_cpp_err=
5038 fi
5039else
5040 ac_cpp_err=yes
5041fi
5042if test -z "$ac_cpp_err"; then
5043 ac_header_preproc=yes
5044else
5045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005046sed 's/^/| /' conftest.$ac_ext >&5
5047
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005048 ac_header_preproc=no
5049fi
5050rm -f conftest.err conftest.$ac_ext
5051echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5052echo "${ECHO_T}$ac_header_preproc" >&6
5053
5054# So? What about this header?
5055case $ac_header_compiler:$ac_header_preproc in
5056 yes:no )
5057 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5058echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5059 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005060echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5061 (
5062 cat <<\_ASBOX
5063## ------------------------------------ ##
5064## Report this to bug-autoconf@gnu.org. ##
5065## ------------------------------------ ##
5066_ASBOX
5067 ) |
5068 sed "s/^/$as_me: WARNING: /" >&2
5069 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005070 no:yes )
5071 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5072echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5073 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5074echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5075 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005076echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5077 (
5078 cat <<\_ASBOX
5079## ------------------------------------ ##
5080## Report this to bug-autoconf@gnu.org. ##
5081## ------------------------------------ ##
5082_ASBOX
5083 ) |
5084 sed "s/^/$as_me: WARNING: /" >&2
5085 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005086esac
5087echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5088echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5089if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5090 echo $ECHO_N "(cached) $ECHO_C" >&6
5091else
5092 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5093fi
5094echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5095echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5096
5097fi
5098if test $ac_cv_header_sys_sysmacros_h = yes; then
5099
5100cat >>confdefs.h <<\_ACEOF
5101#define MAJOR_IN_SYSMACROS 1
5102_ACEOF
5103
5104fi
5105
5106
5107 fi
5108fi
5109
Michael W. Hudson54241132001-12-07 15:38:26 +00005110
Guido van Rossum627b2d71993-12-24 10:39:16 +00005111# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005112was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005113echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5114echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5115cat >conftest.$ac_ext <<_ACEOF
5116#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005117/* confdefs.h. */
5118_ACEOF
5119cat confdefs.h >>conftest.$ac_ext
5120cat >>conftest.$ac_ext <<_ACEOF
5121/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005122#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005123
5124_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005126 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005127 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005128else
Martin v. Löwis11437992002-04-12 09:54:03 +00005129
5130
5131cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005132#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005133_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005134
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005135
Guido van Rossum627b2d71993-12-24 10:39:16 +00005136fi
5137rm -f conftest*
5138
Martin v. Löwis11437992002-04-12 09:54:03 +00005139echo "$as_me:$LINENO: result: $was_it_defined" >&5
5140echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005141
Neal Norwitz11690112002-07-30 01:08:28 +00005142# Check whether using makedev requires defining _OSF_SOURCE
5143echo "$as_me:$LINENO: checking for makedev" >&5
5144echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5145cat >conftest.$ac_ext <<_ACEOF
5146#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005147/* confdefs.h. */
5148_ACEOF
5149cat confdefs.h >>conftest.$ac_ext
5150cat >>conftest.$ac_ext <<_ACEOF
5151/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005152#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005153int
5154main ()
5155{
5156 makedev(0, 0)
5157 ;
5158 return 0;
5159}
5160_ACEOF
5161rm -f conftest.$ac_objext conftest$ac_exeext
5162if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5163 (eval $ac_link) 2>&5
5164 ac_status=$?
5165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166 (exit $ac_status); } &&
5167 { ac_try='test -s conftest$ac_exeext'
5168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5169 (eval $ac_try) 2>&5
5170 ac_status=$?
5171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5172 (exit $ac_status); }; }; then
5173 ac_cv_has_makedev=yes
5174else
5175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005176sed 's/^/| /' conftest.$ac_ext >&5
5177
Neal Norwitz11690112002-07-30 01:08:28 +00005178ac_cv_has_makedev=no
5179fi
5180rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5181if test "$ac_cv_has_makedev" = "no"; then
5182 # we didn't link, try if _OSF_SOURCE will allow us to link
5183 cat >conftest.$ac_ext <<_ACEOF
5184#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005185/* confdefs.h. */
5186_ACEOF
5187cat confdefs.h >>conftest.$ac_ext
5188cat >>conftest.$ac_ext <<_ACEOF
5189/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005190
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005191#define _OSF_SOURCE 1
5192#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005193
Neal Norwitz11690112002-07-30 01:08:28 +00005194int
5195main ()
5196{
5197 makedev(0, 0)
5198 ;
5199 return 0;
5200}
5201_ACEOF
5202rm -f conftest.$ac_objext conftest$ac_exeext
5203if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5204 (eval $ac_link) 2>&5
5205 ac_status=$?
5206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5207 (exit $ac_status); } &&
5208 { ac_try='test -s conftest$ac_exeext'
5209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5210 (eval $ac_try) 2>&5
5211 ac_status=$?
5212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5213 (exit $ac_status); }; }; then
5214 ac_cv_has_makedev=yes
5215else
5216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005217sed 's/^/| /' conftest.$ac_ext >&5
5218
Neal Norwitz11690112002-07-30 01:08:28 +00005219ac_cv_has_makedev=no
5220fi
5221rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5222 if test "$ac_cv_has_makedev" = "yes"; then
5223
5224cat >>confdefs.h <<\_ACEOF
5225#define _OSF_SOURCE 1
5226_ACEOF
5227
5228 fi
5229fi
5230echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5231echo "${ECHO_T}$ac_cv_has_makedev" >&6
5232if test "$ac_cv_has_makedev" = "yes"; then
5233
5234cat >>confdefs.h <<\_ACEOF
5235#define HAVE_MAKEDEV 1
5236_ACEOF
5237
5238fi
5239
Martin v. Löwis399a6892002-10-04 10:22:02 +00005240# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5241# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5242# defined, but the compiler does not support pragma redefine_extname,
5243# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5244# structures (such as rlimit64) without declaring them. As a
5245# work-around, disable LFS on such configurations
5246
5247use_lfs=yes
5248echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5249echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5250cat >conftest.$ac_ext <<_ACEOF
5251#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005252/* confdefs.h. */
5253_ACEOF
5254cat confdefs.h >>conftest.$ac_ext
5255cat >>conftest.$ac_ext <<_ACEOF
5256/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005257
5258#define _LARGEFILE_SOURCE 1
5259#define _FILE_OFFSET_BITS 64
5260#include <sys/resource.h>
5261
Martin v. Löwis399a6892002-10-04 10:22:02 +00005262int
5263main ()
5264{
5265struct rlimit foo;
5266 ;
5267 return 0;
5268}
5269_ACEOF
5270rm -f conftest.$ac_objext
5271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5272 (eval $ac_compile) 2>&5
5273 ac_status=$?
5274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5275 (exit $ac_status); } &&
5276 { ac_try='test -s conftest.$ac_objext'
5277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5278 (eval $ac_try) 2>&5
5279 ac_status=$?
5280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5281 (exit $ac_status); }; }; then
5282 sol_lfs_bug=no
5283else
5284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005285sed 's/^/| /' conftest.$ac_ext >&5
5286
Martin v. Löwis399a6892002-10-04 10:22:02 +00005287sol_lfs_bug=yes
5288fi
5289rm -f conftest.$ac_objext conftest.$ac_ext
5290echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5291echo "${ECHO_T}$sol_lfs_bug" >&6
5292if test "$sol_lfs_bug" = "yes"; then
5293 use_lfs=no
5294fi
5295
5296if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005297# Two defines needed to enable largefile support on various platforms
5298# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005299
Martin v. Löwis11437992002-04-12 09:54:03 +00005300cat >>confdefs.h <<\_ACEOF
5301#define _LARGEFILE_SOURCE 1
5302_ACEOF
5303
5304
5305cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005306#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005307_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005308
Martin v. Löwis399a6892002-10-04 10:22:02 +00005309fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005310
Guido van Rossum84e7b241996-08-19 21:59:00 +00005311# Add some code to confdefs.h so that the test for off_t works on SCO
5312cat >> confdefs.h <<\EOF
5313#if defined(SCO_DS)
5314#undef _OFF_T
5315#endif
5316EOF
5317
Guido van Rossumef2255b2000-03-10 22:30:29 +00005318# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005319echo "$as_me:$LINENO: checking for mode_t" >&5
5320echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5321if test "${ac_cv_type_mode_t+set}" = set; then
5322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005323else
Martin v. Löwis11437992002-04-12 09:54:03 +00005324 cat >conftest.$ac_ext <<_ACEOF
5325#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005326/* confdefs.h. */
5327_ACEOF
5328cat confdefs.h >>conftest.$ac_ext
5329cat >>conftest.$ac_ext <<_ACEOF
5330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005331$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005332int
5333main ()
5334{
5335if ((mode_t *) 0)
5336 return 0;
5337if (sizeof (mode_t))
5338 return 0;
5339 ;
5340 return 0;
5341}
5342_ACEOF
5343rm -f conftest.$ac_objext
5344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5345 (eval $ac_compile) 2>&5
5346 ac_status=$?
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5348 (exit $ac_status); } &&
5349 { ac_try='test -s conftest.$ac_objext'
5350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5351 (eval $ac_try) 2>&5
5352 ac_status=$?
5353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5354 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005355 ac_cv_type_mode_t=yes
5356else
Martin v. Löwis11437992002-04-12 09:54:03 +00005357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005358sed 's/^/| /' conftest.$ac_ext >&5
5359
Martin v. Löwis11437992002-04-12 09:54:03 +00005360ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005361fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005362rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005364echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5365echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5366if test $ac_cv_type_mode_t = yes; then
5367 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005368else
Martin v. Löwis11437992002-04-12 09:54:03 +00005369
5370cat >>confdefs.h <<_ACEOF
5371#define mode_t int
5372_ACEOF
5373
5374fi
5375
5376echo "$as_me:$LINENO: checking for off_t" >&5
5377echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5378if test "${ac_cv_type_off_t+set}" = set; then
5379 echo $ECHO_N "(cached) $ECHO_C" >&6
5380else
5381 cat >conftest.$ac_ext <<_ACEOF
5382#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005383/* confdefs.h. */
5384_ACEOF
5385cat confdefs.h >>conftest.$ac_ext
5386cat >>conftest.$ac_ext <<_ACEOF
5387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005388$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005389int
5390main ()
5391{
5392if ((off_t *) 0)
5393 return 0;
5394if (sizeof (off_t))
5395 return 0;
5396 ;
5397 return 0;
5398}
5399_ACEOF
5400rm -f conftest.$ac_objext
5401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5402 (eval $ac_compile) 2>&5
5403 ac_status=$?
5404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405 (exit $ac_status); } &&
5406 { ac_try='test -s conftest.$ac_objext'
5407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5408 (eval $ac_try) 2>&5
5409 ac_status=$?
5410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5411 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005412 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005413else
Martin v. Löwis11437992002-04-12 09:54:03 +00005414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005415sed 's/^/| /' conftest.$ac_ext >&5
5416
Martin v. Löwis11437992002-04-12 09:54:03 +00005417ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005419rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005421echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5422echo "${ECHO_T}$ac_cv_type_off_t" >&6
5423if test $ac_cv_type_off_t = yes; then
5424 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005425else
Martin v. Löwis11437992002-04-12 09:54:03 +00005426
5427cat >>confdefs.h <<_ACEOF
5428#define off_t long
5429_ACEOF
5430
5431fi
5432
5433echo "$as_me:$LINENO: checking for pid_t" >&5
5434echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5435if test "${ac_cv_type_pid_t+set}" = set; then
5436 echo $ECHO_N "(cached) $ECHO_C" >&6
5437else
5438 cat >conftest.$ac_ext <<_ACEOF
5439#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005440/* confdefs.h. */
5441_ACEOF
5442cat confdefs.h >>conftest.$ac_ext
5443cat >>conftest.$ac_ext <<_ACEOF
5444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005445$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005446int
5447main ()
5448{
5449if ((pid_t *) 0)
5450 return 0;
5451if (sizeof (pid_t))
5452 return 0;
5453 ;
5454 return 0;
5455}
5456_ACEOF
5457rm -f conftest.$ac_objext
5458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5459 (eval $ac_compile) 2>&5
5460 ac_status=$?
5461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5462 (exit $ac_status); } &&
5463 { ac_try='test -s conftest.$ac_objext'
5464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5465 (eval $ac_try) 2>&5
5466 ac_status=$?
5467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5468 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005469 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005470else
Martin v. Löwis11437992002-04-12 09:54:03 +00005471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005472sed 's/^/| /' conftest.$ac_ext >&5
5473
Martin v. Löwis11437992002-04-12 09:54:03 +00005474ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005475fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005476rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005478echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5479echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5480if test $ac_cv_type_pid_t = yes; then
5481 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005482else
Martin v. Löwis11437992002-04-12 09:54:03 +00005483
5484cat >>confdefs.h <<_ACEOF
5485#define pid_t int
5486_ACEOF
5487
5488fi
5489
5490echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5491echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5492if test "${ac_cv_type_signal+set}" = set; then
5493 echo $ECHO_N "(cached) $ECHO_C" >&6
5494else
5495 cat >conftest.$ac_ext <<_ACEOF
5496#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005497/* confdefs.h. */
5498_ACEOF
5499cat confdefs.h >>conftest.$ac_ext
5500cat >>conftest.$ac_ext <<_ACEOF
5501/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005502#include <sys/types.h>
5503#include <signal.h>
5504#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005505# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005506#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005507#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005508extern "C" void (*signal (int, void (*)(int)))(int);
5509#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005510void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005511#endif
5512
Martin v. Löwis11437992002-04-12 09:54:03 +00005513int
5514main ()
5515{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005516int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005517 ;
5518 return 0;
5519}
5520_ACEOF
5521rm -f conftest.$ac_objext
5522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5523 (eval $ac_compile) 2>&5
5524 ac_status=$?
5525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5526 (exit $ac_status); } &&
5527 { ac_try='test -s conftest.$ac_objext'
5528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5529 (eval $ac_try) 2>&5
5530 ac_status=$?
5531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5532 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005533 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005534else
Martin v. Löwis11437992002-04-12 09:54:03 +00005535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005536sed 's/^/| /' conftest.$ac_ext >&5
5537
Martin v. Löwis11437992002-04-12 09:54:03 +00005538ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005539fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005540rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005542echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5543echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005544
Martin v. Löwis11437992002-04-12 09:54:03 +00005545cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005546#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005547_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005548
Michael W. Hudson54241132001-12-07 15:38:26 +00005549
Martin v. Löwis11437992002-04-12 09:54:03 +00005550echo "$as_me:$LINENO: checking for size_t" >&5
5551echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5552if test "${ac_cv_type_size_t+set}" = set; then
5553 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005554else
Martin v. Löwis11437992002-04-12 09:54:03 +00005555 cat >conftest.$ac_ext <<_ACEOF
5556#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005557/* confdefs.h. */
5558_ACEOF
5559cat confdefs.h >>conftest.$ac_ext
5560cat >>conftest.$ac_ext <<_ACEOF
5561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005562$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005563int
5564main ()
5565{
5566if ((size_t *) 0)
5567 return 0;
5568if (sizeof (size_t))
5569 return 0;
5570 ;
5571 return 0;
5572}
5573_ACEOF
5574rm -f conftest.$ac_objext
5575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5576 (eval $ac_compile) 2>&5
5577 ac_status=$?
5578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5579 (exit $ac_status); } &&
5580 { ac_try='test -s conftest.$ac_objext'
5581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5582 (eval $ac_try) 2>&5
5583 ac_status=$?
5584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5585 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005586 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005587else
Martin v. Löwis11437992002-04-12 09:54:03 +00005588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005589sed 's/^/| /' conftest.$ac_ext >&5
5590
Martin v. Löwis11437992002-04-12 09:54:03 +00005591ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005592fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005593rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005595echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5596echo "${ECHO_T}$ac_cv_type_size_t" >&6
5597if test $ac_cv_type_size_t = yes; then
5598 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005599else
Martin v. Löwis11437992002-04-12 09:54:03 +00005600
5601cat >>confdefs.h <<_ACEOF
5602#define size_t unsigned
5603_ACEOF
5604
5605fi
5606
5607echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5608echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5609if test "${ac_cv_type_uid_t+set}" = set; then
5610 echo $ECHO_N "(cached) $ECHO_C" >&6
5611else
5612 cat >conftest.$ac_ext <<_ACEOF
5613#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005614/* confdefs.h. */
5615_ACEOF
5616cat confdefs.h >>conftest.$ac_ext
5617cat >>conftest.$ac_ext <<_ACEOF
5618/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005619#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005620
5621_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005623 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005624 ac_cv_type_uid_t=yes
5625else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005626 ac_cv_type_uid_t=no
5627fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005628rm -f conftest*
5629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005630fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005631echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5632echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005633if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005634
Martin v. Löwis11437992002-04-12 09:54:03 +00005635cat >>confdefs.h <<\_ACEOF
5636#define uid_t int
5637_ACEOF
5638
5639
5640cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005641#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005642_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005643
5644fi
5645
Jack Jansendd19cf82001-12-06 22:36:17 +00005646
Michael W. Hudson54241132001-12-07 15:38:26 +00005647# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005648# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005649echo "$as_me:$LINENO: checking for int" >&5
5650echo $ECHO_N "checking for int... $ECHO_C" >&6
5651if test "${ac_cv_type_int+set}" = set; then
5652 echo $ECHO_N "(cached) $ECHO_C" >&6
5653else
5654 cat >conftest.$ac_ext <<_ACEOF
5655#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005656/* confdefs.h. */
5657_ACEOF
5658cat confdefs.h >>conftest.$ac_ext
5659cat >>conftest.$ac_ext <<_ACEOF
5660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005661$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005662int
5663main ()
5664{
5665if ((int *) 0)
5666 return 0;
5667if (sizeof (int))
5668 return 0;
5669 ;
5670 return 0;
5671}
5672_ACEOF
5673rm -f conftest.$ac_objext
5674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5675 (eval $ac_compile) 2>&5
5676 ac_status=$?
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678 (exit $ac_status); } &&
5679 { ac_try='test -s conftest.$ac_objext'
5680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5681 (eval $ac_try) 2>&5
5682 ac_status=$?
5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684 (exit $ac_status); }; }; then
5685 ac_cv_type_int=yes
5686else
5687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005688sed 's/^/| /' conftest.$ac_ext >&5
5689
Martin v. Löwis11437992002-04-12 09:54:03 +00005690ac_cv_type_int=no
5691fi
5692rm -f conftest.$ac_objext conftest.$ac_ext
5693fi
5694echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5695echo "${ECHO_T}$ac_cv_type_int" >&6
5696
5697echo "$as_me:$LINENO: checking size of int" >&5
5698echo $ECHO_N "checking size of int... $ECHO_C" >&6
5699if test "${ac_cv_sizeof_int+set}" = set; then
5700 echo $ECHO_N "(cached) $ECHO_C" >&6
5701else
5702 if test "$ac_cv_type_int" = yes; then
5703 # The cast to unsigned long works around a bug in the HP C Compiler
5704 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5705 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5706 # This bug is HP SR number 8606223364.
5707 if test "$cross_compiling" = yes; then
5708 # Depending upon the size, compute the lo and hi bounds.
5709cat >conftest.$ac_ext <<_ACEOF
5710#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005711/* confdefs.h. */
5712_ACEOF
5713cat confdefs.h >>conftest.$ac_ext
5714cat >>conftest.$ac_ext <<_ACEOF
5715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005716$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005717int
5718main ()
5719{
5720static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5721test_array [0] = 0
5722
5723 ;
5724 return 0;
5725}
5726_ACEOF
5727rm -f conftest.$ac_objext
5728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5729 (eval $ac_compile) 2>&5
5730 ac_status=$?
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); } &&
5733 { ac_try='test -s conftest.$ac_objext'
5734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5735 (eval $ac_try) 2>&5
5736 ac_status=$?
5737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5738 (exit $ac_status); }; }; then
5739 ac_lo=0 ac_mid=0
5740 while :; do
5741 cat >conftest.$ac_ext <<_ACEOF
5742#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005743/* confdefs.h. */
5744_ACEOF
5745cat confdefs.h >>conftest.$ac_ext
5746cat >>conftest.$ac_ext <<_ACEOF
5747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005748$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005749int
5750main ()
5751{
5752static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5753test_array [0] = 0
5754
5755 ;
5756 return 0;
5757}
5758_ACEOF
5759rm -f conftest.$ac_objext
5760if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5761 (eval $ac_compile) 2>&5
5762 ac_status=$?
5763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764 (exit $ac_status); } &&
5765 { ac_try='test -s conftest.$ac_objext'
5766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5767 (eval $ac_try) 2>&5
5768 ac_status=$?
5769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5770 (exit $ac_status); }; }; then
5771 ac_hi=$ac_mid; break
5772else
5773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005774sed 's/^/| /' conftest.$ac_ext >&5
5775
Martin v. Löwis11437992002-04-12 09:54:03 +00005776ac_lo=`expr $ac_mid + 1`
5777 if test $ac_lo -le $ac_mid; then
5778 ac_lo= ac_hi=
5779 break
5780 fi
5781 ac_mid=`expr 2 '*' $ac_mid + 1`
5782fi
5783rm -f conftest.$ac_objext conftest.$ac_ext
5784 done
5785else
5786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005787sed 's/^/| /' conftest.$ac_ext >&5
5788
Martin v. Löwis11437992002-04-12 09:54:03 +00005789cat >conftest.$ac_ext <<_ACEOF
5790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005791/* confdefs.h. */
5792_ACEOF
5793cat confdefs.h >>conftest.$ac_ext
5794cat >>conftest.$ac_ext <<_ACEOF
5795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005796$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005797int
5798main ()
5799{
5800static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5801test_array [0] = 0
5802
5803 ;
5804 return 0;
5805}
5806_ACEOF
5807rm -f conftest.$ac_objext
5808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5809 (eval $ac_compile) 2>&5
5810 ac_status=$?
5811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5812 (exit $ac_status); } &&
5813 { ac_try='test -s conftest.$ac_objext'
5814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5815 (eval $ac_try) 2>&5
5816 ac_status=$?
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); }; }; then
5819 ac_hi=-1 ac_mid=-1
5820 while :; do
5821 cat >conftest.$ac_ext <<_ACEOF
5822#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005823/* confdefs.h. */
5824_ACEOF
5825cat confdefs.h >>conftest.$ac_ext
5826cat >>conftest.$ac_ext <<_ACEOF
5827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005828$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005829int
5830main ()
5831{
5832static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5833test_array [0] = 0
5834
5835 ;
5836 return 0;
5837}
5838_ACEOF
5839rm -f conftest.$ac_objext
5840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5841 (eval $ac_compile) 2>&5
5842 ac_status=$?
5843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5844 (exit $ac_status); } &&
5845 { ac_try='test -s conftest.$ac_objext'
5846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5847 (eval $ac_try) 2>&5
5848 ac_status=$?
5849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5850 (exit $ac_status); }; }; then
5851 ac_lo=$ac_mid; break
5852else
5853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005854sed 's/^/| /' conftest.$ac_ext >&5
5855
Martin v. Löwis11437992002-04-12 09:54:03 +00005856ac_hi=`expr '(' $ac_mid ')' - 1`
5857 if test $ac_mid -le $ac_hi; then
5858 ac_lo= ac_hi=
5859 break
5860 fi
5861 ac_mid=`expr 2 '*' $ac_mid`
5862fi
5863rm -f conftest.$ac_objext conftest.$ac_ext
5864 done
5865else
5866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005867sed 's/^/| /' conftest.$ac_ext >&5
5868
Martin v. Löwis11437992002-04-12 09:54:03 +00005869ac_lo= ac_hi=
5870fi
5871rm -f conftest.$ac_objext conftest.$ac_ext
5872fi
5873rm -f conftest.$ac_objext conftest.$ac_ext
5874# Binary search between lo and hi bounds.
5875while test "x$ac_lo" != "x$ac_hi"; do
5876 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5877 cat >conftest.$ac_ext <<_ACEOF
5878#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005879/* confdefs.h. */
5880_ACEOF
5881cat confdefs.h >>conftest.$ac_ext
5882cat >>conftest.$ac_ext <<_ACEOF
5883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005884$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005885int
5886main ()
5887{
5888static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5889test_array [0] = 0
5890
5891 ;
5892 return 0;
5893}
5894_ACEOF
5895rm -f conftest.$ac_objext
5896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5897 (eval $ac_compile) 2>&5
5898 ac_status=$?
5899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5900 (exit $ac_status); } &&
5901 { ac_try='test -s conftest.$ac_objext'
5902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5903 (eval $ac_try) 2>&5
5904 ac_status=$?
5905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5906 (exit $ac_status); }; }; then
5907 ac_hi=$ac_mid
5908else
5909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005910sed 's/^/| /' conftest.$ac_ext >&5
5911
Martin v. Löwis11437992002-04-12 09:54:03 +00005912ac_lo=`expr '(' $ac_mid ')' + 1`
5913fi
5914rm -f conftest.$ac_objext conftest.$ac_ext
5915done
5916case $ac_lo in
5917?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005918'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5919See \`config.log' for more details." >&5
5920echo "$as_me: error: cannot compute sizeof (int), 77
5921See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005922 { (exit 1); exit 1; }; } ;;
5923esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005924else
5925 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005926 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5927See \`config.log' for more details." >&5
5928echo "$as_me: error: cannot run test program while cross compiling
5929See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005930 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005931else
Martin v. Löwis11437992002-04-12 09:54:03 +00005932 cat >conftest.$ac_ext <<_ACEOF
5933#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005934/* confdefs.h. */
5935_ACEOF
5936cat confdefs.h >>conftest.$ac_ext
5937cat >>conftest.$ac_ext <<_ACEOF
5938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005939$ac_includes_default
5940long longval () { return (long) (sizeof (int)); }
5941unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005942#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005943#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005944int
5945main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005946{
Martin v. Löwis11437992002-04-12 09:54:03 +00005947
5948 FILE *f = fopen ("conftest.val", "w");
5949 if (! f)
5950 exit (1);
5951 if (((long) (sizeof (int))) < 0)
5952 {
5953 long i = longval ();
5954 if (i != ((long) (sizeof (int))))
5955 exit (1);
5956 fprintf (f, "%ld\n", i);
5957 }
5958 else
5959 {
5960 unsigned long i = ulongval ();
5961 if (i != ((long) (sizeof (int))))
5962 exit (1);
5963 fprintf (f, "%lu\n", i);
5964 }
5965 exit (ferror (f) || fclose (f) != 0);
5966
5967 ;
5968 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005969}
Martin v. Löwis11437992002-04-12 09:54:03 +00005970_ACEOF
5971rm -f conftest$ac_exeext
5972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5973 (eval $ac_link) 2>&5
5974 ac_status=$?
5975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5976 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5978 (eval $ac_try) 2>&5
5979 ac_status=$?
5980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5981 (exit $ac_status); }; }; then
5982 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005983else
Martin v. Löwis11437992002-04-12 09:54:03 +00005984 echo "$as_me: program exited with status $ac_status" >&5
5985echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005986sed 's/^/| /' conftest.$ac_ext >&5
5987
Martin v. Löwis11437992002-04-12 09:54:03 +00005988( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00005989{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5990See \`config.log' for more details." >&5
5991echo "$as_me: error: cannot compute sizeof (int), 77
5992See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005993 { (exit 1); exit 1; }; }
5994fi
Skip Montanaro6dead952003-09-25 14:50:04 +00005995rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005996fi
5997fi
5998rm -f conftest.val
5999else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006000 ac_cv_sizeof_int=0
6001fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006003echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6004echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6005cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006006#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006007_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006008
6009
Martin v. Löwis11437992002-04-12 09:54:03 +00006010echo "$as_me:$LINENO: checking for long" >&5
6011echo $ECHO_N "checking for long... $ECHO_C" >&6
6012if test "${ac_cv_type_long+set}" = set; then
6013 echo $ECHO_N "(cached) $ECHO_C" >&6
6014else
6015 cat >conftest.$ac_ext <<_ACEOF
6016#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006017/* confdefs.h. */
6018_ACEOF
6019cat confdefs.h >>conftest.$ac_ext
6020cat >>conftest.$ac_ext <<_ACEOF
6021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006022$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006023int
6024main ()
6025{
6026if ((long *) 0)
6027 return 0;
6028if (sizeof (long))
6029 return 0;
6030 ;
6031 return 0;
6032}
6033_ACEOF
6034rm -f conftest.$ac_objext
6035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6036 (eval $ac_compile) 2>&5
6037 ac_status=$?
6038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6039 (exit $ac_status); } &&
6040 { ac_try='test -s conftest.$ac_objext'
6041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6042 (eval $ac_try) 2>&5
6043 ac_status=$?
6044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6045 (exit $ac_status); }; }; then
6046 ac_cv_type_long=yes
6047else
6048 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006049sed 's/^/| /' conftest.$ac_ext >&5
6050
Martin v. Löwis11437992002-04-12 09:54:03 +00006051ac_cv_type_long=no
6052fi
6053rm -f conftest.$ac_objext conftest.$ac_ext
6054fi
6055echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6056echo "${ECHO_T}$ac_cv_type_long" >&6
6057
6058echo "$as_me:$LINENO: checking size of long" >&5
6059echo $ECHO_N "checking size of long... $ECHO_C" >&6
6060if test "${ac_cv_sizeof_long+set}" = set; then
6061 echo $ECHO_N "(cached) $ECHO_C" >&6
6062else
6063 if test "$ac_cv_type_long" = yes; then
6064 # The cast to unsigned long works around a bug in the HP C Compiler
6065 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6066 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6067 # This bug is HP SR number 8606223364.
6068 if test "$cross_compiling" = yes; then
6069 # Depending upon the size, compute the lo and hi bounds.
6070cat >conftest.$ac_ext <<_ACEOF
6071#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006072/* confdefs.h. */
6073_ACEOF
6074cat confdefs.h >>conftest.$ac_ext
6075cat >>conftest.$ac_ext <<_ACEOF
6076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006077$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006078int
6079main ()
6080{
6081static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6082test_array [0] = 0
6083
6084 ;
6085 return 0;
6086}
6087_ACEOF
6088rm -f conftest.$ac_objext
6089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6090 (eval $ac_compile) 2>&5
6091 ac_status=$?
6092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093 (exit $ac_status); } &&
6094 { ac_try='test -s conftest.$ac_objext'
6095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6096 (eval $ac_try) 2>&5
6097 ac_status=$?
6098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099 (exit $ac_status); }; }; then
6100 ac_lo=0 ac_mid=0
6101 while :; do
6102 cat >conftest.$ac_ext <<_ACEOF
6103#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006104/* confdefs.h. */
6105_ACEOF
6106cat confdefs.h >>conftest.$ac_ext
6107cat >>conftest.$ac_ext <<_ACEOF
6108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006109$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006110int
6111main ()
6112{
6113static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6114test_array [0] = 0
6115
6116 ;
6117 return 0;
6118}
6119_ACEOF
6120rm -f conftest.$ac_objext
6121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6122 (eval $ac_compile) 2>&5
6123 ac_status=$?
6124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6125 (exit $ac_status); } &&
6126 { ac_try='test -s conftest.$ac_objext'
6127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6128 (eval $ac_try) 2>&5
6129 ac_status=$?
6130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6131 (exit $ac_status); }; }; then
6132 ac_hi=$ac_mid; break
6133else
6134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006135sed 's/^/| /' conftest.$ac_ext >&5
6136
Martin v. Löwis11437992002-04-12 09:54:03 +00006137ac_lo=`expr $ac_mid + 1`
6138 if test $ac_lo -le $ac_mid; then
6139 ac_lo= ac_hi=
6140 break
6141 fi
6142 ac_mid=`expr 2 '*' $ac_mid + 1`
6143fi
6144rm -f conftest.$ac_objext conftest.$ac_ext
6145 done
6146else
6147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006148sed 's/^/| /' conftest.$ac_ext >&5
6149
Martin v. Löwis11437992002-04-12 09:54:03 +00006150cat >conftest.$ac_ext <<_ACEOF
6151#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006152/* confdefs.h. */
6153_ACEOF
6154cat confdefs.h >>conftest.$ac_ext
6155cat >>conftest.$ac_ext <<_ACEOF
6156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006157$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006158int
6159main ()
6160{
6161static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6162test_array [0] = 0
6163
6164 ;
6165 return 0;
6166}
6167_ACEOF
6168rm -f conftest.$ac_objext
6169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6170 (eval $ac_compile) 2>&5
6171 ac_status=$?
6172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173 (exit $ac_status); } &&
6174 { ac_try='test -s conftest.$ac_objext'
6175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6176 (eval $ac_try) 2>&5
6177 ac_status=$?
6178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6179 (exit $ac_status); }; }; then
6180 ac_hi=-1 ac_mid=-1
6181 while :; do
6182 cat >conftest.$ac_ext <<_ACEOF
6183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006184/* confdefs.h. */
6185_ACEOF
6186cat confdefs.h >>conftest.$ac_ext
6187cat >>conftest.$ac_ext <<_ACEOF
6188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006189$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006190int
6191main ()
6192{
6193static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6194test_array [0] = 0
6195
6196 ;
6197 return 0;
6198}
6199_ACEOF
6200rm -f conftest.$ac_objext
6201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6202 (eval $ac_compile) 2>&5
6203 ac_status=$?
6204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6205 (exit $ac_status); } &&
6206 { ac_try='test -s conftest.$ac_objext'
6207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6208 (eval $ac_try) 2>&5
6209 ac_status=$?
6210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6211 (exit $ac_status); }; }; then
6212 ac_lo=$ac_mid; break
6213else
6214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006215sed 's/^/| /' conftest.$ac_ext >&5
6216
Martin v. Löwis11437992002-04-12 09:54:03 +00006217ac_hi=`expr '(' $ac_mid ')' - 1`
6218 if test $ac_mid -le $ac_hi; then
6219 ac_lo= ac_hi=
6220 break
6221 fi
6222 ac_mid=`expr 2 '*' $ac_mid`
6223fi
6224rm -f conftest.$ac_objext conftest.$ac_ext
6225 done
6226else
6227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006228sed 's/^/| /' conftest.$ac_ext >&5
6229
Martin v. Löwis11437992002-04-12 09:54:03 +00006230ac_lo= ac_hi=
6231fi
6232rm -f conftest.$ac_objext conftest.$ac_ext
6233fi
6234rm -f conftest.$ac_objext conftest.$ac_ext
6235# Binary search between lo and hi bounds.
6236while test "x$ac_lo" != "x$ac_hi"; do
6237 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6238 cat >conftest.$ac_ext <<_ACEOF
6239#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006240/* confdefs.h. */
6241_ACEOF
6242cat confdefs.h >>conftest.$ac_ext
6243cat >>conftest.$ac_ext <<_ACEOF
6244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006245$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006246int
6247main ()
6248{
6249static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6250test_array [0] = 0
6251
6252 ;
6253 return 0;
6254}
6255_ACEOF
6256rm -f conftest.$ac_objext
6257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6258 (eval $ac_compile) 2>&5
6259 ac_status=$?
6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); } &&
6262 { ac_try='test -s conftest.$ac_objext'
6263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6264 (eval $ac_try) 2>&5
6265 ac_status=$?
6266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6267 (exit $ac_status); }; }; then
6268 ac_hi=$ac_mid
6269else
6270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006271sed 's/^/| /' conftest.$ac_ext >&5
6272
Martin v. Löwis11437992002-04-12 09:54:03 +00006273ac_lo=`expr '(' $ac_mid ')' + 1`
6274fi
6275rm -f conftest.$ac_objext conftest.$ac_ext
6276done
6277case $ac_lo in
6278?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006279'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6280See \`config.log' for more details." >&5
6281echo "$as_me: error: cannot compute sizeof (long), 77
6282See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006283 { (exit 1); exit 1; }; } ;;
6284esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006285else
6286 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006287 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6288See \`config.log' for more details." >&5
6289echo "$as_me: error: cannot run test program while cross compiling
6290See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006291 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006292else
Martin v. Löwis11437992002-04-12 09:54:03 +00006293 cat >conftest.$ac_ext <<_ACEOF
6294#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006295/* confdefs.h. */
6296_ACEOF
6297cat confdefs.h >>conftest.$ac_ext
6298cat >>conftest.$ac_ext <<_ACEOF
6299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006300$ac_includes_default
6301long longval () { return (long) (sizeof (long)); }
6302unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006303#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006304#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006305int
6306main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006307{
Martin v. Löwis11437992002-04-12 09:54:03 +00006308
6309 FILE *f = fopen ("conftest.val", "w");
6310 if (! f)
6311 exit (1);
6312 if (((long) (sizeof (long))) < 0)
6313 {
6314 long i = longval ();
6315 if (i != ((long) (sizeof (long))))
6316 exit (1);
6317 fprintf (f, "%ld\n", i);
6318 }
6319 else
6320 {
6321 unsigned long i = ulongval ();
6322 if (i != ((long) (sizeof (long))))
6323 exit (1);
6324 fprintf (f, "%lu\n", i);
6325 }
6326 exit (ferror (f) || fclose (f) != 0);
6327
6328 ;
6329 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006330}
Martin v. Löwis11437992002-04-12 09:54:03 +00006331_ACEOF
6332rm -f conftest$ac_exeext
6333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6334 (eval $ac_link) 2>&5
6335 ac_status=$?
6336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6339 (eval $ac_try) 2>&5
6340 ac_status=$?
6341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6342 (exit $ac_status); }; }; then
6343 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006344else
Martin v. Löwis11437992002-04-12 09:54:03 +00006345 echo "$as_me: program exited with status $ac_status" >&5
6346echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006347sed 's/^/| /' conftest.$ac_ext >&5
6348
Martin v. Löwis11437992002-04-12 09:54:03 +00006349( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006350{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6351See \`config.log' for more details." >&5
6352echo "$as_me: error: cannot compute sizeof (long), 77
6353See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006354 { (exit 1); exit 1; }; }
6355fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006356rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006357fi
6358fi
6359rm -f conftest.val
6360else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006361 ac_cv_sizeof_long=0
6362fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006364echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6365echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6366cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006367#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006368_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006369
6370
Martin v. Löwis11437992002-04-12 09:54:03 +00006371echo "$as_me:$LINENO: checking for void *" >&5
6372echo $ECHO_N "checking for void *... $ECHO_C" >&6
6373if test "${ac_cv_type_void_p+set}" = set; then
6374 echo $ECHO_N "(cached) $ECHO_C" >&6
6375else
6376 cat >conftest.$ac_ext <<_ACEOF
6377#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006378/* confdefs.h. */
6379_ACEOF
6380cat confdefs.h >>conftest.$ac_ext
6381cat >>conftest.$ac_ext <<_ACEOF
6382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006383$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006384int
6385main ()
6386{
6387if ((void * *) 0)
6388 return 0;
6389if (sizeof (void *))
6390 return 0;
6391 ;
6392 return 0;
6393}
6394_ACEOF
6395rm -f conftest.$ac_objext
6396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6397 (eval $ac_compile) 2>&5
6398 ac_status=$?
6399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6400 (exit $ac_status); } &&
6401 { ac_try='test -s conftest.$ac_objext'
6402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6403 (eval $ac_try) 2>&5
6404 ac_status=$?
6405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6406 (exit $ac_status); }; }; then
6407 ac_cv_type_void_p=yes
6408else
6409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006410sed 's/^/| /' conftest.$ac_ext >&5
6411
Martin v. Löwis11437992002-04-12 09:54:03 +00006412ac_cv_type_void_p=no
6413fi
6414rm -f conftest.$ac_objext conftest.$ac_ext
6415fi
6416echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6417echo "${ECHO_T}$ac_cv_type_void_p" >&6
6418
6419echo "$as_me:$LINENO: checking size of void *" >&5
6420echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6421if test "${ac_cv_sizeof_void_p+set}" = set; then
6422 echo $ECHO_N "(cached) $ECHO_C" >&6
6423else
6424 if test "$ac_cv_type_void_p" = yes; then
6425 # The cast to unsigned long works around a bug in the HP C Compiler
6426 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6427 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6428 # This bug is HP SR number 8606223364.
6429 if test "$cross_compiling" = yes; then
6430 # Depending upon the size, compute the lo and hi bounds.
6431cat >conftest.$ac_ext <<_ACEOF
6432#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006433/* confdefs.h. */
6434_ACEOF
6435cat confdefs.h >>conftest.$ac_ext
6436cat >>conftest.$ac_ext <<_ACEOF
6437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006438$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006439int
6440main ()
6441{
6442static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6443test_array [0] = 0
6444
6445 ;
6446 return 0;
6447}
6448_ACEOF
6449rm -f conftest.$ac_objext
6450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6451 (eval $ac_compile) 2>&5
6452 ac_status=$?
6453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6454 (exit $ac_status); } &&
6455 { ac_try='test -s conftest.$ac_objext'
6456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6457 (eval $ac_try) 2>&5
6458 ac_status=$?
6459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6460 (exit $ac_status); }; }; then
6461 ac_lo=0 ac_mid=0
6462 while :; do
6463 cat >conftest.$ac_ext <<_ACEOF
6464#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006465/* confdefs.h. */
6466_ACEOF
6467cat confdefs.h >>conftest.$ac_ext
6468cat >>conftest.$ac_ext <<_ACEOF
6469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006470$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006471int
6472main ()
6473{
6474static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6475test_array [0] = 0
6476
6477 ;
6478 return 0;
6479}
6480_ACEOF
6481rm -f conftest.$ac_objext
6482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6483 (eval $ac_compile) 2>&5
6484 ac_status=$?
6485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6486 (exit $ac_status); } &&
6487 { ac_try='test -s conftest.$ac_objext'
6488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6489 (eval $ac_try) 2>&5
6490 ac_status=$?
6491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6492 (exit $ac_status); }; }; then
6493 ac_hi=$ac_mid; break
6494else
6495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006496sed 's/^/| /' conftest.$ac_ext >&5
6497
Martin v. Löwis11437992002-04-12 09:54:03 +00006498ac_lo=`expr $ac_mid + 1`
6499 if test $ac_lo -le $ac_mid; then
6500 ac_lo= ac_hi=
6501 break
6502 fi
6503 ac_mid=`expr 2 '*' $ac_mid + 1`
6504fi
6505rm -f conftest.$ac_objext conftest.$ac_ext
6506 done
6507else
6508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006509sed 's/^/| /' conftest.$ac_ext >&5
6510
Martin v. Löwis11437992002-04-12 09:54:03 +00006511cat >conftest.$ac_ext <<_ACEOF
6512#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006513/* confdefs.h. */
6514_ACEOF
6515cat confdefs.h >>conftest.$ac_ext
6516cat >>conftest.$ac_ext <<_ACEOF
6517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006518$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006519int
6520main ()
6521{
6522static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6523test_array [0] = 0
6524
6525 ;
6526 return 0;
6527}
6528_ACEOF
6529rm -f conftest.$ac_objext
6530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6531 (eval $ac_compile) 2>&5
6532 ac_status=$?
6533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6534 (exit $ac_status); } &&
6535 { ac_try='test -s conftest.$ac_objext'
6536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6537 (eval $ac_try) 2>&5
6538 ac_status=$?
6539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6540 (exit $ac_status); }; }; then
6541 ac_hi=-1 ac_mid=-1
6542 while :; do
6543 cat >conftest.$ac_ext <<_ACEOF
6544#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006545/* confdefs.h. */
6546_ACEOF
6547cat confdefs.h >>conftest.$ac_ext
6548cat >>conftest.$ac_ext <<_ACEOF
6549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006550$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006551int
6552main ()
6553{
6554static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6555test_array [0] = 0
6556
6557 ;
6558 return 0;
6559}
6560_ACEOF
6561rm -f conftest.$ac_objext
6562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6563 (eval $ac_compile) 2>&5
6564 ac_status=$?
6565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6566 (exit $ac_status); } &&
6567 { ac_try='test -s conftest.$ac_objext'
6568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6569 (eval $ac_try) 2>&5
6570 ac_status=$?
6571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6572 (exit $ac_status); }; }; then
6573 ac_lo=$ac_mid; break
6574else
6575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006576sed 's/^/| /' conftest.$ac_ext >&5
6577
Martin v. Löwis11437992002-04-12 09:54:03 +00006578ac_hi=`expr '(' $ac_mid ')' - 1`
6579 if test $ac_mid -le $ac_hi; then
6580 ac_lo= ac_hi=
6581 break
6582 fi
6583 ac_mid=`expr 2 '*' $ac_mid`
6584fi
6585rm -f conftest.$ac_objext conftest.$ac_ext
6586 done
6587else
6588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006589sed 's/^/| /' conftest.$ac_ext >&5
6590
Martin v. Löwis11437992002-04-12 09:54:03 +00006591ac_lo= ac_hi=
6592fi
6593rm -f conftest.$ac_objext conftest.$ac_ext
6594fi
6595rm -f conftest.$ac_objext conftest.$ac_ext
6596# Binary search between lo and hi bounds.
6597while test "x$ac_lo" != "x$ac_hi"; do
6598 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6599 cat >conftest.$ac_ext <<_ACEOF
6600#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006601/* confdefs.h. */
6602_ACEOF
6603cat confdefs.h >>conftest.$ac_ext
6604cat >>conftest.$ac_ext <<_ACEOF
6605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006606$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006607int
6608main ()
6609{
6610static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6611test_array [0] = 0
6612
6613 ;
6614 return 0;
6615}
6616_ACEOF
6617rm -f conftest.$ac_objext
6618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6619 (eval $ac_compile) 2>&5
6620 ac_status=$?
6621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6622 (exit $ac_status); } &&
6623 { ac_try='test -s conftest.$ac_objext'
6624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6625 (eval $ac_try) 2>&5
6626 ac_status=$?
6627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6628 (exit $ac_status); }; }; then
6629 ac_hi=$ac_mid
6630else
6631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006632sed 's/^/| /' conftest.$ac_ext >&5
6633
Martin v. Löwis11437992002-04-12 09:54:03 +00006634ac_lo=`expr '(' $ac_mid ')' + 1`
6635fi
6636rm -f conftest.$ac_objext conftest.$ac_ext
6637done
6638case $ac_lo in
6639?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006640'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6641See \`config.log' for more details." >&5
6642echo "$as_me: error: cannot compute sizeof (void *), 77
6643See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006644 { (exit 1); exit 1; }; } ;;
6645esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006646else
6647 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006648 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6649See \`config.log' for more details." >&5
6650echo "$as_me: error: cannot run test program while cross compiling
6651See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006652 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006653else
Martin v. Löwis11437992002-04-12 09:54:03 +00006654 cat >conftest.$ac_ext <<_ACEOF
6655#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006656/* confdefs.h. */
6657_ACEOF
6658cat confdefs.h >>conftest.$ac_ext
6659cat >>conftest.$ac_ext <<_ACEOF
6660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006661$ac_includes_default
6662long longval () { return (long) (sizeof (void *)); }
6663unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006664#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006665#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006666int
6667main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006668{
Martin v. Löwis11437992002-04-12 09:54:03 +00006669
6670 FILE *f = fopen ("conftest.val", "w");
6671 if (! f)
6672 exit (1);
6673 if (((long) (sizeof (void *))) < 0)
6674 {
6675 long i = longval ();
6676 if (i != ((long) (sizeof (void *))))
6677 exit (1);
6678 fprintf (f, "%ld\n", i);
6679 }
6680 else
6681 {
6682 unsigned long i = ulongval ();
6683 if (i != ((long) (sizeof (void *))))
6684 exit (1);
6685 fprintf (f, "%lu\n", i);
6686 }
6687 exit (ferror (f) || fclose (f) != 0);
6688
6689 ;
6690 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006691}
Martin v. Löwis11437992002-04-12 09:54:03 +00006692_ACEOF
6693rm -f conftest$ac_exeext
6694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6695 (eval $ac_link) 2>&5
6696 ac_status=$?
6697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6698 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6700 (eval $ac_try) 2>&5
6701 ac_status=$?
6702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6703 (exit $ac_status); }; }; then
6704 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006705else
Martin v. Löwis11437992002-04-12 09:54:03 +00006706 echo "$as_me: program exited with status $ac_status" >&5
6707echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006708sed 's/^/| /' conftest.$ac_ext >&5
6709
Martin v. Löwis11437992002-04-12 09:54:03 +00006710( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006711{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6712See \`config.log' for more details." >&5
6713echo "$as_me: error: cannot compute sizeof (void *), 77
6714See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 { (exit 1); exit 1; }; }
6716fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006717rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006718fi
6719fi
6720rm -f conftest.val
6721else
Guido van Rossumad678af1998-10-02 14:42:15 +00006722 ac_cv_sizeof_void_p=0
6723fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006724fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006725echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6726echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6727cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006728#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006729_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006730
6731
Martin v. Löwis11437992002-04-12 09:54:03 +00006732echo "$as_me:$LINENO: checking for short" >&5
6733echo $ECHO_N "checking for short... $ECHO_C" >&6
6734if test "${ac_cv_type_short+set}" = set; then
6735 echo $ECHO_N "(cached) $ECHO_C" >&6
6736else
6737 cat >conftest.$ac_ext <<_ACEOF
6738#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006739/* confdefs.h. */
6740_ACEOF
6741cat confdefs.h >>conftest.$ac_ext
6742cat >>conftest.$ac_ext <<_ACEOF
6743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006744$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006745int
6746main ()
6747{
6748if ((short *) 0)
6749 return 0;
6750if (sizeof (short))
6751 return 0;
6752 ;
6753 return 0;
6754}
6755_ACEOF
6756rm -f conftest.$ac_objext
6757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6758 (eval $ac_compile) 2>&5
6759 ac_status=$?
6760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761 (exit $ac_status); } &&
6762 { ac_try='test -s conftest.$ac_objext'
6763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6764 (eval $ac_try) 2>&5
6765 ac_status=$?
6766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6767 (exit $ac_status); }; }; then
6768 ac_cv_type_short=yes
6769else
6770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006771sed 's/^/| /' conftest.$ac_ext >&5
6772
Martin v. Löwis11437992002-04-12 09:54:03 +00006773ac_cv_type_short=no
6774fi
6775rm -f conftest.$ac_objext conftest.$ac_ext
6776fi
6777echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6778echo "${ECHO_T}$ac_cv_type_short" >&6
6779
6780echo "$as_me:$LINENO: checking size of short" >&5
6781echo $ECHO_N "checking size of short... $ECHO_C" >&6
6782if test "${ac_cv_sizeof_short+set}" = set; then
6783 echo $ECHO_N "(cached) $ECHO_C" >&6
6784else
6785 if test "$ac_cv_type_short" = yes; then
6786 # The cast to unsigned long works around a bug in the HP C Compiler
6787 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6788 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6789 # This bug is HP SR number 8606223364.
6790 if test "$cross_compiling" = yes; then
6791 # Depending upon the size, compute the lo and hi bounds.
6792cat >conftest.$ac_ext <<_ACEOF
6793#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006794/* confdefs.h. */
6795_ACEOF
6796cat confdefs.h >>conftest.$ac_ext
6797cat >>conftest.$ac_ext <<_ACEOF
6798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006799$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006800int
6801main ()
6802{
6803static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6804test_array [0] = 0
6805
6806 ;
6807 return 0;
6808}
6809_ACEOF
6810rm -f conftest.$ac_objext
6811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6812 (eval $ac_compile) 2>&5
6813 ac_status=$?
6814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6815 (exit $ac_status); } &&
6816 { ac_try='test -s conftest.$ac_objext'
6817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6818 (eval $ac_try) 2>&5
6819 ac_status=$?
6820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6821 (exit $ac_status); }; }; then
6822 ac_lo=0 ac_mid=0
6823 while :; do
6824 cat >conftest.$ac_ext <<_ACEOF
6825#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006826/* confdefs.h. */
6827_ACEOF
6828cat confdefs.h >>conftest.$ac_ext
6829cat >>conftest.$ac_ext <<_ACEOF
6830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006831$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006832int
6833main ()
6834{
6835static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6836test_array [0] = 0
6837
6838 ;
6839 return 0;
6840}
6841_ACEOF
6842rm -f conftest.$ac_objext
6843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6844 (eval $ac_compile) 2>&5
6845 ac_status=$?
6846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6847 (exit $ac_status); } &&
6848 { ac_try='test -s conftest.$ac_objext'
6849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6850 (eval $ac_try) 2>&5
6851 ac_status=$?
6852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6853 (exit $ac_status); }; }; then
6854 ac_hi=$ac_mid; break
6855else
6856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006857sed 's/^/| /' conftest.$ac_ext >&5
6858
Martin v. Löwis11437992002-04-12 09:54:03 +00006859ac_lo=`expr $ac_mid + 1`
6860 if test $ac_lo -le $ac_mid; then
6861 ac_lo= ac_hi=
6862 break
6863 fi
6864 ac_mid=`expr 2 '*' $ac_mid + 1`
6865fi
6866rm -f conftest.$ac_objext conftest.$ac_ext
6867 done
6868else
6869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006870sed 's/^/| /' conftest.$ac_ext >&5
6871
Martin v. Löwis11437992002-04-12 09:54:03 +00006872cat >conftest.$ac_ext <<_ACEOF
6873#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006874/* confdefs.h. */
6875_ACEOF
6876cat confdefs.h >>conftest.$ac_ext
6877cat >>conftest.$ac_ext <<_ACEOF
6878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006879$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006880int
6881main ()
6882{
6883static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6884test_array [0] = 0
6885
6886 ;
6887 return 0;
6888}
6889_ACEOF
6890rm -f conftest.$ac_objext
6891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6892 (eval $ac_compile) 2>&5
6893 ac_status=$?
6894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6895 (exit $ac_status); } &&
6896 { ac_try='test -s conftest.$ac_objext'
6897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6898 (eval $ac_try) 2>&5
6899 ac_status=$?
6900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6901 (exit $ac_status); }; }; then
6902 ac_hi=-1 ac_mid=-1
6903 while :; do
6904 cat >conftest.$ac_ext <<_ACEOF
6905#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006906/* confdefs.h. */
6907_ACEOF
6908cat confdefs.h >>conftest.$ac_ext
6909cat >>conftest.$ac_ext <<_ACEOF
6910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006911$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006912int
6913main ()
6914{
6915static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6916test_array [0] = 0
6917
6918 ;
6919 return 0;
6920}
6921_ACEOF
6922rm -f conftest.$ac_objext
6923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6924 (eval $ac_compile) 2>&5
6925 ac_status=$?
6926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6927 (exit $ac_status); } &&
6928 { ac_try='test -s conftest.$ac_objext'
6929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6930 (eval $ac_try) 2>&5
6931 ac_status=$?
6932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6933 (exit $ac_status); }; }; then
6934 ac_lo=$ac_mid; break
6935else
6936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006937sed 's/^/| /' conftest.$ac_ext >&5
6938
Martin v. Löwis11437992002-04-12 09:54:03 +00006939ac_hi=`expr '(' $ac_mid ')' - 1`
6940 if test $ac_mid -le $ac_hi; then
6941 ac_lo= ac_hi=
6942 break
6943 fi
6944 ac_mid=`expr 2 '*' $ac_mid`
6945fi
6946rm -f conftest.$ac_objext conftest.$ac_ext
6947 done
6948else
6949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006950sed 's/^/| /' conftest.$ac_ext >&5
6951
Martin v. Löwis11437992002-04-12 09:54:03 +00006952ac_lo= ac_hi=
6953fi
6954rm -f conftest.$ac_objext conftest.$ac_ext
6955fi
6956rm -f conftest.$ac_objext conftest.$ac_ext
6957# Binary search between lo and hi bounds.
6958while test "x$ac_lo" != "x$ac_hi"; do
6959 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6960 cat >conftest.$ac_ext <<_ACEOF
6961#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006962/* confdefs.h. */
6963_ACEOF
6964cat confdefs.h >>conftest.$ac_ext
6965cat >>conftest.$ac_ext <<_ACEOF
6966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006967$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006968int
6969main ()
6970{
6971static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6972test_array [0] = 0
6973
6974 ;
6975 return 0;
6976}
6977_ACEOF
6978rm -f conftest.$ac_objext
6979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6980 (eval $ac_compile) 2>&5
6981 ac_status=$?
6982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6983 (exit $ac_status); } &&
6984 { ac_try='test -s conftest.$ac_objext'
6985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6986 (eval $ac_try) 2>&5
6987 ac_status=$?
6988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6989 (exit $ac_status); }; }; then
6990 ac_hi=$ac_mid
6991else
6992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006993sed 's/^/| /' conftest.$ac_ext >&5
6994
Martin v. Löwis11437992002-04-12 09:54:03 +00006995ac_lo=`expr '(' $ac_mid ')' + 1`
6996fi
6997rm -f conftest.$ac_objext conftest.$ac_ext
6998done
6999case $ac_lo in
7000?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007001'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7002See \`config.log' for more details." >&5
7003echo "$as_me: error: cannot compute sizeof (short), 77
7004See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007005 { (exit 1); exit 1; }; } ;;
7006esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007007else
7008 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007009 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7010See \`config.log' for more details." >&5
7011echo "$as_me: error: cannot run test program while cross compiling
7012See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007013 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007014else
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 cat >conftest.$ac_ext <<_ACEOF
7016#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007017/* confdefs.h. */
7018_ACEOF
7019cat confdefs.h >>conftest.$ac_ext
7020cat >>conftest.$ac_ext <<_ACEOF
7021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007022$ac_includes_default
7023long longval () { return (long) (sizeof (short)); }
7024unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007025#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007026#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007027int
7028main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007029{
Martin v. Löwis11437992002-04-12 09:54:03 +00007030
7031 FILE *f = fopen ("conftest.val", "w");
7032 if (! f)
7033 exit (1);
7034 if (((long) (sizeof (short))) < 0)
7035 {
7036 long i = longval ();
7037 if (i != ((long) (sizeof (short))))
7038 exit (1);
7039 fprintf (f, "%ld\n", i);
7040 }
7041 else
7042 {
7043 unsigned long i = ulongval ();
7044 if (i != ((long) (sizeof (short))))
7045 exit (1);
7046 fprintf (f, "%lu\n", i);
7047 }
7048 exit (ferror (f) || fclose (f) != 0);
7049
7050 ;
7051 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007052}
Martin v. Löwis11437992002-04-12 09:54:03 +00007053_ACEOF
7054rm -f conftest$ac_exeext
7055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7056 (eval $ac_link) 2>&5
7057 ac_status=$?
7058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7059 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7061 (eval $ac_try) 2>&5
7062 ac_status=$?
7063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7064 (exit $ac_status); }; }; then
7065 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007066else
Martin v. Löwis11437992002-04-12 09:54:03 +00007067 echo "$as_me: program exited with status $ac_status" >&5
7068echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007069sed 's/^/| /' conftest.$ac_ext >&5
7070
Martin v. Löwis11437992002-04-12 09:54:03 +00007071( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007072{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7073See \`config.log' for more details." >&5
7074echo "$as_me: error: cannot compute sizeof (short), 77
7075See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007076 { (exit 1); exit 1; }; }
7077fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007078rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007079fi
7080fi
7081rm -f conftest.val
7082else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007083 ac_cv_sizeof_short=0
7084fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007085fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007086echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7087echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7088cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007089#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007090_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007091
7092
Martin v. Löwis11437992002-04-12 09:54:03 +00007093echo "$as_me:$LINENO: checking for float" >&5
7094echo $ECHO_N "checking for float... $ECHO_C" >&6
7095if test "${ac_cv_type_float+set}" = set; then
7096 echo $ECHO_N "(cached) $ECHO_C" >&6
7097else
7098 cat >conftest.$ac_ext <<_ACEOF
7099#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007100/* confdefs.h. */
7101_ACEOF
7102cat confdefs.h >>conftest.$ac_ext
7103cat >>conftest.$ac_ext <<_ACEOF
7104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007105$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007106int
7107main ()
7108{
7109if ((float *) 0)
7110 return 0;
7111if (sizeof (float))
7112 return 0;
7113 ;
7114 return 0;
7115}
7116_ACEOF
7117rm -f conftest.$ac_objext
7118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7119 (eval $ac_compile) 2>&5
7120 ac_status=$?
7121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7122 (exit $ac_status); } &&
7123 { ac_try='test -s conftest.$ac_objext'
7124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7125 (eval $ac_try) 2>&5
7126 ac_status=$?
7127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7128 (exit $ac_status); }; }; then
7129 ac_cv_type_float=yes
7130else
7131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007132sed 's/^/| /' conftest.$ac_ext >&5
7133
Martin v. Löwis11437992002-04-12 09:54:03 +00007134ac_cv_type_float=no
7135fi
7136rm -f conftest.$ac_objext conftest.$ac_ext
7137fi
7138echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7139echo "${ECHO_T}$ac_cv_type_float" >&6
7140
7141echo "$as_me:$LINENO: checking size of float" >&5
7142echo $ECHO_N "checking size of float... $ECHO_C" >&6
7143if test "${ac_cv_sizeof_float+set}" = set; then
7144 echo $ECHO_N "(cached) $ECHO_C" >&6
7145else
7146 if test "$ac_cv_type_float" = yes; then
7147 # The cast to unsigned long works around a bug in the HP C Compiler
7148 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7149 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7150 # This bug is HP SR number 8606223364.
7151 if test "$cross_compiling" = yes; then
7152 # Depending upon the size, compute the lo and hi bounds.
7153cat >conftest.$ac_ext <<_ACEOF
7154#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007155/* confdefs.h. */
7156_ACEOF
7157cat confdefs.h >>conftest.$ac_ext
7158cat >>conftest.$ac_ext <<_ACEOF
7159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007160$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007161int
7162main ()
7163{
7164static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7165test_array [0] = 0
7166
7167 ;
7168 return 0;
7169}
7170_ACEOF
7171rm -f conftest.$ac_objext
7172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7173 (eval $ac_compile) 2>&5
7174 ac_status=$?
7175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7176 (exit $ac_status); } &&
7177 { ac_try='test -s conftest.$ac_objext'
7178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7179 (eval $ac_try) 2>&5
7180 ac_status=$?
7181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7182 (exit $ac_status); }; }; then
7183 ac_lo=0 ac_mid=0
7184 while :; do
7185 cat >conftest.$ac_ext <<_ACEOF
7186#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007187/* confdefs.h. */
7188_ACEOF
7189cat confdefs.h >>conftest.$ac_ext
7190cat >>conftest.$ac_ext <<_ACEOF
7191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007192$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007193int
7194main ()
7195{
7196static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7197test_array [0] = 0
7198
7199 ;
7200 return 0;
7201}
7202_ACEOF
7203rm -f conftest.$ac_objext
7204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7205 (eval $ac_compile) 2>&5
7206 ac_status=$?
7207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7208 (exit $ac_status); } &&
7209 { ac_try='test -s conftest.$ac_objext'
7210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7211 (eval $ac_try) 2>&5
7212 ac_status=$?
7213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7214 (exit $ac_status); }; }; then
7215 ac_hi=$ac_mid; break
7216else
7217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007218sed 's/^/| /' conftest.$ac_ext >&5
7219
Martin v. Löwis11437992002-04-12 09:54:03 +00007220ac_lo=`expr $ac_mid + 1`
7221 if test $ac_lo -le $ac_mid; then
7222 ac_lo= ac_hi=
7223 break
7224 fi
7225 ac_mid=`expr 2 '*' $ac_mid + 1`
7226fi
7227rm -f conftest.$ac_objext conftest.$ac_ext
7228 done
7229else
7230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007231sed 's/^/| /' conftest.$ac_ext >&5
7232
Martin v. Löwis11437992002-04-12 09:54:03 +00007233cat >conftest.$ac_ext <<_ACEOF
7234#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007235/* confdefs.h. */
7236_ACEOF
7237cat confdefs.h >>conftest.$ac_ext
7238cat >>conftest.$ac_ext <<_ACEOF
7239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007240$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007241int
7242main ()
7243{
7244static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7245test_array [0] = 0
7246
7247 ;
7248 return 0;
7249}
7250_ACEOF
7251rm -f conftest.$ac_objext
7252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7253 (eval $ac_compile) 2>&5
7254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); } &&
7257 { ac_try='test -s conftest.$ac_objext'
7258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7259 (eval $ac_try) 2>&5
7260 ac_status=$?
7261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7262 (exit $ac_status); }; }; then
7263 ac_hi=-1 ac_mid=-1
7264 while :; do
7265 cat >conftest.$ac_ext <<_ACEOF
7266#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007267/* confdefs.h. */
7268_ACEOF
7269cat confdefs.h >>conftest.$ac_ext
7270cat >>conftest.$ac_ext <<_ACEOF
7271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007272$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007273int
7274main ()
7275{
7276static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7277test_array [0] = 0
7278
7279 ;
7280 return 0;
7281}
7282_ACEOF
7283rm -f conftest.$ac_objext
7284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7285 (eval $ac_compile) 2>&5
7286 ac_status=$?
7287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7288 (exit $ac_status); } &&
7289 { ac_try='test -s conftest.$ac_objext'
7290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7291 (eval $ac_try) 2>&5
7292 ac_status=$?
7293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7294 (exit $ac_status); }; }; then
7295 ac_lo=$ac_mid; break
7296else
7297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007298sed 's/^/| /' conftest.$ac_ext >&5
7299
Martin v. Löwis11437992002-04-12 09:54:03 +00007300ac_hi=`expr '(' $ac_mid ')' - 1`
7301 if test $ac_mid -le $ac_hi; then
7302 ac_lo= ac_hi=
7303 break
7304 fi
7305 ac_mid=`expr 2 '*' $ac_mid`
7306fi
7307rm -f conftest.$ac_objext conftest.$ac_ext
7308 done
7309else
7310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007311sed 's/^/| /' conftest.$ac_ext >&5
7312
Martin v. Löwis11437992002-04-12 09:54:03 +00007313ac_lo= ac_hi=
7314fi
7315rm -f conftest.$ac_objext conftest.$ac_ext
7316fi
7317rm -f conftest.$ac_objext conftest.$ac_ext
7318# Binary search between lo and hi bounds.
7319while test "x$ac_lo" != "x$ac_hi"; do
7320 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7321 cat >conftest.$ac_ext <<_ACEOF
7322#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007323/* confdefs.h. */
7324_ACEOF
7325cat confdefs.h >>conftest.$ac_ext
7326cat >>conftest.$ac_ext <<_ACEOF
7327/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007328$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007329int
7330main ()
7331{
7332static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7333test_array [0] = 0
7334
7335 ;
7336 return 0;
7337}
7338_ACEOF
7339rm -f conftest.$ac_objext
7340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7341 (eval $ac_compile) 2>&5
7342 ac_status=$?
7343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7344 (exit $ac_status); } &&
7345 { ac_try='test -s conftest.$ac_objext'
7346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7347 (eval $ac_try) 2>&5
7348 ac_status=$?
7349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7350 (exit $ac_status); }; }; then
7351 ac_hi=$ac_mid
7352else
7353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007354sed 's/^/| /' conftest.$ac_ext >&5
7355
Martin v. Löwis11437992002-04-12 09:54:03 +00007356ac_lo=`expr '(' $ac_mid ')' + 1`
7357fi
7358rm -f conftest.$ac_objext conftest.$ac_ext
7359done
7360case $ac_lo in
7361?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007362'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7363See \`config.log' for more details." >&5
7364echo "$as_me: error: cannot compute sizeof (float), 77
7365See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007366 { (exit 1); exit 1; }; } ;;
7367esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007368else
7369 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007370 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7371See \`config.log' for more details." >&5
7372echo "$as_me: error: cannot run test program while cross compiling
7373See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007374 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007375else
Martin v. Löwis11437992002-04-12 09:54:03 +00007376 cat >conftest.$ac_ext <<_ACEOF
7377#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007378/* confdefs.h. */
7379_ACEOF
7380cat confdefs.h >>conftest.$ac_ext
7381cat >>conftest.$ac_ext <<_ACEOF
7382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007383$ac_includes_default
7384long longval () { return (long) (sizeof (float)); }
7385unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007386#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007387#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007388int
7389main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007390{
Martin v. Löwis11437992002-04-12 09:54:03 +00007391
7392 FILE *f = fopen ("conftest.val", "w");
7393 if (! f)
7394 exit (1);
7395 if (((long) (sizeof (float))) < 0)
7396 {
7397 long i = longval ();
7398 if (i != ((long) (sizeof (float))))
7399 exit (1);
7400 fprintf (f, "%ld\n", i);
7401 }
7402 else
7403 {
7404 unsigned long i = ulongval ();
7405 if (i != ((long) (sizeof (float))))
7406 exit (1);
7407 fprintf (f, "%lu\n", i);
7408 }
7409 exit (ferror (f) || fclose (f) != 0);
7410
7411 ;
7412 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007413}
Martin v. Löwis11437992002-04-12 09:54:03 +00007414_ACEOF
7415rm -f conftest$ac_exeext
7416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7417 (eval $ac_link) 2>&5
7418 ac_status=$?
7419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7420 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7422 (eval $ac_try) 2>&5
7423 ac_status=$?
7424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7425 (exit $ac_status); }; }; then
7426 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007427else
Martin v. Löwis11437992002-04-12 09:54:03 +00007428 echo "$as_me: program exited with status $ac_status" >&5
7429echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007430sed 's/^/| /' conftest.$ac_ext >&5
7431
Martin v. Löwis11437992002-04-12 09:54:03 +00007432( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007433{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7434See \`config.log' for more details." >&5
7435echo "$as_me: error: cannot compute sizeof (float), 77
7436See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007437 { (exit 1); exit 1; }; }
7438fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007439rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007440fi
7441fi
7442rm -f conftest.val
7443else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007444 ac_cv_sizeof_float=0
7445fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007446fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007447echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7448echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7449cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007450#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007451_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007452
7453
Martin v. Löwis11437992002-04-12 09:54:03 +00007454echo "$as_me:$LINENO: checking for double" >&5
7455echo $ECHO_N "checking for double... $ECHO_C" >&6
7456if test "${ac_cv_type_double+set}" = set; then
7457 echo $ECHO_N "(cached) $ECHO_C" >&6
7458else
7459 cat >conftest.$ac_ext <<_ACEOF
7460#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007461/* confdefs.h. */
7462_ACEOF
7463cat confdefs.h >>conftest.$ac_ext
7464cat >>conftest.$ac_ext <<_ACEOF
7465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007466$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007467int
7468main ()
7469{
7470if ((double *) 0)
7471 return 0;
7472if (sizeof (double))
7473 return 0;
7474 ;
7475 return 0;
7476}
7477_ACEOF
7478rm -f conftest.$ac_objext
7479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7480 (eval $ac_compile) 2>&5
7481 ac_status=$?
7482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483 (exit $ac_status); } &&
7484 { ac_try='test -s conftest.$ac_objext'
7485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7486 (eval $ac_try) 2>&5
7487 ac_status=$?
7488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7489 (exit $ac_status); }; }; then
7490 ac_cv_type_double=yes
7491else
7492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007493sed 's/^/| /' conftest.$ac_ext >&5
7494
Martin v. Löwis11437992002-04-12 09:54:03 +00007495ac_cv_type_double=no
7496fi
7497rm -f conftest.$ac_objext conftest.$ac_ext
7498fi
7499echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7500echo "${ECHO_T}$ac_cv_type_double" >&6
7501
7502echo "$as_me:$LINENO: checking size of double" >&5
7503echo $ECHO_N "checking size of double... $ECHO_C" >&6
7504if test "${ac_cv_sizeof_double+set}" = set; then
7505 echo $ECHO_N "(cached) $ECHO_C" >&6
7506else
7507 if test "$ac_cv_type_double" = yes; then
7508 # The cast to unsigned long works around a bug in the HP C Compiler
7509 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7510 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7511 # This bug is HP SR number 8606223364.
7512 if test "$cross_compiling" = yes; then
7513 # Depending upon the size, compute the lo and hi bounds.
7514cat >conftest.$ac_ext <<_ACEOF
7515#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007516/* confdefs.h. */
7517_ACEOF
7518cat confdefs.h >>conftest.$ac_ext
7519cat >>conftest.$ac_ext <<_ACEOF
7520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007521$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007522int
7523main ()
7524{
7525static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7526test_array [0] = 0
7527
7528 ;
7529 return 0;
7530}
7531_ACEOF
7532rm -f conftest.$ac_objext
7533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7534 (eval $ac_compile) 2>&5
7535 ac_status=$?
7536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7537 (exit $ac_status); } &&
7538 { ac_try='test -s conftest.$ac_objext'
7539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7540 (eval $ac_try) 2>&5
7541 ac_status=$?
7542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543 (exit $ac_status); }; }; then
7544 ac_lo=0 ac_mid=0
7545 while :; do
7546 cat >conftest.$ac_ext <<_ACEOF
7547#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007548/* confdefs.h. */
7549_ACEOF
7550cat confdefs.h >>conftest.$ac_ext
7551cat >>conftest.$ac_ext <<_ACEOF
7552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007553$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007554int
7555main ()
7556{
7557static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7558test_array [0] = 0
7559
7560 ;
7561 return 0;
7562}
7563_ACEOF
7564rm -f conftest.$ac_objext
7565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7566 (eval $ac_compile) 2>&5
7567 ac_status=$?
7568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7569 (exit $ac_status); } &&
7570 { ac_try='test -s conftest.$ac_objext'
7571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7572 (eval $ac_try) 2>&5
7573 ac_status=$?
7574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7575 (exit $ac_status); }; }; then
7576 ac_hi=$ac_mid; break
7577else
7578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007579sed 's/^/| /' conftest.$ac_ext >&5
7580
Martin v. Löwis11437992002-04-12 09:54:03 +00007581ac_lo=`expr $ac_mid + 1`
7582 if test $ac_lo -le $ac_mid; then
7583 ac_lo= ac_hi=
7584 break
7585 fi
7586 ac_mid=`expr 2 '*' $ac_mid + 1`
7587fi
7588rm -f conftest.$ac_objext conftest.$ac_ext
7589 done
7590else
7591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007592sed 's/^/| /' conftest.$ac_ext >&5
7593
Martin v. Löwis11437992002-04-12 09:54:03 +00007594cat >conftest.$ac_ext <<_ACEOF
7595#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007596/* confdefs.h. */
7597_ACEOF
7598cat confdefs.h >>conftest.$ac_ext
7599cat >>conftest.$ac_ext <<_ACEOF
7600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007601$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007602int
7603main ()
7604{
7605static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7606test_array [0] = 0
7607
7608 ;
7609 return 0;
7610}
7611_ACEOF
7612rm -f conftest.$ac_objext
7613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7614 (eval $ac_compile) 2>&5
7615 ac_status=$?
7616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617 (exit $ac_status); } &&
7618 { ac_try='test -s conftest.$ac_objext'
7619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7620 (eval $ac_try) 2>&5
7621 ac_status=$?
7622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7623 (exit $ac_status); }; }; then
7624 ac_hi=-1 ac_mid=-1
7625 while :; do
7626 cat >conftest.$ac_ext <<_ACEOF
7627#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007628/* confdefs.h. */
7629_ACEOF
7630cat confdefs.h >>conftest.$ac_ext
7631cat >>conftest.$ac_ext <<_ACEOF
7632/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007633$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007634int
7635main ()
7636{
7637static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7638test_array [0] = 0
7639
7640 ;
7641 return 0;
7642}
7643_ACEOF
7644rm -f conftest.$ac_objext
7645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7646 (eval $ac_compile) 2>&5
7647 ac_status=$?
7648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7649 (exit $ac_status); } &&
7650 { ac_try='test -s conftest.$ac_objext'
7651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7652 (eval $ac_try) 2>&5
7653 ac_status=$?
7654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7655 (exit $ac_status); }; }; then
7656 ac_lo=$ac_mid; break
7657else
7658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007659sed 's/^/| /' conftest.$ac_ext >&5
7660
Martin v. Löwis11437992002-04-12 09:54:03 +00007661ac_hi=`expr '(' $ac_mid ')' - 1`
7662 if test $ac_mid -le $ac_hi; then
7663 ac_lo= ac_hi=
7664 break
7665 fi
7666 ac_mid=`expr 2 '*' $ac_mid`
7667fi
7668rm -f conftest.$ac_objext conftest.$ac_ext
7669 done
7670else
7671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007672sed 's/^/| /' conftest.$ac_ext >&5
7673
Martin v. Löwis11437992002-04-12 09:54:03 +00007674ac_lo= ac_hi=
7675fi
7676rm -f conftest.$ac_objext conftest.$ac_ext
7677fi
7678rm -f conftest.$ac_objext conftest.$ac_ext
7679# Binary search between lo and hi bounds.
7680while test "x$ac_lo" != "x$ac_hi"; do
7681 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7682 cat >conftest.$ac_ext <<_ACEOF
7683#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007684/* confdefs.h. */
7685_ACEOF
7686cat confdefs.h >>conftest.$ac_ext
7687cat >>conftest.$ac_ext <<_ACEOF
7688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007689$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007690int
7691main ()
7692{
7693static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7694test_array [0] = 0
7695
7696 ;
7697 return 0;
7698}
7699_ACEOF
7700rm -f conftest.$ac_objext
7701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7702 (eval $ac_compile) 2>&5
7703 ac_status=$?
7704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7705 (exit $ac_status); } &&
7706 { ac_try='test -s conftest.$ac_objext'
7707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7708 (eval $ac_try) 2>&5
7709 ac_status=$?
7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711 (exit $ac_status); }; }; then
7712 ac_hi=$ac_mid
7713else
7714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007715sed 's/^/| /' conftest.$ac_ext >&5
7716
Martin v. Löwis11437992002-04-12 09:54:03 +00007717ac_lo=`expr '(' $ac_mid ')' + 1`
7718fi
7719rm -f conftest.$ac_objext conftest.$ac_ext
7720done
7721case $ac_lo in
7722?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007723'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7724See \`config.log' for more details." >&5
7725echo "$as_me: error: cannot compute sizeof (double), 77
7726See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 { (exit 1); exit 1; }; } ;;
7728esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007729else
7730 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007731 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7732See \`config.log' for more details." >&5
7733echo "$as_me: error: cannot run test program while cross compiling
7734See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007735 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007736else
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 cat >conftest.$ac_ext <<_ACEOF
7738#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007739/* confdefs.h. */
7740_ACEOF
7741cat confdefs.h >>conftest.$ac_ext
7742cat >>conftest.$ac_ext <<_ACEOF
7743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007744$ac_includes_default
7745long longval () { return (long) (sizeof (double)); }
7746unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007747#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007748#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007749int
7750main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007751{
Martin v. Löwis11437992002-04-12 09:54:03 +00007752
7753 FILE *f = fopen ("conftest.val", "w");
7754 if (! f)
7755 exit (1);
7756 if (((long) (sizeof (double))) < 0)
7757 {
7758 long i = longval ();
7759 if (i != ((long) (sizeof (double))))
7760 exit (1);
7761 fprintf (f, "%ld\n", i);
7762 }
7763 else
7764 {
7765 unsigned long i = ulongval ();
7766 if (i != ((long) (sizeof (double))))
7767 exit (1);
7768 fprintf (f, "%lu\n", i);
7769 }
7770 exit (ferror (f) || fclose (f) != 0);
7771
7772 ;
7773 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007774}
Martin v. Löwis11437992002-04-12 09:54:03 +00007775_ACEOF
7776rm -f conftest$ac_exeext
7777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7778 (eval $ac_link) 2>&5
7779 ac_status=$?
7780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7781 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7783 (eval $ac_try) 2>&5
7784 ac_status=$?
7785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7786 (exit $ac_status); }; }; then
7787 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007788else
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 echo "$as_me: program exited with status $ac_status" >&5
7790echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007791sed 's/^/| /' conftest.$ac_ext >&5
7792
Martin v. Löwis11437992002-04-12 09:54:03 +00007793( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007794{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7795See \`config.log' for more details." >&5
7796echo "$as_me: error: cannot compute sizeof (double), 77
7797See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 { (exit 1); exit 1; }; }
7799fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007800rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007801fi
7802fi
7803rm -f conftest.val
7804else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007805 ac_cv_sizeof_double=0
7806fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007808echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7809echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7810cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007811#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007812_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007813
7814
Martin v. Löwis11437992002-04-12 09:54:03 +00007815echo "$as_me:$LINENO: checking for fpos_t" >&5
7816echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7817if test "${ac_cv_type_fpos_t+set}" = set; then
7818 echo $ECHO_N "(cached) $ECHO_C" >&6
7819else
7820 cat >conftest.$ac_ext <<_ACEOF
7821#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007822/* confdefs.h. */
7823_ACEOF
7824cat confdefs.h >>conftest.$ac_ext
7825cat >>conftest.$ac_ext <<_ACEOF
7826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007827$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007828int
7829main ()
7830{
7831if ((fpos_t *) 0)
7832 return 0;
7833if (sizeof (fpos_t))
7834 return 0;
7835 ;
7836 return 0;
7837}
7838_ACEOF
7839rm -f conftest.$ac_objext
7840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7841 (eval $ac_compile) 2>&5
7842 ac_status=$?
7843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7844 (exit $ac_status); } &&
7845 { ac_try='test -s conftest.$ac_objext'
7846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7847 (eval $ac_try) 2>&5
7848 ac_status=$?
7849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7850 (exit $ac_status); }; }; then
7851 ac_cv_type_fpos_t=yes
7852else
7853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007854sed 's/^/| /' conftest.$ac_ext >&5
7855
Martin v. Löwis11437992002-04-12 09:54:03 +00007856ac_cv_type_fpos_t=no
7857fi
7858rm -f conftest.$ac_objext conftest.$ac_ext
7859fi
7860echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7861echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7862
7863echo "$as_me:$LINENO: checking size of fpos_t" >&5
7864echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7865if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7866 echo $ECHO_N "(cached) $ECHO_C" >&6
7867else
7868 if test "$ac_cv_type_fpos_t" = yes; then
7869 # The cast to unsigned long works around a bug in the HP C Compiler
7870 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7871 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7872 # This bug is HP SR number 8606223364.
7873 if test "$cross_compiling" = yes; then
7874 # Depending upon the size, compute the lo and hi bounds.
7875cat >conftest.$ac_ext <<_ACEOF
7876#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007877/* confdefs.h. */
7878_ACEOF
7879cat confdefs.h >>conftest.$ac_ext
7880cat >>conftest.$ac_ext <<_ACEOF
7881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007882$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007883int
7884main ()
7885{
7886static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7887test_array [0] = 0
7888
7889 ;
7890 return 0;
7891}
7892_ACEOF
7893rm -f conftest.$ac_objext
7894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7895 (eval $ac_compile) 2>&5
7896 ac_status=$?
7897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898 (exit $ac_status); } &&
7899 { ac_try='test -s conftest.$ac_objext'
7900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7901 (eval $ac_try) 2>&5
7902 ac_status=$?
7903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904 (exit $ac_status); }; }; then
7905 ac_lo=0 ac_mid=0
7906 while :; do
7907 cat >conftest.$ac_ext <<_ACEOF
7908#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007909/* confdefs.h. */
7910_ACEOF
7911cat confdefs.h >>conftest.$ac_ext
7912cat >>conftest.$ac_ext <<_ACEOF
7913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007914$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007915int
7916main ()
7917{
7918static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7919test_array [0] = 0
7920
7921 ;
7922 return 0;
7923}
7924_ACEOF
7925rm -f conftest.$ac_objext
7926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7927 (eval $ac_compile) 2>&5
7928 ac_status=$?
7929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7930 (exit $ac_status); } &&
7931 { ac_try='test -s conftest.$ac_objext'
7932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7933 (eval $ac_try) 2>&5
7934 ac_status=$?
7935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7936 (exit $ac_status); }; }; then
7937 ac_hi=$ac_mid; break
7938else
7939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007940sed 's/^/| /' conftest.$ac_ext >&5
7941
Martin v. Löwis11437992002-04-12 09:54:03 +00007942ac_lo=`expr $ac_mid + 1`
7943 if test $ac_lo -le $ac_mid; then
7944 ac_lo= ac_hi=
7945 break
7946 fi
7947 ac_mid=`expr 2 '*' $ac_mid + 1`
7948fi
7949rm -f conftest.$ac_objext conftest.$ac_ext
7950 done
7951else
7952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007953sed 's/^/| /' conftest.$ac_ext >&5
7954
Martin v. Löwis11437992002-04-12 09:54:03 +00007955cat >conftest.$ac_ext <<_ACEOF
7956#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007957/* confdefs.h. */
7958_ACEOF
7959cat confdefs.h >>conftest.$ac_ext
7960cat >>conftest.$ac_ext <<_ACEOF
7961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007963int
7964main ()
7965{
7966static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7967test_array [0] = 0
7968
7969 ;
7970 return 0;
7971}
7972_ACEOF
7973rm -f conftest.$ac_objext
7974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7975 (eval $ac_compile) 2>&5
7976 ac_status=$?
7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978 (exit $ac_status); } &&
7979 { ac_try='test -s conftest.$ac_objext'
7980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7981 (eval $ac_try) 2>&5
7982 ac_status=$?
7983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7984 (exit $ac_status); }; }; then
7985 ac_hi=-1 ac_mid=-1
7986 while :; do
7987 cat >conftest.$ac_ext <<_ACEOF
7988#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007989/* confdefs.h. */
7990_ACEOF
7991cat confdefs.h >>conftest.$ac_ext
7992cat >>conftest.$ac_ext <<_ACEOF
7993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007994$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007995int
7996main ()
7997{
7998static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7999test_array [0] = 0
8000
8001 ;
8002 return 0;
8003}
8004_ACEOF
8005rm -f conftest.$ac_objext
8006if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8007 (eval $ac_compile) 2>&5
8008 ac_status=$?
8009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8010 (exit $ac_status); } &&
8011 { ac_try='test -s conftest.$ac_objext'
8012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8013 (eval $ac_try) 2>&5
8014 ac_status=$?
8015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8016 (exit $ac_status); }; }; then
8017 ac_lo=$ac_mid; break
8018else
8019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008020sed 's/^/| /' conftest.$ac_ext >&5
8021
Martin v. Löwis11437992002-04-12 09:54:03 +00008022ac_hi=`expr '(' $ac_mid ')' - 1`
8023 if test $ac_mid -le $ac_hi; then
8024 ac_lo= ac_hi=
8025 break
8026 fi
8027 ac_mid=`expr 2 '*' $ac_mid`
8028fi
8029rm -f conftest.$ac_objext conftest.$ac_ext
8030 done
8031else
8032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008033sed 's/^/| /' conftest.$ac_ext >&5
8034
Martin v. Löwis11437992002-04-12 09:54:03 +00008035ac_lo= ac_hi=
8036fi
8037rm -f conftest.$ac_objext conftest.$ac_ext
8038fi
8039rm -f conftest.$ac_objext conftest.$ac_ext
8040# Binary search between lo and hi bounds.
8041while test "x$ac_lo" != "x$ac_hi"; do
8042 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8043 cat >conftest.$ac_ext <<_ACEOF
8044#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008045/* confdefs.h. */
8046_ACEOF
8047cat confdefs.h >>conftest.$ac_ext
8048cat >>conftest.$ac_ext <<_ACEOF
8049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008050$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008051int
8052main ()
8053{
8054static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8055test_array [0] = 0
8056
8057 ;
8058 return 0;
8059}
8060_ACEOF
8061rm -f conftest.$ac_objext
8062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8063 (eval $ac_compile) 2>&5
8064 ac_status=$?
8065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8066 (exit $ac_status); } &&
8067 { ac_try='test -s conftest.$ac_objext'
8068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8069 (eval $ac_try) 2>&5
8070 ac_status=$?
8071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8072 (exit $ac_status); }; }; then
8073 ac_hi=$ac_mid
8074else
8075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008076sed 's/^/| /' conftest.$ac_ext >&5
8077
Martin v. Löwis11437992002-04-12 09:54:03 +00008078ac_lo=`expr '(' $ac_mid ')' + 1`
8079fi
8080rm -f conftest.$ac_objext conftest.$ac_ext
8081done
8082case $ac_lo in
8083?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008084'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8085See \`config.log' for more details." >&5
8086echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8087See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 { (exit 1); exit 1; }; } ;;
8089esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008090else
8091 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008092 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8093See \`config.log' for more details." >&5
8094echo "$as_me: error: cannot run test program while cross compiling
8095See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008096 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008097else
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 cat >conftest.$ac_ext <<_ACEOF
8099#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008100/* confdefs.h. */
8101_ACEOF
8102cat confdefs.h >>conftest.$ac_ext
8103cat >>conftest.$ac_ext <<_ACEOF
8104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008105$ac_includes_default
8106long longval () { return (long) (sizeof (fpos_t)); }
8107unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008108#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008109#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008110int
8111main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008112{
Martin v. Löwis11437992002-04-12 09:54:03 +00008113
8114 FILE *f = fopen ("conftest.val", "w");
8115 if (! f)
8116 exit (1);
8117 if (((long) (sizeof (fpos_t))) < 0)
8118 {
8119 long i = longval ();
8120 if (i != ((long) (sizeof (fpos_t))))
8121 exit (1);
8122 fprintf (f, "%ld\n", i);
8123 }
8124 else
8125 {
8126 unsigned long i = ulongval ();
8127 if (i != ((long) (sizeof (fpos_t))))
8128 exit (1);
8129 fprintf (f, "%lu\n", i);
8130 }
8131 exit (ferror (f) || fclose (f) != 0);
8132
8133 ;
8134 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008135}
Martin v. Löwis11437992002-04-12 09:54:03 +00008136_ACEOF
8137rm -f conftest$ac_exeext
8138if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8139 (eval $ac_link) 2>&5
8140 ac_status=$?
8141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8144 (eval $ac_try) 2>&5
8145 ac_status=$?
8146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8147 (exit $ac_status); }; }; then
8148 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008149else
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 echo "$as_me: program exited with status $ac_status" >&5
8151echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008152sed 's/^/| /' conftest.$ac_ext >&5
8153
Martin v. Löwis11437992002-04-12 09:54:03 +00008154( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008155{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8156See \`config.log' for more details." >&5
8157echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8158See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 { (exit 1); exit 1; }; }
8160fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008161rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008162fi
8163fi
8164rm -f conftest.val
8165else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008166 ac_cv_sizeof_fpos_t=0
8167fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008169echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8170echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8171cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008172#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008173_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008174
Michael W. Hudson54241132001-12-07 15:38:26 +00008175
8176
Martin v. Löwis11437992002-04-12 09:54:03 +00008177echo "$as_me:$LINENO: checking for long long support" >&5
8178echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008179have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008180cat >conftest.$ac_ext <<_ACEOF
8181#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008182/* confdefs.h. */
8183_ACEOF
8184cat confdefs.h >>conftest.$ac_ext
8185cat >>conftest.$ac_ext <<_ACEOF
8186/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008187
Martin v. Löwis11437992002-04-12 09:54:03 +00008188int
8189main ()
8190{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008191long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008192 ;
8193 return 0;
8194}
8195_ACEOF
8196rm -f conftest.$ac_objext
8197if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8198 (eval $ac_compile) 2>&5
8199 ac_status=$?
8200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8201 (exit $ac_status); } &&
8202 { ac_try='test -s conftest.$ac_objext'
8203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8204 (eval $ac_try) 2>&5
8205 ac_status=$?
8206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8207 (exit $ac_status); }; }; then
8208
8209
8210cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008211#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008212_ACEOF
8213
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008214 have_long_long=yes
8215
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008216else
Martin v. Löwis11437992002-04-12 09:54:03 +00008217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008218sed 's/^/| /' conftest.$ac_ext >&5
8219
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008220fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008221rm -f conftest.$ac_objext conftest.$ac_ext
8222echo "$as_me:$LINENO: result: $have_long_long" >&5
8223echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008224if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008225echo "$as_me:$LINENO: checking for long long" >&5
8226echo $ECHO_N "checking for long long... $ECHO_C" >&6
8227if test "${ac_cv_type_long_long+set}" = set; then
8228 echo $ECHO_N "(cached) $ECHO_C" >&6
8229else
8230 cat >conftest.$ac_ext <<_ACEOF
8231#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008232/* confdefs.h. */
8233_ACEOF
8234cat confdefs.h >>conftest.$ac_ext
8235cat >>conftest.$ac_ext <<_ACEOF
8236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008237$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008238int
8239main ()
8240{
8241if ((long long *) 0)
8242 return 0;
8243if (sizeof (long long))
8244 return 0;
8245 ;
8246 return 0;
8247}
8248_ACEOF
8249rm -f conftest.$ac_objext
8250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8251 (eval $ac_compile) 2>&5
8252 ac_status=$?
8253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8254 (exit $ac_status); } &&
8255 { ac_try='test -s conftest.$ac_objext'
8256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8257 (eval $ac_try) 2>&5
8258 ac_status=$?
8259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8260 (exit $ac_status); }; }; then
8261 ac_cv_type_long_long=yes
8262else
8263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008264sed 's/^/| /' conftest.$ac_ext >&5
8265
Martin v. Löwis11437992002-04-12 09:54:03 +00008266ac_cv_type_long_long=no
8267fi
8268rm -f conftest.$ac_objext conftest.$ac_ext
8269fi
8270echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8271echo "${ECHO_T}$ac_cv_type_long_long" >&6
8272
8273echo "$as_me:$LINENO: checking size of long long" >&5
8274echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8275if test "${ac_cv_sizeof_long_long+set}" = set; then
8276 echo $ECHO_N "(cached) $ECHO_C" >&6
8277else
8278 if test "$ac_cv_type_long_long" = yes; then
8279 # The cast to unsigned long works around a bug in the HP C Compiler
8280 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8281 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8282 # This bug is HP SR number 8606223364.
8283 if test "$cross_compiling" = yes; then
8284 # Depending upon the size, compute the lo and hi bounds.
8285cat >conftest.$ac_ext <<_ACEOF
8286#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008287/* confdefs.h. */
8288_ACEOF
8289cat confdefs.h >>conftest.$ac_ext
8290cat >>conftest.$ac_ext <<_ACEOF
8291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008292$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008293int
8294main ()
8295{
8296static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8297test_array [0] = 0
8298
8299 ;
8300 return 0;
8301}
8302_ACEOF
8303rm -f conftest.$ac_objext
8304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8305 (eval $ac_compile) 2>&5
8306 ac_status=$?
8307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8308 (exit $ac_status); } &&
8309 { ac_try='test -s conftest.$ac_objext'
8310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8311 (eval $ac_try) 2>&5
8312 ac_status=$?
8313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8314 (exit $ac_status); }; }; then
8315 ac_lo=0 ac_mid=0
8316 while :; do
8317 cat >conftest.$ac_ext <<_ACEOF
8318#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008319/* confdefs.h. */
8320_ACEOF
8321cat confdefs.h >>conftest.$ac_ext
8322cat >>conftest.$ac_ext <<_ACEOF
8323/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008324$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008325int
8326main ()
8327{
8328static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8329test_array [0] = 0
8330
8331 ;
8332 return 0;
8333}
8334_ACEOF
8335rm -f conftest.$ac_objext
8336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8337 (eval $ac_compile) 2>&5
8338 ac_status=$?
8339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8340 (exit $ac_status); } &&
8341 { ac_try='test -s conftest.$ac_objext'
8342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8343 (eval $ac_try) 2>&5
8344 ac_status=$?
8345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8346 (exit $ac_status); }; }; then
8347 ac_hi=$ac_mid; break
8348else
8349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008350sed 's/^/| /' conftest.$ac_ext >&5
8351
Martin v. Löwis11437992002-04-12 09:54:03 +00008352ac_lo=`expr $ac_mid + 1`
8353 if test $ac_lo -le $ac_mid; then
8354 ac_lo= ac_hi=
8355 break
8356 fi
8357 ac_mid=`expr 2 '*' $ac_mid + 1`
8358fi
8359rm -f conftest.$ac_objext conftest.$ac_ext
8360 done
8361else
8362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008363sed 's/^/| /' conftest.$ac_ext >&5
8364
Martin v. Löwis11437992002-04-12 09:54:03 +00008365cat >conftest.$ac_ext <<_ACEOF
8366#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008367/* confdefs.h. */
8368_ACEOF
8369cat confdefs.h >>conftest.$ac_ext
8370cat >>conftest.$ac_ext <<_ACEOF
8371/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008372$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008373int
8374main ()
8375{
8376static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8377test_array [0] = 0
8378
8379 ;
8380 return 0;
8381}
8382_ACEOF
8383rm -f conftest.$ac_objext
8384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8385 (eval $ac_compile) 2>&5
8386 ac_status=$?
8387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388 (exit $ac_status); } &&
8389 { ac_try='test -s conftest.$ac_objext'
8390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8391 (eval $ac_try) 2>&5
8392 ac_status=$?
8393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8394 (exit $ac_status); }; }; then
8395 ac_hi=-1 ac_mid=-1
8396 while :; do
8397 cat >conftest.$ac_ext <<_ACEOF
8398#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008399/* confdefs.h. */
8400_ACEOF
8401cat confdefs.h >>conftest.$ac_ext
8402cat >>conftest.$ac_ext <<_ACEOF
8403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008404$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008405int
8406main ()
8407{
8408static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8409test_array [0] = 0
8410
8411 ;
8412 return 0;
8413}
8414_ACEOF
8415rm -f conftest.$ac_objext
8416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8417 (eval $ac_compile) 2>&5
8418 ac_status=$?
8419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420 (exit $ac_status); } &&
8421 { ac_try='test -s conftest.$ac_objext'
8422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8423 (eval $ac_try) 2>&5
8424 ac_status=$?
8425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8426 (exit $ac_status); }; }; then
8427 ac_lo=$ac_mid; break
8428else
8429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008430sed 's/^/| /' conftest.$ac_ext >&5
8431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432ac_hi=`expr '(' $ac_mid ')' - 1`
8433 if test $ac_mid -le $ac_hi; then
8434 ac_lo= ac_hi=
8435 break
8436 fi
8437 ac_mid=`expr 2 '*' $ac_mid`
8438fi
8439rm -f conftest.$ac_objext conftest.$ac_ext
8440 done
8441else
8442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008443sed 's/^/| /' conftest.$ac_ext >&5
8444
Martin v. Löwis11437992002-04-12 09:54:03 +00008445ac_lo= ac_hi=
8446fi
8447rm -f conftest.$ac_objext conftest.$ac_ext
8448fi
8449rm -f conftest.$ac_objext conftest.$ac_ext
8450# Binary search between lo and hi bounds.
8451while test "x$ac_lo" != "x$ac_hi"; do
8452 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8453 cat >conftest.$ac_ext <<_ACEOF
8454#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008455/* confdefs.h. */
8456_ACEOF
8457cat confdefs.h >>conftest.$ac_ext
8458cat >>conftest.$ac_ext <<_ACEOF
8459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008460$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008461int
8462main ()
8463{
8464static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8465test_array [0] = 0
8466
8467 ;
8468 return 0;
8469}
8470_ACEOF
8471rm -f conftest.$ac_objext
8472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8473 (eval $ac_compile) 2>&5
8474 ac_status=$?
8475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8476 (exit $ac_status); } &&
8477 { ac_try='test -s conftest.$ac_objext'
8478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8479 (eval $ac_try) 2>&5
8480 ac_status=$?
8481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8482 (exit $ac_status); }; }; then
8483 ac_hi=$ac_mid
8484else
8485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008486sed 's/^/| /' conftest.$ac_ext >&5
8487
Martin v. Löwis11437992002-04-12 09:54:03 +00008488ac_lo=`expr '(' $ac_mid ')' + 1`
8489fi
8490rm -f conftest.$ac_objext conftest.$ac_ext
8491done
8492case $ac_lo in
8493?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008494'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8495See \`config.log' for more details." >&5
8496echo "$as_me: error: cannot compute sizeof (long long), 77
8497See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 { (exit 1); exit 1; }; } ;;
8499esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008500else
8501 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008502 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8503See \`config.log' for more details." >&5
8504echo "$as_me: error: cannot run test program while cross compiling
8505See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008506 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008507else
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 cat >conftest.$ac_ext <<_ACEOF
8509#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008510/* confdefs.h. */
8511_ACEOF
8512cat confdefs.h >>conftest.$ac_ext
8513cat >>conftest.$ac_ext <<_ACEOF
8514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008515$ac_includes_default
8516long longval () { return (long) (sizeof (long long)); }
8517unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008518#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008519#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008520int
8521main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008522{
Martin v. Löwis11437992002-04-12 09:54:03 +00008523
8524 FILE *f = fopen ("conftest.val", "w");
8525 if (! f)
8526 exit (1);
8527 if (((long) (sizeof (long long))) < 0)
8528 {
8529 long i = longval ();
8530 if (i != ((long) (sizeof (long long))))
8531 exit (1);
8532 fprintf (f, "%ld\n", i);
8533 }
8534 else
8535 {
8536 unsigned long i = ulongval ();
8537 if (i != ((long) (sizeof (long long))))
8538 exit (1);
8539 fprintf (f, "%lu\n", i);
8540 }
8541 exit (ferror (f) || fclose (f) != 0);
8542
8543 ;
8544 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008545}
Martin v. Löwis11437992002-04-12 09:54:03 +00008546_ACEOF
8547rm -f conftest$ac_exeext
8548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8549 (eval $ac_link) 2>&5
8550 ac_status=$?
8551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8552 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8554 (eval $ac_try) 2>&5
8555 ac_status=$?
8556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8557 (exit $ac_status); }; }; then
8558 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008559else
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 echo "$as_me: program exited with status $ac_status" >&5
8561echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008562sed 's/^/| /' conftest.$ac_ext >&5
8563
Martin v. Löwis11437992002-04-12 09:54:03 +00008564( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008565{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8566See \`config.log' for more details." >&5
8567echo "$as_me: error: cannot compute sizeof (long long), 77
8568See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008569 { (exit 1); exit 1; }; }
8570fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008571rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008572fi
8573fi
8574rm -f conftest.val
8575else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008576 ac_cv_sizeof_long_long=0
8577fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008578fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008579echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8580echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8581cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008582#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008583_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008584
Michael W. Hudson54241132001-12-07 15:38:26 +00008585
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008586fi
8587
Martin v. Löwis11437992002-04-12 09:54:03 +00008588echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8589echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008590have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008591cat >conftest.$ac_ext <<_ACEOF
8592#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008593/* confdefs.h. */
8594_ACEOF
8595cat confdefs.h >>conftest.$ac_ext
8596cat >>conftest.$ac_ext <<_ACEOF
8597/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599int
8600main ()
8601{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008602uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 ;
8604 return 0;
8605}
8606_ACEOF
8607rm -f conftest.$ac_objext
8608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8609 (eval $ac_compile) 2>&5
8610 ac_status=$?
8611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8612 (exit $ac_status); } &&
8613 { ac_try='test -s conftest.$ac_objext'
8614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8615 (eval $ac_try) 2>&5
8616 ac_status=$?
8617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8618 (exit $ac_status); }; }; then
8619
8620
8621cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008622#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008623_ACEOF
8624
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008625 have_uintptr_t=yes
8626
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008627else
Martin v. Löwis11437992002-04-12 09:54:03 +00008628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008629sed 's/^/| /' conftest.$ac_ext >&5
8630
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008631fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008632rm -f conftest.$ac_objext conftest.$ac_ext
8633echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8634echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008635if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008636echo "$as_me:$LINENO: checking for uintptr_t" >&5
8637echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8638if test "${ac_cv_type_uintptr_t+set}" = set; then
8639 echo $ECHO_N "(cached) $ECHO_C" >&6
8640else
8641 cat >conftest.$ac_ext <<_ACEOF
8642#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008643/* confdefs.h. */
8644_ACEOF
8645cat confdefs.h >>conftest.$ac_ext
8646cat >>conftest.$ac_ext <<_ACEOF
8647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008648$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008649int
8650main ()
8651{
8652if ((uintptr_t *) 0)
8653 return 0;
8654if (sizeof (uintptr_t))
8655 return 0;
8656 ;
8657 return 0;
8658}
8659_ACEOF
8660rm -f conftest.$ac_objext
8661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8662 (eval $ac_compile) 2>&5
8663 ac_status=$?
8664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8665 (exit $ac_status); } &&
8666 { ac_try='test -s conftest.$ac_objext'
8667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8668 (eval $ac_try) 2>&5
8669 ac_status=$?
8670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8671 (exit $ac_status); }; }; then
8672 ac_cv_type_uintptr_t=yes
8673else
8674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008675sed 's/^/| /' conftest.$ac_ext >&5
8676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677ac_cv_type_uintptr_t=no
8678fi
8679rm -f conftest.$ac_objext conftest.$ac_ext
8680fi
8681echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8682echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8683
8684echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8685echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8686if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8687 echo $ECHO_N "(cached) $ECHO_C" >&6
8688else
8689 if test "$ac_cv_type_uintptr_t" = yes; then
8690 # The cast to unsigned long works around a bug in the HP C Compiler
8691 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8692 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8693 # This bug is HP SR number 8606223364.
8694 if test "$cross_compiling" = yes; then
8695 # Depending upon the size, compute the lo and hi bounds.
8696cat >conftest.$ac_ext <<_ACEOF
8697#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008698/* confdefs.h. */
8699_ACEOF
8700cat confdefs.h >>conftest.$ac_ext
8701cat >>conftest.$ac_ext <<_ACEOF
8702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008703$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008704int
8705main ()
8706{
8707static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8708test_array [0] = 0
8709
8710 ;
8711 return 0;
8712}
8713_ACEOF
8714rm -f conftest.$ac_objext
8715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8716 (eval $ac_compile) 2>&5
8717 ac_status=$?
8718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8719 (exit $ac_status); } &&
8720 { ac_try='test -s conftest.$ac_objext'
8721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8722 (eval $ac_try) 2>&5
8723 ac_status=$?
8724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8725 (exit $ac_status); }; }; then
8726 ac_lo=0 ac_mid=0
8727 while :; do
8728 cat >conftest.$ac_ext <<_ACEOF
8729#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008730/* confdefs.h. */
8731_ACEOF
8732cat confdefs.h >>conftest.$ac_ext
8733cat >>conftest.$ac_ext <<_ACEOF
8734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008735$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008736int
8737main ()
8738{
8739static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8740test_array [0] = 0
8741
8742 ;
8743 return 0;
8744}
8745_ACEOF
8746rm -f conftest.$ac_objext
8747if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8748 (eval $ac_compile) 2>&5
8749 ac_status=$?
8750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8751 (exit $ac_status); } &&
8752 { ac_try='test -s conftest.$ac_objext'
8753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8754 (eval $ac_try) 2>&5
8755 ac_status=$?
8756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757 (exit $ac_status); }; }; then
8758 ac_hi=$ac_mid; break
8759else
8760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008761sed 's/^/| /' conftest.$ac_ext >&5
8762
Martin v. Löwis11437992002-04-12 09:54:03 +00008763ac_lo=`expr $ac_mid + 1`
8764 if test $ac_lo -le $ac_mid; then
8765 ac_lo= ac_hi=
8766 break
8767 fi
8768 ac_mid=`expr 2 '*' $ac_mid + 1`
8769fi
8770rm -f conftest.$ac_objext conftest.$ac_ext
8771 done
8772else
8773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008774sed 's/^/| /' conftest.$ac_ext >&5
8775
Martin v. Löwis11437992002-04-12 09:54:03 +00008776cat >conftest.$ac_ext <<_ACEOF
8777#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008778/* confdefs.h. */
8779_ACEOF
8780cat confdefs.h >>conftest.$ac_ext
8781cat >>conftest.$ac_ext <<_ACEOF
8782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008783$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008784int
8785main ()
8786{
8787static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8788test_array [0] = 0
8789
8790 ;
8791 return 0;
8792}
8793_ACEOF
8794rm -f conftest.$ac_objext
8795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8796 (eval $ac_compile) 2>&5
8797 ac_status=$?
8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799 (exit $ac_status); } &&
8800 { ac_try='test -s conftest.$ac_objext'
8801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8802 (eval $ac_try) 2>&5
8803 ac_status=$?
8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805 (exit $ac_status); }; }; then
8806 ac_hi=-1 ac_mid=-1
8807 while :; do
8808 cat >conftest.$ac_ext <<_ACEOF
8809#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008810/* confdefs.h. */
8811_ACEOF
8812cat confdefs.h >>conftest.$ac_ext
8813cat >>conftest.$ac_ext <<_ACEOF
8814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008815$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008816int
8817main ()
8818{
8819static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8820test_array [0] = 0
8821
8822 ;
8823 return 0;
8824}
8825_ACEOF
8826rm -f conftest.$ac_objext
8827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8828 (eval $ac_compile) 2>&5
8829 ac_status=$?
8830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8831 (exit $ac_status); } &&
8832 { ac_try='test -s conftest.$ac_objext'
8833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8834 (eval $ac_try) 2>&5
8835 ac_status=$?
8836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8837 (exit $ac_status); }; }; then
8838 ac_lo=$ac_mid; break
8839else
8840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008841sed 's/^/| /' conftest.$ac_ext >&5
8842
Martin v. Löwis11437992002-04-12 09:54:03 +00008843ac_hi=`expr '(' $ac_mid ')' - 1`
8844 if test $ac_mid -le $ac_hi; then
8845 ac_lo= ac_hi=
8846 break
8847 fi
8848 ac_mid=`expr 2 '*' $ac_mid`
8849fi
8850rm -f conftest.$ac_objext conftest.$ac_ext
8851 done
8852else
8853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008854sed 's/^/| /' conftest.$ac_ext >&5
8855
Martin v. Löwis11437992002-04-12 09:54:03 +00008856ac_lo= ac_hi=
8857fi
8858rm -f conftest.$ac_objext conftest.$ac_ext
8859fi
8860rm -f conftest.$ac_objext conftest.$ac_ext
8861# Binary search between lo and hi bounds.
8862while test "x$ac_lo" != "x$ac_hi"; do
8863 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8864 cat >conftest.$ac_ext <<_ACEOF
8865#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008866/* confdefs.h. */
8867_ACEOF
8868cat confdefs.h >>conftest.$ac_ext
8869cat >>conftest.$ac_ext <<_ACEOF
8870/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008871$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008872int
8873main ()
8874{
8875static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8876test_array [0] = 0
8877
8878 ;
8879 return 0;
8880}
8881_ACEOF
8882rm -f conftest.$ac_objext
8883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8884 (eval $ac_compile) 2>&5
8885 ac_status=$?
8886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8887 (exit $ac_status); } &&
8888 { ac_try='test -s conftest.$ac_objext'
8889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8890 (eval $ac_try) 2>&5
8891 ac_status=$?
8892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8893 (exit $ac_status); }; }; then
8894 ac_hi=$ac_mid
8895else
8896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008897sed 's/^/| /' conftest.$ac_ext >&5
8898
Martin v. Löwis11437992002-04-12 09:54:03 +00008899ac_lo=`expr '(' $ac_mid ')' + 1`
8900fi
8901rm -f conftest.$ac_objext conftest.$ac_ext
8902done
8903case $ac_lo in
8904?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008905'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8906See \`config.log' for more details." >&5
8907echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8908See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 { (exit 1); exit 1; }; } ;;
8910esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008911else
8912 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008913 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8914See \`config.log' for more details." >&5
8915echo "$as_me: error: cannot run test program while cross compiling
8916See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008918else
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 cat >conftest.$ac_ext <<_ACEOF
8920#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008921/* confdefs.h. */
8922_ACEOF
8923cat confdefs.h >>conftest.$ac_ext
8924cat >>conftest.$ac_ext <<_ACEOF
8925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008926$ac_includes_default
8927long longval () { return (long) (sizeof (uintptr_t)); }
8928unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008929#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008930#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008931int
8932main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008933{
Martin v. Löwis11437992002-04-12 09:54:03 +00008934
8935 FILE *f = fopen ("conftest.val", "w");
8936 if (! f)
8937 exit (1);
8938 if (((long) (sizeof (uintptr_t))) < 0)
8939 {
8940 long i = longval ();
8941 if (i != ((long) (sizeof (uintptr_t))))
8942 exit (1);
8943 fprintf (f, "%ld\n", i);
8944 }
8945 else
8946 {
8947 unsigned long i = ulongval ();
8948 if (i != ((long) (sizeof (uintptr_t))))
8949 exit (1);
8950 fprintf (f, "%lu\n", i);
8951 }
8952 exit (ferror (f) || fclose (f) != 0);
8953
8954 ;
8955 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008956}
Martin v. Löwis11437992002-04-12 09:54:03 +00008957_ACEOF
8958rm -f conftest$ac_exeext
8959if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8960 (eval $ac_link) 2>&5
8961 ac_status=$?
8962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8963 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8965 (eval $ac_try) 2>&5
8966 ac_status=$?
8967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968 (exit $ac_status); }; }; then
8969 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008970else
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 echo "$as_me: program exited with status $ac_status" >&5
8972echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008973sed 's/^/| /' conftest.$ac_ext >&5
8974
Martin v. Löwis11437992002-04-12 09:54:03 +00008975( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008976{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8977See \`config.log' for more details." >&5
8978echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8979See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 { (exit 1); exit 1; }; }
8981fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008982rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008983fi
8984fi
8985rm -f conftest.val
8986else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008987 ac_cv_sizeof_uintptr_t=0
8988fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008989fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008990echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8991echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8992cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008993#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008994_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008995
Michael W. Hudson54241132001-12-07 15:38:26 +00008996
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008997fi
8998
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008999# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009000echo "$as_me:$LINENO: checking size of off_t" >&5
9001echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9002if test "${ac_cv_sizeof_off_t+set}" = set; then
9003 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009004else
9005 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009006 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009007else
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 cat >conftest.$ac_ext <<_ACEOF
9009#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009010/* confdefs.h. */
9011_ACEOF
9012cat confdefs.h >>conftest.$ac_ext
9013cat >>conftest.$ac_ext <<_ACEOF
9014/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009015#include <stdio.h>
9016#include <sys/types.h>
9017main()
9018{
9019 FILE *f=fopen("conftestval", "w");
9020 if (!f) exit(1);
9021 fprintf(f, "%d\n", sizeof(off_t));
9022 exit(0);
9023}
Martin v. Löwis11437992002-04-12 09:54:03 +00009024_ACEOF
9025rm -f conftest$ac_exeext
9026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9027 (eval $ac_link) 2>&5
9028 ac_status=$?
9029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9032 (eval $ac_try) 2>&5
9033 ac_status=$?
9034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9035 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009036 ac_cv_sizeof_off_t=`cat conftestval`
9037else
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 echo "$as_me: program exited with status $ac_status" >&5
9039echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009040sed 's/^/| /' conftest.$ac_ext >&5
9041
Martin v. Löwis11437992002-04-12 09:54:03 +00009042( exit $ac_status )
9043ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009044fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009045rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009046fi
9047
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009048fi
9049
Martin v. Löwis11437992002-04-12 09:54:03 +00009050echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9051echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9052
9053cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009054#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009055_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009056
Michael W. Hudson54241132001-12-07 15:38:26 +00009057
Martin v. Löwis11437992002-04-12 09:54:03 +00009058echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9059echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009060if test "$have_long_long" = yes -a \
9061 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9062 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009063
Martin v. Löwis11437992002-04-12 09:54:03 +00009064cat >>confdefs.h <<\_ACEOF
9065#define HAVE_LARGEFILE_SUPPORT 1
9066_ACEOF
9067
9068 echo "$as_me:$LINENO: result: yes" >&5
9069echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009070else
Martin v. Löwis11437992002-04-12 09:54:03 +00009071 echo "$as_me:$LINENO: result: no" >&5
9072echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009073fi
9074
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009075# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009076echo "$as_me:$LINENO: checking size of time_t" >&5
9077echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9078if test "${ac_cv_sizeof_time_t+set}" = set; then
9079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009080else
9081 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009082 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009083else
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 cat >conftest.$ac_ext <<_ACEOF
9085#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009086/* confdefs.h. */
9087_ACEOF
9088cat confdefs.h >>conftest.$ac_ext
9089cat >>conftest.$ac_ext <<_ACEOF
9090/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009091#include <stdio.h>
9092#include <time.h>
9093main()
9094{
9095 FILE *f=fopen("conftestval", "w");
9096 if (!f) exit(1);
9097 fprintf(f, "%d\n", sizeof(time_t));
9098 exit(0);
9099}
Martin v. Löwis11437992002-04-12 09:54:03 +00009100_ACEOF
9101rm -f conftest$ac_exeext
9102if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9103 (eval $ac_link) 2>&5
9104 ac_status=$?
9105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9106 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9108 (eval $ac_try) 2>&5
9109 ac_status=$?
9110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9111 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009112 ac_cv_sizeof_time_t=`cat conftestval`
9113else
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 echo "$as_me: program exited with status $ac_status" >&5
9115echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009116sed 's/^/| /' conftest.$ac_ext >&5
9117
Martin v. Löwis11437992002-04-12 09:54:03 +00009118( exit $ac_status )
9119ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009120fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009121rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009122fi
9123
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009124fi
9125
Martin v. Löwis11437992002-04-12 09:54:03 +00009126echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9127echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9128
9129cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009130#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009131_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009132
Michael W. Hudson54241132001-12-07 15:38:26 +00009133
9134
Trent Mick635f6fb2000-08-23 21:33:05 +00009135# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009136ac_save_cc="$CC"
9137if test "$ac_cv_kpthread" = "yes"
9138then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009139elif test "$ac_cv_kthread" = "yes"
9140then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009141elif test "$ac_cv_pthread" = "yes"
9142then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009143fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009144echo "$as_me:$LINENO: checking for pthread_t" >&5
9145echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009146have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009147cat >conftest.$ac_ext <<_ACEOF
9148#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009149/* confdefs.h. */
9150_ACEOF
9151cat confdefs.h >>conftest.$ac_ext
9152cat >>conftest.$ac_ext <<_ACEOF
9153/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009154#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009155int
9156main ()
9157{
Guido van Rossum12580492000-09-24 16:47:19 +00009158pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009159 ;
9160 return 0;
9161}
9162_ACEOF
9163rm -f conftest.$ac_objext
9164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9165 (eval $ac_compile) 2>&5
9166 ac_status=$?
9167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9168 (exit $ac_status); } &&
9169 { ac_try='test -s conftest.$ac_objext'
9170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9171 (eval $ac_try) 2>&5
9172 ac_status=$?
9173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9174 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009175 have_pthread_t=yes
9176else
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009178sed 's/^/| /' conftest.$ac_ext >&5
9179
Trent Mick635f6fb2000-08-23 21:33:05 +00009180fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009181rm -f conftest.$ac_objext conftest.$ac_ext
9182echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9183echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009184if test "$have_pthread_t" = yes ; then
9185 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009186 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9187echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9188 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9189 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009190else
9191 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009192 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009193else
Martin v. Löwis11437992002-04-12 09:54:03 +00009194 cat >conftest.$ac_ext <<_ACEOF
9195#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009196/* confdefs.h. */
9197_ACEOF
9198cat confdefs.h >>conftest.$ac_ext
9199cat >>conftest.$ac_ext <<_ACEOF
9200/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009201#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009202#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009203 main()
9204 {
9205 FILE *f=fopen("conftestval", "w");
9206 if (!f) exit(1);
9207 fprintf(f, "%d\n", sizeof(pthread_t));
9208 exit(0);
9209 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009210_ACEOF
9211rm -f conftest$ac_exeext
9212if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9213 (eval $ac_link) 2>&5
9214 ac_status=$?
9215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9216 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9218 (eval $ac_try) 2>&5
9219 ac_status=$?
9220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9221 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009222 ac_cv_sizeof_pthread_t=`cat conftestval`
9223else
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 echo "$as_me: program exited with status $ac_status" >&5
9225echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009226sed 's/^/| /' conftest.$ac_ext >&5
9227
Martin v. Löwis11437992002-04-12 09:54:03 +00009228( exit $ac_status )
9229ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009230fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009231rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009232fi
9233
Trent Mick635f6fb2000-08-23 21:33:05 +00009234fi
9235
Martin v. Löwis11437992002-04-12 09:54:03 +00009236 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9237echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9238
9239cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009240#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009241_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009242
9243fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009244CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009245
Martin v. Löwis11437992002-04-12 09:54:03 +00009246echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9247echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009248# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9249if test "${enable_toolbox_glue+set}" = set; then
9250 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009251
Martin v. Löwis11437992002-04-12 09:54:03 +00009252fi;
Jack Jansene578a632001-08-15 01:27:14 +00009253
9254if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009255then
Jack Jansene578a632001-08-15 01:27:14 +00009256 case $ac_sys_system/$ac_sys_release in
9257 Darwin/*)
9258 enable_toolbox_glue="yes";;
9259 *)
9260 enable_toolbox_glue="no";;
9261 esac
9262fi
9263case "$enable_toolbox_glue" in
9264yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009265 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009266 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009267 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009268
9269cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009270#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009271_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009272
9273 ;;
9274*)
9275 extra_frameworks=""
9276 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009277 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009278 ;;
9279esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009280echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9281echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009282
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009283
9284case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009285 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009286 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009287 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009288 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009289 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009290 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009291 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009292 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009293 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009294 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009295esac
9296
Martin v. Löwis11437992002-04-12 09:54:03 +00009297echo "$as_me:$LINENO: checking for --enable-framework" >&5
9298echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009299if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009300then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009301 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009302 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009303 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009304
Martin v. Löwis11437992002-04-12 09:54:03 +00009305cat >>confdefs.h <<\_ACEOF
9306#define WITH_NEXT_FRAMEWORK 1
9307_ACEOF
9308
9309 echo "$as_me:$LINENO: result: yes" >&5
9310echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009311else
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 echo "$as_me:$LINENO: result: no" >&5
9313echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009314fi
9315
Martin v. Löwis11437992002-04-12 09:54:03 +00009316echo "$as_me:$LINENO: checking for dyld" >&5
9317echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009318case $ac_sys_system/$ac_sys_release in
9319 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009320
Martin v. Löwis11437992002-04-12 09:54:03 +00009321cat >>confdefs.h <<\_ACEOF
9322#define WITH_DYLD 1
9323_ACEOF
9324
9325 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9326echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009327 ;;
9328 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 echo "$as_me:$LINENO: result: no" >&5
9330echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009331 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009332esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009333
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009335
Michael W. Hudson54241132001-12-07 15:38:26 +00009336
9337
9338
9339
Guido van Rossum0a516c91994-09-12 10:58:40 +00009340# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009341# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009342echo "$as_me:$LINENO: checking SO" >&5
9343echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009344if test -z "$SO"
9345then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009346 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009347 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009348 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009349 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009350 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009351else
9352 # this might also be a termcap variable, see #610332
9353 echo
9354 echo '====================================================================='
9355 echo '+ +'
9356 echo '+ WARNING: You have set SO in your environment. +'
9357 echo '+ Do you really mean to change the extension for shared libraries? +'
9358 echo '+ Continuing in 10 seconds to let you to ponder. +'
9359 echo '+ +'
9360 echo '====================================================================='
9361 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009363echo "$as_me:$LINENO: result: $SO" >&5
9364echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009365# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009366# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009367# (Shared libraries in this instance are shared modules to be loaded into
9368# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009369echo "$as_me:$LINENO: checking LDSHARED" >&5
9370echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009371if test -z "$LDSHARED"
9372then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009373 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009374 AIX*)
9375 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009376 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009377 ;;
9378 BeOS*)
9379 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009380 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009381 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009382 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009383 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00009385 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009386 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009387 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +00009388 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009389 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009390 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009391 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009392 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9393 if test "$enable_framework" ; then
9394 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009395 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9396 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009397 else
9398 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009399 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009400 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009401 Darwin/*)
9402 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9403 if test "$enable_framework" ; then
9404 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009405 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9406 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009407 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009408 # No framework, use the Python app as bundle-loader
9409 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009410 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009411 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009412 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009413 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009414 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009415 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009416 then
9417 LDSHARED="cc -shared ${LDFLAGS}"
9418 else
9419 LDSHARED="ld -Bshareable ${LDFLAGS}"
9420 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009421 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009422 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009423 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009424 then LDSHARED='$(CC) -shared'
9425 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009426 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009427 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009428 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009429 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009430 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009431 *) LDSHARED="ld";;
9432 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009434echo "$as_me:$LINENO: result: $LDSHARED" >&5
9435echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009436BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009437# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009438# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009439echo "$as_me:$LINENO: checking CCSHARED" >&5
9440echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009441if test -z "$CCSHARED"
9442then
Guido van Rossum07397971997-04-29 21:49:50 +00009443 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009444 SunOS*) if test "$GCC" = yes;
9445 then CCSHARED="-fPIC";
9446 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009447 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009448 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009449 else CCSHARED="+z";
9450 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009451 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009452 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009453 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009454 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009455 if test "$GCC" = "yes"
9456 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009457 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009458 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009459 SCO_SV*)
9460 if test "$GCC" = "yes"
9461 then CCSHARED="-fPIC"
9462 else CCSHARED="-Kpic -belf"
9463 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009464 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009465 IRIX*/6*) case $CC in
9466 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009467 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009468 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009469 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009470 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009471fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009472echo "$as_me:$LINENO: result: $CCSHARED" >&5
9473echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009474# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009475# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009476echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9477echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009478if test -z "$LINKFORSHARED"
9479then
Guido van Rossum07397971997-04-29 21:49:50 +00009480 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009481 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009482 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009483 LINKFORSHARED="-Wl,-E -Wl,+s";;
9484# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009485 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009486 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009487 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009489 # -u __dummy makes the linker aware of the objc runtime
9490 # in System.framework; otherwise, __objcInit (referenced in
9491 # crt1.o) gets erroneously defined as common, which breaks dynamic
9492 # loading of any modules which reference it in System.framework.
9493 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9494 # not used by the core itself but which needs to be in the core so
9495 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009496 # -prebind is no longer used, because it actually seems to give a
9497 # slowdown in stead of a speedup, maybe due to the large number of
9498 # dynamic loads Python does.
9499 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009500 if test "$enable_framework"
9501 then
Jack Jansenc8607b72003-12-08 01:10:12 +00009502 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework Python"
Jack Jansene578a632001-08-15 01:27:14 +00009503 fi
9504 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009505 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009506 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009507 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009509 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9510 then
9511 LINKFORSHARED="-Wl,--export-dynamic"
9512 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009513 SunOS/5*) case $CC in
9514 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009515 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009516 then
9517 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009518 fi;;
9519 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009520 CYGWIN*)
9521 if test $enable_shared = "no"
9522 then
9523 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9524 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009525 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009526fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009527echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9528echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009529
Michael W. Hudson54241132001-12-07 15:38:26 +00009530
Martin v. Löwis11437992002-04-12 09:54:03 +00009531echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9532echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009533if test ! "$LIBRARY" = "$LDLIBRARY"
9534then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009535 case $ac_sys_system in
9536 CYGWIN*)
9537 # Cygwin needs CCSHARED when building extension DLLs
9538 # but not when building the interpreter DLL.
9539 CFLAGSFORSHARED='';;
9540 *)
9541 CFLAGSFORSHARED='$(CCSHARED)'
9542 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009544echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9545echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009546
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009547# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9548# library (with --enable-shared).
9549# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009550# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9551# if it is not required, since it creates a dependency of the shared library
9552# to LIBS. This, in turn, means that applications linking the shared libpython
9553# don't need to link LIBS explicitly. The default should be only changed
9554# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009555
9556echo "$as_me:$LINENO: checking SHLIBS" >&5
9557echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9558case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009559 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009560 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009561esac
9562echo "$as_me:$LINENO: result: $SHLIBS" >&5
9563echo "${ECHO_T}$SHLIBS" >&6
9564
9565
Guido van Rossum627b2d71993-12-24 10:39:16 +00009566# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009567
9568echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9569echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9570if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9571 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009572else
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009574LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009575cat >conftest.$ac_ext <<_ACEOF
9576#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009577/* confdefs.h. */
9578_ACEOF
9579cat confdefs.h >>conftest.$ac_ext
9580cat >>conftest.$ac_ext <<_ACEOF
9581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009582
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009583/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009584#ifdef __cplusplus
9585extern "C"
9586#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009587/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 builtin and then its argument prototype would still apply. */
9589char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009590int
9591main ()
9592{
9593dlopen ();
9594 ;
9595 return 0;
9596}
9597_ACEOF
9598rm -f conftest.$ac_objext conftest$ac_exeext
9599if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9600 (eval $ac_link) 2>&5
9601 ac_status=$?
9602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9603 (exit $ac_status); } &&
9604 { ac_try='test -s conftest$ac_exeext'
9605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9606 (eval $ac_try) 2>&5
9607 ac_status=$?
9608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9609 (exit $ac_status); }; }; then
9610 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009611else
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009613sed 's/^/| /' conftest.$ac_ext >&5
9614
Martin v. Löwis11437992002-04-12 09:54:03 +00009615ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009617rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9618LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009619fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009620echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9621echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9622if test $ac_cv_lib_dl_dlopen = yes; then
9623 cat >>confdefs.h <<_ACEOF
9624#define HAVE_LIBDL 1
9625_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009626
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009627 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009628
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009629fi
9630 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009631
9632echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9633echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9634if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9635 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009636else
Martin v. Löwis11437992002-04-12 09:54:03 +00009637 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009638LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009639cat >conftest.$ac_ext <<_ACEOF
9640#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009641/* confdefs.h. */
9642_ACEOF
9643cat confdefs.h >>conftest.$ac_ext
9644cat >>conftest.$ac_ext <<_ACEOF
9645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009646
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009647/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009648#ifdef __cplusplus
9649extern "C"
9650#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009651/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 builtin and then its argument prototype would still apply. */
9653char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009654int
9655main ()
9656{
9657shl_load ();
9658 ;
9659 return 0;
9660}
9661_ACEOF
9662rm -f conftest.$ac_objext conftest$ac_exeext
9663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9664 (eval $ac_link) 2>&5
9665 ac_status=$?
9666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9667 (exit $ac_status); } &&
9668 { ac_try='test -s conftest$ac_exeext'
9669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9670 (eval $ac_try) 2>&5
9671 ac_status=$?
9672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9673 (exit $ac_status); }; }; then
9674 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009675else
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009677sed 's/^/| /' conftest.$ac_ext >&5
9678
Martin v. Löwis11437992002-04-12 09:54:03 +00009679ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009680fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009681rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9682LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009683fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009684echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9685echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9686if test $ac_cv_lib_dld_shl_load = yes; then
9687 cat >>confdefs.h <<_ACEOF
9688#define HAVE_LIBDLD 1
9689_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009690
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009691 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009692
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009693fi
9694 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009695
9696# only check for sem_ini if thread support is requested
9697if test "$with_threads" = "yes" -o -z "$with_threads"; then
9698 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009699echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9700if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009702else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009703 ac_func_search_save_LIBS=$LIBS
9704ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009705cat >conftest.$ac_ext <<_ACEOF
9706#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009707/* confdefs.h. */
9708_ACEOF
9709cat confdefs.h >>conftest.$ac_ext
9710cat >>conftest.$ac_ext <<_ACEOF
9711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009712
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009713/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009714#ifdef __cplusplus
9715extern "C"
9716#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009717/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 builtin and then its argument prototype would still apply. */
9719char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009720int
9721main ()
9722{
9723sem_init ();
9724 ;
9725 return 0;
9726}
9727_ACEOF
9728rm -f conftest.$ac_objext conftest$ac_exeext
9729if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9730 (eval $ac_link) 2>&5
9731 ac_status=$?
9732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9733 (exit $ac_status); } &&
9734 { ac_try='test -s conftest$ac_exeext'
9735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9736 (eval $ac_try) 2>&5
9737 ac_status=$?
9738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9739 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009740 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009741else
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009743sed 's/^/| /' conftest.$ac_ext >&5
9744
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009745fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009746rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009747if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009748 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009749 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9750 cat >conftest.$ac_ext <<_ACEOF
9751#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009752/* confdefs.h. */
9753_ACEOF
9754cat confdefs.h >>conftest.$ac_ext
9755cat >>conftest.$ac_ext <<_ACEOF
9756/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009757
9758/* Override any gcc2 internal prototype to avoid an error. */
9759#ifdef __cplusplus
9760extern "C"
9761#endif
9762/* We use char because int might match the return type of a gcc2
9763 builtin and then its argument prototype would still apply. */
9764char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009765int
9766main ()
9767{
9768sem_init ();
9769 ;
9770 return 0;
9771}
Martin v. Löwis11437992002-04-12 09:54:03 +00009772_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009773rm -f conftest.$ac_objext conftest$ac_exeext
9774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9775 (eval $ac_link) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); } &&
9779 { ac_try='test -s conftest$ac_exeext'
9780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9781 (eval $ac_try) 2>&5
9782 ac_status=$?
9783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9784 (exit $ac_status); }; }; then
9785 ac_cv_search_sem_init="-l$ac_lib"
9786break
9787else
9788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009789sed 's/^/| /' conftest.$ac_ext >&5
9790
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009791fi
9792rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9793 done
9794fi
9795LIBS=$ac_func_search_save_LIBS
9796fi
9797echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9798echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9799if test "$ac_cv_search_sem_init" != no; then
9800 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009801
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009802fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009803 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009804 # posix4 on Solaris 2.6
9805 # pthread (first!) on Linux
9806fi
9807
Martin v. Löwis19d17342003-06-14 21:03:05 +00009808# check if we need libintl for locale functions
9809echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9810echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9811if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9812 echo $ECHO_N "(cached) $ECHO_C" >&6
9813else
9814 ac_check_lib_save_LIBS=$LIBS
9815LIBS="-lintl $LIBS"
9816cat >conftest.$ac_ext <<_ACEOF
9817#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009818/* confdefs.h. */
9819_ACEOF
9820cat confdefs.h >>conftest.$ac_ext
9821cat >>conftest.$ac_ext <<_ACEOF
9822/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009823
9824/* Override any gcc2 internal prototype to avoid an error. */
9825#ifdef __cplusplus
9826extern "C"
9827#endif
9828/* We use char because int might match the return type of a gcc2
9829 builtin and then its argument prototype would still apply. */
9830char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009831int
9832main ()
9833{
9834textdomain ();
9835 ;
9836 return 0;
9837}
9838_ACEOF
9839rm -f conftest.$ac_objext conftest$ac_exeext
9840if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9841 (eval $ac_link) 2>&5
9842 ac_status=$?
9843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9844 (exit $ac_status); } &&
9845 { ac_try='test -s conftest$ac_exeext'
9846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9847 (eval $ac_try) 2>&5
9848 ac_status=$?
9849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9850 (exit $ac_status); }; }; then
9851 ac_cv_lib_intl_textdomain=yes
9852else
9853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009854sed 's/^/| /' conftest.$ac_ext >&5
9855
Martin v. Löwis19d17342003-06-14 21:03:05 +00009856ac_cv_lib_intl_textdomain=no
9857fi
9858rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9859LIBS=$ac_check_lib_save_LIBS
9860fi
9861echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9862echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9863if test $ac_cv_lib_intl_textdomain = yes; then
9864
9865cat >>confdefs.h <<\_ACEOF
9866#define WITH_LIBINTL 1
9867_ACEOF
9868
9869fi
9870
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009871
9872# checks for system dependent C++ extensions support
9873case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9875echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9876 cat >conftest.$ac_ext <<_ACEOF
9877#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009878/* confdefs.h. */
9879_ACEOF
9880cat confdefs.h >>conftest.$ac_ext
9881cat >>conftest.$ac_ext <<_ACEOF
9882/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009883#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009884int
9885main ()
9886{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009887loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 ;
9889 return 0;
9890}
9891_ACEOF
9892rm -f conftest.$ac_objext conftest$ac_exeext
9893if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9894 (eval $ac_link) 2>&5
9895 ac_status=$?
9896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9897 (exit $ac_status); } &&
9898 { ac_try='test -s conftest$ac_exeext'
9899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9900 (eval $ac_try) 2>&5
9901 ac_status=$?
9902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9903 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009904
Martin v. Löwis11437992002-04-12 09:54:03 +00009905cat >>confdefs.h <<\_ACEOF
9906#define AIX_GENUINE_CPLUSPLUS 1
9907_ACEOF
9908
9909 echo "$as_me:$LINENO: result: yes" >&5
9910echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009911else
Martin v. Löwis11437992002-04-12 09:54:03 +00009912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009913sed 's/^/| /' conftest.$ac_ext >&5
9914
Martin v. Löwis11437992002-04-12 09:54:03 +00009915echo "$as_me:$LINENO: result: no" >&5
9916echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009917fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009918rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009919 *) ;;
9920esac
9921
Guido van Rossum70c7f481998-03-26 18:44:10 +00009922# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009923# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +00009924echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9925echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9926if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9927 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009928else
Martin v. Löwis11437992002-04-12 09:54:03 +00009929 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009930LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009931cat >conftest.$ac_ext <<_ACEOF
9932#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009933/* confdefs.h. */
9934_ACEOF
9935cat confdefs.h >>conftest.$ac_ext
9936cat >>conftest.$ac_ext <<_ACEOF
9937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009938
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009939/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009940#ifdef __cplusplus
9941extern "C"
9942#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009943/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 builtin and then its argument prototype would still apply. */
9945char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009946int
9947main ()
9948{
9949t_open ();
9950 ;
9951 return 0;
9952}
9953_ACEOF
9954rm -f conftest.$ac_objext conftest$ac_exeext
9955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9956 (eval $ac_link) 2>&5
9957 ac_status=$?
9958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9959 (exit $ac_status); } &&
9960 { ac_try='test -s conftest$ac_exeext'
9961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9962 (eval $ac_try) 2>&5
9963 ac_status=$?
9964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9965 (exit $ac_status); }; }; then
9966 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009967else
Martin v. Löwis11437992002-04-12 09:54:03 +00009968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009969sed 's/^/| /' conftest.$ac_ext >&5
9970
Martin v. Löwis11437992002-04-12 09:54:03 +00009971ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009973rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9974LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009975fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009976echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9977echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9978if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009979 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009980fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009981 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009982echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9983echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9984if test "${ac_cv_lib_socket_socket+set}" = set; then
9985 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009986else
Martin v. Löwis11437992002-04-12 09:54:03 +00009987 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009988LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009989cat >conftest.$ac_ext <<_ACEOF
9990#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009991/* confdefs.h. */
9992_ACEOF
9993cat confdefs.h >>conftest.$ac_ext
9994cat >>conftest.$ac_ext <<_ACEOF
9995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009996
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009997/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009998#ifdef __cplusplus
9999extern "C"
10000#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010001/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 builtin and then its argument prototype would still apply. */
10003char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010004int
10005main ()
10006{
10007socket ();
10008 ;
10009 return 0;
10010}
10011_ACEOF
10012rm -f conftest.$ac_objext conftest$ac_exeext
10013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10014 (eval $ac_link) 2>&5
10015 ac_status=$?
10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017 (exit $ac_status); } &&
10018 { ac_try='test -s conftest$ac_exeext'
10019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10020 (eval $ac_try) 2>&5
10021 ac_status=$?
10022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023 (exit $ac_status); }; }; then
10024 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010025else
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010027sed 's/^/| /' conftest.$ac_ext >&5
10028
Martin v. Löwis11437992002-04-12 09:54:03 +000010029ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010030fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010031rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10032LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010034echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10035echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10036if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010037 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010038fi
10039 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010040
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010041case "$ac_sys_system" in
10042BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010043echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10044echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10045if test "${ac_cv_lib_net_socket+set}" = set; then
10046 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010047else
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010049LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010050cat >conftest.$ac_ext <<_ACEOF
10051#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010052/* confdefs.h. */
10053_ACEOF
10054cat confdefs.h >>conftest.$ac_ext
10055cat >>conftest.$ac_ext <<_ACEOF
10056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010057
Guido van Rossumad678af1998-10-02 14:42:15 +000010058/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010059#ifdef __cplusplus
10060extern "C"
10061#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010062/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 builtin and then its argument prototype would still apply. */
10064char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010065int
10066main ()
10067{
10068socket ();
10069 ;
10070 return 0;
10071}
10072_ACEOF
10073rm -f conftest.$ac_objext conftest$ac_exeext
10074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10075 (eval $ac_link) 2>&5
10076 ac_status=$?
10077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10078 (exit $ac_status); } &&
10079 { ac_try='test -s conftest$ac_exeext'
10080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10081 (eval $ac_try) 2>&5
10082 ac_status=$?
10083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10084 (exit $ac_status); }; }; then
10085 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010086else
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010088sed 's/^/| /' conftest.$ac_ext >&5
10089
Martin v. Löwis11437992002-04-12 09:54:03 +000010090ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10093LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010095echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10096echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10097if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010098 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010099fi
10100 # BeOS
10101;;
10102esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010103
Martin v. Löwis11437992002-04-12 09:54:03 +000010104echo "$as_me:$LINENO: checking for --with-libs" >&5
10105echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10106
Guido van Rossuma68acba1996-07-31 17:36:39 +000010107# Check whether --with-libs or --without-libs was given.
10108if test "${with_libs+set}" = set; then
10109 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010110
10111echo "$as_me:$LINENO: result: $withval" >&5
10112echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010113LIBS="$withval $LIBS"
10114
10115else
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 echo "$as_me:$LINENO: result: no" >&5
10117echo "${ECHO_T}no" >&6
10118fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010119
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010120# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010121
10122
Martin v. Löwis11437992002-04-12 09:54:03 +000010123echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10124echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10125
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010126# Check whether --with-signal-module or --without-signal-module was given.
10127if test "${with_signal_module+set}" = set; then
10128 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010129
Martin v. Löwis11437992002-04-12 09:54:03 +000010130fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010131
10132if test -z "$with_signal_module"
10133then with_signal_module="yes"
10134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010135echo "$as_me:$LINENO: result: $with_signal_module" >&5
10136echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010137
10138if test "${with_signal_module}" = "yes"; then
10139 USE_SIGNAL_MODULE=""
10140 SIGNAL_OBJS=""
10141else
10142 USE_SIGNAL_MODULE="#"
10143 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10144fi
10145
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010146# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010147
Barry Warsawc0d24d82000-06-29 16:12:00 +000010148USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010149
Martin v. Löwis11437992002-04-12 09:54:03 +000010150echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10151echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10152
Guido van Rossumec2f0731997-01-22 20:54:01 +000010153
10154# Check whether --with-dec-threads or --without-dec-threads was given.
10155if test "${with_dec_threads+set}" = set; then
10156 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010157
10158echo "$as_me:$LINENO: result: $withval" >&5
10159echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010160LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010161if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010162 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010163fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010164else
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 echo "$as_me:$LINENO: result: no" >&5
10166echo "${ECHO_T}no" >&6
10167fi;
10168
10169# Templates for things AC_DEFINEd more than once.
10170# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010171
10172
Martin v. Löwis11437992002-04-12 09:54:03 +000010173
10174
10175
10176
10177
10178echo "$as_me:$LINENO: checking for --with-threads" >&5
10179echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10180
Guido van Rossumec2f0731997-01-22 20:54:01 +000010181# Check whether --with-threads or --without-threads was given.
10182if test "${with_threads+set}" = set; then
10183 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010184
Martin v. Löwis11437992002-04-12 09:54:03 +000010185fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010186
Barry Warsawc0d24d82000-06-29 16:12:00 +000010187# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010188
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010189# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010190if test "${with_thread+set}" = set; then
10191 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010192 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010193fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000010194
10195if test -z "$with_threads"
10196then with_threads="yes"
10197fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010198echo "$as_me:$LINENO: result: $with_threads" >&5
10199echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000010200
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010201
Barry Warsawc0d24d82000-06-29 16:12:00 +000010202if test "$with_threads" = "no"
10203then
10204 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010205elif test "$ac_cv_pthread_is_default" = yes
10206then
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010208#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010209_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010210
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010211 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010213#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010214_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010215
10216 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010218elif test "$ac_cv_kpthread" = "yes"
10219then
10220 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010221 if test "$ac_cv_cxx_thread" = "yes"; then
10222 CXX="$CXX -Kpthread"
10223 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010225#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010226_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010227
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010228 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010229 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010230elif test "$ac_cv_kthread" = "yes"
10231then
10232 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010233 if test "$ac_cv_cxx_thread" = "yes"; then
10234 CXX="$CXX -Kthread"
10235 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010236 cat >>confdefs.h <<\_ACEOF
10237#define WITH_THREAD 1
10238_ACEOF
10239
10240 posix_threads=yes
10241 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010242elif test "$ac_cv_pthread" = "yes"
10243then
10244 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010245 if test "$ac_cv_cxx_thread" = "yes"; then
10246 CXX="$CXX -pthread"
10247 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010248 cat >>confdefs.h <<\_ACEOF
10249#define WITH_THREAD 1
10250_ACEOF
10251
10252 posix_threads=yes
10253 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010254else
10255 if test ! -z "$with_threads" -a -d "$with_threads"
10256 then LDFLAGS="$LDFLAGS -L$with_threads"
10257 fi
10258 if test ! -z "$withval" -a -d "$withval"
10259 then LDFLAGS="$LDFLAGS -L$withval"
10260 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010261
10262 # According to the POSIX spec, a pthreads implementation must
10263 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10265echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10266 cat >conftest.$ac_ext <<_ACEOF
10267#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* confdefs.h. */
10269_ACEOF
10270cat confdefs.h >>conftest.$ac_ext
10271cat >>conftest.$ac_ext <<_ACEOF
10272/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010273
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010274#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010275#ifdef _POSIX_THREADS
10276yes
10277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010278
10279_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010281 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010282 unistd_defines_pthreads=yes
10283else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010284 unistd_defines_pthreads=no
10285fi
10286rm -f conftest*
10287
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10289echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010290
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010292#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010293_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010294
Martin v. Löwis11437992002-04-12 09:54:03 +000010295 if test "${ac_cv_header_cthreads_h+set}" = set; then
10296 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10297echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10298if test "${ac_cv_header_cthreads_h+set}" = set; then
10299 echo $ECHO_N "(cached) $ECHO_C" >&6
10300fi
10301echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10302echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010303else
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 # Is the header compilable?
10305echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10306echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10307cat >conftest.$ac_ext <<_ACEOF
10308#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* confdefs.h. */
10310_ACEOF
10311cat confdefs.h >>conftest.$ac_ext
10312cat >>conftest.$ac_ext <<_ACEOF
10313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010314$ac_includes_default
10315#include <cthreads.h>
10316_ACEOF
10317rm -f conftest.$ac_objext
10318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10319 (eval $ac_compile) 2>&5
10320 ac_status=$?
10321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10322 (exit $ac_status); } &&
10323 { ac_try='test -s conftest.$ac_objext'
10324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10325 (eval $ac_try) 2>&5
10326 ac_status=$?
10327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10328 (exit $ac_status); }; }; then
10329 ac_header_compiler=yes
10330else
10331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010332sed 's/^/| /' conftest.$ac_ext >&5
10333
Martin v. Löwis11437992002-04-12 09:54:03 +000010334ac_header_compiler=no
10335fi
10336rm -f conftest.$ac_objext conftest.$ac_ext
10337echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10338echo "${ECHO_T}$ac_header_compiler" >&6
10339
10340# Is the header present?
10341echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10342echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10343cat >conftest.$ac_ext <<_ACEOF
10344#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010345/* confdefs.h. */
10346_ACEOF
10347cat confdefs.h >>conftest.$ac_ext
10348cat >>conftest.$ac_ext <<_ACEOF
10349/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010350#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010351_ACEOF
10352if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10353 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10354 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010355 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 rm -f conftest.er1
10357 cat conftest.err >&5
10358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10359 (exit $ac_status); } >/dev/null; then
10360 if test -s conftest.err; then
10361 ac_cpp_err=$ac_c_preproc_warn_flag
10362 else
10363 ac_cpp_err=
10364 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010365else
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 ac_cpp_err=yes
10367fi
10368if test -z "$ac_cpp_err"; then
10369 ac_header_preproc=yes
10370else
10371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010372sed 's/^/| /' conftest.$ac_ext >&5
10373
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010376rm -f conftest.err conftest.$ac_ext
10377echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10378echo "${ECHO_T}$ac_header_preproc" >&6
10379
10380# So? What about this header?
10381case $ac_header_compiler:$ac_header_preproc in
10382 yes:no )
10383 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10384echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10385 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010386echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10387 (
10388 cat <<\_ASBOX
10389## ------------------------------------ ##
10390## Report this to bug-autoconf@gnu.org. ##
10391## ------------------------------------ ##
10392_ASBOX
10393 ) |
10394 sed "s/^/$as_me: WARNING: /" >&2
10395 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 no:yes )
10397 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10398echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10399 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10400echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10401 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010402echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10403 (
10404 cat <<\_ASBOX
10405## ------------------------------------ ##
10406## Report this to bug-autoconf@gnu.org. ##
10407## ------------------------------------ ##
10408_ASBOX
10409 ) |
10410 sed "s/^/$as_me: WARNING: /" >&2
10411 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010412esac
10413echo "$as_me:$LINENO: checking for cthreads.h" >&5
10414echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10415if test "${ac_cv_header_cthreads_h+set}" = set; then
10416 echo $ECHO_N "(cached) $ECHO_C" >&6
10417else
10418 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010420echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10421echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10422
10423fi
10424if test $ac_cv_header_cthreads_h = yes; then
10425 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010426#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010427_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010428
Martin v. Löwis11437992002-04-12 09:54:03 +000010429 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010430#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010431_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010432
Martin v. Löwis11437992002-04-12 09:54:03 +000010433
10434cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010435#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010436_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010437
10438 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010439 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010440else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010441
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10443 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10444echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10445if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10446 echo $ECHO_N "(cached) $ECHO_C" >&6
10447fi
10448echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10449echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010450else
Martin v. Löwis11437992002-04-12 09:54:03 +000010451 # Is the header compilable?
10452echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10453echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10454cat >conftest.$ac_ext <<_ACEOF
10455#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010456/* confdefs.h. */
10457_ACEOF
10458cat confdefs.h >>conftest.$ac_ext
10459cat >>conftest.$ac_ext <<_ACEOF
10460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010461$ac_includes_default
10462#include <mach/cthreads.h>
10463_ACEOF
10464rm -f conftest.$ac_objext
10465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10466 (eval $ac_compile) 2>&5
10467 ac_status=$?
10468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10469 (exit $ac_status); } &&
10470 { ac_try='test -s conftest.$ac_objext'
10471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10472 (eval $ac_try) 2>&5
10473 ac_status=$?
10474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10475 (exit $ac_status); }; }; then
10476 ac_header_compiler=yes
10477else
10478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010479sed 's/^/| /' conftest.$ac_ext >&5
10480
Martin v. Löwis11437992002-04-12 09:54:03 +000010481ac_header_compiler=no
10482fi
10483rm -f conftest.$ac_objext conftest.$ac_ext
10484echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10485echo "${ECHO_T}$ac_header_compiler" >&6
10486
10487# Is the header present?
10488echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10489echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10490cat >conftest.$ac_ext <<_ACEOF
10491#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010492/* confdefs.h. */
10493_ACEOF
10494cat confdefs.h >>conftest.$ac_ext
10495cat >>conftest.$ac_ext <<_ACEOF
10496/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010497#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010498_ACEOF
10499if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10500 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10501 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010502 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 rm -f conftest.er1
10504 cat conftest.err >&5
10505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10506 (exit $ac_status); } >/dev/null; then
10507 if test -s conftest.err; then
10508 ac_cpp_err=$ac_c_preproc_warn_flag
10509 else
10510 ac_cpp_err=
10511 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010512else
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 ac_cpp_err=yes
10514fi
10515if test -z "$ac_cpp_err"; then
10516 ac_header_preproc=yes
10517else
10518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010519sed 's/^/| /' conftest.$ac_ext >&5
10520
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010522fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010523rm -f conftest.err conftest.$ac_ext
10524echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10525echo "${ECHO_T}$ac_header_preproc" >&6
10526
10527# So? What about this header?
10528case $ac_header_compiler:$ac_header_preproc in
10529 yes:no )
10530 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10531echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10532 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010533echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10534 (
10535 cat <<\_ASBOX
10536## ------------------------------------ ##
10537## Report this to bug-autoconf@gnu.org. ##
10538## ------------------------------------ ##
10539_ASBOX
10540 ) |
10541 sed "s/^/$as_me: WARNING: /" >&2
10542 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 no:yes )
10544 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10545echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10546 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10547echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10548 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010549echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10550 (
10551 cat <<\_ASBOX
10552## ------------------------------------ ##
10553## Report this to bug-autoconf@gnu.org. ##
10554## ------------------------------------ ##
10555_ASBOX
10556 ) |
10557 sed "s/^/$as_me: WARNING: /" >&2
10558 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010559esac
10560echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10561echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10562if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10563 echo $ECHO_N "(cached) $ECHO_C" >&6
10564else
10565 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010567echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10568echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10569
10570fi
10571if test $ac_cv_header_mach_cthreads_h = yes; then
10572 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010573#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010574_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010575
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010577#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010578_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010579
Martin v. Löwis11437992002-04-12 09:54:03 +000010580
10581cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010582#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010583_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010584
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010585 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010586else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010587
Martin v. Löwis11437992002-04-12 09:54:03 +000010588 echo "$as_me:$LINENO: checking for --with-pth" >&5
10589echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10590
10591# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010592if test "${with_pth+set}" = set; then
10593 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010594 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010595echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010596 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010597#define WITH_THREAD 1
10598_ACEOF
10599
10600
10601cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010602#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010603_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010604
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010605 LIBS="-lpth $LIBS"
10606 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010607else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010608 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010609echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010610
10611 # Just looking for pthread_create in libpthread is not enough:
10612 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10613 # So we really have to include pthread.h, and then link.
10614 _libs=$LIBS
10615 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010616 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10617echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10618 cat >conftest.$ac_ext <<_ACEOF
10619#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010620/* confdefs.h. */
10621_ACEOF
10622cat confdefs.h >>conftest.$ac_ext
10623cat >>conftest.$ac_ext <<_ACEOF
10624/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010625#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010626
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010627void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010628int
10629main ()
10630{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010631
10632pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010633 ;
10634 return 0;
10635}
10636_ACEOF
10637rm -f conftest.$ac_objext conftest$ac_exeext
10638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10639 (eval $ac_link) 2>&5
10640 ac_status=$?
10641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10642 (exit $ac_status); } &&
10643 { ac_try='test -s conftest$ac_exeext'
10644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10645 (eval $ac_try) 2>&5
10646 ac_status=$?
10647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10648 (exit $ac_status); }; }; then
10649
10650 echo "$as_me:$LINENO: result: yes" >&5
10651echo "${ECHO_T}yes" >&6
10652 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010653#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010654_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010655
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010656 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010657 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010658else
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010660sed 's/^/| /' conftest.$ac_ext >&5
10661
Martin v. Löwis11437992002-04-12 09:54:03 +000010662
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010663 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010664 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10665echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10666if test "${ac_cv_func_pthread_detach+set}" = set; then
10667 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010668else
Martin v. Löwis11437992002-04-12 09:54:03 +000010669 cat >conftest.$ac_ext <<_ACEOF
10670#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010671/* confdefs.h. */
10672_ACEOF
10673cat confdefs.h >>conftest.$ac_ext
10674cat >>conftest.$ac_ext <<_ACEOF
10675/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010676/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010677 which can conflict with char pthread_detach (); below.
10678 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010679 <limits.h> exists even on freestanding compilers. Under hpux,
10680 including <limits.h> includes <sys/time.h> and causes problems
10681 checking for functions defined therein. */
10682#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010683# include <limits.h>
10684#else
10685# include <assert.h>
10686#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010687/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010688#ifdef __cplusplus
10689extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010690{
Martin v. Löwis11437992002-04-12 09:54:03 +000010691#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010692/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 builtin and then its argument prototype would still apply. */
10694char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010695/* The GNU C library defines this for functions which it implements
10696 to always fail with ENOSYS. Some functions are actually named
10697 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010698#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010699choke me
10700#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010701char (*f) () = pthread_detach;
10702#endif
10703#ifdef __cplusplus
10704}
Guido van Rossumad678af1998-10-02 14:42:15 +000010705#endif
10706
Skip Montanaro6dead952003-09-25 14:50:04 +000010707int
10708main ()
10709{
10710return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 ;
10712 return 0;
10713}
10714_ACEOF
10715rm -f conftest.$ac_objext conftest$ac_exeext
10716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10717 (eval $ac_link) 2>&5
10718 ac_status=$?
10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720 (exit $ac_status); } &&
10721 { ac_try='test -s conftest$ac_exeext'
10722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10723 (eval $ac_try) 2>&5
10724 ac_status=$?
10725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726 (exit $ac_status); }; }; then
10727 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010728else
Martin v. Löwis11437992002-04-12 09:54:03 +000010729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010730sed 's/^/| /' conftest.$ac_ext >&5
10731
Martin v. Löwis11437992002-04-12 09:54:03 +000010732ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010733fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010734rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010736echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10737echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10738if test $ac_cv_func_pthread_detach = yes; then
10739 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010740#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010741_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010742
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010743 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010744 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010745else
Guido van Rossumad678af1998-10-02 14:42:15 +000010746
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010747 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10748 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10749echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10750if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10751 echo $ECHO_N "(cached) $ECHO_C" >&6
10752fi
10753echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10754echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10755else
10756 # Is the header compilable?
10757echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10758echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10759cat >conftest.$ac_ext <<_ACEOF
10760#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010761/* confdefs.h. */
10762_ACEOF
10763cat confdefs.h >>conftest.$ac_ext
10764cat >>conftest.$ac_ext <<_ACEOF
10765/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010766$ac_includes_default
10767#include <atheos/threads.h>
10768_ACEOF
10769rm -f conftest.$ac_objext
10770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10771 (eval $ac_compile) 2>&5
10772 ac_status=$?
10773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10774 (exit $ac_status); } &&
10775 { ac_try='test -s conftest.$ac_objext'
10776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10777 (eval $ac_try) 2>&5
10778 ac_status=$?
10779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10780 (exit $ac_status); }; }; then
10781 ac_header_compiler=yes
10782else
10783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010784sed 's/^/| /' conftest.$ac_ext >&5
10785
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010786ac_header_compiler=no
10787fi
10788rm -f conftest.$ac_objext conftest.$ac_ext
10789echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10790echo "${ECHO_T}$ac_header_compiler" >&6
10791
10792# Is the header present?
10793echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10794echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10795cat >conftest.$ac_ext <<_ACEOF
10796#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010797/* confdefs.h. */
10798_ACEOF
10799cat confdefs.h >>conftest.$ac_ext
10800cat >>conftest.$ac_ext <<_ACEOF
10801/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010802#include <atheos/threads.h>
10803_ACEOF
10804if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10805 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10806 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010807 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010808 rm -f conftest.er1
10809 cat conftest.err >&5
10810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10811 (exit $ac_status); } >/dev/null; then
10812 if test -s conftest.err; then
10813 ac_cpp_err=$ac_c_preproc_warn_flag
10814 else
10815 ac_cpp_err=
10816 fi
10817else
10818 ac_cpp_err=yes
10819fi
10820if test -z "$ac_cpp_err"; then
10821 ac_header_preproc=yes
10822else
10823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010824sed 's/^/| /' conftest.$ac_ext >&5
10825
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010826 ac_header_preproc=no
10827fi
10828rm -f conftest.err conftest.$ac_ext
10829echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10830echo "${ECHO_T}$ac_header_preproc" >&6
10831
10832# So? What about this header?
10833case $ac_header_compiler:$ac_header_preproc in
10834 yes:no )
10835 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10836echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10837 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010838echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10839 (
10840 cat <<\_ASBOX
10841## ------------------------------------ ##
10842## Report this to bug-autoconf@gnu.org. ##
10843## ------------------------------------ ##
10844_ASBOX
10845 ) |
10846 sed "s/^/$as_me: WARNING: /" >&2
10847 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010848 no:yes )
10849 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10850echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10851 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10852echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10853 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010854echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10855 (
10856 cat <<\_ASBOX
10857## ------------------------------------ ##
10858## Report this to bug-autoconf@gnu.org. ##
10859## ------------------------------------ ##
10860_ASBOX
10861 ) |
10862 sed "s/^/$as_me: WARNING: /" >&2
10863 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010864esac
10865echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10866echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10867if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10868 echo $ECHO_N "(cached) $ECHO_C" >&6
10869else
10870 ac_cv_header_atheos_threads_h=$ac_header_preproc
10871fi
10872echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10873echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10874
10875fi
10876if test $ac_cv_header_atheos_threads_h = yes; then
10877 cat >>confdefs.h <<\_ACEOF
10878#define WITH_THREAD 1
10879_ACEOF
10880
10881
10882cat >>confdefs.h <<\_ACEOF
10883#define ATHEOS_THREADS 1
10884_ACEOF
10885
10886 THREADOBJ="Python/thread.o"
10887else
10888
Martin v. Löwis11437992002-04-12 09:54:03 +000010889 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10890 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10891echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10892if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10893 echo $ECHO_N "(cached) $ECHO_C" >&6
10894fi
10895echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10896echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010897else
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 # Is the header compilable?
10899echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10900echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10901cat >conftest.$ac_ext <<_ACEOF
10902#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* confdefs.h. */
10904_ACEOF
10905cat confdefs.h >>conftest.$ac_ext
10906cat >>conftest.$ac_ext <<_ACEOF
10907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010908$ac_includes_default
10909#include <kernel/OS.h>
10910_ACEOF
10911rm -f conftest.$ac_objext
10912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10913 (eval $ac_compile) 2>&5
10914 ac_status=$?
10915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10916 (exit $ac_status); } &&
10917 { ac_try='test -s conftest.$ac_objext'
10918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10919 (eval $ac_try) 2>&5
10920 ac_status=$?
10921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10922 (exit $ac_status); }; }; then
10923 ac_header_compiler=yes
10924else
10925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010926sed 's/^/| /' conftest.$ac_ext >&5
10927
Martin v. Löwis11437992002-04-12 09:54:03 +000010928ac_header_compiler=no
10929fi
10930rm -f conftest.$ac_objext conftest.$ac_ext
10931echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10932echo "${ECHO_T}$ac_header_compiler" >&6
10933
10934# Is the header present?
10935echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10936echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10937cat >conftest.$ac_ext <<_ACEOF
10938#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010939/* confdefs.h. */
10940_ACEOF
10941cat confdefs.h >>conftest.$ac_ext
10942cat >>conftest.$ac_ext <<_ACEOF
10943/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010944#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010945_ACEOF
10946if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10947 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10948 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010949 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010950 rm -f conftest.er1
10951 cat conftest.err >&5
10952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10953 (exit $ac_status); } >/dev/null; then
10954 if test -s conftest.err; then
10955 ac_cpp_err=$ac_c_preproc_warn_flag
10956 else
10957 ac_cpp_err=
10958 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010959else
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 ac_cpp_err=yes
10961fi
10962if test -z "$ac_cpp_err"; then
10963 ac_header_preproc=yes
10964else
10965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010966sed 's/^/| /' conftest.$ac_ext >&5
10967
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010969fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010970rm -f conftest.err conftest.$ac_ext
10971echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10972echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010973
Martin v. Löwis11437992002-04-12 09:54:03 +000010974# So? What about this header?
10975case $ac_header_compiler:$ac_header_preproc in
10976 yes:no )
10977 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10978echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10979 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010980echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10981 (
10982 cat <<\_ASBOX
10983## ------------------------------------ ##
10984## Report this to bug-autoconf@gnu.org. ##
10985## ------------------------------------ ##
10986_ASBOX
10987 ) |
10988 sed "s/^/$as_me: WARNING: /" >&2
10989 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010990 no:yes )
10991 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10992echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10993 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10994echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10995 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010996echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10997 (
10998 cat <<\_ASBOX
10999## ------------------------------------ ##
11000## Report this to bug-autoconf@gnu.org. ##
11001## ------------------------------------ ##
11002_ASBOX
11003 ) |
11004 sed "s/^/$as_me: WARNING: /" >&2
11005 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011006esac
11007echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11008echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11009if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11010 echo $ECHO_N "(cached) $ECHO_C" >&6
11011else
11012 ac_cv_header_kernel_OS_h=$ac_header_preproc
11013fi
11014echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11015echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11016
11017fi
11018if test $ac_cv_header_kernel_OS_h = yes; then
11019 cat >>confdefs.h <<\_ACEOF
11020#define WITH_THREAD 1
11021_ACEOF
11022
11023
11024cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011025#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011026_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011027
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011028 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011029else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011030
Martin v. Löwis11437992002-04-12 09:54:03 +000011031 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11032echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11033if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11034 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011035else
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011037LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011038cat >conftest.$ac_ext <<_ACEOF
11039#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011040/* confdefs.h. */
11041_ACEOF
11042cat confdefs.h >>conftest.$ac_ext
11043cat >>conftest.$ac_ext <<_ACEOF
11044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011045
Greg Steinadf63d62000-07-05 10:38:09 +000011046/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011047#ifdef __cplusplus
11048extern "C"
11049#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011050/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 builtin and then its argument prototype would still apply. */
11052char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011053int
11054main ()
11055{
11056pthread_create ();
11057 ;
11058 return 0;
11059}
11060_ACEOF
11061rm -f conftest.$ac_objext conftest$ac_exeext
11062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11063 (eval $ac_link) 2>&5
11064 ac_status=$?
11065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11066 (exit $ac_status); } &&
11067 { ac_try='test -s conftest$ac_exeext'
11068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11069 (eval $ac_try) 2>&5
11070 ac_status=$?
11071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11072 (exit $ac_status); }; }; then
11073 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011074else
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011076sed 's/^/| /' conftest.$ac_ext >&5
11077
Martin v. Löwis11437992002-04-12 09:54:03 +000011078ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11081LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011083echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11084echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11085if test $ac_cv_lib_pthreads_pthread_create = yes; then
11086 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011087#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011088_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011089
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011090 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011091 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011092 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011093else
Greg Steinadf63d62000-07-05 10:38:09 +000011094
Martin v. Löwis11437992002-04-12 09:54:03 +000011095 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11096echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11097if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11098 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011099else
Martin v. Löwis11437992002-04-12 09:54:03 +000011100 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011101LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011102cat >conftest.$ac_ext <<_ACEOF
11103#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011104/* confdefs.h. */
11105_ACEOF
11106cat confdefs.h >>conftest.$ac_ext
11107cat >>conftest.$ac_ext <<_ACEOF
11108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011109
Guido van Rossum49545951997-12-02 19:28:29 +000011110/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011111#ifdef __cplusplus
11112extern "C"
11113#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011114/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 builtin and then its argument prototype would still apply. */
11116char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011117int
11118main ()
11119{
11120pthread_create ();
11121 ;
11122 return 0;
11123}
11124_ACEOF
11125rm -f conftest.$ac_objext conftest$ac_exeext
11126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11127 (eval $ac_link) 2>&5
11128 ac_status=$?
11129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11130 (exit $ac_status); } &&
11131 { ac_try='test -s conftest$ac_exeext'
11132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11133 (eval $ac_try) 2>&5
11134 ac_status=$?
11135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11136 (exit $ac_status); }; }; then
11137 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011138else
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011140sed 's/^/| /' conftest.$ac_ext >&5
11141
Martin v. Löwis11437992002-04-12 09:54:03 +000011142ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011144rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11145LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011146fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011147echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11148echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11149if test $ac_cv_lib_c_r_pthread_create = yes; then
11150 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011151#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011152_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011153
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011154 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011155 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011156 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011157else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011158
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11160echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11161if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11162 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011163else
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011165LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011166cat >conftest.$ac_ext <<_ACEOF
11167#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011168/* confdefs.h. */
11169_ACEOF
11170cat confdefs.h >>conftest.$ac_ext
11171cat >>conftest.$ac_ext <<_ACEOF
11172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011173
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011174/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011175#ifdef __cplusplus
11176extern "C"
11177#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011178/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011179 builtin and then its argument prototype would still apply. */
11180char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011181int
11182main ()
11183{
11184__pthread_create_system ();
11185 ;
11186 return 0;
11187}
11188_ACEOF
11189rm -f conftest.$ac_objext conftest$ac_exeext
11190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11191 (eval $ac_link) 2>&5
11192 ac_status=$?
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); } &&
11195 { ac_try='test -s conftest$ac_exeext'
11196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11197 (eval $ac_try) 2>&5
11198 ac_status=$?
11199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11200 (exit $ac_status); }; }; then
11201 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011202else
Martin v. Löwis11437992002-04-12 09:54:03 +000011203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011204sed 's/^/| /' conftest.$ac_ext >&5
11205
Martin v. Löwis11437992002-04-12 09:54:03 +000011206ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011207fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011208rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11209LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011211echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11212echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11213if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11214 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011215#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011216_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011217
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011218 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011219 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011220 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011221else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011222
Martin v. Löwis11437992002-04-12 09:54:03 +000011223 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11224echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11225if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11226 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011227else
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011229LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011230cat >conftest.$ac_ext <<_ACEOF
11231#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011232/* confdefs.h. */
11233_ACEOF
11234cat confdefs.h >>conftest.$ac_ext
11235cat >>conftest.$ac_ext <<_ACEOF
11236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011237
Guido van Rossumb93a8621998-05-07 13:27:32 +000011238/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011239#ifdef __cplusplus
11240extern "C"
11241#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011242/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 builtin and then its argument prototype would still apply. */
11244char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011245int
11246main ()
11247{
11248pthread_create ();
11249 ;
11250 return 0;
11251}
11252_ACEOF
11253rm -f conftest.$ac_objext conftest$ac_exeext
11254if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11255 (eval $ac_link) 2>&5
11256 ac_status=$?
11257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258 (exit $ac_status); } &&
11259 { ac_try='test -s conftest$ac_exeext'
11260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11261 (eval $ac_try) 2>&5
11262 ac_status=$?
11263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264 (exit $ac_status); }; }; then
11265 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011266else
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011268sed 's/^/| /' conftest.$ac_ext >&5
11269
Martin v. Löwis11437992002-04-12 09:54:03 +000011270ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011271fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011272rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11273LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011274fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011275echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11276echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11277if test $ac_cv_lib_cma_pthread_create = yes; then
11278 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011279#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011280_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011281
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011282 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011283 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011284 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011285else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011286
Martin v. Löwis130fb172001-07-19 11:00:41 +000011287 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011288fi
11289
Guido van Rossum627b2d71993-12-24 10:39:16 +000011290
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011291fi
11292
Guido van Rossum0be3e491997-05-22 20:33:33 +000011293fi
11294
Guido van Rossum49545951997-12-02 19:28:29 +000011295fi
11296
Guido van Rossumb93a8621998-05-07 13:27:32 +000011297fi
11298
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011299
Michael W. Hudson54241132001-12-07 15:38:26 +000011300fi
11301
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011302
11303fi
11304
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011305fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011306rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11307fi;
11308fi
11309
11310
11311fi
11312
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011313
Michael W. Hudson54241132001-12-07 15:38:26 +000011314
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11316echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11317if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11318 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011319else
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011321LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011322cat >conftest.$ac_ext <<_ACEOF
11323#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* confdefs.h. */
11325_ACEOF
11326cat confdefs.h >>conftest.$ac_ext
11327cat >>conftest.$ac_ext <<_ACEOF
11328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011329
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011330/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011331#ifdef __cplusplus
11332extern "C"
11333#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011334/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 builtin and then its argument prototype would still apply. */
11336char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011337int
11338main ()
11339{
11340usconfig ();
11341 ;
11342 return 0;
11343}
11344_ACEOF
11345rm -f conftest.$ac_objext conftest$ac_exeext
11346if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11347 (eval $ac_link) 2>&5
11348 ac_status=$?
11349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11350 (exit $ac_status); } &&
11351 { ac_try='test -s conftest$ac_exeext'
11352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11353 (eval $ac_try) 2>&5
11354 ac_status=$?
11355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11356 (exit $ac_status); }; }; then
11357 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011358else
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011360sed 's/^/| /' conftest.$ac_ext >&5
11361
Martin v. Löwis11437992002-04-12 09:54:03 +000011362ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011364rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11365LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011367echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11368echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11369if test $ac_cv_lib_mpc_usconfig = yes; then
11370 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011372_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011373
Martin v. Löwis130fb172001-07-19 11:00:41 +000011374 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011375 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011376 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011377fi
11378
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011379
Neal Norwitza978ab02002-11-02 16:58:05 +000011380 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11382echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11383if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011385else
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011387LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011388cat >conftest.$ac_ext <<_ACEOF
11389#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011390/* confdefs.h. */
11391_ACEOF
11392cat confdefs.h >>conftest.$ac_ext
11393cat >>conftest.$ac_ext <<_ACEOF
11394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011395
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011396/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011397#ifdef __cplusplus
11398extern "C"
11399#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011400/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011401 builtin and then its argument prototype would still apply. */
11402char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011403int
11404main ()
11405{
11406thr_create ();
11407 ;
11408 return 0;
11409}
11410_ACEOF
11411rm -f conftest.$ac_objext conftest$ac_exeext
11412if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11413 (eval $ac_link) 2>&5
11414 ac_status=$?
11415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11416 (exit $ac_status); } &&
11417 { ac_try='test -s conftest$ac_exeext'
11418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11419 (eval $ac_try) 2>&5
11420 ac_status=$?
11421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11422 (exit $ac_status); }; }; then
11423 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011424else
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011426sed 's/^/| /' conftest.$ac_ext >&5
11427
Martin v. Löwis11437992002-04-12 09:54:03 +000011428ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011429fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011430rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11431LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011433echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11434echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11435if test $ac_cv_lib_thread_thr_create = yes; then
11436 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011437#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011438_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011439
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011440 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011441 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011442 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011443fi
11444
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011445 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011446
Martin v. Löwis130fb172001-07-19 11:00:41 +000011447 if test "$USE_THREAD_MODULE" != "#"
11448 then
11449 # If the above checks didn't disable threads, (at least) OSF1
11450 # needs this '-threads' argument during linking.
11451 case $ac_sys_system in
11452 OSF1) LDLAST=-threads;;
11453 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011454 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011455fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011456
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011457if test "$posix_threads" = "yes"; then
11458 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011459
11460cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011461#define _POSIX_THREADS 1
11462_ACEOF
11463
11464 fi
11465
11466 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11467 case $ac_sys_system/$ac_sys_release in
11468 SunOS/5.6)
11469cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011470#define HAVE_PTHREAD_DESTRUCTOR 1
11471_ACEOF
11472
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011473 ;;
11474 SunOS/5.8)
11475cat >>confdefs.h <<\_ACEOF
11476#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11477_ACEOF
11478
11479 ;;
11480 esac
11481
11482 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11483echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11484 if test "${ac_cv_pthread_system_supported+set}" = set; then
11485 echo $ECHO_N "(cached) $ECHO_C" >&6
11486else
11487 if test "$cross_compiling" = yes; then
11488 ac_cv_pthread_system_supported=no
11489else
11490 cat >conftest.$ac_ext <<_ACEOF
11491#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011492/* confdefs.h. */
11493_ACEOF
11494cat confdefs.h >>conftest.$ac_ext
11495cat >>conftest.$ac_ext <<_ACEOF
11496/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011497#include <pthread.h>
11498 void *foo(void *parm) {
11499 return NULL;
11500 }
11501 main() {
11502 pthread_attr_t attr;
11503 pthread_t id;
11504 if (pthread_attr_init(&attr)) exit(-1);
11505 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11506 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11507 exit(0);
11508 }
11509_ACEOF
11510rm -f conftest$ac_exeext
11511if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11512 (eval $ac_link) 2>&5
11513 ac_status=$?
11514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11517 (eval $ac_try) 2>&5
11518 ac_status=$?
11519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11520 (exit $ac_status); }; }; then
11521 ac_cv_pthread_system_supported=yes
11522else
11523 echo "$as_me: program exited with status $ac_status" >&5
11524echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011525sed 's/^/| /' conftest.$ac_ext >&5
11526
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011527( exit $ac_status )
11528ac_cv_pthread_system_supported=no
11529fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011530rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011531fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011532
Guido van Rossum627b2d71993-12-24 10:39:16 +000011533fi
11534
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011535 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11536echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11537 if test "$ac_cv_pthread_system_supported" = "yes"; then
11538
11539cat >>confdefs.h <<\_ACEOF
11540#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11541_ACEOF
11542
11543 fi
11544
11545for ac_func in pthread_sigmask
11546do
11547as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11548echo "$as_me:$LINENO: checking for $ac_func" >&5
11549echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11550if eval "test \"\${$as_ac_var+set}\" = set"; then
11551 echo $ECHO_N "(cached) $ECHO_C" >&6
11552else
11553 cat >conftest.$ac_ext <<_ACEOF
11554#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011555/* confdefs.h. */
11556_ACEOF
11557cat confdefs.h >>conftest.$ac_ext
11558cat >>conftest.$ac_ext <<_ACEOF
11559/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011560/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011561 which can conflict with char $ac_func (); below.
11562 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011563 <limits.h> exists even on freestanding compilers. Under hpux,
11564 including <limits.h> includes <sys/time.h> and causes problems
11565 checking for functions defined therein. */
11566#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011567# include <limits.h>
11568#else
11569# include <assert.h>
11570#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011571/* Override any gcc2 internal prototype to avoid an error. */
11572#ifdef __cplusplus
11573extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011574{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011575#endif
11576/* We use char because int might match the return type of a gcc2
11577 builtin and then its argument prototype would still apply. */
11578char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011579/* The GNU C library defines this for functions which it implements
11580 to always fail with ENOSYS. Some functions are actually named
11581 something starting with __ and the normal name is an alias. */
11582#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11583choke me
11584#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011585char (*f) () = $ac_func;
11586#endif
11587#ifdef __cplusplus
11588}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011589#endif
11590
Skip Montanaro6dead952003-09-25 14:50:04 +000011591int
11592main ()
11593{
11594return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011595 ;
11596 return 0;
11597}
11598_ACEOF
11599rm -f conftest.$ac_objext conftest$ac_exeext
11600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11601 (eval $ac_link) 2>&5
11602 ac_status=$?
11603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604 (exit $ac_status); } &&
11605 { ac_try='test -s conftest$ac_exeext'
11606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11607 (eval $ac_try) 2>&5
11608 ac_status=$?
11609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11610 (exit $ac_status); }; }; then
11611 eval "$as_ac_var=yes"
11612else
11613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011614sed 's/^/| /' conftest.$ac_ext >&5
11615
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011616eval "$as_ac_var=no"
11617fi
11618rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11619fi
11620echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11621echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11622if test `eval echo '${'$as_ac_var'}'` = yes; then
11623 cat >>confdefs.h <<_ACEOF
11624#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11625_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011626 case $ac_sys_system in
11627 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011628
Jason Tishlerfac083d2003-07-22 15:20:49 +000011629cat >>confdefs.h <<\_ACEOF
11630#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11631_ACEOF
11632
11633 ;;
11634 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011635fi
11636done
11637
11638fi
11639
11640
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011641# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011642
11643
11644echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11645echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011646# Check whether --enable-ipv6 or --disable-ipv6 was given.
11647if test "${enable_ipv6+set}" = set; then
11648 enableval="$enable_ipv6"
11649 case "$enableval" in
11650 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 echo "$as_me:$LINENO: result: no" >&5
11652echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011653 ipv6=no
11654 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011655 *) echo "$as_me:$LINENO: result: yes" >&5
11656echo "${ECHO_T}yes" >&6
11657 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011658#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011659_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011660
11661 ipv6=yes
11662 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011663 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011664else
Martin v. Löwis11437992002-04-12 09:54:03 +000011665
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011666 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 echo "$as_me:$LINENO: result: no" >&5
11668echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011669 ipv6=no
11670
11671else
Martin v. Löwis11437992002-04-12 09:54:03 +000011672 cat >conftest.$ac_ext <<_ACEOF
11673#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011674/* confdefs.h. */
11675_ACEOF
11676cat confdefs.h >>conftest.$ac_ext
11677cat >>conftest.$ac_ext <<_ACEOF
11678/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011679 /* AF_INET6 available check */
11680#include <sys/types.h>
11681#include <sys/socket.h>
11682main()
11683{
11684 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11685 exit(1);
11686 else
11687 exit(0);
11688}
11689
Martin v. Löwis11437992002-04-12 09:54:03 +000011690_ACEOF
11691rm -f conftest$ac_exeext
11692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11693 (eval $ac_link) 2>&5
11694 ac_status=$?
11695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11698 (eval $ac_try) 2>&5
11699 ac_status=$?
11700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11701 (exit $ac_status); }; }; then
11702 echo "$as_me:$LINENO: result: yes" >&5
11703echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011704 ipv6=yes
11705else
Martin v. Löwis11437992002-04-12 09:54:03 +000011706 echo "$as_me: program exited with status $ac_status" >&5
11707echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011708sed 's/^/| /' conftest.$ac_ext >&5
11709
Martin v. Löwis11437992002-04-12 09:54:03 +000011710( exit $ac_status )
11711echo "$as_me:$LINENO: result: no" >&5
11712echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011713 ipv6=no
11714fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011715rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011716fi
11717
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011718if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011719 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11720echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11721 cat >conftest.$ac_ext <<_ACEOF
11722#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011723/* confdefs.h. */
11724_ACEOF
11725cat confdefs.h >>conftest.$ac_ext
11726cat >>conftest.$ac_ext <<_ACEOF
11727/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011728#include <sys/types.h>
11729#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011730int
11731main ()
11732{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011733struct sockaddr_in6 x;
11734x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011735 ;
11736 return 0;
11737}
11738_ACEOF
11739rm -f conftest.$ac_objext
11740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11741 (eval $ac_compile) 2>&5
11742 ac_status=$?
11743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11744 (exit $ac_status); } &&
11745 { ac_try='test -s conftest.$ac_objext'
11746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11747 (eval $ac_try) 2>&5
11748 ac_status=$?
11749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11750 (exit $ac_status); }; }; then
11751 echo "$as_me:$LINENO: result: yes" >&5
11752echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011753 ipv6=yes
11754else
Martin v. Löwis11437992002-04-12 09:54:03 +000011755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011756sed 's/^/| /' conftest.$ac_ext >&5
11757
Martin v. Löwis11437992002-04-12 09:54:03 +000011758echo "$as_me:$LINENO: result: no" >&5
11759echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011760 ipv6=no
11761fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011762rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011763fi
11764
11765if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011767#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011768_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011769
11770fi
11771
Martin v. Löwis11437992002-04-12 09:54:03 +000011772fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011773
11774ipv6type=unknown
11775ipv6lib=none
11776ipv6trylibc=no
11777
11778if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11780echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011781 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11782 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011783 case $i in
11784 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 cat >conftest.$ac_ext <<_ACEOF
11786#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011787/* confdefs.h. */
11788_ACEOF
11789cat confdefs.h >>conftest.$ac_ext
11790cat >>conftest.$ac_ext <<_ACEOF
11791/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011792
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011793#include <netinet/in.h>
11794#ifdef IPV6_INRIA_VERSION
11795yes
11796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011797_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011798if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011799 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011800 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011801fi
11802rm -f conftest*
11803
11804 ;;
11805 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011806 cat >conftest.$ac_ext <<_ACEOF
11807#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011808/* confdefs.h. */
11809_ACEOF
11810cat confdefs.h >>conftest.$ac_ext
11811cat >>conftest.$ac_ext <<_ACEOF
11812/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011813
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011814#include <netinet/in.h>
11815#ifdef __KAME__
11816yes
11817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011818_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011820 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011821 ipv6type=$i;
11822 ipv6lib=inet6
11823 ipv6libdir=/usr/local/v6/lib
11824 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011825fi
11826rm -f conftest*
11827
11828 ;;
11829 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011830 cat >conftest.$ac_ext <<_ACEOF
11831#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011832/* confdefs.h. */
11833_ACEOF
11834cat confdefs.h >>conftest.$ac_ext
11835cat >>conftest.$ac_ext <<_ACEOF
11836/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011837
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011838#include <features.h>
11839#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11840yes
11841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011842_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011844 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011845 ipv6type=$i;
11846 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011847fi
11848rm -f conftest*
11849
11850 ;;
11851 linux-inet6)
11852 if test -d /usr/inet6; then
11853 ipv6type=$i
11854 ipv6lib=inet6
11855 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011856 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011857 fi
11858 ;;
11859 solaris)
11860 if test -f /etc/netconfig; then
11861 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11862 ipv6type=$i
11863 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011864 fi
11865 fi
11866 ;;
11867 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011868 cat >conftest.$ac_ext <<_ACEOF
11869#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011870/* confdefs.h. */
11871_ACEOF
11872cat confdefs.h >>conftest.$ac_ext
11873cat >>conftest.$ac_ext <<_ACEOF
11874/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011875
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011876#include <sys/param.h>
11877#ifdef _TOSHIBA_INET6
11878yes
11879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011880_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011882 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011883 ipv6type=$i;
11884 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011885 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011886fi
11887rm -f conftest*
11888
11889 ;;
11890 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011891 cat >conftest.$ac_ext <<_ACEOF
11892#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011893/* confdefs.h. */
11894_ACEOF
11895cat confdefs.h >>conftest.$ac_ext
11896cat >>conftest.$ac_ext <<_ACEOF
11897/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011899#include </usr/local/v6/include/sys/v6config.h>
11900#ifdef __V6D__
11901yes
11902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011903_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011905 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011906 ipv6type=$i;
11907 ipv6lib=v6;
11908 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011909 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011910fi
11911rm -f conftest*
11912
11913 ;;
11914 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011915 cat >conftest.$ac_ext <<_ACEOF
11916#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011917/* confdefs.h. */
11918_ACEOF
11919cat confdefs.h >>conftest.$ac_ext
11920cat >>conftest.$ac_ext <<_ACEOF
11921/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011922
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011923#include <sys/param.h>
11924#ifdef _ZETA_MINAMI_INET6
11925yes
11926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011927_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011929 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011930 ipv6type=$i;
11931 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011932 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011933fi
11934rm -f conftest*
11935
11936 ;;
11937 esac
11938 if test "$ipv6type" != "unknown"; then
11939 break
11940 fi
11941 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011942 echo "$as_me:$LINENO: result: $ipv6type" >&5
11943echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011944fi
11945
11946if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11947 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11948 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11949 echo "using lib$ipv6lib"
11950 else
11951 if test $ipv6trylibc = "yes"; then
11952 echo "using libc"
11953 else
11954 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11955 echo "You need to fetch lib$ipv6lib.a from appropriate"
11956 echo 'ipv6 kit and compile beforehand.'
11957 exit 1
11958 fi
11959 fi
11960fi
11961
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011962# Check for --with-doc-strings
11963echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11964echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11965
11966# Check whether --with-doc-strings or --without-doc-strings was given.
11967if test "${with_doc_strings+set}" = set; then
11968 withval="$with_doc_strings"
11969
11970fi;
11971
11972if test -z "$with_doc_strings"
11973then with_doc_strings="yes"
11974fi
11975if test "$with_doc_strings" != "no"
11976then
11977
11978cat >>confdefs.h <<\_ACEOF
11979#define WITH_DOC_STRINGS 1
11980_ACEOF
11981
11982fi
11983echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11984echo "${ECHO_T}$with_doc_strings" >&6
11985
Neil Schemenauera35c6882001-02-27 04:45:05 +000011986# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011987echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11988echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11989
Neil Schemenauera35c6882001-02-27 04:45:05 +000011990# Check whether --with-pymalloc or --without-pymalloc was given.
11991if test "${with_pymalloc+set}" = set; then
11992 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011993
Martin v. Löwis11437992002-04-12 09:54:03 +000011994fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011995
Neil Schemenauer16c22972002-03-22 15:34:49 +000011996if test -z "$with_pymalloc"
11997then with_pymalloc="yes"
11998fi
11999if test "$with_pymalloc" != "no"
12000then
Martin v. Löwis11437992002-04-12 09:54:03 +000012001
12002cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012003#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012004_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012005
12006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012007echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12008echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012009
Barry Warsawef82cd72000-06-30 16:21:01 +000012010# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012011echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12012echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12013
Barry Warsawef82cd72000-06-30 16:21:01 +000012014# Check whether --with-wctype-functions or --without-wctype-functions was given.
12015if test "${with_wctype_functions+set}" = set; then
12016 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012017
Barry Warsawef82cd72000-06-30 16:21:01 +000012018if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012019then
12020
12021cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012022#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012023_ACEOF
12024
12025 echo "$as_me:$LINENO: result: yes" >&5
12026echo "${ECHO_T}yes" >&6
12027else echo "$as_me:$LINENO: result: no" >&5
12028echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012029fi
12030else
Martin v. Löwis11437992002-04-12 09:54:03 +000012031 echo "$as_me:$LINENO: result: no" >&5
12032echo "${ECHO_T}no" >&6
12033fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012034
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012035# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012036
Guido van Rossum98935bf2001-09-05 19:13:16 +000012037DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012038
Guido van Rossume97ee181999-12-20 21:27:22 +000012039# the dlopen() function means we might want to use dynload_shlib.o. some
12040# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012041
Thomas Wouters3a584202000-08-05 23:28:51 +000012042for ac_func in dlopen
12043do
Martin v. Löwis11437992002-04-12 09:54:03 +000012044as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12045echo "$as_me:$LINENO: checking for $ac_func" >&5
12046echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12047if eval "test \"\${$as_ac_var+set}\" = set"; then
12048 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012049else
Martin v. Löwis11437992002-04-12 09:54:03 +000012050 cat >conftest.$ac_ext <<_ACEOF
12051#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012052/* confdefs.h. */
12053_ACEOF
12054cat confdefs.h >>conftest.$ac_ext
12055cat >>conftest.$ac_ext <<_ACEOF
12056/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012057/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012058 which can conflict with char $ac_func (); below.
12059 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012060 <limits.h> exists even on freestanding compilers. Under hpux,
12061 including <limits.h> includes <sys/time.h> and causes problems
12062 checking for functions defined therein. */
12063#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012064# include <limits.h>
12065#else
12066# include <assert.h>
12067#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012068/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012069#ifdef __cplusplus
12070extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012071{
Martin v. Löwis11437992002-04-12 09:54:03 +000012072#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012073/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012074 builtin and then its argument prototype would still apply. */
12075char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012076/* The GNU C library defines this for functions which it implements
12077 to always fail with ENOSYS. Some functions are actually named
12078 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012079#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012080choke me
12081#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012082char (*f) () = $ac_func;
12083#endif
12084#ifdef __cplusplus
12085}
Guido van Rossume97ee181999-12-20 21:27:22 +000012086#endif
12087
Skip Montanaro6dead952003-09-25 14:50:04 +000012088int
12089main ()
12090{
12091return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012092 ;
12093 return 0;
12094}
12095_ACEOF
12096rm -f conftest.$ac_objext conftest$ac_exeext
12097if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12098 (eval $ac_link) 2>&5
12099 ac_status=$?
12100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12101 (exit $ac_status); } &&
12102 { ac_try='test -s conftest$ac_exeext'
12103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12104 (eval $ac_try) 2>&5
12105 ac_status=$?
12106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12107 (exit $ac_status); }; }; then
12108 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012109else
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012111sed 's/^/| /' conftest.$ac_ext >&5
12112
Martin v. Löwis11437992002-04-12 09:54:03 +000012113eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012114fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012115rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012116fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012117echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12118echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12119if test `eval echo '${'$as_ac_var'}'` = yes; then
12120 cat >>confdefs.h <<_ACEOF
12121#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12122_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012123
Guido van Rossume97ee181999-12-20 21:27:22 +000012124fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012125done
Guido van Rossume97ee181999-12-20 21:27:22 +000012126
Michael W. Hudson54241132001-12-07 15:38:26 +000012127
Guido van Rossume97ee181999-12-20 21:27:22 +000012128# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12129# loading of modules.
12130
Martin v. Löwis11437992002-04-12 09:54:03 +000012131echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12132echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012133if test -z "$DYNLOADFILE"
12134then
12135 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012136 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12137 if test "$ac_cv_func_dlopen" = yes
12138 then DYNLOADFILE="dynload_shlib.o"
12139 else DYNLOADFILE="dynload_aix.o"
12140 fi
12141 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012142 BeOS*) DYNLOADFILE="dynload_beos.o";;
12143 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012144 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012145 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012146 *)
12147 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12148 # out any dynamic loading
12149 if test "$ac_cv_func_dlopen" = yes
12150 then DYNLOADFILE="dynload_shlib.o"
12151 else DYNLOADFILE="dynload_stub.o"
12152 fi
12153 ;;
12154 esac
12155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012156echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12157echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012158if test "$DYNLOADFILE" != "dynload_stub.o"
12159then
Martin v. Löwis11437992002-04-12 09:54:03 +000012160
12161cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012162#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012163_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012164
12165fi
12166
Neil Schemenauer4e425612001-06-19 15:44:15 +000012167# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12168
Michael W. Hudson54241132001-12-07 15:38:26 +000012169
Martin v. Löwis11437992002-04-12 09:54:03 +000012170echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12171echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012172if test -z "$MACHDEP_OBJS"
12173then
Jack Jansene578a632001-08-15 01:27:14 +000012174 MACHDEP_OBJS=$extra_machdep_objs
12175else
12176 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012177fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012178echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12179echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012180
Guido van Rossum627b2d71993-12-24 10:39:16 +000012181# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
Martin v. Löwisd5843682002-11-21 20:41:28 +000012253for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012254 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012255 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012256 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012257 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012258 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012259 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012260 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012261 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000012262 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012263 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012264 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012265do
Martin v. Löwis11437992002-04-12 09:54:03 +000012266as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12267echo "$as_me:$LINENO: checking for $ac_func" >&5
12268echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12269if eval "test \"\${$as_ac_var+set}\" = set"; then
12270 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012271else
Martin v. Löwis11437992002-04-12 09:54:03 +000012272 cat >conftest.$ac_ext <<_ACEOF
12273#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012274/* confdefs.h. */
12275_ACEOF
12276cat confdefs.h >>conftest.$ac_ext
12277cat >>conftest.$ac_ext <<_ACEOF
12278/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012279/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012280 which can conflict with char $ac_func (); below.
12281 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012282 <limits.h> exists even on freestanding compilers. Under hpux,
12283 including <limits.h> includes <sys/time.h> and causes problems
12284 checking for functions defined therein. */
12285#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012286# include <limits.h>
12287#else
12288# include <assert.h>
12289#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012290/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012291#ifdef __cplusplus
12292extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012293{
Martin v. Löwis11437992002-04-12 09:54:03 +000012294#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012295/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 builtin and then its argument prototype would still apply. */
12297char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012298/* The GNU C library defines this for functions which it implements
12299 to always fail with ENOSYS. Some functions are actually named
12300 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012301#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012302choke me
12303#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012304char (*f) () = $ac_func;
12305#endif
12306#ifdef __cplusplus
12307}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012308#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012309
Skip Montanaro6dead952003-09-25 14:50:04 +000012310int
12311main ()
12312{
12313return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012314 ;
12315 return 0;
12316}
12317_ACEOF
12318rm -f conftest.$ac_objext conftest$ac_exeext
12319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12320 (eval $ac_link) 2>&5
12321 ac_status=$?
12322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12323 (exit $ac_status); } &&
12324 { ac_try='test -s conftest$ac_exeext'
12325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12326 (eval $ac_try) 2>&5
12327 ac_status=$?
12328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12329 (exit $ac_status); }; }; then
12330 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012331else
Martin v. Löwis11437992002-04-12 09:54:03 +000012332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012333sed 's/^/| /' conftest.$ac_ext >&5
12334
Martin v. Löwis11437992002-04-12 09:54:03 +000012335eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012336fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012337rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012338fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012339echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12340echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12341if test `eval echo '${'$as_ac_var'}'` = yes; then
12342 cat >>confdefs.h <<_ACEOF
12343#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12344_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012345
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012346fi
12347done
12348
Michael W. Hudson54241132001-12-07 15:38:26 +000012349
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012350# For some functions, having a definition is not sufficient, since
12351# we want to take their address.
12352echo "$as_me:$LINENO: checking for chroot" >&5
12353echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12354cat >conftest.$ac_ext <<_ACEOF
12355#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012356/* confdefs.h. */
12357_ACEOF
12358cat confdefs.h >>conftest.$ac_ext
12359cat >>conftest.$ac_ext <<_ACEOF
12360/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012361#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012362int
12363main ()
12364{
12365void *x=chroot
12366 ;
12367 return 0;
12368}
12369_ACEOF
12370rm -f conftest.$ac_objext
12371if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12372 (eval $ac_compile) 2>&5
12373 ac_status=$?
12374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12375 (exit $ac_status); } &&
12376 { ac_try='test -s conftest.$ac_objext'
12377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12378 (eval $ac_try) 2>&5
12379 ac_status=$?
12380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12381 (exit $ac_status); }; }; then
12382
12383cat >>confdefs.h <<\_ACEOF
12384#define HAVE_CHROOT 1
12385_ACEOF
12386
12387 echo "$as_me:$LINENO: result: yes" >&5
12388echo "${ECHO_T}yes" >&6
12389else
12390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012391sed 's/^/| /' conftest.$ac_ext >&5
12392
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012393echo "$as_me:$LINENO: result: no" >&5
12394echo "${ECHO_T}no" >&6
12395
12396fi
12397rm -f conftest.$ac_objext conftest.$ac_ext
12398echo "$as_me:$LINENO: checking for link" >&5
12399echo $ECHO_N "checking for link... $ECHO_C" >&6
12400cat >conftest.$ac_ext <<_ACEOF
12401#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012402/* confdefs.h. */
12403_ACEOF
12404cat confdefs.h >>conftest.$ac_ext
12405cat >>conftest.$ac_ext <<_ACEOF
12406/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012407#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012408int
12409main ()
12410{
12411void *x=link
12412 ;
12413 return 0;
12414}
12415_ACEOF
12416rm -f conftest.$ac_objext
12417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12418 (eval $ac_compile) 2>&5
12419 ac_status=$?
12420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12421 (exit $ac_status); } &&
12422 { ac_try='test -s conftest.$ac_objext'
12423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12424 (eval $ac_try) 2>&5
12425 ac_status=$?
12426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12427 (exit $ac_status); }; }; then
12428
12429cat >>confdefs.h <<\_ACEOF
12430#define HAVE_LINK 1
12431_ACEOF
12432
12433 echo "$as_me:$LINENO: result: yes" >&5
12434echo "${ECHO_T}yes" >&6
12435else
12436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012437sed 's/^/| /' conftest.$ac_ext >&5
12438
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012439echo "$as_me:$LINENO: result: no" >&5
12440echo "${ECHO_T}no" >&6
12441
12442fi
12443rm -f conftest.$ac_objext conftest.$ac_ext
12444echo "$as_me:$LINENO: checking for symlink" >&5
12445echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12446cat >conftest.$ac_ext <<_ACEOF
12447#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012448/* confdefs.h. */
12449_ACEOF
12450cat confdefs.h >>conftest.$ac_ext
12451cat >>conftest.$ac_ext <<_ACEOF
12452/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012453#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012454int
12455main ()
12456{
12457void *x=symlink
12458 ;
12459 return 0;
12460}
12461_ACEOF
12462rm -f conftest.$ac_objext
12463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12464 (eval $ac_compile) 2>&5
12465 ac_status=$?
12466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12467 (exit $ac_status); } &&
12468 { ac_try='test -s conftest.$ac_objext'
12469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12470 (eval $ac_try) 2>&5
12471 ac_status=$?
12472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12473 (exit $ac_status); }; }; then
12474
12475cat >>confdefs.h <<\_ACEOF
12476#define HAVE_SYMLINK 1
12477_ACEOF
12478
12479 echo "$as_me:$LINENO: result: yes" >&5
12480echo "${ECHO_T}yes" >&6
12481else
12482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012483sed 's/^/| /' conftest.$ac_ext >&5
12484
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012485echo "$as_me:$LINENO: result: no" >&5
12486echo "${ECHO_T}no" >&6
12487
12488fi
12489rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012490echo "$as_me:$LINENO: checking for fchdir" >&5
12491echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12492cat >conftest.$ac_ext <<_ACEOF
12493#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012494/* confdefs.h. */
12495_ACEOF
12496cat confdefs.h >>conftest.$ac_ext
12497cat >>conftest.$ac_ext <<_ACEOF
12498/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012499#include <unistd.h>
12500int
12501main ()
12502{
12503void *x=fchdir
12504 ;
12505 return 0;
12506}
12507_ACEOF
12508rm -f conftest.$ac_objext
12509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12510 (eval $ac_compile) 2>&5
12511 ac_status=$?
12512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12513 (exit $ac_status); } &&
12514 { ac_try='test -s conftest.$ac_objext'
12515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12516 (eval $ac_try) 2>&5
12517 ac_status=$?
12518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12519 (exit $ac_status); }; }; then
12520
12521cat >>confdefs.h <<\_ACEOF
12522#define HAVE_FCHDIR 1
12523_ACEOF
12524
12525 echo "$as_me:$LINENO: result: yes" >&5
12526echo "${ECHO_T}yes" >&6
12527else
12528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012529sed 's/^/| /' conftest.$ac_ext >&5
12530
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012531echo "$as_me:$LINENO: result: no" >&5
12532echo "${ECHO_T}no" >&6
12533
12534fi
12535rm -f conftest.$ac_objext conftest.$ac_ext
12536echo "$as_me:$LINENO: checking for fsync" >&5
12537echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12538cat >conftest.$ac_ext <<_ACEOF
12539#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012540/* confdefs.h. */
12541_ACEOF
12542cat confdefs.h >>conftest.$ac_ext
12543cat >>conftest.$ac_ext <<_ACEOF
12544/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012545#include <unistd.h>
12546int
12547main ()
12548{
12549void *x=fsync
12550 ;
12551 return 0;
12552}
12553_ACEOF
12554rm -f conftest.$ac_objext
12555if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12556 (eval $ac_compile) 2>&5
12557 ac_status=$?
12558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559 (exit $ac_status); } &&
12560 { ac_try='test -s conftest.$ac_objext'
12561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12562 (eval $ac_try) 2>&5
12563 ac_status=$?
12564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12565 (exit $ac_status); }; }; then
12566
12567cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012568#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012569_ACEOF
12570
12571 echo "$as_me:$LINENO: result: yes" >&5
12572echo "${ECHO_T}yes" >&6
12573else
12574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012575sed 's/^/| /' conftest.$ac_ext >&5
12576
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012577echo "$as_me:$LINENO: result: no" >&5
12578echo "${ECHO_T}no" >&6
12579
12580fi
12581rm -f conftest.$ac_objext conftest.$ac_ext
12582echo "$as_me:$LINENO: checking for fdatasync" >&5
12583echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12584cat >conftest.$ac_ext <<_ACEOF
12585#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012586/* confdefs.h. */
12587_ACEOF
12588cat confdefs.h >>conftest.$ac_ext
12589cat >>conftest.$ac_ext <<_ACEOF
12590/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012591#include <unistd.h>
12592int
12593main ()
12594{
12595void *x=fdatasync
12596 ;
12597 return 0;
12598}
12599_ACEOF
12600rm -f conftest.$ac_objext
12601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12602 (eval $ac_compile) 2>&5
12603 ac_status=$?
12604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12605 (exit $ac_status); } &&
12606 { ac_try='test -s conftest.$ac_objext'
12607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12608 (eval $ac_try) 2>&5
12609 ac_status=$?
12610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12611 (exit $ac_status); }; }; then
12612
12613cat >>confdefs.h <<\_ACEOF
12614#define HAVE_FDATASYNC 1
12615_ACEOF
12616
12617 echo "$as_me:$LINENO: result: yes" >&5
12618echo "${ECHO_T}yes" >&6
12619else
12620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012621sed 's/^/| /' conftest.$ac_ext >&5
12622
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012623echo "$as_me:$LINENO: result: no" >&5
12624echo "${ECHO_T}no" >&6
12625
12626fi
12627rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012628
Martin v. Löwisd5843682002-11-21 20:41:28 +000012629# On some systems (eg. FreeBSD 5), we would find a definition of the
12630# functions ctermid_r, setgroups in the library, but no prototype
12631# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12632# address to avoid compiler warnings and potential miscompilations
12633# because of the missing prototypes.
12634
12635echo "$as_me:$LINENO: checking for ctermid_r" >&5
12636echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12637cat >conftest.$ac_ext <<_ACEOF
12638#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012639/* confdefs.h. */
12640_ACEOF
12641cat confdefs.h >>conftest.$ac_ext
12642cat >>conftest.$ac_ext <<_ACEOF
12643/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012644
12645#include "confdefs.h"
12646#include <stdio.h>
12647
Martin v. Löwisd5843682002-11-21 20:41:28 +000012648int
12649main ()
12650{
12651void* p = ctermid_r
12652 ;
12653 return 0;
12654}
12655_ACEOF
12656rm -f conftest.$ac_objext
12657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12658 (eval $ac_compile) 2>&5
12659 ac_status=$?
12660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12661 (exit $ac_status); } &&
12662 { ac_try='test -s conftest.$ac_objext'
12663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12664 (eval $ac_try) 2>&5
12665 ac_status=$?
12666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12667 (exit $ac_status); }; }; then
12668
12669cat >>confdefs.h <<\_ACEOF
12670#define HAVE_CTERMID_R 1
12671_ACEOF
12672
12673 echo "$as_me:$LINENO: result: yes" >&5
12674echo "${ECHO_T}yes" >&6
12675else
12676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012677sed 's/^/| /' conftest.$ac_ext >&5
12678
Martin v. Löwisd5843682002-11-21 20:41:28 +000012679echo "$as_me:$LINENO: result: no" >&5
12680echo "${ECHO_T}no" >&6
12681
12682fi
12683rm -f conftest.$ac_objext conftest.$ac_ext
12684
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012685echo "$as_me:$LINENO: checking for flock" >&5
12686echo $ECHO_N "checking for flock... $ECHO_C" >&6
12687cat >conftest.$ac_ext <<_ACEOF
12688#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012689/* confdefs.h. */
12690_ACEOF
12691cat confdefs.h >>conftest.$ac_ext
12692cat >>conftest.$ac_ext <<_ACEOF
12693/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012694
12695#include "confdefs.h"
12696#include <sys/file.h>
12697
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012698int
12699main ()
12700{
12701void* p = flock
12702 ;
12703 return 0;
12704}
12705_ACEOF
12706rm -f conftest.$ac_objext
12707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12708 (eval $ac_compile) 2>&5
12709 ac_status=$?
12710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12711 (exit $ac_status); } &&
12712 { ac_try='test -s conftest.$ac_objext'
12713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12714 (eval $ac_try) 2>&5
12715 ac_status=$?
12716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12717 (exit $ac_status); }; }; then
12718
12719cat >>confdefs.h <<\_ACEOF
12720#define HAVE_FLOCK 1
12721_ACEOF
12722
12723 echo "$as_me:$LINENO: result: yes" >&5
12724echo "${ECHO_T}yes" >&6
12725else
12726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012727sed 's/^/| /' conftest.$ac_ext >&5
12728
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012729echo "$as_me:$LINENO: result: no" >&5
12730echo "${ECHO_T}no" >&6
12731
12732fi
12733rm -f conftest.$ac_objext conftest.$ac_ext
12734
12735echo "$as_me:$LINENO: checking for getpagesize" >&5
12736echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12737cat >conftest.$ac_ext <<_ACEOF
12738#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* confdefs.h. */
12740_ACEOF
12741cat confdefs.h >>conftest.$ac_ext
12742cat >>conftest.$ac_ext <<_ACEOF
12743/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012744
12745#include "confdefs.h"
12746#include <unistd.h>
12747
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012748int
12749main ()
12750{
12751void* p = getpagesize
12752 ;
12753 return 0;
12754}
12755_ACEOF
12756rm -f conftest.$ac_objext
12757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12758 (eval $ac_compile) 2>&5
12759 ac_status=$?
12760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12761 (exit $ac_status); } &&
12762 { ac_try='test -s conftest.$ac_objext'
12763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12764 (eval $ac_try) 2>&5
12765 ac_status=$?
12766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12767 (exit $ac_status); }; }; then
12768
12769cat >>confdefs.h <<\_ACEOF
12770#define HAVE_GETPAGESIZE 1
12771_ACEOF
12772
12773 echo "$as_me:$LINENO: result: yes" >&5
12774echo "${ECHO_T}yes" >&6
12775else
12776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012777sed 's/^/| /' conftest.$ac_ext >&5
12778
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012779echo "$as_me:$LINENO: result: no" >&5
12780echo "${ECHO_T}no" >&6
12781
12782fi
12783rm -f conftest.$ac_objext conftest.$ac_ext
12784
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012785for ac_prog in true
12786do
12787 # Extract the first word of "$ac_prog", so it can be a program name with args.
12788set dummy $ac_prog; ac_word=$2
12789echo "$as_me:$LINENO: checking for $ac_word" >&5
12790echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12791if test "${ac_cv_prog_TRUE+set}" = set; then
12792 echo $ECHO_N "(cached) $ECHO_C" >&6
12793else
12794 if test -n "$TRUE"; then
12795 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12796else
12797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12798for as_dir in $PATH
12799do
12800 IFS=$as_save_IFS
12801 test -z "$as_dir" && as_dir=.
12802 for ac_exec_ext in '' $ac_executable_extensions; do
12803 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12804 ac_cv_prog_TRUE="$ac_prog"
12805 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12806 break 2
12807 fi
12808done
12809done
12810
12811fi
12812fi
12813TRUE=$ac_cv_prog_TRUE
12814if test -n "$TRUE"; then
12815 echo "$as_me:$LINENO: result: $TRUE" >&5
12816echo "${ECHO_T}$TRUE" >&6
12817else
12818 echo "$as_me:$LINENO: result: no" >&5
12819echo "${ECHO_T}no" >&6
12820fi
12821
12822 test -n "$TRUE" && break
12823done
12824test -n "$TRUE" || TRUE="/bin/true"
12825
12826
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012827echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12828echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12829if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12830 echo $ECHO_N "(cached) $ECHO_C" >&6
12831else
12832 ac_check_lib_save_LIBS=$LIBS
12833LIBS="-lc $LIBS"
12834cat >conftest.$ac_ext <<_ACEOF
12835#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012836/* confdefs.h. */
12837_ACEOF
12838cat confdefs.h >>conftest.$ac_ext
12839cat >>conftest.$ac_ext <<_ACEOF
12840/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012841
12842/* Override any gcc2 internal prototype to avoid an error. */
12843#ifdef __cplusplus
12844extern "C"
12845#endif
12846/* We use char because int might match the return type of a gcc2
12847 builtin and then its argument prototype would still apply. */
12848char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012849int
12850main ()
12851{
12852inet_aton ();
12853 ;
12854 return 0;
12855}
12856_ACEOF
12857rm -f conftest.$ac_objext conftest$ac_exeext
12858if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12859 (eval $ac_link) 2>&5
12860 ac_status=$?
12861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12862 (exit $ac_status); } &&
12863 { ac_try='test -s conftest$ac_exeext'
12864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12865 (eval $ac_try) 2>&5
12866 ac_status=$?
12867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12868 (exit $ac_status); }; }; then
12869 ac_cv_lib_c_inet_aton=yes
12870else
12871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012872sed 's/^/| /' conftest.$ac_ext >&5
12873
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012874ac_cv_lib_c_inet_aton=no
12875fi
12876rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12877LIBS=$ac_check_lib_save_LIBS
12878fi
12879echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12880echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12881if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012882 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012883else
12884
12885echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12886echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12887if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12888 echo $ECHO_N "(cached) $ECHO_C" >&6
12889else
12890 ac_check_lib_save_LIBS=$LIBS
12891LIBS="-lresolv $LIBS"
12892cat >conftest.$ac_ext <<_ACEOF
12893#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012894/* confdefs.h. */
12895_ACEOF
12896cat confdefs.h >>conftest.$ac_ext
12897cat >>conftest.$ac_ext <<_ACEOF
12898/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012899
12900/* Override any gcc2 internal prototype to avoid an error. */
12901#ifdef __cplusplus
12902extern "C"
12903#endif
12904/* We use char because int might match the return type of a gcc2
12905 builtin and then its argument prototype would still apply. */
12906char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012907int
12908main ()
12909{
12910inet_aton ();
12911 ;
12912 return 0;
12913}
12914_ACEOF
12915rm -f conftest.$ac_objext conftest$ac_exeext
12916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12917 (eval $ac_link) 2>&5
12918 ac_status=$?
12919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12920 (exit $ac_status); } &&
12921 { ac_try='test -s conftest$ac_exeext'
12922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12923 (eval $ac_try) 2>&5
12924 ac_status=$?
12925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12926 (exit $ac_status); }; }; then
12927 ac_cv_lib_resolv_inet_aton=yes
12928else
12929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012930sed 's/^/| /' conftest.$ac_ext >&5
12931
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012932ac_cv_lib_resolv_inet_aton=no
12933fi
12934rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12935LIBS=$ac_check_lib_save_LIBS
12936fi
12937echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12938echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12939if test $ac_cv_lib_resolv_inet_aton = yes; then
12940 cat >>confdefs.h <<_ACEOF
12941#define HAVE_LIBRESOLV 1
12942_ACEOF
12943
12944 LIBS="-lresolv $LIBS"
12945
12946fi
12947
12948
12949fi
12950
12951
Martin v. Löwise9416172003-05-03 10:12:45 +000012952echo "$as_me:$LINENO: checking for hstrerror" >&5
12953echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12954cat >conftest.$ac_ext <<_ACEOF
12955#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012956/* confdefs.h. */
12957_ACEOF
12958cat confdefs.h >>conftest.$ac_ext
12959cat >>conftest.$ac_ext <<_ACEOF
12960/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012961
12962#include "confdefs.h"
12963#include <netdb.h>
12964
Martin v. Löwise9416172003-05-03 10:12:45 +000012965int
12966main ()
12967{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012968void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012969 ;
12970 return 0;
12971}
12972_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012973rm -f conftest.$ac_objext conftest$ac_exeext
12974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12975 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012976 ac_status=$?
12977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12978 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012979 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12981 (eval $ac_try) 2>&5
12982 ac_status=$?
12983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12984 (exit $ac_status); }; }; then
12985
12986cat >>confdefs.h <<\_ACEOF
12987#define HAVE_HSTRERROR 1
12988_ACEOF
12989
12990 echo "$as_me:$LINENO: result: yes" >&5
12991echo "${ECHO_T}yes" >&6
12992else
12993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012994sed 's/^/| /' conftest.$ac_ext >&5
12995
Martin v. Löwise9416172003-05-03 10:12:45 +000012996echo "$as_me:$LINENO: result: no" >&5
12997echo "${ECHO_T}no" >&6
12998
12999fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013000rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013001
13002echo "$as_me:$LINENO: checking for inet_aton" >&5
13003echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13004cat >conftest.$ac_ext <<_ACEOF
13005#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013006/* confdefs.h. */
13007_ACEOF
13008cat confdefs.h >>conftest.$ac_ext
13009cat >>conftest.$ac_ext <<_ACEOF
13010/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013011
13012#include "confdefs.h"
13013#include <sys/socket.h>
13014#include <netinet/in.h>
13015#include <arpa/inet.h>
13016
Martin v. Löwise9416172003-05-03 10:12:45 +000013017int
13018main ()
13019{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013020void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013021 ;
13022 return 0;
13023}
13024_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013025rm -f conftest.$ac_objext conftest$ac_exeext
13026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13027 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013028 ac_status=$?
13029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13030 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013031 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13033 (eval $ac_try) 2>&5
13034 ac_status=$?
13035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036 (exit $ac_status); }; }; then
13037
13038cat >>confdefs.h <<\_ACEOF
13039#define HAVE_INET_ATON 1
13040_ACEOF
13041
13042 echo "$as_me:$LINENO: result: yes" >&5
13043echo "${ECHO_T}yes" >&6
13044else
13045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013046sed 's/^/| /' conftest.$ac_ext >&5
13047
Martin v. Löwise9416172003-05-03 10:12:45 +000013048echo "$as_me:$LINENO: result: no" >&5
13049echo "${ECHO_T}no" >&6
13050
13051fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013052rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013053
13054echo "$as_me:$LINENO: checking for inet_pton" >&5
13055echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13056cat >conftest.$ac_ext <<_ACEOF
13057#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013058/* confdefs.h. */
13059_ACEOF
13060cat confdefs.h >>conftest.$ac_ext
13061cat >>conftest.$ac_ext <<_ACEOF
13062/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013063
13064#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013065#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013066#include <sys/socket.h>
13067#include <netinet/in.h>
13068#include <arpa/inet.h>
13069
Martin v. Löwise9416172003-05-03 10:12:45 +000013070int
13071main ()
13072{
13073void* p = inet_pton
13074 ;
13075 return 0;
13076}
13077_ACEOF
13078rm -f conftest.$ac_objext
13079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13080 (eval $ac_compile) 2>&5
13081 ac_status=$?
13082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13083 (exit $ac_status); } &&
13084 { ac_try='test -s conftest.$ac_objext'
13085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13086 (eval $ac_try) 2>&5
13087 ac_status=$?
13088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13089 (exit $ac_status); }; }; then
13090
13091cat >>confdefs.h <<\_ACEOF
13092#define HAVE_INET_PTON 1
13093_ACEOF
13094
13095 echo "$as_me:$LINENO: result: yes" >&5
13096echo "${ECHO_T}yes" >&6
13097else
13098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013099sed 's/^/| /' conftest.$ac_ext >&5
13100
Martin v. Löwise9416172003-05-03 10:12:45 +000013101echo "$as_me:$LINENO: result: no" >&5
13102echo "${ECHO_T}no" >&6
13103
13104fi
13105rm -f conftest.$ac_objext conftest.$ac_ext
13106
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013107# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013108echo "$as_me:$LINENO: checking for setgroups" >&5
13109echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13110cat >conftest.$ac_ext <<_ACEOF
13111#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013112/* confdefs.h. */
13113_ACEOF
13114cat confdefs.h >>conftest.$ac_ext
13115cat >>conftest.$ac_ext <<_ACEOF
13116/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013117
13118#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013119#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013120#ifdef HAVE_GRP_H
13121#include <grp.h>
13122#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013123
Martin v. Löwisd5843682002-11-21 20:41:28 +000013124int
13125main ()
13126{
13127void* p = setgroups
13128 ;
13129 return 0;
13130}
13131_ACEOF
13132rm -f conftest.$ac_objext
13133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13134 (eval $ac_compile) 2>&5
13135 ac_status=$?
13136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13137 (exit $ac_status); } &&
13138 { ac_try='test -s conftest.$ac_objext'
13139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13140 (eval $ac_try) 2>&5
13141 ac_status=$?
13142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13143 (exit $ac_status); }; }; then
13144
13145cat >>confdefs.h <<\_ACEOF
13146#define HAVE_SETGROUPS 1
13147_ACEOF
13148
13149 echo "$as_me:$LINENO: result: yes" >&5
13150echo "${ECHO_T}yes" >&6
13151else
13152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013153sed 's/^/| /' conftest.$ac_ext >&5
13154
Martin v. Löwisd5843682002-11-21 20:41:28 +000013155echo "$as_me:$LINENO: result: no" >&5
13156echo "${ECHO_T}no" >&6
13157
13158fi
13159rm -f conftest.$ac_objext conftest.$ac_ext
13160
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013161# check for openpty and forkpty
13162
Martin v. Löwis11437992002-04-12 09:54:03 +000013163
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013164for ac_func in openpty
13165do
Martin v. Löwis11437992002-04-12 09:54:03 +000013166as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13167echo "$as_me:$LINENO: checking for $ac_func" >&5
13168echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13169if eval "test \"\${$as_ac_var+set}\" = set"; then
13170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013171else
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 cat >conftest.$ac_ext <<_ACEOF
13173#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013174/* confdefs.h. */
13175_ACEOF
13176cat confdefs.h >>conftest.$ac_ext
13177cat >>conftest.$ac_ext <<_ACEOF
13178/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013179/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013180 which can conflict with char $ac_func (); below.
13181 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013182 <limits.h> exists even on freestanding compilers. Under hpux,
13183 including <limits.h> includes <sys/time.h> and causes problems
13184 checking for functions defined therein. */
13185#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013186# include <limits.h>
13187#else
13188# include <assert.h>
13189#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013190/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013191#ifdef __cplusplus
13192extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013193{
Martin v. Löwis11437992002-04-12 09:54:03 +000013194#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013195/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 builtin and then its argument prototype would still apply. */
13197char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013198/* The GNU C library defines this for functions which it implements
13199 to always fail with ENOSYS. Some functions are actually named
13200 something starting with __ and the normal name is an alias. */
13201#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13202choke me
13203#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013204char (*f) () = $ac_func;
13205#endif
13206#ifdef __cplusplus
13207}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013208#endif
13209
Skip Montanaro6dead952003-09-25 14:50:04 +000013210int
13211main ()
13212{
13213return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013214 ;
13215 return 0;
13216}
13217_ACEOF
13218rm -f conftest.$ac_objext conftest$ac_exeext
13219if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13220 (eval $ac_link) 2>&5
13221 ac_status=$?
13222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13223 (exit $ac_status); } &&
13224 { ac_try='test -s conftest$ac_exeext'
13225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13226 (eval $ac_try) 2>&5
13227 ac_status=$?
13228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13229 (exit $ac_status); }; }; then
13230 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013231else
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013233sed 's/^/| /' conftest.$ac_ext >&5
13234
Martin v. Löwis11437992002-04-12 09:54:03 +000013235eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013236fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013237rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013238fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013239echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13240echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13241if test `eval echo '${'$as_ac_var'}'` = yes; then
13242 cat >>confdefs.h <<_ACEOF
13243#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13244_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013245
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013246else
Martin v. Löwis11437992002-04-12 09:54:03 +000013247 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13248echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13249if test "${ac_cv_lib_util_openpty+set}" = set; then
13250 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013251else
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013253LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013254cat >conftest.$ac_ext <<_ACEOF
13255#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013256/* confdefs.h. */
13257_ACEOF
13258cat confdefs.h >>conftest.$ac_ext
13259cat >>conftest.$ac_ext <<_ACEOF
13260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013261
Fred Drake8cef4cf2000-06-28 16:40:38 +000013262/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013263#ifdef __cplusplus
13264extern "C"
13265#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013266/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013267 builtin and then its argument prototype would still apply. */
13268char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013269int
13270main ()
13271{
13272openpty ();
13273 ;
13274 return 0;
13275}
13276_ACEOF
13277rm -f conftest.$ac_objext conftest$ac_exeext
13278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13279 (eval $ac_link) 2>&5
13280 ac_status=$?
13281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13282 (exit $ac_status); } &&
13283 { ac_try='test -s conftest$ac_exeext'
13284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13285 (eval $ac_try) 2>&5
13286 ac_status=$?
13287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13288 (exit $ac_status); }; }; then
13289 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013290else
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013292sed 's/^/| /' conftest.$ac_ext >&5
13293
Martin v. Löwis11437992002-04-12 09:54:03 +000013294ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013295fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013296rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13297LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013299echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13300echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13301if test $ac_cv_lib_util_openpty = yes; then
13302 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013303#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013304_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013305 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013306fi
13307
13308fi
13309done
13310
Martin v. Löwis11437992002-04-12 09:54:03 +000013311
Fred Drake8cef4cf2000-06-28 16:40:38 +000013312for ac_func in forkpty
13313do
Martin v. Löwis11437992002-04-12 09:54:03 +000013314as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13315echo "$as_me:$LINENO: checking for $ac_func" >&5
13316echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13317if eval "test \"\${$as_ac_var+set}\" = set"; then
13318 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013319else
Martin v. Löwis11437992002-04-12 09:54:03 +000013320 cat >conftest.$ac_ext <<_ACEOF
13321#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013322/* confdefs.h. */
13323_ACEOF
13324cat confdefs.h >>conftest.$ac_ext
13325cat >>conftest.$ac_ext <<_ACEOF
13326/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013327/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013328 which can conflict with char $ac_func (); below.
13329 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013330 <limits.h> exists even on freestanding compilers. Under hpux,
13331 including <limits.h> includes <sys/time.h> and causes problems
13332 checking for functions defined therein. */
13333#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013334# include <limits.h>
13335#else
13336# include <assert.h>
13337#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013338/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013339#ifdef __cplusplus
13340extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013341{
Martin v. Löwis11437992002-04-12 09:54:03 +000013342#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013343/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013344 builtin and then its argument prototype would still apply. */
13345char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013346/* The GNU C library defines this for functions which it implements
13347 to always fail with ENOSYS. Some functions are actually named
13348 something starting with __ and the normal name is an alias. */
13349#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13350choke me
13351#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013352char (*f) () = $ac_func;
13353#endif
13354#ifdef __cplusplus
13355}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013356#endif
13357
Skip Montanaro6dead952003-09-25 14:50:04 +000013358int
13359main ()
13360{
13361return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 ;
13363 return 0;
13364}
13365_ACEOF
13366rm -f conftest.$ac_objext conftest$ac_exeext
13367if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13368 (eval $ac_link) 2>&5
13369 ac_status=$?
13370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13371 (exit $ac_status); } &&
13372 { ac_try='test -s conftest$ac_exeext'
13373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13374 (eval $ac_try) 2>&5
13375 ac_status=$?
13376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13377 (exit $ac_status); }; }; then
13378 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013379else
Martin v. Löwis11437992002-04-12 09:54:03 +000013380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013381sed 's/^/| /' conftest.$ac_ext >&5
13382
Martin v. Löwis11437992002-04-12 09:54:03 +000013383eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013385rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013387echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13388echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13389if test `eval echo '${'$as_ac_var'}'` = yes; then
13390 cat >>confdefs.h <<_ACEOF
13391#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13392_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013393
Fred Drake8cef4cf2000-06-28 16:40:38 +000013394else
Martin v. Löwis11437992002-04-12 09:54:03 +000013395 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13396echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13397if test "${ac_cv_lib_util_forkpty+set}" = set; then
13398 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013399else
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013401LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013402cat >conftest.$ac_ext <<_ACEOF
13403#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013404/* confdefs.h. */
13405_ACEOF
13406cat confdefs.h >>conftest.$ac_ext
13407cat >>conftest.$ac_ext <<_ACEOF
13408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013409
Fred Drake8cef4cf2000-06-28 16:40:38 +000013410/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013411#ifdef __cplusplus
13412extern "C"
13413#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013414/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013415 builtin and then its argument prototype would still apply. */
13416char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013417int
13418main ()
13419{
13420forkpty ();
13421 ;
13422 return 0;
13423}
13424_ACEOF
13425rm -f conftest.$ac_objext conftest$ac_exeext
13426if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13427 (eval $ac_link) 2>&5
13428 ac_status=$?
13429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13430 (exit $ac_status); } &&
13431 { ac_try='test -s conftest$ac_exeext'
13432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13433 (eval $ac_try) 2>&5
13434 ac_status=$?
13435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13436 (exit $ac_status); }; }; then
13437 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013438else
Martin v. Löwis11437992002-04-12 09:54:03 +000013439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013440sed 's/^/| /' conftest.$ac_ext >&5
13441
Martin v. Löwis11437992002-04-12 09:54:03 +000013442ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013443fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013444rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13445LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013446fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013447echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13448echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13449if test $ac_cv_lib_util_forkpty = yes; then
13450 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013451#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013452_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013453 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013454fi
13455
13456fi
13457done
13458
Jack Jansendd19cf82001-12-06 22:36:17 +000013459
Michael W. Hudson54241132001-12-07 15:38:26 +000013460# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013461
13462
13463
13464
13465
13466
Fred Drake8cef4cf2000-06-28 16:40:38 +000013467for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13468do
Martin v. Löwis11437992002-04-12 09:54:03 +000013469as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13470echo "$as_me:$LINENO: checking for $ac_func" >&5
13471echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13472if eval "test \"\${$as_ac_var+set}\" = set"; then
13473 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013474else
Martin v. Löwis11437992002-04-12 09:54:03 +000013475 cat >conftest.$ac_ext <<_ACEOF
13476#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013477/* confdefs.h. */
13478_ACEOF
13479cat confdefs.h >>conftest.$ac_ext
13480cat >>conftest.$ac_ext <<_ACEOF
13481/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013482/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013483 which can conflict with char $ac_func (); below.
13484 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013485 <limits.h> exists even on freestanding compilers. Under hpux,
13486 including <limits.h> includes <sys/time.h> and causes problems
13487 checking for functions defined therein. */
13488#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013489# include <limits.h>
13490#else
13491# include <assert.h>
13492#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013493/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013494#ifdef __cplusplus
13495extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013496{
Martin v. Löwis11437992002-04-12 09:54:03 +000013497#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013498/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 builtin and then its argument prototype would still apply. */
13500char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013501/* The GNU C library defines this for functions which it implements
13502 to always fail with ENOSYS. Some functions are actually named
13503 something starting with __ and the normal name is an alias. */
13504#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13505choke me
13506#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013507char (*f) () = $ac_func;
13508#endif
13509#ifdef __cplusplus
13510}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013511#endif
13512
Skip Montanaro6dead952003-09-25 14:50:04 +000013513int
13514main ()
13515{
13516return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013517 ;
13518 return 0;
13519}
13520_ACEOF
13521rm -f conftest.$ac_objext conftest$ac_exeext
13522if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13523 (eval $ac_link) 2>&5
13524 ac_status=$?
13525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13526 (exit $ac_status); } &&
13527 { ac_try='test -s conftest$ac_exeext'
13528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13529 (eval $ac_try) 2>&5
13530 ac_status=$?
13531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13532 (exit $ac_status); }; }; then
13533 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013534else
Martin v. Löwis11437992002-04-12 09:54:03 +000013535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013536sed 's/^/| /' conftest.$ac_ext >&5
13537
Martin v. Löwis11437992002-04-12 09:54:03 +000013538eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013539fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013540rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013541fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013542echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13543echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13544if test `eval echo '${'$as_ac_var'}'` = yes; then
13545 cat >>confdefs.h <<_ACEOF
13546#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13547_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013548
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013549fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013550done
13551
Michael W. Hudson54241132001-12-07 15:38:26 +000013552
Martin v. Löwis11437992002-04-12 09:54:03 +000013553
13554
13555
13556
13557
Martin v. Löwis1142de32002-03-29 16:28:31 +000013558for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013559do
Martin v. Löwis11437992002-04-12 09:54:03 +000013560as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13561echo "$as_me:$LINENO: checking for $ac_func" >&5
13562echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13563if eval "test \"\${$as_ac_var+set}\" = set"; then
13564 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013565else
Martin v. Löwis11437992002-04-12 09:54:03 +000013566 cat >conftest.$ac_ext <<_ACEOF
13567#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013568/* confdefs.h. */
13569_ACEOF
13570cat confdefs.h >>conftest.$ac_ext
13571cat >>conftest.$ac_ext <<_ACEOF
13572/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013573/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013574 which can conflict with char $ac_func (); below.
13575 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013576 <limits.h> exists even on freestanding compilers. Under hpux,
13577 including <limits.h> includes <sys/time.h> and causes problems
13578 checking for functions defined therein. */
13579#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013580# include <limits.h>
13581#else
13582# include <assert.h>
13583#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013584/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013585#ifdef __cplusplus
13586extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013587{
Martin v. Löwis11437992002-04-12 09:54:03 +000013588#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013589/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013590 builtin and then its argument prototype would still apply. */
13591char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013592/* The GNU C library defines this for functions which it implements
13593 to always fail with ENOSYS. Some functions are actually named
13594 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013595#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013596choke me
13597#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013598char (*f) () = $ac_func;
13599#endif
13600#ifdef __cplusplus
13601}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013602#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013603
Skip Montanaro6dead952003-09-25 14:50:04 +000013604int
13605main ()
13606{
13607return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013608 ;
13609 return 0;
13610}
13611_ACEOF
13612rm -f conftest.$ac_objext conftest$ac_exeext
13613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13614 (eval $ac_link) 2>&5
13615 ac_status=$?
13616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13617 (exit $ac_status); } &&
13618 { ac_try='test -s conftest$ac_exeext'
13619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13620 (eval $ac_try) 2>&5
13621 ac_status=$?
13622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13623 (exit $ac_status); }; }; then
13624 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013625else
Martin v. Löwis11437992002-04-12 09:54:03 +000013626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013627sed 's/^/| /' conftest.$ac_ext >&5
13628
Martin v. Löwis11437992002-04-12 09:54:03 +000013629eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013630fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013631rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013633echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13634echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13635if test `eval echo '${'$as_ac_var'}'` = yes; then
13636 cat >>confdefs.h <<_ACEOF
13637#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13638_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013639
Martin v. Löwis1142de32002-03-29 16:28:31 +000013640else
Martin v. Löwis11437992002-04-12 09:54:03 +000013641 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013642fi
13643done
13644
13645
Martin v. Löwis11437992002-04-12 09:54:03 +000013646
Martin v. Löwis1142de32002-03-29 16:28:31 +000013647for ac_func in getpgrp
13648do
Martin v. Löwis11437992002-04-12 09:54:03 +000013649as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13650echo "$as_me:$LINENO: checking for $ac_func" >&5
13651echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13652if eval "test \"\${$as_ac_var+set}\" = set"; then
13653 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013654else
Martin v. Löwis11437992002-04-12 09:54:03 +000013655 cat >conftest.$ac_ext <<_ACEOF
13656#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013657/* confdefs.h. */
13658_ACEOF
13659cat confdefs.h >>conftest.$ac_ext
13660cat >>conftest.$ac_ext <<_ACEOF
13661/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013662/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013663 which can conflict with char $ac_func (); below.
13664 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013665 <limits.h> exists even on freestanding compilers. Under hpux,
13666 including <limits.h> includes <sys/time.h> and causes problems
13667 checking for functions defined therein. */
13668#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013669# include <limits.h>
13670#else
13671# include <assert.h>
13672#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013673/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013674#ifdef __cplusplus
13675extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013676{
Martin v. Löwis11437992002-04-12 09:54:03 +000013677#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013678/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013679 builtin and then its argument prototype would still apply. */
13680char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013681/* The GNU C library defines this for functions which it implements
13682 to always fail with ENOSYS. Some functions are actually named
13683 something starting with __ and the normal name is an alias. */
13684#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13685choke me
13686#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013687char (*f) () = $ac_func;
13688#endif
13689#ifdef __cplusplus
13690}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013691#endif
13692
Skip Montanaro6dead952003-09-25 14:50:04 +000013693int
13694main ()
13695{
13696return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013697 ;
13698 return 0;
13699}
13700_ACEOF
13701rm -f conftest.$ac_objext conftest$ac_exeext
13702if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13703 (eval $ac_link) 2>&5
13704 ac_status=$?
13705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13706 (exit $ac_status); } &&
13707 { ac_try='test -s conftest$ac_exeext'
13708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13709 (eval $ac_try) 2>&5
13710 ac_status=$?
13711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13712 (exit $ac_status); }; }; then
13713 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013714else
Martin v. Löwis11437992002-04-12 09:54:03 +000013715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013716sed 's/^/| /' conftest.$ac_ext >&5
13717
Martin v. Löwis11437992002-04-12 09:54:03 +000013718eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013719fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013720rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013721fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013722echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13723echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13724if test `eval echo '${'$as_ac_var'}'` = yes; then
13725 cat >>confdefs.h <<_ACEOF
13726#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13727_ACEOF
13728 cat >conftest.$ac_ext <<_ACEOF
13729#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013730/* confdefs.h. */
13731_ACEOF
13732cat confdefs.h >>conftest.$ac_ext
13733cat >>conftest.$ac_ext <<_ACEOF
13734/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013736int
13737main ()
13738{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013739getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 ;
13741 return 0;
13742}
13743_ACEOF
13744rm -f conftest.$ac_objext
13745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13746 (eval $ac_compile) 2>&5
13747 ac_status=$?
13748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13749 (exit $ac_status); } &&
13750 { ac_try='test -s conftest.$ac_objext'
13751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13752 (eval $ac_try) 2>&5
13753 ac_status=$?
13754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13755 (exit $ac_status); }; }; then
13756
13757cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013758#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013759_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013760
Martin v. Löwis11437992002-04-12 09:54:03 +000013761
Guido van Rossumf78abae1997-01-21 22:02:36 +000013762else
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013764sed 's/^/| /' conftest.$ac_ext >&5
13765
Guido van Rossum627b2d71993-12-24 10:39:16 +000013766fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013767rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013768
Guido van Rossum627b2d71993-12-24 10:39:16 +000013769fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013770done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013771
Jack Jansen150753c2003-03-29 22:07:47 +000013772
13773for ac_func in setpgrp
13774do
13775as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13776echo "$as_me:$LINENO: checking for $ac_func" >&5
13777echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13778if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013780else
Martin v. Löwis11437992002-04-12 09:54:03 +000013781 cat >conftest.$ac_ext <<_ACEOF
13782#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013783/* confdefs.h. */
13784_ACEOF
13785cat confdefs.h >>conftest.$ac_ext
13786cat >>conftest.$ac_ext <<_ACEOF
13787/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013788/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013789 which can conflict with char $ac_func (); below.
13790 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013791 <limits.h> exists even on freestanding compilers. Under hpux,
13792 including <limits.h> includes <sys/time.h> and causes problems
13793 checking for functions defined therein. */
13794#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013795# include <limits.h>
13796#else
13797# include <assert.h>
13798#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013799/* Override any gcc2 internal prototype to avoid an error. */
13800#ifdef __cplusplus
13801extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013802{
Martin v. Löwis11437992002-04-12 09:54:03 +000013803#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013804/* We use char because int might match the return type of a gcc2
13805 builtin and then its argument prototype would still apply. */
13806char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013807/* The GNU C library defines this for functions which it implements
13808 to always fail with ENOSYS. Some functions are actually named
13809 something starting with __ and the normal name is an alias. */
13810#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13811choke me
13812#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013813char (*f) () = $ac_func;
13814#endif
13815#ifdef __cplusplus
13816}
Jack Jansen150753c2003-03-29 22:07:47 +000013817#endif
13818
Skip Montanaro6dead952003-09-25 14:50:04 +000013819int
13820main ()
13821{
13822return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013823 ;
13824 return 0;
13825}
13826_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013827rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013828if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13829 (eval $ac_link) 2>&5
13830 ac_status=$?
13831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013832 (exit $ac_status); } &&
13833 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13835 (eval $ac_try) 2>&5
13836 ac_status=$?
13837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13838 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013839 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013840else
Jack Jansen150753c2003-03-29 22:07:47 +000013841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013842sed 's/^/| /' conftest.$ac_ext >&5
13843
Jack Jansen150753c2003-03-29 22:07:47 +000013844eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013845fi
Jack Jansen150753c2003-03-29 22:07:47 +000013846rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013847fi
Jack Jansen150753c2003-03-29 22:07:47 +000013848echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13849echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13850if test `eval echo '${'$as_ac_var'}'` = yes; then
13851 cat >>confdefs.h <<_ACEOF
13852#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13853_ACEOF
13854 cat >conftest.$ac_ext <<_ACEOF
13855#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013856/* confdefs.h. */
13857_ACEOF
13858cat confdefs.h >>conftest.$ac_ext
13859cat >>conftest.$ac_ext <<_ACEOF
13860/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013861#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013862int
13863main ()
13864{
13865setpgrp(0,0);
13866 ;
13867 return 0;
13868}
13869_ACEOF
13870rm -f conftest.$ac_objext
13871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13872 (eval $ac_compile) 2>&5
13873 ac_status=$?
13874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13875 (exit $ac_status); } &&
13876 { ac_try='test -s conftest.$ac_objext'
13877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13878 (eval $ac_try) 2>&5
13879 ac_status=$?
13880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13881 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013882
13883cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013884#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013885_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013886
Jack Jansen150753c2003-03-29 22:07:47 +000013887
13888else
13889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013890sed 's/^/| /' conftest.$ac_ext >&5
13891
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013892fi
Jack Jansen150753c2003-03-29 22:07:47 +000013893rm -f conftest.$ac_objext conftest.$ac_ext
13894
13895fi
13896done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013897
Martin v. Löwis11437992002-04-12 09:54:03 +000013898
Thomas Wouters3a584202000-08-05 23:28:51 +000013899for ac_func in gettimeofday
13900do
Martin v. Löwis11437992002-04-12 09:54:03 +000013901as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13902echo "$as_me:$LINENO: checking for $ac_func" >&5
13903echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13904if eval "test \"\${$as_ac_var+set}\" = set"; then
13905 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013906else
Martin v. Löwis11437992002-04-12 09:54:03 +000013907 cat >conftest.$ac_ext <<_ACEOF
13908#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013909/* confdefs.h. */
13910_ACEOF
13911cat confdefs.h >>conftest.$ac_ext
13912cat >>conftest.$ac_ext <<_ACEOF
13913/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013914/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013915 which can conflict with char $ac_func (); below.
13916 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013917 <limits.h> exists even on freestanding compilers. Under hpux,
13918 including <limits.h> includes <sys/time.h> and causes problems
13919 checking for functions defined therein. */
13920#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013921# include <limits.h>
13922#else
13923# include <assert.h>
13924#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013925/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013926#ifdef __cplusplus
13927extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013928{
Martin v. Löwis11437992002-04-12 09:54:03 +000013929#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013930/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 builtin and then its argument prototype would still apply. */
13932char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013933/* The GNU C library defines this for functions which it implements
13934 to always fail with ENOSYS. Some functions are actually named
13935 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013936#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013937choke me
13938#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013939char (*f) () = $ac_func;
13940#endif
13941#ifdef __cplusplus
13942}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013943#endif
13944
Skip Montanaro6dead952003-09-25 14:50:04 +000013945int
13946main ()
13947{
13948return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 ;
13950 return 0;
13951}
13952_ACEOF
13953rm -f conftest.$ac_objext conftest$ac_exeext
13954if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13955 (eval $ac_link) 2>&5
13956 ac_status=$?
13957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13958 (exit $ac_status); } &&
13959 { ac_try='test -s conftest$ac_exeext'
13960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13961 (eval $ac_try) 2>&5
13962 ac_status=$?
13963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13964 (exit $ac_status); }; }; then
13965 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013966else
Martin v. Löwis11437992002-04-12 09:54:03 +000013967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013968sed 's/^/| /' conftest.$ac_ext >&5
13969
Martin v. Löwis11437992002-04-12 09:54:03 +000013970eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013971fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013972rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013973fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013974echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13975echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13976if test `eval echo '${'$as_ac_var'}'` = yes; then
13977 cat >>confdefs.h <<_ACEOF
13978#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13979_ACEOF
13980 cat >conftest.$ac_ext <<_ACEOF
13981#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013982/* confdefs.h. */
13983_ACEOF
13984cat confdefs.h >>conftest.$ac_ext
13985cat >>conftest.$ac_ext <<_ACEOF
13986/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013987#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013988int
13989main ()
13990{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013991gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013992 ;
13993 return 0;
13994}
13995_ACEOF
13996rm -f conftest.$ac_objext
13997if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13998 (eval $ac_compile) 2>&5
13999 ac_status=$?
14000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14001 (exit $ac_status); } &&
14002 { ac_try='test -s conftest.$ac_objext'
14003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14004 (eval $ac_try) 2>&5
14005 ac_status=$?
14006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14007 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014008 :
14009else
Martin v. Löwis11437992002-04-12 09:54:03 +000014010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014011sed 's/^/| /' conftest.$ac_ext >&5
14012
Martin v. Löwis11437992002-04-12 09:54:03 +000014013
14014cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014015#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014016_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014017
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
Guido van Rossum627b2d71993-12-24 10:39:16 +000014019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014020rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014021
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014022fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014023done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014024
Michael W. Hudson54241132001-12-07 15:38:26 +000014025
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014026echo "$as_me:$LINENO: checking for major" >&5
14027echo $ECHO_N "checking for major... $ECHO_C" >&6
14028cat >conftest.$ac_ext <<_ACEOF
14029#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014030/* confdefs.h. */
14031_ACEOF
14032cat confdefs.h >>conftest.$ac_ext
14033cat >>conftest.$ac_ext <<_ACEOF
14034/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014035
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014036#if defined(MAJOR_IN_MKDEV)
14037#include <sys/mkdev.h>
14038#elif defined(MAJOR_IN_SYSMACROS)
14039#include <sys/sysmacros.h>
14040#else
14041#include <sys/types.h>
14042#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014043
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014044int
14045main ()
14046{
14047
14048 makedev(major(0),minor(0));
14049
14050 ;
14051 return 0;
14052}
14053_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014054rm -f conftest.$ac_objext conftest$ac_exeext
14055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14056 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014057 ac_status=$?
14058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14059 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014060 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14062 (eval $ac_try) 2>&5
14063 ac_status=$?
14064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14065 (exit $ac_status); }; }; then
14066
14067
14068cat >>confdefs.h <<\_ACEOF
14069#define HAVE_DEVICE_MACROS 1
14070_ACEOF
14071
14072 echo "$as_me:$LINENO: result: yes" >&5
14073echo "${ECHO_T}yes" >&6
14074
14075else
14076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014077sed 's/^/| /' conftest.$ac_ext >&5
14078
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014079
14080 echo "$as_me:$LINENO: result: no" >&5
14081echo "${ECHO_T}no" >&6
14082
14083fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014084rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014085
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014086# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014087# for [no]getaddrinfo in netdb.h.
14088echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14089echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14090cat >conftest.$ac_ext <<_ACEOF
14091#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014092/* confdefs.h. */
14093_ACEOF
14094cat confdefs.h >>conftest.$ac_ext
14095cat >>conftest.$ac_ext <<_ACEOF
14096/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014097
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014098#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014099#include <sys/socket.h>
14100#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014101#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014102
Martin v. Löwis11437992002-04-12 09:54:03 +000014103int
14104main ()
14105{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014106
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014107getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014108
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 ;
14110 return 0;
14111}
14112_ACEOF
14113rm -f conftest.$ac_objext conftest$ac_exeext
14114if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14115 (eval $ac_link) 2>&5
14116 ac_status=$?
14117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14118 (exit $ac_status); } &&
14119 { ac_try='test -s conftest$ac_exeext'
14120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14121 (eval $ac_try) 2>&5
14122 ac_status=$?
14123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14124 (exit $ac_status); }; }; then
14125
14126echo "$as_me:$LINENO: result: yes" >&5
14127echo "${ECHO_T}yes" >&6
14128echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14129echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014130if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014131 echo "$as_me:$LINENO: result: buggy" >&5
14132echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014133buggygetaddrinfo=yes
14134else
Martin v. Löwis11437992002-04-12 09:54:03 +000014135 cat >conftest.$ac_ext <<_ACEOF
14136#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014137/* confdefs.h. */
14138_ACEOF
14139cat confdefs.h >>conftest.$ac_ext
14140cat >>conftest.$ac_ext <<_ACEOF
14141/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014142
14143#include <sys/types.h>
14144#include <netdb.h>
14145#include <string.h>
14146#include <sys/socket.h>
14147#include <netinet/in.h>
14148
14149main()
14150{
14151 int passive, gaierr, inet4 = 0, inet6 = 0;
14152 struct addrinfo hints, *ai, *aitop;
14153 char straddr[INET6_ADDRSTRLEN], strport[16];
14154
14155 for (passive = 0; passive <= 1; passive++) {
14156 memset(&hints, 0, sizeof(hints));
14157 hints.ai_family = AF_UNSPEC;
14158 hints.ai_flags = passive ? AI_PASSIVE : 0;
14159 hints.ai_socktype = SOCK_STREAM;
14160 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14161 (void)gai_strerror(gaierr);
14162 goto bad;
14163 }
14164 for (ai = aitop; ai; ai = ai->ai_next) {
14165 if (ai->ai_addr == NULL ||
14166 ai->ai_addrlen == 0 ||
14167 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14168 straddr, sizeof(straddr), strport, sizeof(strport),
14169 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14170 goto bad;
14171 }
14172 switch (ai->ai_family) {
14173 case AF_INET:
14174 if (strcmp(strport, "54321") != 0) {
14175 goto bad;
14176 }
14177 if (passive) {
14178 if (strcmp(straddr, "0.0.0.0") != 0) {
14179 goto bad;
14180 }
14181 } else {
14182 if (strcmp(straddr, "127.0.0.1") != 0) {
14183 goto bad;
14184 }
14185 }
14186 inet4++;
14187 break;
14188 case AF_INET6:
14189 if (strcmp(strport, "54321") != 0) {
14190 goto bad;
14191 }
14192 if (passive) {
14193 if (strcmp(straddr, "::") != 0) {
14194 goto bad;
14195 }
14196 } else {
14197 if (strcmp(straddr, "::1") != 0) {
14198 goto bad;
14199 }
14200 }
14201 inet6++;
14202 break;
14203 case AF_UNSPEC:
14204 goto bad;
14205 break;
14206 default:
14207 /* another family support? */
14208 break;
14209 }
14210 }
14211 }
14212
14213 if (!(inet4 == 0 || inet4 == 2))
14214 goto bad;
14215 if (!(inet6 == 0 || inet6 == 2))
14216 goto bad;
14217
14218 if (aitop)
14219 freeaddrinfo(aitop);
14220 exit(0);
14221
14222 bad:
14223 if (aitop)
14224 freeaddrinfo(aitop);
14225 exit(1);
14226}
14227
Martin v. Löwis11437992002-04-12 09:54:03 +000014228_ACEOF
14229rm -f conftest$ac_exeext
14230if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14231 (eval $ac_link) 2>&5
14232 ac_status=$?
14233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14234 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14236 (eval $ac_try) 2>&5
14237 ac_status=$?
14238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14239 (exit $ac_status); }; }; then
14240 echo "$as_me:$LINENO: result: good" >&5
14241echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014242buggygetaddrinfo=no
14243else
Martin v. Löwis11437992002-04-12 09:54:03 +000014244 echo "$as_me: program exited with status $ac_status" >&5
14245echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014246sed 's/^/| /' conftest.$ac_ext >&5
14247
Martin v. Löwis11437992002-04-12 09:54:03 +000014248( exit $ac_status )
14249echo "$as_me:$LINENO: result: buggy" >&5
14250echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014251buggygetaddrinfo=yes
14252fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014253rm -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 +000014254fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014255else
Martin v. Löwis11437992002-04-12 09:54:03 +000014256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014257sed 's/^/| /' conftest.$ac_ext >&5
14258
Martin v. Löwis11437992002-04-12 09:54:03 +000014259
14260echo "$as_me:$LINENO: result: no" >&5
14261echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014262buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014263
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014264fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014265rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014266
14267if test "$buggygetaddrinfo" = "yes"; then
14268 if test "$ipv6" = "yes"; then
14269 echo 'Fatal: You must get working getaddrinfo() function.'
14270 echo ' or you can specify "--disable-ipv6"'.
14271 exit 1
14272 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014273else
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
14275cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014276#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014277_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014278
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014280
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014281for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014282do
Martin v. Löwis11437992002-04-12 09:54:03 +000014283as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14284echo "$as_me:$LINENO: checking for $ac_func" >&5
14285echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14286if eval "test \"\${$as_ac_var+set}\" = set"; then
14287 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014288else
Martin v. Löwis11437992002-04-12 09:54:03 +000014289 cat >conftest.$ac_ext <<_ACEOF
14290#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014291/* confdefs.h. */
14292_ACEOF
14293cat confdefs.h >>conftest.$ac_ext
14294cat >>conftest.$ac_ext <<_ACEOF
14295/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014296/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014297 which can conflict with char $ac_func (); below.
14298 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014299 <limits.h> exists even on freestanding compilers. Under hpux,
14300 including <limits.h> includes <sys/time.h> and causes problems
14301 checking for functions defined therein. */
14302#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014303# include <limits.h>
14304#else
14305# include <assert.h>
14306#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014307/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014308#ifdef __cplusplus
14309extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014310{
Martin v. Löwis11437992002-04-12 09:54:03 +000014311#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014312/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014313 builtin and then its argument prototype would still apply. */
14314char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014315/* The GNU C library defines this for functions which it implements
14316 to always fail with ENOSYS. Some functions are actually named
14317 something starting with __ and the normal name is an alias. */
14318#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14319choke me
14320#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014321char (*f) () = $ac_func;
14322#endif
14323#ifdef __cplusplus
14324}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014325#endif
14326
Skip Montanaro6dead952003-09-25 14:50:04 +000014327int
14328main ()
14329{
14330return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014331 ;
14332 return 0;
14333}
14334_ACEOF
14335rm -f conftest.$ac_objext conftest$ac_exeext
14336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14337 (eval $ac_link) 2>&5
14338 ac_status=$?
14339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14340 (exit $ac_status); } &&
14341 { ac_try='test -s conftest$ac_exeext'
14342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14343 (eval $ac_try) 2>&5
14344 ac_status=$?
14345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14346 (exit $ac_status); }; }; then
14347 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014348else
Martin v. Löwis11437992002-04-12 09:54:03 +000014349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014350sed 's/^/| /' conftest.$ac_ext >&5
14351
Martin v. Löwis11437992002-04-12 09:54:03 +000014352eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014354rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014356echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14357echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14358if test `eval echo '${'$as_ac_var'}'` = yes; then
14359 cat >>confdefs.h <<_ACEOF
14360#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14361_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014362
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014363fi
14364done
14365
Michael W. Hudson54241132001-12-07 15:38:26 +000014366
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014367# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014368echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14369echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14370if test "${ac_cv_header_time+set}" = set; then
14371 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014372else
Martin v. Löwis11437992002-04-12 09:54:03 +000014373 cat >conftest.$ac_ext <<_ACEOF
14374#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014375/* confdefs.h. */
14376_ACEOF
14377cat confdefs.h >>conftest.$ac_ext
14378cat >>conftest.$ac_ext <<_ACEOF
14379/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014380#include <sys/types.h>
14381#include <sys/time.h>
14382#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
Martin v. Löwis11437992002-04-12 09:54:03 +000014384int
14385main ()
14386{
14387if ((struct tm *) 0)
14388return 0;
14389 ;
14390 return 0;
14391}
14392_ACEOF
14393rm -f conftest.$ac_objext
14394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14395 (eval $ac_compile) 2>&5
14396 ac_status=$?
14397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14398 (exit $ac_status); } &&
14399 { ac_try='test -s conftest.$ac_objext'
14400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14401 (eval $ac_try) 2>&5
14402 ac_status=$?
14403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14404 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014405 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014406else
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014408sed 's/^/| /' conftest.$ac_ext >&5
14409
Martin v. Löwis11437992002-04-12 09:54:03 +000014410ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014411fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014412rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014413fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014414echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14415echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014416if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
14418cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014419#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014420_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014421
14422fi
14423
Martin v. Löwis11437992002-04-12 09:54:03 +000014424echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14425echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14426if test "${ac_cv_struct_tm+set}" = set; then
14427 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014428else
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 cat >conftest.$ac_ext <<_ACEOF
14430#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014431/* confdefs.h. */
14432_ACEOF
14433cat confdefs.h >>conftest.$ac_ext
14434cat >>conftest.$ac_ext <<_ACEOF
14435/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014436#include <sys/types.h>
14437#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014438
Martin v. Löwis11437992002-04-12 09:54:03 +000014439int
14440main ()
14441{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014442struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014443 ;
14444 return 0;
14445}
14446_ACEOF
14447rm -f conftest.$ac_objext
14448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14449 (eval $ac_compile) 2>&5
14450 ac_status=$?
14451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14452 (exit $ac_status); } &&
14453 { ac_try='test -s conftest.$ac_objext'
14454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14455 (eval $ac_try) 2>&5
14456 ac_status=$?
14457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14458 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014459 ac_cv_struct_tm=time.h
14460else
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014462sed 's/^/| /' conftest.$ac_ext >&5
14463
Martin v. Löwis11437992002-04-12 09:54:03 +000014464ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014465fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014466rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014468echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14469echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014470if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014471
14472cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014473#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014474_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014475
14476fi
14477
Martin v. Löwis11437992002-04-12 09:54:03 +000014478echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14479echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14480if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14481 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014482else
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 cat >conftest.$ac_ext <<_ACEOF
14484#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014485/* confdefs.h. */
14486_ACEOF
14487cat confdefs.h >>conftest.$ac_ext
14488cat >>conftest.$ac_ext <<_ACEOF
14489/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014490#include <sys/types.h>
14491#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014492
14493
Martin v. Löwis11437992002-04-12 09:54:03 +000014494int
14495main ()
14496{
14497static struct tm ac_aggr;
14498if (ac_aggr.tm_zone)
14499return 0;
14500 ;
14501 return 0;
14502}
14503_ACEOF
14504rm -f conftest.$ac_objext
14505if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14506 (eval $ac_compile) 2>&5
14507 ac_status=$?
14508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14509 (exit $ac_status); } &&
14510 { ac_try='test -s conftest.$ac_objext'
14511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14512 (eval $ac_try) 2>&5
14513 ac_status=$?
14514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14515 (exit $ac_status); }; }; then
14516 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014517else
Martin v. Löwis11437992002-04-12 09:54:03 +000014518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014519sed 's/^/| /' conftest.$ac_ext >&5
14520
14521cat >conftest.$ac_ext <<_ACEOF
14522#line $LINENO "configure"
14523/* confdefs.h. */
14524_ACEOF
14525cat confdefs.h >>conftest.$ac_ext
14526cat >>conftest.$ac_ext <<_ACEOF
14527/* end confdefs.h. */
14528#include <sys/types.h>
14529#include <$ac_cv_struct_tm>
14530
14531
14532int
14533main ()
14534{
14535static struct tm ac_aggr;
14536if (sizeof ac_aggr.tm_zone)
14537return 0;
14538 ;
14539 return 0;
14540}
14541_ACEOF
14542rm -f conftest.$ac_objext
14543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14544 (eval $ac_compile) 2>&5
14545 ac_status=$?
14546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14547 (exit $ac_status); } &&
14548 { ac_try='test -s conftest.$ac_objext'
14549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14550 (eval $ac_try) 2>&5
14551 ac_status=$?
14552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14553 (exit $ac_status); }; }; then
14554 ac_cv_member_struct_tm_tm_zone=yes
14555else
14556 echo "$as_me: failed program was:" >&5
14557sed 's/^/| /' conftest.$ac_ext >&5
14558
Martin v. Löwis11437992002-04-12 09:54:03 +000014559ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014561rm -f conftest.$ac_objext conftest.$ac_ext
14562fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014563rm -f conftest.$ac_objext conftest.$ac_ext
14564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014565echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14566echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14567if test $ac_cv_member_struct_tm_tm_zone = yes; then
14568
14569cat >>confdefs.h <<_ACEOF
14570#define HAVE_STRUCT_TM_TM_ZONE 1
14571_ACEOF
14572
14573
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014574fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014575
Martin v. Löwis11437992002-04-12 09:54:03 +000014576if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14577
14578cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014579#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014580_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014581
14582else
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 echo "$as_me:$LINENO: checking for tzname" >&5
14584echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14585if test "${ac_cv_var_tzname+set}" = set; then
14586 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014587else
Martin v. Löwis11437992002-04-12 09:54:03 +000014588 cat >conftest.$ac_ext <<_ACEOF
14589#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014590/* confdefs.h. */
14591_ACEOF
14592cat confdefs.h >>conftest.$ac_ext
14593cat >>conftest.$ac_ext <<_ACEOF
14594/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014595#include <time.h>
14596#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014597extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014599
Martin v. Löwis11437992002-04-12 09:54:03 +000014600int
14601main ()
14602{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014603atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 ;
14605 return 0;
14606}
14607_ACEOF
14608rm -f conftest.$ac_objext conftest$ac_exeext
14609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14610 (eval $ac_link) 2>&5
14611 ac_status=$?
14612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14613 (exit $ac_status); } &&
14614 { ac_try='test -s conftest$ac_exeext'
14615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14616 (eval $ac_try) 2>&5
14617 ac_status=$?
14618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14619 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014620 ac_cv_var_tzname=yes
14621else
Martin v. Löwis11437992002-04-12 09:54:03 +000014622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014623sed 's/^/| /' conftest.$ac_ext >&5
14624
Martin v. Löwis11437992002-04-12 09:54:03 +000014625ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014626fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014627rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014628fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014629echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14630echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014631 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014632
14633cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014634#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014635_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014636
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014637 fi
14638fi
14639
Martin v. Löwis11437992002-04-12 09:54:03 +000014640echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14641echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14642if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14643 echo $ECHO_N "(cached) $ECHO_C" >&6
14644else
14645 cat >conftest.$ac_ext <<_ACEOF
14646#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014647/* confdefs.h. */
14648_ACEOF
14649cat confdefs.h >>conftest.$ac_ext
14650cat >>conftest.$ac_ext <<_ACEOF
14651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014652$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014653int
14654main ()
14655{
14656static struct stat ac_aggr;
14657if (ac_aggr.st_rdev)
14658return 0;
14659 ;
14660 return 0;
14661}
14662_ACEOF
14663rm -f conftest.$ac_objext
14664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14665 (eval $ac_compile) 2>&5
14666 ac_status=$?
14667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668 (exit $ac_status); } &&
14669 { ac_try='test -s conftest.$ac_objext'
14670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14671 (eval $ac_try) 2>&5
14672 ac_status=$?
14673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14674 (exit $ac_status); }; }; then
14675 ac_cv_member_struct_stat_st_rdev=yes
14676else
14677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014678sed 's/^/| /' conftest.$ac_ext >&5
14679
14680cat >conftest.$ac_ext <<_ACEOF
14681#line $LINENO "configure"
14682/* confdefs.h. */
14683_ACEOF
14684cat confdefs.h >>conftest.$ac_ext
14685cat >>conftest.$ac_ext <<_ACEOF
14686/* end confdefs.h. */
14687$ac_includes_default
14688int
14689main ()
14690{
14691static struct stat ac_aggr;
14692if (sizeof ac_aggr.st_rdev)
14693return 0;
14694 ;
14695 return 0;
14696}
14697_ACEOF
14698rm -f conftest.$ac_objext
14699if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14700 (eval $ac_compile) 2>&5
14701 ac_status=$?
14702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14703 (exit $ac_status); } &&
14704 { ac_try='test -s conftest.$ac_objext'
14705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14706 (eval $ac_try) 2>&5
14707 ac_status=$?
14708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14709 (exit $ac_status); }; }; then
14710 ac_cv_member_struct_stat_st_rdev=yes
14711else
14712 echo "$as_me: failed program was:" >&5
14713sed 's/^/| /' conftest.$ac_ext >&5
14714
Martin v. Löwis11437992002-04-12 09:54:03 +000014715ac_cv_member_struct_stat_st_rdev=no
14716fi
14717rm -f conftest.$ac_objext conftest.$ac_ext
14718fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014719rm -f conftest.$ac_objext conftest.$ac_ext
14720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014721echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14722echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14723if test $ac_cv_member_struct_stat_st_rdev = yes; then
14724
14725cat >>confdefs.h <<_ACEOF
14726#define HAVE_STRUCT_STAT_ST_RDEV 1
14727_ACEOF
14728
14729
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014730fi
14731
Martin v. Löwis11437992002-04-12 09:54:03 +000014732echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14733echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14734if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14735 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014736else
Martin v. Löwis11437992002-04-12 09:54:03 +000014737 cat >conftest.$ac_ext <<_ACEOF
14738#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014739/* confdefs.h. */
14740_ACEOF
14741cat confdefs.h >>conftest.$ac_ext
14742cat >>conftest.$ac_ext <<_ACEOF
14743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014744$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014745int
14746main ()
14747{
14748static struct stat ac_aggr;
14749if (ac_aggr.st_blksize)
14750return 0;
14751 ;
14752 return 0;
14753}
14754_ACEOF
14755rm -f conftest.$ac_objext
14756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14757 (eval $ac_compile) 2>&5
14758 ac_status=$?
14759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14760 (exit $ac_status); } &&
14761 { ac_try='test -s conftest.$ac_objext'
14762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14763 (eval $ac_try) 2>&5
14764 ac_status=$?
14765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14766 (exit $ac_status); }; }; then
14767 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014768else
Martin v. Löwis11437992002-04-12 09:54:03 +000014769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014770sed 's/^/| /' conftest.$ac_ext >&5
14771
14772cat >conftest.$ac_ext <<_ACEOF
14773#line $LINENO "configure"
14774/* confdefs.h. */
14775_ACEOF
14776cat confdefs.h >>conftest.$ac_ext
14777cat >>conftest.$ac_ext <<_ACEOF
14778/* end confdefs.h. */
14779$ac_includes_default
14780int
14781main ()
14782{
14783static struct stat ac_aggr;
14784if (sizeof ac_aggr.st_blksize)
14785return 0;
14786 ;
14787 return 0;
14788}
14789_ACEOF
14790rm -f conftest.$ac_objext
14791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14792 (eval $ac_compile) 2>&5
14793 ac_status=$?
14794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14795 (exit $ac_status); } &&
14796 { ac_try='test -s conftest.$ac_objext'
14797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14798 (eval $ac_try) 2>&5
14799 ac_status=$?
14800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14801 (exit $ac_status); }; }; then
14802 ac_cv_member_struct_stat_st_blksize=yes
14803else
14804 echo "$as_me: failed program was:" >&5
14805sed 's/^/| /' conftest.$ac_ext >&5
14806
Martin v. Löwis11437992002-04-12 09:54:03 +000014807ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014808fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014809rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014810fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014811rm -f conftest.$ac_objext conftest.$ac_ext
14812fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014813echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14814echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14815if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014816
Martin v. Löwis11437992002-04-12 09:54:03 +000014817cat >>confdefs.h <<_ACEOF
14818#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14819_ACEOF
14820
14821
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014822fi
14823
Martin v. Löwis11437992002-04-12 09:54:03 +000014824echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14825echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14826if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14827 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014828else
Martin v. Löwis11437992002-04-12 09:54:03 +000014829 cat >conftest.$ac_ext <<_ACEOF
14830#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014831/* confdefs.h. */
14832_ACEOF
14833cat confdefs.h >>conftest.$ac_ext
14834cat >>conftest.$ac_ext <<_ACEOF
14835/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014836$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014837int
14838main ()
14839{
14840static struct stat ac_aggr;
14841if (ac_aggr.st_blocks)
14842return 0;
14843 ;
14844 return 0;
14845}
14846_ACEOF
14847rm -f conftest.$ac_objext
14848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14849 (eval $ac_compile) 2>&5
14850 ac_status=$?
14851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14852 (exit $ac_status); } &&
14853 { ac_try='test -s conftest.$ac_objext'
14854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14855 (eval $ac_try) 2>&5
14856 ac_status=$?
14857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14858 (exit $ac_status); }; }; then
14859 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014860else
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014862sed 's/^/| /' conftest.$ac_ext >&5
14863
14864cat >conftest.$ac_ext <<_ACEOF
14865#line $LINENO "configure"
14866/* confdefs.h. */
14867_ACEOF
14868cat confdefs.h >>conftest.$ac_ext
14869cat >>conftest.$ac_ext <<_ACEOF
14870/* end confdefs.h. */
14871$ac_includes_default
14872int
14873main ()
14874{
14875static struct stat ac_aggr;
14876if (sizeof ac_aggr.st_blocks)
14877return 0;
14878 ;
14879 return 0;
14880}
14881_ACEOF
14882rm -f conftest.$ac_objext
14883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14884 (eval $ac_compile) 2>&5
14885 ac_status=$?
14886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14887 (exit $ac_status); } &&
14888 { ac_try='test -s conftest.$ac_objext'
14889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14890 (eval $ac_try) 2>&5
14891 ac_status=$?
14892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14893 (exit $ac_status); }; }; then
14894 ac_cv_member_struct_stat_st_blocks=yes
14895else
14896 echo "$as_me: failed program was:" >&5
14897sed 's/^/| /' conftest.$ac_ext >&5
14898
Martin v. Löwis11437992002-04-12 09:54:03 +000014899ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014900fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014901rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014902fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014903rm -f conftest.$ac_objext conftest.$ac_ext
14904fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014905echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14906echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14907if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014908
Martin v. Löwis11437992002-04-12 09:54:03 +000014909cat >>confdefs.h <<_ACEOF
14910#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14911_ACEOF
14912
14913
14914cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014915#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014916_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014917
14918else
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014920fi
14921
Michael W. Hudson54241132001-12-07 15:38:26 +000014922
Martin v. Löwis11437992002-04-12 09:54:03 +000014923
14924echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14925echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14926if test "${ac_cv_header_time_altzone+set}" = set; then
14927 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014928else
Martin v. Löwis11437992002-04-12 09:54:03 +000014929 cat >conftest.$ac_ext <<_ACEOF
14930#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014931/* confdefs.h. */
14932_ACEOF
14933cat confdefs.h >>conftest.$ac_ext
14934cat >>conftest.$ac_ext <<_ACEOF
14935/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014936#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014937int
14938main ()
14939{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014940return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 ;
14942 return 0;
14943}
14944_ACEOF
14945rm -f conftest.$ac_objext
14946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14947 (eval $ac_compile) 2>&5
14948 ac_status=$?
14949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14950 (exit $ac_status); } &&
14951 { ac_try='test -s conftest.$ac_objext'
14952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14953 (eval $ac_try) 2>&5
14954 ac_status=$?
14955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14956 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014957 ac_cv_header_time_altzone=yes
14958else
Martin v. Löwis11437992002-04-12 09:54:03 +000014959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014960sed 's/^/| /' conftest.$ac_ext >&5
14961
Martin v. Löwis11437992002-04-12 09:54:03 +000014962ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014963fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014964rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014965fi
14966
Martin v. Löwis11437992002-04-12 09:54:03 +000014967echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14968echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014969if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014970
14971cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014972#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014973_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014974
14975fi
14976
Guido van Rossumda88dad1995-01-26 00:46:29 +000014977was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014978echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14979echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14980cat >conftest.$ac_ext <<_ACEOF
14981#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014982/* confdefs.h. */
14983_ACEOF
14984cat confdefs.h >>conftest.$ac_ext
14985cat >>conftest.$ac_ext <<_ACEOF
14986/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014987
14988#include <sys/types.h>
14989#include <sys/select.h>
14990#include <sys/time.h>
14991
Martin v. Löwis11437992002-04-12 09:54:03 +000014992int
14993main ()
14994{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014995;
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 ;
14997 return 0;
14998}
14999_ACEOF
15000rm -f conftest.$ac_objext
15001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15002 (eval $ac_compile) 2>&5
15003 ac_status=$?
15004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15005 (exit $ac_status); } &&
15006 { ac_try='test -s conftest.$ac_objext'
15007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15008 (eval $ac_try) 2>&5
15009 ac_status=$?
15010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15011 (exit $ac_status); }; }; then
15012
15013
15014cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015015#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015016_ACEOF
15017
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015018 was_it_defined=yes
15019
Guido van Rossumf78abae1997-01-21 22:02:36 +000015020else
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015022sed 's/^/| /' conftest.$ac_ext >&5
15023
Guido van Rossum7f43da71994-08-01 12:15:30 +000015024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015025rm -f conftest.$ac_objext conftest.$ac_ext
15026echo "$as_me:$LINENO: result: $was_it_defined" >&5
15027echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015028
Martin v. Löwis11437992002-04-12 09:54:03 +000015029echo "$as_me:$LINENO: checking for addrinfo" >&5
15030echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15031if test "${ac_cv_struct_addrinfo+set}" = set; then
15032 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015033else
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 cat >conftest.$ac_ext <<_ACEOF
15035#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015036/* confdefs.h. */
15037_ACEOF
15038cat confdefs.h >>conftest.$ac_ext
15039cat >>conftest.$ac_ext <<_ACEOF
15040/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015041
15042# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015043int
15044main ()
15045{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015046struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015047 ;
15048 return 0;
15049}
15050_ACEOF
15051rm -f conftest.$ac_objext
15052if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15053 (eval $ac_compile) 2>&5
15054 ac_status=$?
15055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15056 (exit $ac_status); } &&
15057 { ac_try='test -s conftest.$ac_objext'
15058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15059 (eval $ac_try) 2>&5
15060 ac_status=$?
15061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15062 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015063 ac_cv_struct_addrinfo=yes
15064else
Martin v. Löwis11437992002-04-12 09:54:03 +000015065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015066sed 's/^/| /' conftest.$ac_ext >&5
15067
Martin v. Löwis11437992002-04-12 09:54:03 +000015068ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015069fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015070rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015071fi
15072
Martin v. Löwis11437992002-04-12 09:54:03 +000015073echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15074echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015075if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015076
15077cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015078#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015079_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015080
15081fi
15082
Martin v. Löwis11437992002-04-12 09:54:03 +000015083echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15084echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15085if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15086 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015087else
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 cat >conftest.$ac_ext <<_ACEOF
15089#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015090/* confdefs.h. */
15091_ACEOF
15092cat confdefs.h >>conftest.$ac_ext
15093cat >>conftest.$ac_ext <<_ACEOF
15094/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015095
15096# include <sys/types.h>
15097# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015098int
15099main ()
15100{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015101struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 ;
15103 return 0;
15104}
15105_ACEOF
15106rm -f conftest.$ac_objext
15107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15108 (eval $ac_compile) 2>&5
15109 ac_status=$?
15110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15111 (exit $ac_status); } &&
15112 { ac_try='test -s conftest.$ac_objext'
15113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15114 (eval $ac_try) 2>&5
15115 ac_status=$?
15116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15117 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015118 ac_cv_struct_sockaddr_storage=yes
15119else
Martin v. Löwis11437992002-04-12 09:54:03 +000015120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015121sed 's/^/| /' conftest.$ac_ext >&5
15122
Martin v. Löwis11437992002-04-12 09:54:03 +000015123ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015125rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015126fi
15127
Martin v. Löwis11437992002-04-12 09:54:03 +000015128echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15129echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015130if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015131
15132cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015133#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015134_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015135
15136fi
15137
Guido van Rossum627b2d71993-12-24 10:39:16 +000015138# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015139
Michael W. Hudson54241132001-12-07 15:38:26 +000015140
Martin v. Löwis11437992002-04-12 09:54:03 +000015141echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15142echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15143if test "${ac_cv_c_char_unsigned+set}" = set; then
15144 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015145else
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 cat >conftest.$ac_ext <<_ACEOF
15147#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015148/* confdefs.h. */
15149_ACEOF
15150cat confdefs.h >>conftest.$ac_ext
15151cat >>conftest.$ac_ext <<_ACEOF
15152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015153$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015154int
15155main ()
15156{
15157static int test_array [1 - 2 * !(((char) -1) < 0)];
15158test_array [0] = 0
15159
15160 ;
15161 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015162}
Martin v. Löwis11437992002-04-12 09:54:03 +000015163_ACEOF
15164rm -f conftest.$ac_objext
15165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15166 (eval $ac_compile) 2>&5
15167 ac_status=$?
15168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15169 (exit $ac_status); } &&
15170 { ac_try='test -s conftest.$ac_objext'
15171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15172 (eval $ac_try) 2>&5
15173 ac_status=$?
15174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15175 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015176 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015177else
15178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015179sed 's/^/| /' conftest.$ac_ext >&5
15180
Martin v. Löwis11437992002-04-12 09:54:03 +000015181ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015183rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015184fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015185echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15186echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015187if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015189#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015190_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015191
15192fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015193
Martin v. Löwis11437992002-04-12 09:54:03 +000015194echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15195echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15196if test "${ac_cv_c_const+set}" = set; then
15197 echo $ECHO_N "(cached) $ECHO_C" >&6
15198else
15199 cat >conftest.$ac_ext <<_ACEOF
15200#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015201/* confdefs.h. */
15202_ACEOF
15203cat confdefs.h >>conftest.$ac_ext
15204cat >>conftest.$ac_ext <<_ACEOF
15205/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015206
Martin v. Löwis11437992002-04-12 09:54:03 +000015207int
15208main ()
15209{
15210/* FIXME: Include the comments suggested by Paul. */
15211#ifndef __cplusplus
15212 /* Ultrix mips cc rejects this. */
15213 typedef int charset[2];
15214 const charset x;
15215 /* SunOS 4.1.1 cc rejects this. */
15216 char const *const *ccp;
15217 char **p;
15218 /* NEC SVR4.0.2 mips cc rejects this. */
15219 struct point {int x, y;};
15220 static struct point const zero = {0,0};
15221 /* AIX XL C 1.02.0.0 rejects this.
15222 It does not let you subtract one const X* pointer from another in
15223 an arm of an if-expression whose if-part is not a constant
15224 expression */
15225 const char *g = "string";
15226 ccp = &g + (g ? g-g : 0);
15227 /* HPUX 7.0 cc rejects these. */
15228 ++ccp;
15229 p = (char**) ccp;
15230 ccp = (char const *const *) p;
15231 { /* SCO 3.2v4 cc rejects this. */
15232 char *t;
15233 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015234
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 *t++ = 0;
15236 }
15237 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15238 int x[] = {25, 17};
15239 const int *foo = &x[0];
15240 ++foo;
15241 }
15242 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15243 typedef const int *iptr;
15244 iptr p = 0;
15245 ++p;
15246 }
15247 { /* AIX XL C 1.02.0.0 rejects this saying
15248 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15249 struct s { int j; const int *ap[3]; };
15250 struct s *b; b->j = 5;
15251 }
15252 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15253 const int foo = 10;
15254 }
15255#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015256
Martin v. Löwis11437992002-04-12 09:54:03 +000015257 ;
15258 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015259}
Martin v. Löwis11437992002-04-12 09:54:03 +000015260_ACEOF
15261rm -f conftest.$ac_objext
15262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15263 (eval $ac_compile) 2>&5
15264 ac_status=$?
15265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15266 (exit $ac_status); } &&
15267 { ac_try='test -s conftest.$ac_objext'
15268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15269 (eval $ac_try) 2>&5
15270 ac_status=$?
15271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15272 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015273 ac_cv_c_const=yes
15274else
Martin v. Löwis11437992002-04-12 09:54:03 +000015275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015276sed 's/^/| /' conftest.$ac_ext >&5
15277
Martin v. Löwis11437992002-04-12 09:54:03 +000015278ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015280rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015282echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15283echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015284if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015285
15286cat >>confdefs.h <<\_ACEOF
15287#define const
15288_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015289
15290fi
15291
Michael W. Hudson54241132001-12-07 15:38:26 +000015292
Guido van Rossumda88dad1995-01-26 00:46:29 +000015293works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015294echo "$as_me:$LINENO: checking for working volatile" >&5
15295echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15296cat >conftest.$ac_ext <<_ACEOF
15297#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015298/* confdefs.h. */
15299_ACEOF
15300cat confdefs.h >>conftest.$ac_ext
15301cat >>conftest.$ac_ext <<_ACEOF
15302/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015303
Martin v. Löwis11437992002-04-12 09:54:03 +000015304int
15305main ()
15306{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015307volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 ;
15309 return 0;
15310}
15311_ACEOF
15312rm -f conftest.$ac_objext
15313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15314 (eval $ac_compile) 2>&5
15315 ac_status=$?
15316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15317 (exit $ac_status); } &&
15318 { ac_try='test -s conftest.$ac_objext'
15319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15320 (eval $ac_try) 2>&5
15321 ac_status=$?
15322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15323 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015324 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015325else
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015327sed 's/^/| /' conftest.$ac_ext >&5
15328
Martin v. Löwis11437992002-04-12 09:54:03 +000015329
15330cat >>confdefs.h <<\_ACEOF
15331#define volatile
15332_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015333
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015334
Guido van Rossum627b2d71993-12-24 10:39:16 +000015335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015336rm -f conftest.$ac_objext conftest.$ac_ext
15337echo "$as_me:$LINENO: result: $works" >&5
15338echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015339
Guido van Rossumda88dad1995-01-26 00:46:29 +000015340works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015341echo "$as_me:$LINENO: checking for working signed char" >&5
15342echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15343cat >conftest.$ac_ext <<_ACEOF
15344#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015345/* confdefs.h. */
15346_ACEOF
15347cat confdefs.h >>conftest.$ac_ext
15348cat >>conftest.$ac_ext <<_ACEOF
15349/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015350
Martin v. Löwis11437992002-04-12 09:54:03 +000015351int
15352main ()
15353{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015354signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 ;
15356 return 0;
15357}
15358_ACEOF
15359rm -f conftest.$ac_objext
15360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15361 (eval $ac_compile) 2>&5
15362 ac_status=$?
15363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15364 (exit $ac_status); } &&
15365 { ac_try='test -s conftest.$ac_objext'
15366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15367 (eval $ac_try) 2>&5
15368 ac_status=$?
15369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15370 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015371 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015372else
Martin v. Löwis11437992002-04-12 09:54:03 +000015373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015374sed 's/^/| /' conftest.$ac_ext >&5
15375
Martin v. Löwis11437992002-04-12 09:54:03 +000015376
15377cat >>confdefs.h <<\_ACEOF
15378#define signed
15379_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015380
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015381
Guido van Rossum7f43da71994-08-01 12:15:30 +000015382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015383rm -f conftest.$ac_objext conftest.$ac_ext
15384echo "$as_me:$LINENO: result: $works" >&5
15385echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015386
Guido van Rossumda88dad1995-01-26 00:46:29 +000015387have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015388echo "$as_me:$LINENO: checking for prototypes" >&5
15389echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15390cat >conftest.$ac_ext <<_ACEOF
15391#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015392/* confdefs.h. */
15393_ACEOF
15394cat confdefs.h >>conftest.$ac_ext
15395cat >>conftest.$ac_ext <<_ACEOF
15396/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015397int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015398int
15399main ()
15400{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015401return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015402 ;
15403 return 0;
15404}
15405_ACEOF
15406rm -f conftest.$ac_objext
15407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15408 (eval $ac_compile) 2>&5
15409 ac_status=$?
15410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15411 (exit $ac_status); } &&
15412 { ac_try='test -s conftest.$ac_objext'
15413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15414 (eval $ac_try) 2>&5
15415 ac_status=$?
15416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15417 (exit $ac_status); }; }; then
15418
15419
15420cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015421#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015422_ACEOF
15423
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015424 have_prototypes=yes
15425
Guido van Rossumf78abae1997-01-21 22:02:36 +000015426else
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015428sed 's/^/| /' conftest.$ac_ext >&5
15429
Guido van Rossum7f43da71994-08-01 12:15:30 +000015430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015431rm -f conftest.$ac_objext conftest.$ac_ext
15432echo "$as_me:$LINENO: result: $have_prototypes" >&5
15433echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015434
Guido van Rossumda88dad1995-01-26 00:46:29 +000015435works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015436echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15437echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15438cat >conftest.$ac_ext <<_ACEOF
15439#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015440/* confdefs.h. */
15441_ACEOF
15442cat confdefs.h >>conftest.$ac_ext
15443cat >>conftest.$ac_ext <<_ACEOF
15444/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015445
15446#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015447int foo(int x, ...) {
15448 va_list va;
15449 va_start(va, x);
15450 va_arg(va, int);
15451 va_arg(va, char *);
15452 va_arg(va, double);
15453 return 0;
15454}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015455
Martin v. Löwis11437992002-04-12 09:54:03 +000015456int
15457main ()
15458{
Guido van Rossum90eea071996-08-30 20:58:57 +000015459return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015460 ;
15461 return 0;
15462}
15463_ACEOF
15464rm -f conftest.$ac_objext
15465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15466 (eval $ac_compile) 2>&5
15467 ac_status=$?
15468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15469 (exit $ac_status); } &&
15470 { ac_try='test -s conftest.$ac_objext'
15471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15472 (eval $ac_try) 2>&5
15473 ac_status=$?
15474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15475 (exit $ac_status); }; }; then
15476
15477
15478cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015479#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015480_ACEOF
15481
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015482 works=yes
15483
Guido van Rossumf78abae1997-01-21 22:02:36 +000015484else
Martin v. Löwis11437992002-04-12 09:54:03 +000015485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015486sed 's/^/| /' conftest.$ac_ext >&5
15487
Guido van Rossum627b2d71993-12-24 10:39:16 +000015488fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015489rm -f conftest.$ac_objext conftest.$ac_ext
15490echo "$as_me:$LINENO: result: $works" >&5
15491echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015492
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015493# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015494echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15495echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15496cat >conftest.$ac_ext <<_ACEOF
15497#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015498/* confdefs.h. */
15499_ACEOF
15500cat confdefs.h >>conftest.$ac_ext
15501cat >>conftest.$ac_ext <<_ACEOF
15502/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015503#include <sys/types.h>
15504#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015505int
15506main ()
15507{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015508struct sockaddr x;
15509x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015510 ;
15511 return 0;
15512}
15513_ACEOF
15514rm -f conftest.$ac_objext
15515if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15516 (eval $ac_compile) 2>&5
15517 ac_status=$?
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); } &&
15520 { ac_try='test -s conftest.$ac_objext'
15521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15522 (eval $ac_try) 2>&5
15523 ac_status=$?
15524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525 (exit $ac_status); }; }; then
15526 echo "$as_me:$LINENO: result: yes" >&5
15527echo "${ECHO_T}yes" >&6
15528
15529cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015530#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015531_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015532
15533else
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015535sed 's/^/| /' conftest.$ac_ext >&5
15536
Martin v. Löwis11437992002-04-12 09:54:03 +000015537echo "$as_me:$LINENO: result: no" >&5
15538echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015539fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015540rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015541
Guido van Rossumda88dad1995-01-26 00:46:29 +000015542va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015543echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15544echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15545cat >conftest.$ac_ext <<_ACEOF
15546#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015547/* confdefs.h. */
15548_ACEOF
15549cat confdefs.h >>conftest.$ac_ext
15550cat >>conftest.$ac_ext <<_ACEOF
15551/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015552
15553#ifdef HAVE_STDARG_PROTOTYPES
15554#include <stdarg.h>
15555#else
15556#include <varargs.h>
15557#endif
15558
Martin v. Löwis11437992002-04-12 09:54:03 +000015559int
15560main ()
15561{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015562va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015563 ;
15564 return 0;
15565}
15566_ACEOF
15567rm -f conftest.$ac_objext
15568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15569 (eval $ac_compile) 2>&5
15570 ac_status=$?
15571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15572 (exit $ac_status); } &&
15573 { ac_try='test -s conftest.$ac_objext'
15574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15575 (eval $ac_try) 2>&5
15576 ac_status=$?
15577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15578 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015579 :
15580else
Martin v. Löwis11437992002-04-12 09:54:03 +000015581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015582sed 's/^/| /' conftest.$ac_ext >&5
15583
Martin v. Löwis11437992002-04-12 09:54:03 +000015584
15585
15586cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015587#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015588_ACEOF
15589
Guido van Rossumda88dad1995-01-26 00:46:29 +000015590 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015591
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015593rm -f conftest.$ac_objext conftest.$ac_ext
15594echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15595echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015596
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015597# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015598
15599
15600
15601echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15602echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15603if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15604 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015605else
Martin v. Löwis11437992002-04-12 09:54:03 +000015606 cat >conftest.$ac_ext <<_ACEOF
15607#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015608/* confdefs.h. */
15609_ACEOF
15610cat confdefs.h >>conftest.$ac_ext
15611cat >>conftest.$ac_ext <<_ACEOF
15612/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015613/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015614 which can conflict with char gethostbyname_r (); below.
15615 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015616 <limits.h> exists even on freestanding compilers. Under hpux,
15617 including <limits.h> includes <sys/time.h> and causes problems
15618 checking for functions defined therein. */
15619#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015620# include <limits.h>
15621#else
15622# include <assert.h>
15623#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015624/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015625#ifdef __cplusplus
15626extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015627{
Martin v. Löwis11437992002-04-12 09:54:03 +000015628#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015629/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 builtin and then its argument prototype would still apply. */
15631char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015632/* The GNU C library defines this for functions which it implements
15633 to always fail with ENOSYS. Some functions are actually named
15634 something starting with __ and the normal name is an alias. */
15635#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15636choke me
15637#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015638char (*f) () = gethostbyname_r;
15639#endif
15640#ifdef __cplusplus
15641}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015642#endif
15643
Skip Montanaro6dead952003-09-25 14:50:04 +000015644int
15645main ()
15646{
15647return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 ;
15649 return 0;
15650}
15651_ACEOF
15652rm -f conftest.$ac_objext conftest$ac_exeext
15653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15654 (eval $ac_link) 2>&5
15655 ac_status=$?
15656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15657 (exit $ac_status); } &&
15658 { ac_try='test -s conftest$ac_exeext'
15659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15660 (eval $ac_try) 2>&5
15661 ac_status=$?
15662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15663 (exit $ac_status); }; }; then
15664 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015665else
Martin v. Löwis11437992002-04-12 09:54:03 +000015666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015667sed 's/^/| /' conftest.$ac_ext >&5
15668
Martin v. Löwis11437992002-04-12 09:54:03 +000015669ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015671rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015673echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15674echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15675if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015676
Martin v. Löwis11437992002-04-12 09:54:03 +000015677 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015678#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015679_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015680
Martin v. Löwis11437992002-04-12 09:54:03 +000015681 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15682echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015683 OLD_CFLAGS=$CFLAGS
15684 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015685 cat >conftest.$ac_ext <<_ACEOF
15686#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015687/* confdefs.h. */
15688_ACEOF
15689cat confdefs.h >>conftest.$ac_ext
15690cat >>conftest.$ac_ext <<_ACEOF
15691/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015692
15693# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015694
Martin v. Löwis11437992002-04-12 09:54:03 +000015695int
15696main ()
15697{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015698
15699 char *name;
15700 struct hostent *he, *res;
15701 char buffer[2048];
15702 int buflen = 2048;
15703 int h_errnop;
15704
15705 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015706
15707 ;
15708 return 0;
15709}
15710_ACEOF
15711rm -f conftest.$ac_objext
15712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15713 (eval $ac_compile) 2>&5
15714 ac_status=$?
15715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15716 (exit $ac_status); } &&
15717 { ac_try='test -s conftest.$ac_objext'
15718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15719 (eval $ac_try) 2>&5
15720 ac_status=$?
15721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15722 (exit $ac_status); }; }; then
15723
15724 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015725#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015726_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015727
Martin v. Löwis11437992002-04-12 09:54:03 +000015728
15729cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015730#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015731_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015732
Martin v. Löwis11437992002-04-12 09:54:03 +000015733 echo "$as_me:$LINENO: result: yes" >&5
15734echo "${ECHO_T}yes" >&6
15735
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015736else
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015738sed 's/^/| /' conftest.$ac_ext >&5
15739
Martin v. Löwis11437992002-04-12 09:54:03 +000015740
15741 echo "$as_me:$LINENO: result: no" >&5
15742echo "${ECHO_T}no" >&6
15743 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15744echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15745 cat >conftest.$ac_ext <<_ACEOF
15746#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015747/* confdefs.h. */
15748_ACEOF
15749cat confdefs.h >>conftest.$ac_ext
15750cat >>conftest.$ac_ext <<_ACEOF
15751/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015752
15753# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015754
Martin v. Löwis11437992002-04-12 09:54:03 +000015755int
15756main ()
15757{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015758
15759 char *name;
15760 struct hostent *he;
15761 char buffer[2048];
15762 int buflen = 2048;
15763 int h_errnop;
15764
15765 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015766
15767 ;
15768 return 0;
15769}
15770_ACEOF
15771rm -f conftest.$ac_objext
15772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15773 (eval $ac_compile) 2>&5
15774 ac_status=$?
15775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15776 (exit $ac_status); } &&
15777 { ac_try='test -s conftest.$ac_objext'
15778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15779 (eval $ac_try) 2>&5
15780 ac_status=$?
15781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15782 (exit $ac_status); }; }; then
15783
15784 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015785#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015786_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015787
Martin v. Löwis11437992002-04-12 09:54:03 +000015788
15789cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015790#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015791_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015792
Martin v. Löwis11437992002-04-12 09:54:03 +000015793 echo "$as_me:$LINENO: result: yes" >&5
15794echo "${ECHO_T}yes" >&6
15795
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015796else
Martin v. Löwis11437992002-04-12 09:54:03 +000015797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015798sed 's/^/| /' conftest.$ac_ext >&5
15799
Martin v. Löwis11437992002-04-12 09:54:03 +000015800
15801 echo "$as_me:$LINENO: result: no" >&5
15802echo "${ECHO_T}no" >&6
15803 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15804echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15805 cat >conftest.$ac_ext <<_ACEOF
15806#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015807/* confdefs.h. */
15808_ACEOF
15809cat confdefs.h >>conftest.$ac_ext
15810cat >>conftest.$ac_ext <<_ACEOF
15811/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015812
15813# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015814
Martin v. Löwis11437992002-04-12 09:54:03 +000015815int
15816main ()
15817{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015818
15819 char *name;
15820 struct hostent *he;
15821 struct hostent_data data;
15822
15823 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015824
15825 ;
15826 return 0;
15827}
15828_ACEOF
15829rm -f conftest.$ac_objext
15830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15831 (eval $ac_compile) 2>&5
15832 ac_status=$?
15833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15834 (exit $ac_status); } &&
15835 { ac_try='test -s conftest.$ac_objext'
15836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15837 (eval $ac_try) 2>&5
15838 ac_status=$?
15839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15840 (exit $ac_status); }; }; then
15841
15842 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015843#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015844_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015845
Martin v. Löwis11437992002-04-12 09:54:03 +000015846
15847cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015848#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015849_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015850
Martin v. Löwis11437992002-04-12 09:54:03 +000015851 echo "$as_me:$LINENO: result: yes" >&5
15852echo "${ECHO_T}yes" >&6
15853
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015854else
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015856sed 's/^/| /' conftest.$ac_ext >&5
15857
Martin v. Löwis11437992002-04-12 09:54:03 +000015858
15859 echo "$as_me:$LINENO: result: no" >&5
15860echo "${ECHO_T}no" >&6
15861
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015862fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015863rm -f conftest.$ac_objext conftest.$ac_ext
15864
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015866rm -f conftest.$ac_objext conftest.$ac_ext
15867
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015869rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015870 CFLAGS=$OLD_CFLAGS
15871
15872else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015873
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
15875for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015876do
Martin v. Löwis11437992002-04-12 09:54:03 +000015877as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15878echo "$as_me:$LINENO: checking for $ac_func" >&5
15879echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15880if eval "test \"\${$as_ac_var+set}\" = set"; then
15881 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015882else
Martin v. Löwis11437992002-04-12 09:54:03 +000015883 cat >conftest.$ac_ext <<_ACEOF
15884#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015885/* confdefs.h. */
15886_ACEOF
15887cat confdefs.h >>conftest.$ac_ext
15888cat >>conftest.$ac_ext <<_ACEOF
15889/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015890/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015891 which can conflict with char $ac_func (); below.
15892 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015893 <limits.h> exists even on freestanding compilers. Under hpux,
15894 including <limits.h> includes <sys/time.h> and causes problems
15895 checking for functions defined therein. */
15896#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015897# include <limits.h>
15898#else
15899# include <assert.h>
15900#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015901/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015902#ifdef __cplusplus
15903extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015904{
Martin v. Löwis11437992002-04-12 09:54:03 +000015905#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015906/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015907 builtin and then its argument prototype would still apply. */
15908char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015909/* The GNU C library defines this for functions which it implements
15910 to always fail with ENOSYS. Some functions are actually named
15911 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015912#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015913choke me
15914#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015915char (*f) () = $ac_func;
15916#endif
15917#ifdef __cplusplus
15918}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015919#endif
15920
Skip Montanaro6dead952003-09-25 14:50:04 +000015921int
15922main ()
15923{
15924return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015925 ;
15926 return 0;
15927}
15928_ACEOF
15929rm -f conftest.$ac_objext conftest$ac_exeext
15930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15931 (eval $ac_link) 2>&5
15932 ac_status=$?
15933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15934 (exit $ac_status); } &&
15935 { ac_try='test -s conftest$ac_exeext'
15936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15937 (eval $ac_try) 2>&5
15938 ac_status=$?
15939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15940 (exit $ac_status); }; }; then
15941 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015942else
Martin v. Löwis11437992002-04-12 09:54:03 +000015943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015944sed 's/^/| /' conftest.$ac_ext >&5
15945
Martin v. Löwis11437992002-04-12 09:54:03 +000015946eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015947fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015948rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015949fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015950echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15951echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15952if test `eval echo '${'$as_ac_var'}'` = yes; then
15953 cat >>confdefs.h <<_ACEOF
15954#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15955_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015956
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015957fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015958done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015959
Michael W. Hudson54241132001-12-07 15:38:26 +000015960
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015961fi
15962
Michael W. Hudson54241132001-12-07 15:38:26 +000015963
15964
15965
15966
15967
15968
Guido van Rossum627b2d71993-12-24 10:39:16 +000015969# checks for system services
15970# (none yet)
15971
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015972# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015973echo "$as_me:$LINENO: checking for __fpu_control" >&5
15974echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15975if test "${ac_cv_func___fpu_control+set}" = set; then
15976 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015977else
Martin v. Löwis11437992002-04-12 09:54:03 +000015978 cat >conftest.$ac_ext <<_ACEOF
15979#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015980/* confdefs.h. */
15981_ACEOF
15982cat confdefs.h >>conftest.$ac_ext
15983cat >>conftest.$ac_ext <<_ACEOF
15984/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015985/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015986 which can conflict with char __fpu_control (); below.
15987 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015988 <limits.h> exists even on freestanding compilers. Under hpux,
15989 including <limits.h> includes <sys/time.h> and causes problems
15990 checking for functions defined therein. */
15991#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015992# include <limits.h>
15993#else
15994# include <assert.h>
15995#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015996/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015997#ifdef __cplusplus
15998extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015999{
Martin v. Löwis11437992002-04-12 09:54:03 +000016000#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016001/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016002 builtin and then its argument prototype would still apply. */
16003char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016004/* The GNU C library defines this for functions which it implements
16005 to always fail with ENOSYS. Some functions are actually named
16006 something starting with __ and the normal name is an alias. */
16007#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16008choke me
16009#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016010char (*f) () = __fpu_control;
16011#endif
16012#ifdef __cplusplus
16013}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016014#endif
16015
Skip Montanaro6dead952003-09-25 14:50:04 +000016016int
16017main ()
16018{
16019return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016020 ;
16021 return 0;
16022}
16023_ACEOF
16024rm -f conftest.$ac_objext conftest$ac_exeext
16025if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16026 (eval $ac_link) 2>&5
16027 ac_status=$?
16028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16029 (exit $ac_status); } &&
16030 { ac_try='test -s conftest$ac_exeext'
16031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16032 (eval $ac_try) 2>&5
16033 ac_status=$?
16034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16035 (exit $ac_status); }; }; then
16036 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016037else
Martin v. Löwis11437992002-04-12 09:54:03 +000016038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016039sed 's/^/| /' conftest.$ac_ext >&5
16040
Martin v. Löwis11437992002-04-12 09:54:03 +000016041ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016043rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016045echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16046echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16047if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016048 :
16049else
Martin v. Löwis11437992002-04-12 09:54:03 +000016050
16051echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16052echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16053if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16054 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016055else
Martin v. Löwis11437992002-04-12 09:54:03 +000016056 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016057LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016058cat >conftest.$ac_ext <<_ACEOF
16059#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016060/* confdefs.h. */
16061_ACEOF
16062cat confdefs.h >>conftest.$ac_ext
16063cat >>conftest.$ac_ext <<_ACEOF
16064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016066/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016067#ifdef __cplusplus
16068extern "C"
16069#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016070/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016071 builtin and then its argument prototype would still apply. */
16072char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016073int
16074main ()
16075{
16076__fpu_control ();
16077 ;
16078 return 0;
16079}
16080_ACEOF
16081rm -f conftest.$ac_objext conftest$ac_exeext
16082if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16083 (eval $ac_link) 2>&5
16084 ac_status=$?
16085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16086 (exit $ac_status); } &&
16087 { ac_try='test -s conftest$ac_exeext'
16088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16089 (eval $ac_try) 2>&5
16090 ac_status=$?
16091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16092 (exit $ac_status); }; }; then
16093 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016094else
Martin v. Löwis11437992002-04-12 09:54:03 +000016095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016096sed 's/^/| /' conftest.$ac_ext >&5
16097
Martin v. Löwis11437992002-04-12 09:54:03 +000016098ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016099fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016100rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16101LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016103echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16104echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16105if test $ac_cv_lib_ieee___fpu_control = yes; then
16106 cat >>confdefs.h <<_ACEOF
16107#define HAVE_LIBIEEE 1
16108_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016109
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016110 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016111
Guido van Rossum627b2d71993-12-24 10:39:16 +000016112fi
16113
Michael W. Hudson54241132001-12-07 15:38:26 +000016114
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016115fi
16116
Michael W. Hudson54241132001-12-07 15:38:26 +000016117
Guido van Rossum7f253911997-05-09 02:42:48 +000016118# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016119echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16120echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16121
Guido van Rossum7f253911997-05-09 02:42:48 +000016122# Check whether --with-fpectl or --without-fpectl was given.
16123if test "${with_fpectl+set}" = set; then
16124 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016125
Guido van Rossum7f253911997-05-09 02:42:48 +000016126if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016127then
16128
16129cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016130#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016131_ACEOF
16132
16133 echo "$as_me:$LINENO: result: yes" >&5
16134echo "${ECHO_T}yes" >&6
16135else echo "$as_me:$LINENO: result: no" >&5
16136echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016137fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016138else
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 echo "$as_me:$LINENO: result: no" >&5
16140echo "${ECHO_T}no" >&6
16141fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016142
Guido van Rossum7f43da71994-08-01 12:15:30 +000016143# check for --with-libm=...
16144
Guido van Rossum563e7081996-09-10 18:20:48 +000016145case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016146Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016147BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016148*) LIBM=-lm
16149esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016150echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16151echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16152
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016153# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016154if test "${with_libm+set}" = set; then
16155 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016156
Guido van Rossum7f253911997-05-09 02:42:48 +000016157if test "$withval" = no
16158then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016159 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16160echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016161elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016162then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16164echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16165else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16166echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16167 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016168fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016169else
Martin v. Löwis11437992002-04-12 09:54:03 +000016170 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16171echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16172fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016173
16174# check for --with-libc=...
16175
Martin v. Löwis11437992002-04-12 09:54:03 +000016176echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16177echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16178
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016179# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016180if test "${with_libc+set}" = set; then
16181 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016182
Guido van Rossum7f253911997-05-09 02:42:48 +000016183if test "$withval" = no
16184then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016185 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16186echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016187elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016188then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016189 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16190echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16191else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16192echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16193 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016194fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016195else
Martin v. Löwis11437992002-04-12 09:54:03 +000016196 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16197echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16198fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016199
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016200# check for hypot() in math library
16201LIBS_SAVE=$LIBS
16202LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016203
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016204for ac_func in hypot
16205do
Martin v. Löwis11437992002-04-12 09:54:03 +000016206as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16207echo "$as_me:$LINENO: checking for $ac_func" >&5
16208echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16209if eval "test \"\${$as_ac_var+set}\" = set"; then
16210 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016211else
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 cat >conftest.$ac_ext <<_ACEOF
16213#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016214/* confdefs.h. */
16215_ACEOF
16216cat confdefs.h >>conftest.$ac_ext
16217cat >>conftest.$ac_ext <<_ACEOF
16218/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016219/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016220 which can conflict with char $ac_func (); below.
16221 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016222 <limits.h> exists even on freestanding compilers. Under hpux,
16223 including <limits.h> includes <sys/time.h> and causes problems
16224 checking for functions defined therein. */
16225#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016226# include <limits.h>
16227#else
16228# include <assert.h>
16229#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016230/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016231#ifdef __cplusplus
16232extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016233{
Martin v. Löwis11437992002-04-12 09:54:03 +000016234#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016235/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016236 builtin and then its argument prototype would still apply. */
16237char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016238/* The GNU C library defines this for functions which it implements
16239 to always fail with ENOSYS. Some functions are actually named
16240 something starting with __ and the normal name is an alias. */
16241#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16242choke me
16243#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016244char (*f) () = $ac_func;
16245#endif
16246#ifdef __cplusplus
16247}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016248#endif
16249
Skip Montanaro6dead952003-09-25 14:50:04 +000016250int
16251main ()
16252{
16253return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016254 ;
16255 return 0;
16256}
16257_ACEOF
16258rm -f conftest.$ac_objext conftest$ac_exeext
16259if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16260 (eval $ac_link) 2>&5
16261 ac_status=$?
16262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16263 (exit $ac_status); } &&
16264 { ac_try='test -s conftest$ac_exeext'
16265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16266 (eval $ac_try) 2>&5
16267 ac_status=$?
16268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16269 (exit $ac_status); }; }; then
16270 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016271else
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016273sed 's/^/| /' conftest.$ac_ext >&5
16274
Martin v. Löwis11437992002-04-12 09:54:03 +000016275eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016277rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016279echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16280echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16281if test `eval echo '${'$as_ac_var'}'` = yes; then
16282 cat >>confdefs.h <<_ACEOF
16283#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16284_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016285
Michael W. Hudson54241132001-12-07 15:38:26 +000016286else
Martin v. Löwis11437992002-04-12 09:54:03 +000016287 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016288fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016289done
16290
Michael W. Hudson54241132001-12-07 15:38:26 +000016291
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016292LIBS=$LIBS_SAVE
16293
Guido van Rossumef2255b2000-03-10 22:30:29 +000016294# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016295if test "${ac_cv_header_wchar_h+set}" = set; then
16296 echo "$as_me:$LINENO: checking for wchar.h" >&5
16297echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16298if test "${ac_cv_header_wchar_h+set}" = set; then
16299 echo $ECHO_N "(cached) $ECHO_C" >&6
16300fi
16301echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16302echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016303else
Martin v. Löwis11437992002-04-12 09:54:03 +000016304 # Is the header compilable?
16305echo "$as_me:$LINENO: checking wchar.h usability" >&5
16306echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16307cat >conftest.$ac_ext <<_ACEOF
16308#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016309/* confdefs.h. */
16310_ACEOF
16311cat confdefs.h >>conftest.$ac_ext
16312cat >>conftest.$ac_ext <<_ACEOF
16313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016314$ac_includes_default
16315#include <wchar.h>
16316_ACEOF
16317rm -f conftest.$ac_objext
16318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16319 (eval $ac_compile) 2>&5
16320 ac_status=$?
16321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16322 (exit $ac_status); } &&
16323 { ac_try='test -s conftest.$ac_objext'
16324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16325 (eval $ac_try) 2>&5
16326 ac_status=$?
16327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16328 (exit $ac_status); }; }; then
16329 ac_header_compiler=yes
16330else
16331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016332sed 's/^/| /' conftest.$ac_ext >&5
16333
Martin v. Löwis11437992002-04-12 09:54:03 +000016334ac_header_compiler=no
16335fi
16336rm -f conftest.$ac_objext conftest.$ac_ext
16337echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16338echo "${ECHO_T}$ac_header_compiler" >&6
16339
16340# Is the header present?
16341echo "$as_me:$LINENO: checking wchar.h presence" >&5
16342echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16343cat >conftest.$ac_ext <<_ACEOF
16344#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016345/* confdefs.h. */
16346_ACEOF
16347cat confdefs.h >>conftest.$ac_ext
16348cat >>conftest.$ac_ext <<_ACEOF
16349/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016350#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016351_ACEOF
16352if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16353 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16354 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016355 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016356 rm -f conftest.er1
16357 cat conftest.err >&5
16358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16359 (exit $ac_status); } >/dev/null; then
16360 if test -s conftest.err; then
16361 ac_cpp_err=$ac_c_preproc_warn_flag
16362 else
16363 ac_cpp_err=
16364 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016365else
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 ac_cpp_err=yes
16367fi
16368if test -z "$ac_cpp_err"; then
16369 ac_header_preproc=yes
16370else
16371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016372sed 's/^/| /' conftest.$ac_ext >&5
16373
Martin v. Löwis11437992002-04-12 09:54:03 +000016374 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016376rm -f conftest.err conftest.$ac_ext
16377echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16378echo "${ECHO_T}$ac_header_preproc" >&6
16379
16380# So? What about this header?
16381case $ac_header_compiler:$ac_header_preproc in
16382 yes:no )
16383 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16384echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16385 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016386echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16387 (
16388 cat <<\_ASBOX
16389## ------------------------------------ ##
16390## Report this to bug-autoconf@gnu.org. ##
16391## ------------------------------------ ##
16392_ASBOX
16393 ) |
16394 sed "s/^/$as_me: WARNING: /" >&2
16395 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 no:yes )
16397 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16398echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16399 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16400echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16401 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016402echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16403 (
16404 cat <<\_ASBOX
16405## ------------------------------------ ##
16406## Report this to bug-autoconf@gnu.org. ##
16407## ------------------------------------ ##
16408_ASBOX
16409 ) |
16410 sed "s/^/$as_me: WARNING: /" >&2
16411 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016412esac
16413echo "$as_me:$LINENO: checking for wchar.h" >&5
16414echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16415if test "${ac_cv_header_wchar_h+set}" = set; then
16416 echo $ECHO_N "(cached) $ECHO_C" >&6
16417else
16418 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016420echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16421echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16422
16423fi
16424if test $ac_cv_header_wchar_h = yes; then
16425
16426
16427cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016428#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016429_ACEOF
16430
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016431 wchar_h="yes"
16432
Guido van Rossumef2255b2000-03-10 22:30:29 +000016433else
Martin v. Löwis11437992002-04-12 09:54:03 +000016434 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016435
16436fi
16437
Michael W. Hudson54241132001-12-07 15:38:26 +000016438
Martin v. Löwis11437992002-04-12 09:54:03 +000016439
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016440# determine wchar_t size
16441if test "$wchar_h" = yes
16442then
Martin v. Löwis11437992002-04-12 09:54:03 +000016443 echo "$as_me:$LINENO: checking for wchar_t" >&5
16444echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16445if test "${ac_cv_type_wchar_t+set}" = set; then
16446 echo $ECHO_N "(cached) $ECHO_C" >&6
16447else
16448 cat >conftest.$ac_ext <<_ACEOF
16449#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016450/* confdefs.h. */
16451_ACEOF
16452cat confdefs.h >>conftest.$ac_ext
16453cat >>conftest.$ac_ext <<_ACEOF
16454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016455#include <wchar.h>
16456
Martin v. Löwis11437992002-04-12 09:54:03 +000016457int
16458main ()
16459{
16460if ((wchar_t *) 0)
16461 return 0;
16462if (sizeof (wchar_t))
16463 return 0;
16464 ;
16465 return 0;
16466}
16467_ACEOF
16468rm -f conftest.$ac_objext
16469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16470 (eval $ac_compile) 2>&5
16471 ac_status=$?
16472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16473 (exit $ac_status); } &&
16474 { ac_try='test -s conftest.$ac_objext'
16475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16476 (eval $ac_try) 2>&5
16477 ac_status=$?
16478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16479 (exit $ac_status); }; }; then
16480 ac_cv_type_wchar_t=yes
16481else
16482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016483sed 's/^/| /' conftest.$ac_ext >&5
16484
Martin v. Löwis11437992002-04-12 09:54:03 +000016485ac_cv_type_wchar_t=no
16486fi
16487rm -f conftest.$ac_objext conftest.$ac_ext
16488fi
16489echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16490echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16491
16492echo "$as_me:$LINENO: checking size of wchar_t" >&5
16493echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16494if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16495 echo $ECHO_N "(cached) $ECHO_C" >&6
16496else
16497 if test "$ac_cv_type_wchar_t" = yes; then
16498 # The cast to unsigned long works around a bug in the HP C Compiler
16499 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16500 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16501 # This bug is HP SR number 8606223364.
16502 if test "$cross_compiling" = yes; then
16503 # Depending upon the size, compute the lo and hi bounds.
16504cat >conftest.$ac_ext <<_ACEOF
16505#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016506/* confdefs.h. */
16507_ACEOF
16508cat confdefs.h >>conftest.$ac_ext
16509cat >>conftest.$ac_ext <<_ACEOF
16510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016511#include <wchar.h>
16512
Martin v. Löwis11437992002-04-12 09:54:03 +000016513int
16514main ()
16515{
16516static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16517test_array [0] = 0
16518
16519 ;
16520 return 0;
16521}
16522_ACEOF
16523rm -f conftest.$ac_objext
16524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16525 (eval $ac_compile) 2>&5
16526 ac_status=$?
16527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16528 (exit $ac_status); } &&
16529 { ac_try='test -s conftest.$ac_objext'
16530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16531 (eval $ac_try) 2>&5
16532 ac_status=$?
16533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16534 (exit $ac_status); }; }; then
16535 ac_lo=0 ac_mid=0
16536 while :; do
16537 cat >conftest.$ac_ext <<_ACEOF
16538#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016539/* confdefs.h. */
16540_ACEOF
16541cat confdefs.h >>conftest.$ac_ext
16542cat >>conftest.$ac_ext <<_ACEOF
16543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016544#include <wchar.h>
16545
Martin v. Löwis11437992002-04-12 09:54:03 +000016546int
16547main ()
16548{
16549static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16550test_array [0] = 0
16551
16552 ;
16553 return 0;
16554}
16555_ACEOF
16556rm -f conftest.$ac_objext
16557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16558 (eval $ac_compile) 2>&5
16559 ac_status=$?
16560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16561 (exit $ac_status); } &&
16562 { ac_try='test -s conftest.$ac_objext'
16563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16564 (eval $ac_try) 2>&5
16565 ac_status=$?
16566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16567 (exit $ac_status); }; }; then
16568 ac_hi=$ac_mid; break
16569else
16570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016571sed 's/^/| /' conftest.$ac_ext >&5
16572
Martin v. Löwis11437992002-04-12 09:54:03 +000016573ac_lo=`expr $ac_mid + 1`
16574 if test $ac_lo -le $ac_mid; then
16575 ac_lo= ac_hi=
16576 break
16577 fi
16578 ac_mid=`expr 2 '*' $ac_mid + 1`
16579fi
16580rm -f conftest.$ac_objext conftest.$ac_ext
16581 done
16582else
16583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016584sed 's/^/| /' conftest.$ac_ext >&5
16585
Martin v. Löwis11437992002-04-12 09:54:03 +000016586cat >conftest.$ac_ext <<_ACEOF
16587#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016588/* confdefs.h. */
16589_ACEOF
16590cat confdefs.h >>conftest.$ac_ext
16591cat >>conftest.$ac_ext <<_ACEOF
16592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016593#include <wchar.h>
16594
Martin v. Löwis11437992002-04-12 09:54:03 +000016595int
16596main ()
16597{
16598static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16599test_array [0] = 0
16600
16601 ;
16602 return 0;
16603}
16604_ACEOF
16605rm -f conftest.$ac_objext
16606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16607 (eval $ac_compile) 2>&5
16608 ac_status=$?
16609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16610 (exit $ac_status); } &&
16611 { ac_try='test -s conftest.$ac_objext'
16612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16613 (eval $ac_try) 2>&5
16614 ac_status=$?
16615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16616 (exit $ac_status); }; }; then
16617 ac_hi=-1 ac_mid=-1
16618 while :; do
16619 cat >conftest.$ac_ext <<_ACEOF
16620#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016621/* confdefs.h. */
16622_ACEOF
16623cat confdefs.h >>conftest.$ac_ext
16624cat >>conftest.$ac_ext <<_ACEOF
16625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016626#include <wchar.h>
16627
Martin v. Löwis11437992002-04-12 09:54:03 +000016628int
16629main ()
16630{
16631static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16632test_array [0] = 0
16633
16634 ;
16635 return 0;
16636}
16637_ACEOF
16638rm -f conftest.$ac_objext
16639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16640 (eval $ac_compile) 2>&5
16641 ac_status=$?
16642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16643 (exit $ac_status); } &&
16644 { ac_try='test -s conftest.$ac_objext'
16645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16646 (eval $ac_try) 2>&5
16647 ac_status=$?
16648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16649 (exit $ac_status); }; }; then
16650 ac_lo=$ac_mid; break
16651else
16652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016653sed 's/^/| /' conftest.$ac_ext >&5
16654
Martin v. Löwis11437992002-04-12 09:54:03 +000016655ac_hi=`expr '(' $ac_mid ')' - 1`
16656 if test $ac_mid -le $ac_hi; then
16657 ac_lo= ac_hi=
16658 break
16659 fi
16660 ac_mid=`expr 2 '*' $ac_mid`
16661fi
16662rm -f conftest.$ac_objext conftest.$ac_ext
16663 done
16664else
16665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016666sed 's/^/| /' conftest.$ac_ext >&5
16667
Martin v. Löwis11437992002-04-12 09:54:03 +000016668ac_lo= ac_hi=
16669fi
16670rm -f conftest.$ac_objext conftest.$ac_ext
16671fi
16672rm -f conftest.$ac_objext conftest.$ac_ext
16673# Binary search between lo and hi bounds.
16674while test "x$ac_lo" != "x$ac_hi"; do
16675 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16676 cat >conftest.$ac_ext <<_ACEOF
16677#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016678/* confdefs.h. */
16679_ACEOF
16680cat confdefs.h >>conftest.$ac_ext
16681cat >>conftest.$ac_ext <<_ACEOF
16682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016683#include <wchar.h>
16684
Martin v. Löwis11437992002-04-12 09:54:03 +000016685int
16686main ()
16687{
16688static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16689test_array [0] = 0
16690
16691 ;
16692 return 0;
16693}
16694_ACEOF
16695rm -f conftest.$ac_objext
16696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16697 (eval $ac_compile) 2>&5
16698 ac_status=$?
16699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16700 (exit $ac_status); } &&
16701 { ac_try='test -s conftest.$ac_objext'
16702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16703 (eval $ac_try) 2>&5
16704 ac_status=$?
16705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16706 (exit $ac_status); }; }; then
16707 ac_hi=$ac_mid
16708else
16709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016710sed 's/^/| /' conftest.$ac_ext >&5
16711
Martin v. Löwis11437992002-04-12 09:54:03 +000016712ac_lo=`expr '(' $ac_mid ')' + 1`
16713fi
16714rm -f conftest.$ac_objext conftest.$ac_ext
16715done
16716case $ac_lo in
16717?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016718'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16719See \`config.log' for more details." >&5
16720echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16721See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016722 { (exit 1); exit 1; }; } ;;
16723esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016724else
16725 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016726 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16727See \`config.log' for more details." >&5
16728echo "$as_me: error: cannot run test program while cross compiling
16729See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016730 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016731else
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 cat >conftest.$ac_ext <<_ACEOF
16733#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016734/* confdefs.h. */
16735_ACEOF
16736cat confdefs.h >>conftest.$ac_ext
16737cat >>conftest.$ac_ext <<_ACEOF
16738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016739#include <wchar.h>
16740
16741long longval () { return (long) (sizeof (wchar_t)); }
16742unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016743#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016744#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016745int
16746main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016747{
Martin v. Löwis11437992002-04-12 09:54:03 +000016748
16749 FILE *f = fopen ("conftest.val", "w");
16750 if (! f)
16751 exit (1);
16752 if (((long) (sizeof (wchar_t))) < 0)
16753 {
16754 long i = longval ();
16755 if (i != ((long) (sizeof (wchar_t))))
16756 exit (1);
16757 fprintf (f, "%ld\n", i);
16758 }
16759 else
16760 {
16761 unsigned long i = ulongval ();
16762 if (i != ((long) (sizeof (wchar_t))))
16763 exit (1);
16764 fprintf (f, "%lu\n", i);
16765 }
16766 exit (ferror (f) || fclose (f) != 0);
16767
16768 ;
16769 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016770}
Martin v. Löwis11437992002-04-12 09:54:03 +000016771_ACEOF
16772rm -f conftest$ac_exeext
16773if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16774 (eval $ac_link) 2>&5
16775 ac_status=$?
16776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16777 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16779 (eval $ac_try) 2>&5
16780 ac_status=$?
16781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16782 (exit $ac_status); }; }; then
16783 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016784else
Martin v. Löwis11437992002-04-12 09:54:03 +000016785 echo "$as_me: program exited with status $ac_status" >&5
16786echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016787sed 's/^/| /' conftest.$ac_ext >&5
16788
Martin v. Löwis11437992002-04-12 09:54:03 +000016789( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000016790{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16791See \`config.log' for more details." >&5
16792echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16793See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016794 { (exit 1); exit 1; }; }
16795fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016796rm -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 +000016797fi
16798fi
16799rm -f conftest.val
16800else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016801 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016802fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016803fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016804echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16805echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16806cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016807#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016808_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016809
Michael W. Hudson54241132001-12-07 15:38:26 +000016810
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016811fi
16812
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016813echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16814echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16815have_ucs4_tcl=no
16816cat >conftest.$ac_ext <<_ACEOF
16817#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016818/* confdefs.h. */
16819_ACEOF
16820cat confdefs.h >>conftest.$ac_ext
16821cat >>conftest.$ac_ext <<_ACEOF
16822/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016823
16824#include <tcl.h>
16825#if TCL_UTF_MAX != 6
16826# error "NOT UCS4_TCL"
16827#endif
16828int
16829main ()
16830{
16831
16832 ;
16833 return 0;
16834}
16835_ACEOF
16836rm -f conftest.$ac_objext
16837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16838 (eval $ac_compile) 2>&5
16839 ac_status=$?
16840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16841 (exit $ac_status); } &&
16842 { ac_try='test -s conftest.$ac_objext'
16843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16844 (eval $ac_try) 2>&5
16845 ac_status=$?
16846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16847 (exit $ac_status); }; }; then
16848
16849
16850cat >>confdefs.h <<\_ACEOF
16851#define HAVE_UCS4_TCL 1
16852_ACEOF
16853
16854 have_ucs4_tcl=yes
16855
16856else
16857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016858sed 's/^/| /' conftest.$ac_ext >&5
16859
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016860fi
16861rm -f conftest.$ac_objext conftest.$ac_ext
16862echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
16863echo "${ECHO_T}$have_ucs4_tcl" >&6
16864
Skip Montanaro6dead952003-09-25 14:50:04 +000016865# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016866if test "$wchar_h" = yes
16867then
16868 # check whether wchar_t is signed or not
16869 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
16870echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
16871 if test "${ac_cv_wchar_t_signed+set}" = set; then
16872 echo $ECHO_N "(cached) $ECHO_C" >&6
16873else
16874
16875 if test "$cross_compiling" = yes; then
16876 ac_cv_wchar_t_signed=yes
16877else
16878 cat >conftest.$ac_ext <<_ACEOF
16879#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016880/* confdefs.h. */
16881_ACEOF
16882cat confdefs.h >>conftest.$ac_ext
16883cat >>conftest.$ac_ext <<_ACEOF
16884/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016885
16886 #include <wchar.h>
16887 int main()
16888 {
16889 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
16890 }
16891
16892_ACEOF
16893rm -f conftest$ac_exeext
16894if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16895 (eval $ac_link) 2>&5
16896 ac_status=$?
16897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16898 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16900 (eval $ac_try) 2>&5
16901 ac_status=$?
16902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16903 (exit $ac_status); }; }; then
16904 ac_cv_wchar_t_signed=yes
16905else
16906 echo "$as_me: program exited with status $ac_status" >&5
16907echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016908sed 's/^/| /' conftest.$ac_ext >&5
16909
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016910( exit $ac_status )
16911ac_cv_wchar_t_signed=no
16912fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016913rm -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 +000016914fi
16915fi
16916
16917 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
16918echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
16919fi
16920
Martin v. Löwis11437992002-04-12 09:54:03 +000016921echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16922echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016923# Check whether --enable-unicode or --disable-unicode was given.
16924if test "${enable_unicode+set}" = set; then
16925 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016926
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016927else
16928 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016929fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016930
16931if test $enable_unicode = yes
16932then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016933 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016934 case "$have_ucs4_tcl" in
16935 yes) enable_unicode="ucs4"
16936 ;;
16937 *) enable_unicode="ucs2"
16938 ;;
16939 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016940fi
16941
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016942
16943
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016944case "$enable_unicode" in
16945ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016946 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016947#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016948_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016949
16950 ;;
16951ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016952 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016953#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016954_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016955
16956 ;;
16957esac
16958
Michael W. Hudson54241132001-12-07 15:38:26 +000016959
Martin v. Löwis11437992002-04-12 09:54:03 +000016960
16961
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016962
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016963if test "$enable_unicode" = "no"
16964then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016965 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 echo "$as_me:$LINENO: result: not used" >&5
16967echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016968else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016969 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016970
16971cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016972#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016973_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016974
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016975
16976 # wchar_t is only usable if it maps to an unsigned type
16977 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
16978 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016979 then
16980 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016981
Martin v. Löwis11437992002-04-12 09:54:03 +000016982cat >>confdefs.h <<\_ACEOF
16983#define HAVE_USABLE_WCHAR_T 1
16984_ACEOF
16985
16986 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016987#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016988_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016989
16990 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16991 then
16992 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016993 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016994#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016995_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016996
16997 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16998 then
16999 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017000 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017001#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017002_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017003
17004 else
17005 PY_UNICODE_TYPE="no type found"
17006 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017007 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17008echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017009fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017010
17011# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017012echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17013echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17014if test "${ac_cv_c_bigendian+set}" = set; then
17015 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017016else
Martin v. Löwis11437992002-04-12 09:54:03 +000017017 # See if sys/param.h defines the BYTE_ORDER macro.
17018cat >conftest.$ac_ext <<_ACEOF
17019#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017020/* confdefs.h. */
17021_ACEOF
17022cat confdefs.h >>conftest.$ac_ext
17023cat >>conftest.$ac_ext <<_ACEOF
17024/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017025#include <sys/types.h>
17026#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017027
Martin v. Löwis11437992002-04-12 09:54:03 +000017028int
17029main ()
17030{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017031#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17032 bogus endian macros
17033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017034
17035 ;
17036 return 0;
17037}
17038_ACEOF
17039rm -f conftest.$ac_objext
17040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17041 (eval $ac_compile) 2>&5
17042 ac_status=$?
17043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17044 (exit $ac_status); } &&
17045 { ac_try='test -s conftest.$ac_objext'
17046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17047 (eval $ac_try) 2>&5
17048 ac_status=$?
17049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17050 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017051 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017052cat >conftest.$ac_ext <<_ACEOF
17053#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017054/* confdefs.h. */
17055_ACEOF
17056cat confdefs.h >>conftest.$ac_ext
17057cat >>conftest.$ac_ext <<_ACEOF
17058/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017059#include <sys/types.h>
17060#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017061
Martin v. Löwis11437992002-04-12 09:54:03 +000017062int
17063main ()
17064{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017065#if BYTE_ORDER != BIG_ENDIAN
17066 not big endian
17067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017068
17069 ;
17070 return 0;
17071}
17072_ACEOF
17073rm -f conftest.$ac_objext
17074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17075 (eval $ac_compile) 2>&5
17076 ac_status=$?
17077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17078 (exit $ac_status); } &&
17079 { ac_try='test -s conftest.$ac_objext'
17080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17081 (eval $ac_try) 2>&5
17082 ac_status=$?
17083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17084 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017085 ac_cv_c_bigendian=yes
17086else
Martin v. Löwis11437992002-04-12 09:54:03 +000017087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017088sed 's/^/| /' conftest.$ac_ext >&5
17089
Martin v. Löwis11437992002-04-12 09:54:03 +000017090ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017092rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017093else
Martin v. Löwis11437992002-04-12 09:54:03 +000017094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017095sed 's/^/| /' conftest.$ac_ext >&5
17096
Martin v. Löwis11437992002-04-12 09:54:03 +000017097# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017098if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017099 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017100 ac_cv_c_bigendian=unknown
17101 cat >conftest.$ac_ext <<_ACEOF
17102#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017103/* confdefs.h. */
17104_ACEOF
17105cat confdefs.h >>conftest.$ac_ext
17106cat >>conftest.$ac_ext <<_ACEOF
17107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017108short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17109short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17110void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17111short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17112short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17113void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017114int
17115main ()
17116{
17117 _ascii (); _ebcdic ();
17118 ;
17119 return 0;
17120}
17121_ACEOF
17122rm -f conftest.$ac_objext
17123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17124 (eval $ac_compile) 2>&5
17125 ac_status=$?
17126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17127 (exit $ac_status); } &&
17128 { ac_try='test -s conftest.$ac_objext'
17129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17130 (eval $ac_try) 2>&5
17131 ac_status=$?
17132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17133 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017134 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017135 ac_cv_c_bigendian=yes
17136fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017137if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017138 if test "$ac_cv_c_bigendian" = unknown; then
17139 ac_cv_c_bigendian=no
17140 else
17141 # finding both strings is unlikely to happen, but who knows?
17142 ac_cv_c_bigendian=unknown
17143 fi
17144fi
17145else
17146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017147sed 's/^/| /' conftest.$ac_ext >&5
17148
Martin v. Löwis11437992002-04-12 09:54:03 +000017149fi
17150rm -f conftest.$ac_objext conftest.$ac_ext
17151else
17152 cat >conftest.$ac_ext <<_ACEOF
17153#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017154/* confdefs.h. */
17155_ACEOF
17156cat confdefs.h >>conftest.$ac_ext
17157cat >>conftest.$ac_ext <<_ACEOF
17158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017159int
17160main ()
17161{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017162 /* Are we little or big endian? From Harbison&Steele. */
17163 union
17164 {
17165 long l;
17166 char c[sizeof (long)];
17167 } u;
17168 u.l = 1;
17169 exit (u.c[sizeof (long) - 1] == 1);
17170}
Martin v. Löwis11437992002-04-12 09:54:03 +000017171_ACEOF
17172rm -f conftest$ac_exeext
17173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17174 (eval $ac_link) 2>&5
17175 ac_status=$?
17176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17177 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17179 (eval $ac_try) 2>&5
17180 ac_status=$?
17181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17182 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017183 ac_cv_c_bigendian=no
17184else
Martin v. Löwis11437992002-04-12 09:54:03 +000017185 echo "$as_me: program exited with status $ac_status" >&5
17186echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017187sed 's/^/| /' conftest.$ac_ext >&5
17188
Martin v. Löwis11437992002-04-12 09:54:03 +000017189( exit $ac_status )
17190ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017191fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017192rm -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 +000017193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017194fi
17195rm -f conftest.$ac_objext conftest.$ac_ext
17196fi
17197echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17198echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17199case $ac_cv_c_bigendian in
17200 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017201
Martin v. Löwis11437992002-04-12 09:54:03 +000017202cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017203#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017204_ACEOF
17205 ;;
17206 no)
17207 ;;
17208 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017209 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017210presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017211echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017212presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17213 { (exit 1); exit 1; }; } ;;
17214esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017215
Michael W. Hudson54241132001-12-07 15:38:26 +000017216
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017217# Check whether right shifting a negative integer extends the sign bit
17218# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017219echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17220echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17221if test "${ac_cv_rshift_extends_sign+set}" = set; then
17222 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017223else
Martin v. Löwis11437992002-04-12 09:54:03 +000017224
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017225if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017226 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017227else
Martin v. Löwis11437992002-04-12 09:54:03 +000017228 cat >conftest.$ac_ext <<_ACEOF
17229#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017230/* confdefs.h. */
17231_ACEOF
17232cat confdefs.h >>conftest.$ac_ext
17233cat >>conftest.$ac_ext <<_ACEOF
17234/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017235
17236int main()
17237{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017238 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017239}
17240
Martin v. Löwis11437992002-04-12 09:54:03 +000017241_ACEOF
17242rm -f conftest$ac_exeext
17243if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17244 (eval $ac_link) 2>&5
17245 ac_status=$?
17246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17247 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17249 (eval $ac_try) 2>&5
17250 ac_status=$?
17251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17252 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017253 ac_cv_rshift_extends_sign=yes
17254else
Martin v. Löwis11437992002-04-12 09:54:03 +000017255 echo "$as_me: program exited with status $ac_status" >&5
17256echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017257sed 's/^/| /' conftest.$ac_ext >&5
17258
Martin v. Löwis11437992002-04-12 09:54:03 +000017259( exit $ac_status )
17260ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017261fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017262rm -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 +000017263fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017264fi
17265
Martin v. Löwis11437992002-04-12 09:54:03 +000017266echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17267echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017268if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017269then
Martin v. Löwis11437992002-04-12 09:54:03 +000017270
17271cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017272#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017273_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017274
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017275fi
17276
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017277# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017278echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17279echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17280if test "${ac_cv_have_getc_unlocked+set}" = set; then
17281 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017282else
Martin v. Löwis11437992002-04-12 09:54:03 +000017283
17284cat >conftest.$ac_ext <<_ACEOF
17285#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017286/* confdefs.h. */
17287_ACEOF
17288cat confdefs.h >>conftest.$ac_ext
17289cat >>conftest.$ac_ext <<_ACEOF
17290/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017291#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017292int
17293main ()
17294{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017295
17296 FILE *f = fopen("/dev/null", "r");
17297 flockfile(f);
17298 getc_unlocked(f);
17299 funlockfile(f);
17300
Martin v. Löwis11437992002-04-12 09:54:03 +000017301 ;
17302 return 0;
17303}
17304_ACEOF
17305rm -f conftest.$ac_objext conftest$ac_exeext
17306if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17307 (eval $ac_link) 2>&5
17308 ac_status=$?
17309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17310 (exit $ac_status); } &&
17311 { ac_try='test -s conftest$ac_exeext'
17312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17313 (eval $ac_try) 2>&5
17314 ac_status=$?
17315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17316 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017317 ac_cv_have_getc_unlocked=yes
17318else
Martin v. Löwis11437992002-04-12 09:54:03 +000017319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017320sed 's/^/| /' conftest.$ac_ext >&5
17321
Martin v. Löwis11437992002-04-12 09:54:03 +000017322ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017324rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017325fi
17326
Martin v. Löwis11437992002-04-12 09:54:03 +000017327echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17328echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017329if test "$ac_cv_have_getc_unlocked" = yes
17330then
Martin v. Löwis11437992002-04-12 09:54:03 +000017331
17332cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017333#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017334_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017335
17336fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017337
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017338# check for readline 2.2
17339cat >conftest.$ac_ext <<_ACEOF
17340#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017341/* confdefs.h. */
17342_ACEOF
17343cat confdefs.h >>conftest.$ac_ext
17344cat >>conftest.$ac_ext <<_ACEOF
17345/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017346#include <readline/readline.h>
17347_ACEOF
17348if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17349 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17350 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017351 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017352 rm -f conftest.er1
17353 cat conftest.err >&5
17354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17355 (exit $ac_status); } >/dev/null; then
17356 if test -s conftest.err; then
17357 ac_cpp_err=$ac_c_preproc_warn_flag
17358 else
17359 ac_cpp_err=
17360 fi
17361else
17362 ac_cpp_err=yes
17363fi
17364if test -z "$ac_cpp_err"; then
17365 have_readline=yes
17366else
17367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017368sed 's/^/| /' conftest.$ac_ext >&5
17369
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017370 have_readline=no
17371fi
17372rm -f conftest.err conftest.$ac_ext
17373if test $have_readline = yes
17374then
17375 cat >conftest.$ac_ext <<_ACEOF
17376#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017377/* confdefs.h. */
17378_ACEOF
17379cat confdefs.h >>conftest.$ac_ext
17380cat >>conftest.$ac_ext <<_ACEOF
17381/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017382#include <readline/readline.h>
17383
17384_ACEOF
17385if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017386 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017387
17388cat >>confdefs.h <<\_ACEOF
17389#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17390_ACEOF
17391
17392fi
17393rm -f conftest*
17394
17395fi
17396
Martin v. Löwis0daad592001-09-30 21:09:59 +000017397# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017398echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17399echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17400if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17401 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017402else
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017404LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017405cat >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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017412
Guido van Rossum353ae582001-07-10 16:45:32 +000017413/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017414#ifdef __cplusplus
17415extern "C"
17416#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017417/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017418 builtin and then its argument prototype would still apply. */
17419char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017420int
17421main ()
17422{
17423rl_pre_input_hook ();
17424 ;
17425 return 0;
17426}
17427_ACEOF
17428rm -f conftest.$ac_objext conftest$ac_exeext
17429if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17430 (eval $ac_link) 2>&5
17431 ac_status=$?
17432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17433 (exit $ac_status); } &&
17434 { ac_try='test -s conftest$ac_exeext'
17435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17436 (eval $ac_try) 2>&5
17437 ac_status=$?
17438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17439 (exit $ac_status); }; }; then
17440 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017441else
Martin v. Löwis11437992002-04-12 09:54:03 +000017442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017443sed 's/^/| /' conftest.$ac_ext >&5
17444
Martin v. Löwis11437992002-04-12 09:54:03 +000017445ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017446fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017447rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17448LIBS=$ac_check_lib_save_LIBS
17449fi
17450echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17451echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17452if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017453
Martin v. Löwis11437992002-04-12 09:54:03 +000017454cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017455#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017456_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017457
Martin v. Löwis0daad592001-09-30 21:09:59 +000017458fi
17459
Michael W. Hudson54241132001-12-07 15:38:26 +000017460
Martin v. Löwis0daad592001-09-30 21:09:59 +000017461# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017462echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17463echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17464if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17465 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017466else
Martin v. Löwis11437992002-04-12 09:54:03 +000017467 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017468LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017469cat >conftest.$ac_ext <<_ACEOF
17470#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017471/* confdefs.h. */
17472_ACEOF
17473cat confdefs.h >>conftest.$ac_ext
17474cat >>conftest.$ac_ext <<_ACEOF
17475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017476
Martin v. Löwis0daad592001-09-30 21:09:59 +000017477/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017478#ifdef __cplusplus
17479extern "C"
17480#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017481/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017482 builtin and then its argument prototype would still apply. */
17483char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017484int
17485main ()
17486{
17487rl_completion_matches ();
17488 ;
17489 return 0;
17490}
17491_ACEOF
17492rm -f conftest.$ac_objext conftest$ac_exeext
17493if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17494 (eval $ac_link) 2>&5
17495 ac_status=$?
17496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17497 (exit $ac_status); } &&
17498 { ac_try='test -s conftest$ac_exeext'
17499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17500 (eval $ac_try) 2>&5
17501 ac_status=$?
17502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17503 (exit $ac_status); }; }; then
17504 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017505else
Martin v. Löwis11437992002-04-12 09:54:03 +000017506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017507sed 's/^/| /' conftest.$ac_ext >&5
17508
Martin v. Löwis11437992002-04-12 09:54:03 +000017509ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017510fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017511rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17512LIBS=$ac_check_lib_save_LIBS
17513fi
17514echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17515echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17516if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017517
Martin v. Löwis11437992002-04-12 09:54:03 +000017518cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017519#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017520_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017521
Guido van Rossum353ae582001-07-10 16:45:32 +000017522fi
17523
Jack Jansendd19cf82001-12-06 22:36:17 +000017524
Martin v. Löwis11437992002-04-12 09:54:03 +000017525echo "$as_me:$LINENO: checking for broken nice()" >&5
17526echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17527if test "${ac_cv_broken_nice+set}" = set; then
17528 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017529else
Martin v. Löwis11437992002-04-12 09:54:03 +000017530
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017531if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017532 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017533else
Martin v. Löwis11437992002-04-12 09:54:03 +000017534 cat >conftest.$ac_ext <<_ACEOF
17535#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017536/* confdefs.h. */
17537_ACEOF
17538cat confdefs.h >>conftest.$ac_ext
17539cat >>conftest.$ac_ext <<_ACEOF
17540/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017541
17542int main()
17543{
17544 int val1 = nice(1);
17545 if (val1 != -1 && val1 == nice(2))
17546 exit(0);
17547 exit(1);
17548}
17549
Martin v. Löwis11437992002-04-12 09:54:03 +000017550_ACEOF
17551rm -f conftest$ac_exeext
17552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17553 (eval $ac_link) 2>&5
17554 ac_status=$?
17555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17556 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17558 (eval $ac_try) 2>&5
17559 ac_status=$?
17560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17561 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017562 ac_cv_broken_nice=yes
17563else
Martin v. Löwis11437992002-04-12 09:54:03 +000017564 echo "$as_me: program exited with status $ac_status" >&5
17565echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017566sed 's/^/| /' conftest.$ac_ext >&5
17567
Martin v. Löwis11437992002-04-12 09:54:03 +000017568( exit $ac_status )
17569ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017570fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017571rm -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 +000017572fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017573fi
17574
Martin v. Löwis11437992002-04-12 09:54:03 +000017575echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17576echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017577if test "$ac_cv_broken_nice" = yes
17578then
Martin v. Löwis11437992002-04-12 09:54:03 +000017579
17580cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017581#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017582_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017583
17584fi
17585
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017586# tzset(3) exists and works like we expect it to
17587echo "$as_me:$LINENO: checking for working tzset()" >&5
17588echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17589if test "${ac_cv_working_tzset+set}" = set; then
17590 echo $ECHO_N "(cached) $ECHO_C" >&6
17591else
17592
17593if test "$cross_compiling" = yes; then
17594 ac_cv_working_tzset=no
17595else
17596 cat >conftest.$ac_ext <<_ACEOF
17597#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017598/* confdefs.h. */
17599_ACEOF
17600cat confdefs.h >>conftest.$ac_ext
17601cat >>conftest.$ac_ext <<_ACEOF
17602/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017603
17604#include <stdlib.h>
17605#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017606#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017607int main()
17608{
Brett Cannon18367812003-09-19 00:59:16 +000017609 /* Note that we need to ensure that not only does tzset(3)
17610 do 'something' with localtime, but it works as documented
17611 in the library reference and as expected by the test suite.
17612
17613 Red Hat 6.2 doesn't understand the southern hemisphere
17614 after New Year's Day; it thinks swaps on that day.
17615 */
17616
17617 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17618 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17619
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017620 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017621 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017622 if (localtime(&groundhogday)->tm_hour != 0)
17623 exit(1);
17624
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017625 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017626 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017627 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017628 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017629
17630 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17631 tzset();
17632 if (localtime(&groundhogday)->tm_hour != 11)
17633 exit(1);
17634 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17635 exit(1);
17636 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17637 exit(1);
17638
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017639 exit(0);
17640}
17641
17642_ACEOF
17643rm -f conftest$ac_exeext
17644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17645 (eval $ac_link) 2>&5
17646 ac_status=$?
17647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17648 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17650 (eval $ac_try) 2>&5
17651 ac_status=$?
17652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17653 (exit $ac_status); }; }; then
17654 ac_cv_working_tzset=yes
17655else
17656 echo "$as_me: program exited with status $ac_status" >&5
17657echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017658sed 's/^/| /' conftest.$ac_ext >&5
17659
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017660( exit $ac_status )
17661ac_cv_working_tzset=no
17662fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017663rm -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 +000017664fi
17665fi
17666
17667echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17668echo "${ECHO_T}$ac_cv_working_tzset" >&6
17669if test "$ac_cv_working_tzset" = yes
17670then
17671
17672cat >>confdefs.h <<\_ACEOF
17673#define HAVE_WORKING_TZSET 1
17674_ACEOF
17675
17676fi
17677
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017678# Look for subsecond timestamps in struct stat
17679echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17680echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17681if test "${ac_cv_stat_tv_nsec+set}" = set; then
17682 echo $ECHO_N "(cached) $ECHO_C" >&6
17683else
17684 cat >conftest.$ac_ext <<_ACEOF
17685#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017686/* confdefs.h. */
17687_ACEOF
17688cat confdefs.h >>conftest.$ac_ext
17689cat >>conftest.$ac_ext <<_ACEOF
17690/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017691#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017692int
17693main ()
17694{
17695
17696struct stat st;
17697st.st_mtim.tv_nsec = 1;
17698
17699 ;
17700 return 0;
17701}
17702_ACEOF
17703rm -f conftest.$ac_objext
17704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17705 (eval $ac_compile) 2>&5
17706 ac_status=$?
17707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17708 (exit $ac_status); } &&
17709 { ac_try='test -s conftest.$ac_objext'
17710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17711 (eval $ac_try) 2>&5
17712 ac_status=$?
17713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17714 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017715 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017716else
17717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017718sed 's/^/| /' conftest.$ac_ext >&5
17719
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017720ac_cv_stat_tv_nsec=no
17721fi
17722rm -f conftest.$ac_objext conftest.$ac_ext
17723fi
17724
17725echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17726echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17727if test "$ac_cv_stat_tv_nsec" = yes
17728then
17729
17730cat >>confdefs.h <<\_ACEOF
17731#define HAVE_STAT_TV_NSEC 1
17732_ACEOF
17733
17734fi
17735
Jack Jansen666b1e72001-10-31 12:11:48 +000017736# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017737echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17738echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17739if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17740 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017741else
Martin v. Löwis11437992002-04-12 09:54:03 +000017742 cat >conftest.$ac_ext <<_ACEOF
17743#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017744/* confdefs.h. */
17745_ACEOF
17746cat confdefs.h >>conftest.$ac_ext
17747cat >>conftest.$ac_ext <<_ACEOF
17748/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017749#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017750int
17751main ()
17752{
Jack Jansen666b1e72001-10-31 12:11:48 +000017753
17754 int rtn;
17755 rtn = mvwdelch(0,0,0);
17756
Martin v. Löwis11437992002-04-12 09:54:03 +000017757 ;
17758 return 0;
17759}
17760_ACEOF
17761rm -f conftest.$ac_objext
17762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17763 (eval $ac_compile) 2>&5
17764 ac_status=$?
17765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17766 (exit $ac_status); } &&
17767 { ac_try='test -s conftest.$ac_objext'
17768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17769 (eval $ac_try) 2>&5
17770 ac_status=$?
17771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17772 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017773 ac_cv_mvwdelch_is_expression=yes
17774else
Martin v. Löwis11437992002-04-12 09:54:03 +000017775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017776sed 's/^/| /' conftest.$ac_ext >&5
17777
Martin v. Löwis11437992002-04-12 09:54:03 +000017778ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017779fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017780rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017781fi
17782
Martin v. Löwis11437992002-04-12 09:54:03 +000017783echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17784echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017785
17786if test "$ac_cv_mvwdelch_is_expression" = yes
17787then
Martin v. Löwis11437992002-04-12 09:54:03 +000017788
17789cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017790#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017791_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017792
17793fi
17794
Martin v. Löwis11437992002-04-12 09:54:03 +000017795echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17796echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17797if test "${ac_cv_window_has_flags+set}" = set; then
17798 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017799else
Martin v. Löwis11437992002-04-12 09:54:03 +000017800 cat >conftest.$ac_ext <<_ACEOF
17801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017802/* confdefs.h. */
17803_ACEOF
17804cat confdefs.h >>conftest.$ac_ext
17805cat >>conftest.$ac_ext <<_ACEOF
17806/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017807#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017808int
17809main ()
17810{
Jack Jansen666b1e72001-10-31 12:11:48 +000017811
17812 WINDOW *w;
17813 w->_flags = 0;
17814
Martin v. Löwis11437992002-04-12 09:54:03 +000017815 ;
17816 return 0;
17817}
17818_ACEOF
17819rm -f conftest.$ac_objext
17820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17821 (eval $ac_compile) 2>&5
17822 ac_status=$?
17823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17824 (exit $ac_status); } &&
17825 { ac_try='test -s conftest.$ac_objext'
17826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17827 (eval $ac_try) 2>&5
17828 ac_status=$?
17829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17830 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017831 ac_cv_window_has_flags=yes
17832else
Martin v. Löwis11437992002-04-12 09:54:03 +000017833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017834sed 's/^/| /' conftest.$ac_ext >&5
17835
Martin v. Löwis11437992002-04-12 09:54:03 +000017836ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017837fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017838rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017839fi
17840
Martin v. Löwis11437992002-04-12 09:54:03 +000017841echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17842echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017843
Jack Jansen666b1e72001-10-31 12:11:48 +000017844
17845if test "$ac_cv_window_has_flags" = yes
17846then
Martin v. Löwis11437992002-04-12 09:54:03 +000017847
17848cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017849#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017850_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017851
17852fi
17853
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017854echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17855echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17856
17857if test -e /dev/ptmx
17858then
17859 echo "$as_me:$LINENO: result: yes" >&5
17860echo "${ECHO_T}yes" >&6
17861
17862cat >>confdefs.h <<\_ACEOF
17863#define HAVE_DEV_PTMX 1
17864_ACEOF
17865
17866else
17867 echo "$as_me:$LINENO: result: no" >&5
17868echo "${ECHO_T}no" >&6
17869fi
17870
Neal Norwitz865400f2003-03-21 01:42:58 +000017871echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17872echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17873
17874if test -e /dev/ptc
17875then
17876 echo "$as_me:$LINENO: result: yes" >&5
17877echo "${ECHO_T}yes" >&6
17878
17879cat >>confdefs.h <<\_ACEOF
17880#define HAVE_DEV_PTC 1
17881_ACEOF
17882
17883else
17884 echo "$as_me:$LINENO: result: no" >&5
17885echo "${ECHO_T}no" >&6
17886fi
17887
Martin v. Löwis11437992002-04-12 09:54:03 +000017888echo "$as_me:$LINENO: checking for socklen_t" >&5
17889echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17890if test "${ac_cv_type_socklen_t+set}" = set; then
17891 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017892else
Martin v. Löwis11437992002-04-12 09:54:03 +000017893 cat >conftest.$ac_ext <<_ACEOF
17894#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017895/* confdefs.h. */
17896_ACEOF
17897cat confdefs.h >>conftest.$ac_ext
17898cat >>conftest.$ac_ext <<_ACEOF
17899/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000017900
17901#ifdef HAVE_SYS_TYPES_H
17902#include <sys/types.h>
17903#endif
17904#ifdef HAVE_SYS_SOCKET_H
17905#include <sys/socket.h>
17906#endif
17907
17908
Martin v. Löwis11437992002-04-12 09:54:03 +000017909int
17910main ()
17911{
17912if ((socklen_t *) 0)
17913 return 0;
17914if (sizeof (socklen_t))
17915 return 0;
17916 ;
17917 return 0;
17918}
17919_ACEOF
17920rm -f conftest.$ac_objext
17921if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17922 (eval $ac_compile) 2>&5
17923 ac_status=$?
17924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17925 (exit $ac_status); } &&
17926 { ac_try='test -s conftest.$ac_objext'
17927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17928 (eval $ac_try) 2>&5
17929 ac_status=$?
17930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17931 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017932 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017933else
Martin v. Löwis11437992002-04-12 09:54:03 +000017934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017935sed 's/^/| /' conftest.$ac_ext >&5
17936
Martin v. Löwis11437992002-04-12 09:54:03 +000017937ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017938fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017939rm -f conftest.$ac_objext conftest.$ac_ext
17940fi
17941echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17942echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17943if test $ac_cv_type_socklen_t = yes; then
17944 :
17945else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017946
Martin v. Löwis01c04012002-11-11 14:58:44 +000017947cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017948#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017949_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017950
17951fi
17952
Michael W. Hudson54241132001-12-07 15:38:26 +000017953
Michael W. Hudson54241132001-12-07 15:38:26 +000017954
17955
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017956for h in `(cd $srcdir;echo Python/thread_*.h)`
17957do
17958 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17959done
17960
Michael W. Hudson54241132001-12-07 15:38:26 +000017961
Jack Jansen0b06be72002-06-21 14:48:38 +000017962SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017963echo "$as_me:$LINENO: checking for build directories" >&5
17964echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017965for dir in $SRCDIRS; do
17966 if test ! -d $dir; then
17967 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017968 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017969done
Martin v. Löwis11437992002-04-12 09:54:03 +000017970echo "$as_me:$LINENO: result: done" >&5
17971echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017972
Guido van Rossum627b2d71993-12-24 10:39:16 +000017973# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000017974 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017975
Martin v. Löwis11437992002-04-12 09:54:03 +000017976cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017977# This file is a shell script that caches the results of configure
17978# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017979# scripts and configure runs, see configure's option --config-cache.
17980# It is not useful on other systems. If it contains results you don't
17981# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017982#
Martin v. Löwis11437992002-04-12 09:54:03 +000017983# config.status only pays attention to the cache file if you give it
17984# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017985#
Skip Montanaro6dead952003-09-25 14:50:04 +000017986# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017987# loading this file, other *unset* `ac_cv_foo' will be assigned the
17988# following values.
17989
17990_ACEOF
17991
Guido van Rossumf78abae1997-01-21 22:02:36 +000017992# The following way of writing the cache mishandles newlines in values,
17993# but we know of no workaround that is simple, portable, and efficient.
17994# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017995# Ultrix sh set writes to stderr and can't be redirected directly,
17996# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017997{
17998 (set) 2>&1 |
17999 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18000 *ac_space=\ *)
18001 # `set' does not quote correctly, so add quotes (double-quote
18002 # substitution turns \\\\ into \\, and sed turns \\ into \).
18003 sed -n \
18004 "s/'/'\\\\''/g;
18005 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18006 ;;
18007 *)
18008 # `set' quotes correctly as required by POSIX, so do not add quotes.
18009 sed -n \
18010 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18011 ;;
18012 esac;
18013} |
18014 sed '
18015 t clear
18016 : clear
18017 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18018 t end
18019 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18020 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018021if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018022 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018023 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18024 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018025 else
18026 echo "not updating unwritable cache $cache_file"
18027 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018028fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018029rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018030
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018031test "x$prefix" = xNONE && prefix=$ac_default_prefix
18032# Let make expand exec_prefix.
18033test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018034
Martin v. Löwis11437992002-04-12 09:54:03 +000018035# VPATH may cause trouble with some makes, so we remove $(srcdir),
18036# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18037# trailing colons and then remove the whole line if VPATH becomes empty
18038# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018039if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018040 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18041s/:*\$(srcdir):*/:/;
18042s/:*\${srcdir}:*/:/;
18043s/:*@srcdir@:*/:/;
18044s/^\([^=]*=[ ]*\):*/\1/;
18045s/:*$//;
18046s/^[^=]*=[ ]*$//;
18047}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018048fi
18049
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018050DEFS=-DHAVE_CONFIG_H
18051
Skip Montanaro6dead952003-09-25 14:50:04 +000018052ac_libobjs=
18053ac_ltlibobjs=
18054for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18055 # 1. Remove the extension, and $U if already installed.
18056 ac_i=`echo "$ac_i" |
18057 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18058 # 2. Add them.
18059 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18060 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18061done
18062LIBOBJS=$ac_libobjs
18063
18064LTLIBOBJS=$ac_ltlibobjs
18065
18066
Martin v. Löwis11437992002-04-12 09:54:03 +000018067
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018068: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018069ac_clean_files_save=$ac_clean_files
18070ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18071{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18072echo "$as_me: creating $CONFIG_STATUS" >&6;}
18073cat >$CONFIG_STATUS <<_ACEOF
18074#! $SHELL
18075# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018076# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018077# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018078# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018079
Martin v. Löwis11437992002-04-12 09:54:03 +000018080debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018081ac_cs_recheck=false
18082ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018083SHELL=\${CONFIG_SHELL-$SHELL}
18084_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018085
Martin v. Löwis11437992002-04-12 09:54:03 +000018086cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018087## --------------------- ##
18088## M4sh Initialization. ##
18089## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018090
Martin v. Löwis11437992002-04-12 09:54:03 +000018091# Be Bourne compatible
18092if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18093 emulate sh
18094 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018095 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18096 # is contrary to our usage. Disable this feature.
18097 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018098elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18099 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018100fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018101
Martin v. Löwis11437992002-04-12 09:54:03 +000018102# Support unset when possible.
18103if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18104 as_unset=unset
18105else
18106 as_unset=false
18107fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018108
Skip Montanaro6dead952003-09-25 14:50:04 +000018109
18110# Work around bugs in pre-3.0 UWIN ksh.
18111$as_unset ENV MAIL MAILPATH
18112PS1='$ '
18113PS2='> '
18114PS4='+ '
18115
18116# NLS nuisances.
18117for as_var in \
18118 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18119 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18120 LC_TELEPHONE LC_TIME
18121do
18122 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18123 eval $as_var=C; export $as_var
18124 else
18125 $as_unset $as_var
18126 fi
18127done
18128
18129# Required to use basename.
18130if expr a : '\(a\)' >/dev/null 2>&1; then
18131 as_expr=expr
18132else
18133 as_expr=false
18134fi
18135
18136if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18137 as_basename=basename
18138else
18139 as_basename=false
18140fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018141
18142
18143# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018144as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018145$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18146 X"$0" : 'X\(//\)$' \| \
18147 X"$0" : 'X\(/\)$' \| \
18148 . : '\(.\)' 2>/dev/null ||
18149echo X/"$0" |
18150 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18151 /^X\/\(\/\/\)$/{ s//\1/; q; }
18152 /^X\/\(\/\).*/{ s//\1/; q; }
18153 s/.*/./; q'`
18154
Skip Montanaro6dead952003-09-25 14:50:04 +000018155
Martin v. Löwis11437992002-04-12 09:54:03 +000018156# PATH needs CR, and LINENO needs CR and PATH.
18157# Avoid depending upon Character Ranges.
18158as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18159as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18160as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18161as_cr_digits='0123456789'
18162as_cr_alnum=$as_cr_Letters$as_cr_digits
18163
18164# The user is always right.
18165if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018166 echo "#! /bin/sh" >conf$$.sh
18167 echo "exit 0" >>conf$$.sh
18168 chmod +x conf$$.sh
18169 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018170 PATH_SEPARATOR=';'
18171 else
18172 PATH_SEPARATOR=:
18173 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018174 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018175fi
18176
18177
18178 as_lineno_1=$LINENO
18179 as_lineno_2=$LINENO
18180 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18181 test "x$as_lineno_1" != "x$as_lineno_2" &&
18182 test "x$as_lineno_3" = "x$as_lineno_2" || {
18183 # Find who we are. Look in the path if we contain no path at all
18184 # relative or not.
18185 case $0 in
18186 *[\\/]* ) as_myself=$0 ;;
18187 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18188for as_dir in $PATH
18189do
18190 IFS=$as_save_IFS
18191 test -z "$as_dir" && as_dir=.
18192 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18193done
18194
18195 ;;
18196 esac
18197 # We did not find ourselves, most probably we were run as `sh COMMAND'
18198 # in which case we are not to be found in the path.
18199 if test "x$as_myself" = x; then
18200 as_myself=$0
18201 fi
18202 if test ! -f "$as_myself"; then
18203 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18204echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18205 { (exit 1); exit 1; }; }
18206 fi
18207 case $CONFIG_SHELL in
18208 '')
18209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18211do
18212 IFS=$as_save_IFS
18213 test -z "$as_dir" && as_dir=.
18214 for as_base in sh bash ksh sh5; do
18215 case $as_dir in
18216 /*)
18217 if ("$as_dir/$as_base" -c '
18218 as_lineno_1=$LINENO
18219 as_lineno_2=$LINENO
18220 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18221 test "x$as_lineno_1" != "x$as_lineno_2" &&
18222 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018223 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18224 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018225 CONFIG_SHELL=$as_dir/$as_base
18226 export CONFIG_SHELL
18227 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18228 fi;;
18229 esac
18230 done
18231done
18232;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018233 esac
18234
Martin v. Löwis11437992002-04-12 09:54:03 +000018235 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18236 # uniformly replaced by the line number. The first 'sed' inserts a
18237 # line-number line before each line; the second 'sed' does the real
18238 # work. The second script uses 'N' to pair each line-number line
18239 # with the numbered line, and appends trailing '-' during
18240 # substitution so that $LINENO is not a special case at line end.
18241 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18242 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18243 sed '=' <$as_myself |
18244 sed '
18245 N
18246 s,$,-,
18247 : loop
18248 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18249 t loop
18250 s,-$,,
18251 s,^['$as_cr_digits']*\n,,
18252 ' >$as_me.lineno &&
18253 chmod +x $as_me.lineno ||
18254 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18255echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18256 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018257
Martin v. Löwis11437992002-04-12 09:54:03 +000018258 # Don't try to exec as it changes $[0], causing all sort of problems
18259 # (the dirname of $[0] is not the place where we might find the
18260 # original and so on. Autoconf is especially sensible to this).
18261 . ./$as_me.lineno
18262 # Exit status is that of the last command.
18263 exit
18264}
18265
18266
18267case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18268 *c*,-n*) ECHO_N= ECHO_C='
18269' ECHO_T=' ' ;;
18270 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18271 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18272esac
18273
18274if expr a : '\(a\)' >/dev/null 2>&1; then
18275 as_expr=expr
18276else
18277 as_expr=false
18278fi
18279
18280rm -f conf$$ conf$$.exe conf$$.file
18281echo >conf$$.file
18282if ln -s conf$$.file conf$$ 2>/dev/null; then
18283 # We could just check for DJGPP; but this test a) works b) is more generic
18284 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18285 if test -f conf$$.exe; then
18286 # Don't use ln at all; we don't have any links
18287 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018288 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018289 as_ln_s='ln -s'
18290 fi
18291elif ln conf$$.file conf$$ 2>/dev/null; then
18292 as_ln_s=ln
18293else
18294 as_ln_s='cp -p'
18295fi
18296rm -f conf$$ conf$$.exe conf$$.file
18297
Skip Montanaro6dead952003-09-25 14:50:04 +000018298if mkdir -p . 2>/dev/null; then
18299 as_mkdir_p=:
18300else
18301 as_mkdir_p=false
18302fi
18303
Martin v. Löwis11437992002-04-12 09:54:03 +000018304as_executable_p="test -f"
18305
18306# Sed expression to map a string onto a valid CPP name.
18307as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18308
18309# Sed expression to map a string onto a valid variable name.
18310as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18311
18312
18313# IFS
18314# We need space, tab and new line, in precisely that order.
18315as_nl='
18316'
18317IFS=" $as_nl"
18318
18319# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018320$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018321
18322exec 6>&1
18323
18324# Open the log real soon, to keep \$[0] and so on meaningful, and to
18325# report actual input values of CONFIG_FILES etc. instead of their
18326# values after options handling. Logging --version etc. is OK.
18327exec 5>>config.log
18328{
18329 echo
18330 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18331## Running $as_me. ##
18332_ASBOX
18333} >&5
18334cat >&5 <<_CSEOF
18335
Fred Drake9bd44622003-07-30 17:39:48 +000018336This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000018337generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018338
18339 CONFIG_FILES = $CONFIG_FILES
18340 CONFIG_HEADERS = $CONFIG_HEADERS
18341 CONFIG_LINKS = $CONFIG_LINKS
18342 CONFIG_COMMANDS = $CONFIG_COMMANDS
18343 $ $0 $@
18344
18345_CSEOF
18346echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18347echo >&5
18348_ACEOF
18349
18350# Files that config.status was made for.
18351if test -n "$ac_config_files"; then
18352 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18353fi
18354
18355if test -n "$ac_config_headers"; then
18356 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18357fi
18358
18359if test -n "$ac_config_links"; then
18360 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18361fi
18362
18363if test -n "$ac_config_commands"; then
18364 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18365fi
18366
18367cat >>$CONFIG_STATUS <<\_ACEOF
18368
18369ac_cs_usage="\
18370\`$as_me' instantiates files from templates according to the
18371current configuration.
18372
18373Usage: $0 [OPTIONS] [FILE]...
18374
18375 -h, --help print this help, then exit
18376 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018377 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018378 -d, --debug don't remove temporary files
18379 --recheck update $as_me by reconfiguring in the same conditions
18380 --file=FILE[:TEMPLATE]
18381 instantiate the configuration file FILE
18382 --header=FILE[:TEMPLATE]
18383 instantiate the configuration header FILE
18384
18385Configuration files:
18386$config_files
18387
18388Configuration headers:
18389$config_headers
18390
18391Report bugs to <bug-autoconf@gnu.org>."
18392_ACEOF
18393
18394cat >>$CONFIG_STATUS <<_ACEOF
18395ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018396python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000018397configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018398 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18399
18400Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18401Free Software Foundation, Inc.
18402This config.status script is free software; the Free Software Foundation
18403gives unlimited permission to copy, distribute and modify it."
18404srcdir=$srcdir
18405INSTALL="$INSTALL"
18406_ACEOF
18407
18408cat >>$CONFIG_STATUS <<\_ACEOF
18409# If no file are specified by the user, then we need to provide default
18410# value. By we need to know if files were specified by the user.
18411ac_need_defaults=:
18412while test $# != 0
18413do
18414 case $1 in
18415 --*=*)
18416 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18417 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018418 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018419 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018420 -*)
18421 ac_option=$1
18422 ac_optarg=$2
18423 ac_shift=shift
18424 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018425 *) # This is not an option, so the user has probably given explicit
18426 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018427 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018428 ac_need_defaults=false;;
18429 esac
18430
Skip Montanaro6dead952003-09-25 14:50:04 +000018431 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018432 # Handling of the options.
18433_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018434cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018435 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18436 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018437 --version | --vers* | -V )
18438 echo "$ac_cs_version"; exit 0 ;;
18439 --he | --h)
18440 # Conflict between --help and --header
18441 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18442Try \`$0 --help' for more information." >&5
18443echo "$as_me: error: ambiguous option: $1
18444Try \`$0 --help' for more information." >&2;}
18445 { (exit 1); exit 1; }; };;
18446 --help | --hel | -h )
18447 echo "$ac_cs_usage"; exit 0 ;;
18448 --debug | --d* | -d )
18449 debug=: ;;
18450 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018451 $ac_shift
18452 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018453 ac_need_defaults=false;;
18454 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018455 $ac_shift
18456 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018457 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018458 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18459 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18460 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018461
18462 # This is an error.
18463 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18464Try \`$0 --help' for more information." >&5
18465echo "$as_me: error: unrecognized option: $1
18466Try \`$0 --help' for more information." >&2;}
18467 { (exit 1); exit 1; }; } ;;
18468
18469 *) ac_config_targets="$ac_config_targets $1" ;;
18470
18471 esac
18472 shift
18473done
18474
Skip Montanaro6dead952003-09-25 14:50:04 +000018475ac_configure_extra_args=
18476
18477if $ac_cs_silent; then
18478 exec 6>/dev/null
18479 ac_configure_extra_args="$ac_configure_extra_args --silent"
18480fi
18481
18482_ACEOF
18483cat >>$CONFIG_STATUS <<_ACEOF
18484if \$ac_cs_recheck; then
18485 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18486 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18487fi
18488
Martin v. Löwis11437992002-04-12 09:54:03 +000018489_ACEOF
18490
18491
18492
18493
18494
18495cat >>$CONFIG_STATUS <<\_ACEOF
18496for ac_config_target in $ac_config_targets
18497do
18498 case "$ac_config_target" in
18499 # Handling of arguments.
18500 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18501 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18502 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18503 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18504echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18505 { (exit 1); exit 1; }; };;
18506 esac
18507done
18508
18509# If the user did not use the arguments to specify the items to instantiate,
18510# then the envvar interface is used. Set only those that are not.
18511# We use the long form for the default assignment because of an extremely
18512# bizarre bug on SunOS 4.1.3.
18513if $ac_need_defaults; then
18514 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18515 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18516fi
18517
Skip Montanaro6dead952003-09-25 14:50:04 +000018518# Have a temporary directory for convenience. Make it in the build tree
18519# simply because there is no reason to put it here, and in addition,
18520# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018521# Create a temporary directory, and hook for its removal unless debugging.
18522$debug ||
18523{
18524 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18525 trap '{ (exit 1); exit 1; }' 1 2 13 15
18526}
18527
18528# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018529
Martin v. Löwis11437992002-04-12 09:54:03 +000018530{
Skip Montanaro6dead952003-09-25 14:50:04 +000018531 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018532 test -n "$tmp" && test -d "$tmp"
18533} ||
18534{
Skip Montanaro6dead952003-09-25 14:50:04 +000018535 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018536 (umask 077 && mkdir $tmp)
18537} ||
18538{
Skip Montanaro6dead952003-09-25 14:50:04 +000018539 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018540 { (exit 1); exit 1; }
18541}
18542
18543_ACEOF
18544
18545cat >>$CONFIG_STATUS <<_ACEOF
18546
18547#
18548# CONFIG_FILES section.
18549#
18550
18551# No need to generate the scripts if there are no CONFIG_FILES.
18552# This happens for instance when ./config.status config.h
18553if test -n "\$CONFIG_FILES"; then
18554 # Protect against being on the right side of a sed subst in config.status.
18555 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18556 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18557s,@SHELL@,$SHELL,;t t
18558s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18559s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18560s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18561s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18562s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18563s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18564s,@exec_prefix@,$exec_prefix,;t t
18565s,@prefix@,$prefix,;t t
18566s,@program_transform_name@,$program_transform_name,;t t
18567s,@bindir@,$bindir,;t t
18568s,@sbindir@,$sbindir,;t t
18569s,@libexecdir@,$libexecdir,;t t
18570s,@datadir@,$datadir,;t t
18571s,@sysconfdir@,$sysconfdir,;t t
18572s,@sharedstatedir@,$sharedstatedir,;t t
18573s,@localstatedir@,$localstatedir,;t t
18574s,@libdir@,$libdir,;t t
18575s,@includedir@,$includedir,;t t
18576s,@oldincludedir@,$oldincludedir,;t t
18577s,@infodir@,$infodir,;t t
18578s,@mandir@,$mandir,;t t
18579s,@build_alias@,$build_alias,;t t
18580s,@host_alias@,$host_alias,;t t
18581s,@target_alias@,$target_alias,;t t
18582s,@DEFS@,$DEFS,;t t
18583s,@ECHO_C@,$ECHO_C,;t t
18584s,@ECHO_N@,$ECHO_N,;t t
18585s,@ECHO_T@,$ECHO_T,;t t
18586s,@LIBS@,$LIBS,;t t
18587s,@VERSION@,$VERSION,;t t
18588s,@SOVERSION@,$SOVERSION,;t t
18589s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18590s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18591s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18592s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18593s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18594s,@MACHDEP@,$MACHDEP,;t t
18595s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018596s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018597s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018598s,@CXX@,$CXX,;t t
18599s,@MAINOBJ@,$MAINOBJ,;t t
18600s,@EXEEXT@,$EXEEXT,;t t
18601s,@CC@,$CC,;t t
18602s,@CFLAGS@,$CFLAGS,;t t
18603s,@LDFLAGS@,$LDFLAGS,;t t
18604s,@CPPFLAGS@,$CPPFLAGS,;t t
18605s,@ac_ct_CC@,$ac_ct_CC,;t t
18606s,@OBJEXT@,$OBJEXT,;t t
18607s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018608s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018609s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18610s,@LIBRARY@,$LIBRARY,;t t
18611s,@LDLIBRARY@,$LDLIBRARY,;t t
18612s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18613s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18614s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18615s,@INSTSONAME@,$INSTSONAME,;t t
18616s,@RUNSHARED@,$RUNSHARED,;t t
18617s,@LINKCC@,$LINKCC,;t t
18618s,@RANLIB@,$RANLIB,;t t
18619s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18620s,@AR@,$AR,;t t
18621s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18622s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18623s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18624s,@LN@,$LN,;t t
18625s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018626s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018627s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18628s,@SO@,$SO,;t t
18629s,@LDSHARED@,$LDSHARED,;t t
18630s,@BLDSHARED@,$BLDSHARED,;t t
18631s,@CCSHARED@,$CCSHARED,;t t
18632s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18633s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018634s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018635s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18636s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18637s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18638s,@LDLAST@,$LDLAST,;t t
18639s,@THREADOBJ@,$THREADOBJ,;t t
18640s,@DLINCLDIR@,$DLINCLDIR,;t t
18641s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18642s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018643s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018644s,@LIBOBJS@,$LIBOBJS,;t t
18645s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18646s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18647s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18648s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18649s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18650s,@LIBM@,$LIBM,;t t
18651s,@LIBC@,$LIBC,;t t
18652s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18653s,@THREADHEADERS@,$THREADHEADERS,;t t
18654s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018655s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018656CEOF
18657
18658_ACEOF
18659
18660 cat >>$CONFIG_STATUS <<\_ACEOF
18661 # Split the substitutions into bite-sized pieces for seds with
18662 # small command number limits, like on Digital OSF/1 and HP-UX.
18663 ac_max_sed_lines=48
18664 ac_sed_frag=1 # Number of current file.
18665 ac_beg=1 # First line for current file.
18666 ac_end=$ac_max_sed_lines # Line after last line for current file.
18667 ac_more_lines=:
18668 ac_sed_cmds=
18669 while $ac_more_lines; do
18670 if test $ac_beg -gt 1; then
18671 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18672 else
18673 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18674 fi
18675 if test ! -s $tmp/subs.frag; then
18676 ac_more_lines=false
18677 else
18678 # The purpose of the label and of the branching condition is to
18679 # speed up the sed processing (if there are no `@' at all, there
18680 # is no need to browse any of the substitutions).
18681 # These are the two extra sed commands mentioned above.
18682 (echo ':t
18683 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18684 if test -z "$ac_sed_cmds"; then
18685 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18686 else
18687 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18688 fi
18689 ac_sed_frag=`expr $ac_sed_frag + 1`
18690 ac_beg=$ac_end
18691 ac_end=`expr $ac_end + $ac_max_sed_lines`
18692 fi
18693 done
18694 if test -z "$ac_sed_cmds"; then
18695 ac_sed_cmds=cat
18696 fi
18697fi # test -n "$CONFIG_FILES"
18698
18699_ACEOF
18700cat >>$CONFIG_STATUS <<\_ACEOF
18701for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18702 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18703 case $ac_file in
18704 - | *:- | *:-:* ) # input from stdin
18705 cat >$tmp/stdin
18706 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18707 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18708 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18709 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18710 * ) ac_file_in=$ac_file.in ;;
18711 esac
18712
18713 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18714 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18715$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18716 X"$ac_file" : 'X\(//\)[^/]' \| \
18717 X"$ac_file" : 'X\(//\)$' \| \
18718 X"$ac_file" : 'X\(/\)' \| \
18719 . : '\(.\)' 2>/dev/null ||
18720echo X"$ac_file" |
18721 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18722 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18723 /^X\(\/\/\)$/{ s//\1/; q; }
18724 /^X\(\/\).*/{ s//\1/; q; }
18725 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018726 { if $as_mkdir_p; then
18727 mkdir -p "$ac_dir"
18728 else
18729 as_dir="$ac_dir"
18730 as_dirs=
18731 while test ! -d "$as_dir"; do
18732 as_dirs="$as_dir $as_dirs"
18733 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18734$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18735 X"$as_dir" : 'X\(//\)[^/]' \| \
18736 X"$as_dir" : 'X\(//\)$' \| \
18737 X"$as_dir" : 'X\(/\)' \| \
18738 . : '\(.\)' 2>/dev/null ||
18739echo X"$as_dir" |
18740 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18741 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18742 /^X\(\/\/\)$/{ s//\1/; q; }
18743 /^X\(\/\).*/{ s//\1/; q; }
18744 s/.*/./; q'`
18745 done
18746 test ! -n "$as_dirs" || mkdir $as_dirs
18747 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18748echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18749 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018750
18751 ac_builddir=.
18752
18753if test "$ac_dir" != .; then
18754 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18755 # A "../" for each directory in $ac_dir_suffix.
18756 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18757else
18758 ac_dir_suffix= ac_top_builddir=
18759fi
18760
18761case $srcdir in
18762 .) # No --srcdir option. We are building in place.
18763 ac_srcdir=.
18764 if test -z "$ac_top_builddir"; then
18765 ac_top_srcdir=.
18766 else
18767 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18768 fi ;;
18769 [\\/]* | ?:[\\/]* ) # Absolute path.
18770 ac_srcdir=$srcdir$ac_dir_suffix;
18771 ac_top_srcdir=$srcdir ;;
18772 *) # Relative path.
18773 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18774 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18775esac
18776# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18777# absolute.
18778ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018779ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018780ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18781ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18782
18783
18784 case $INSTALL in
18785 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18786 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18787 esac
18788
18789 if test x"$ac_file" != x-; then
18790 { echo "$as_me:$LINENO: creating $ac_file" >&5
18791echo "$as_me: creating $ac_file" >&6;}
18792 rm -f "$ac_file"
18793 fi
18794 # Let's still pretend it is `configure' which instantiates (i.e., don't
18795 # use $as_me), people would be surprised to read:
18796 # /* config.h. Generated by config.status. */
18797 if test x"$ac_file" = x-; then
18798 configure_input=
18799 else
18800 configure_input="$ac_file. "
18801 fi
18802 configure_input=$configure_input"Generated from `echo $ac_file_in |
18803 sed 's,.*/,,'` by configure."
18804
18805 # First look for the input files in the build tree, otherwise in the
18806 # src tree.
18807 ac_file_inputs=`IFS=:
18808 for f in $ac_file_in; do
18809 case $f in
18810 -) echo $tmp/stdin ;;
18811 [\\/$]*)
18812 # Absolute (can't be DOS-style, as IFS=:)
18813 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18814echo "$as_me: error: cannot find input file: $f" >&2;}
18815 { (exit 1); exit 1; }; }
18816 echo $f;;
18817 *) # Relative
18818 if test -f "$f"; then
18819 # Build tree
18820 echo $f
18821 elif test -f "$srcdir/$f"; then
18822 # Source tree
18823 echo $srcdir/$f
18824 else
18825 # /dev/null tree
18826 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18827echo "$as_me: error: cannot find input file: $f" >&2;}
18828 { (exit 1); exit 1; }; }
18829 fi;;
18830 esac
18831 done` || { (exit 1); exit 1; }
18832_ACEOF
18833cat >>$CONFIG_STATUS <<_ACEOF
18834 sed "$ac_vpsub
18835$extrasub
18836_ACEOF
18837cat >>$CONFIG_STATUS <<\_ACEOF
18838:t
18839/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18840s,@configure_input@,$configure_input,;t t
18841s,@srcdir@,$ac_srcdir,;t t
18842s,@abs_srcdir@,$ac_abs_srcdir,;t t
18843s,@top_srcdir@,$ac_top_srcdir,;t t
18844s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18845s,@builddir@,$ac_builddir,;t t
18846s,@abs_builddir@,$ac_abs_builddir,;t t
18847s,@top_builddir@,$ac_top_builddir,;t t
18848s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18849s,@INSTALL@,$ac_INSTALL,;t t
18850" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18851 rm -f $tmp/stdin
18852 if test x"$ac_file" != x-; then
18853 mv $tmp/out $ac_file
18854 else
18855 cat $tmp/out
18856 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018857 fi
18858
Martin v. Löwis11437992002-04-12 09:54:03 +000018859done
18860_ACEOF
18861cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018862
Martin v. Löwis11437992002-04-12 09:54:03 +000018863#
18864# CONFIG_HEADER section.
18865#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018866
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018867# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18868# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018869#
18870# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018871ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18872ac_dB='[ ].*$,\1#\2'
18873ac_dC=' '
18874ac_dD=',;t'
18875# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18876ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18877ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018878ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018879ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018880
Martin v. Löwis11437992002-04-12 09:54:03 +000018881for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018882 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018883 case $ac_file in
18884 - | *:- | *:-:* ) # input from stdin
18885 cat >$tmp/stdin
18886 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18887 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18888 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18889 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18890 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018891 esac
18892
Martin v. Löwis11437992002-04-12 09:54:03 +000018893 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18894echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018895
Martin v. Löwis11437992002-04-12 09:54:03 +000018896 # First look for the input files in the build tree, otherwise in the
18897 # src tree.
18898 ac_file_inputs=`IFS=:
18899 for f in $ac_file_in; do
18900 case $f in
18901 -) echo $tmp/stdin ;;
18902 [\\/$]*)
18903 # Absolute (can't be DOS-style, as IFS=:)
18904 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18905echo "$as_me: error: cannot find input file: $f" >&2;}
18906 { (exit 1); exit 1; }; }
18907 echo $f;;
18908 *) # Relative
18909 if test -f "$f"; then
18910 # Build tree
18911 echo $f
18912 elif test -f "$srcdir/$f"; then
18913 # Source tree
18914 echo $srcdir/$f
18915 else
18916 # /dev/null tree
18917 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18918echo "$as_me: error: cannot find input file: $f" >&2;}
18919 { (exit 1); exit 1; }; }
18920 fi;;
18921 esac
18922 done` || { (exit 1); exit 1; }
18923 # Remove the trailing spaces.
18924 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018925
Martin v. Löwis11437992002-04-12 09:54:03 +000018926_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018927
Martin v. Löwis11437992002-04-12 09:54:03 +000018928# Transform confdefs.h into two sed scripts, `conftest.defines' and
18929# `conftest.undefs', that substitutes the proper values into
18930# config.h.in to produce config.h. The first handles `#define'
18931# templates, and the second `#undef' templates.
18932# And first: Protect against being on the right side of a sed subst in
18933# config.status. Protect against being in an unquoted here document
18934# in config.status.
18935rm -f conftest.defines conftest.undefs
18936# Using a here document instead of a string reduces the quoting nightmare.
18937# Putting comments in sed scripts is not portable.
18938#
18939# `end' is used to avoid that the second main sed command (meant for
18940# 0-ary CPP macros) applies to n-ary macro definitions.
18941# See the Autoconf documentation for `clear'.
18942cat >confdef2sed.sed <<\_ACEOF
18943s/[\\&,]/\\&/g
18944s,[\\$`],\\&,g
18945t clear
18946: clear
18947s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18948t end
18949s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18950: end
18951_ACEOF
18952# If some macros were called several times there might be several times
18953# the same #defines, which is useless. Nevertheless, we may not want to
18954# sort them, since we want the *last* AC-DEFINE to be honored.
18955uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18956sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18957rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018958
18959# This sed command replaces #undef with comments. This is necessary, for
18960# example, in the case of _POSIX_SOURCE, which is predefined and required
18961# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018962cat >>conftest.undefs <<\_ACEOF
18963s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18964_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018965
Martin v. Löwis11437992002-04-12 09:54:03 +000018966# Break up conftest.defines because some shells have a limit on the size
18967# of here documents, and old seds have small limits too (100 cmds).
18968echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000018969echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018970echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18971echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018972rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018973while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018974do
Martin v. Löwis11437992002-04-12 09:54:03 +000018975 # Write a limited-size here document to $tmp/defines.sed.
18976 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18977 # Speed up: don't consider the non `#define' lines.
18978 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18979 # Work around the forget-to-reset-the-flag bug.
18980 echo 't clr' >>$CONFIG_STATUS
18981 echo ': clr' >>$CONFIG_STATUS
18982 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018983 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018984 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18985 rm -f $tmp/in
18986 mv $tmp/out $tmp/in
18987' >>$CONFIG_STATUS
18988 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18989 rm -f conftest.defines
18990 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018991done
Martin v. Löwis11437992002-04-12 09:54:03 +000018992rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000018993echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018994echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018995
Martin v. Löwis11437992002-04-12 09:54:03 +000018996# Break up conftest.undefs 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 #undef templates' >>$CONFIG_STATUS
18999rm -f conftest.tail
19000while grep . conftest.undefs >/dev/null
19001do
19002 # Write a limited-size here document to $tmp/undefs.sed.
19003 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19004 # Speed up: don't consider the non `#undef'
19005 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19006 # Work around the forget-to-reset-the-flag bug.
19007 echo 't clr' >>$CONFIG_STATUS
19008 echo ': clr' >>$CONFIG_STATUS
19009 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19010 echo 'CEOF
19011 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19012 rm -f $tmp/in
19013 mv $tmp/out $tmp/in
19014' >>$CONFIG_STATUS
19015 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19016 rm -f conftest.undefs
19017 mv conftest.tail conftest.undefs
19018done
19019rm -f conftest.undefs
19020
19021cat >>$CONFIG_STATUS <<\_ACEOF
19022 # Let's still pretend it is `configure' which instantiates (i.e., don't
19023 # use $as_me), people would be surprised to read:
19024 # /* config.h. Generated by config.status. */
19025 if test x"$ac_file" = x-; then
19026 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019027 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019028 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019029 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019030 cat $tmp/in >>$tmp/config.h
19031 rm -f $tmp/in
19032 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019033 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019034 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19035echo "$as_me: $ac_file is unchanged" >&6;}
19036 else
19037 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19038$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19039 X"$ac_file" : 'X\(//\)[^/]' \| \
19040 X"$ac_file" : 'X\(//\)$' \| \
19041 X"$ac_file" : 'X\(/\)' \| \
19042 . : '\(.\)' 2>/dev/null ||
19043echo X"$ac_file" |
19044 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19045 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19046 /^X\(\/\/\)$/{ s//\1/; q; }
19047 /^X\(\/\).*/{ s//\1/; q; }
19048 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019049 { if $as_mkdir_p; then
19050 mkdir -p "$ac_dir"
19051 else
19052 as_dir="$ac_dir"
19053 as_dirs=
19054 while test ! -d "$as_dir"; do
19055 as_dirs="$as_dir $as_dirs"
19056 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19057$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19058 X"$as_dir" : 'X\(//\)[^/]' \| \
19059 X"$as_dir" : 'X\(//\)$' \| \
19060 X"$as_dir" : 'X\(/\)' \| \
19061 . : '\(.\)' 2>/dev/null ||
19062echo X"$as_dir" |
19063 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19064 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19065 /^X\(\/\/\)$/{ s//\1/; q; }
19066 /^X\(\/\).*/{ s//\1/; q; }
19067 s/.*/./; q'`
19068 done
19069 test ! -n "$as_dirs" || mkdir $as_dirs
19070 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19071echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19072 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019073
Martin v. Löwis11437992002-04-12 09:54:03 +000019074 rm -f $ac_file
19075 mv $tmp/config.h $ac_file
19076 fi
19077 else
19078 cat $tmp/config.h
19079 rm -f $tmp/config.h
19080 fi
19081done
19082_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019083
Martin v. Löwis11437992002-04-12 09:54:03 +000019084cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019085
Martin v. Löwis11437992002-04-12 09:54:03 +000019086{ (exit 0); exit 0; }
19087_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019088chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019089ac_clean_files=$ac_clean_files_save
19090
19091
19092# configure is writing to config.log, and then calls config.status.
19093# config.status does its own redirection, appending to config.log.
19094# Unfortunately, on DOS this fails, as config.log is still kept open
19095# by configure, so config.status won't be able to write to it; its
19096# output is simply discarded. So we exec the FD to /dev/null,
19097# effectively closing config.log, so it can be properly (re)opened and
19098# appended to by config.status. When coming back to configure, we
19099# need to make the FD available again.
19100if test "$no_create" != yes; then
19101 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019102 ac_config_status_args=
19103 test "$silent" = yes &&
19104 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019105 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019106 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019107 exec 5>>config.log
19108 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19109 # would make configure fail if this is the last instruction.
19110 $ac_cs_success || { (exit 1); exit 1; }
19111fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019112
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019113
19114echo "creating Setup"
19115if test ! -f Modules/Setup
19116then
19117 cp $srcdir/Modules/Setup.dist Modules/Setup
19118fi
19119
19120echo "creating Setup.local"
19121if test ! -f Modules/Setup.local
19122then
19123 echo "# Edit this file for local setup changes" >Modules/Setup.local
19124fi
19125
19126echo "creating Makefile"
19127$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19128 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019129 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019130mv config.c Modules