blob: 5619b2cd7750b69042742902c309a934f9dc03e2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jack Jansen6b08a402004-06-03 12:41:45 +00002# From configure.in Revision: 1.455 .
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
Jack Jansen6b08a402004-06-03 12:41:45 +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 CONFIGURE_MACOSX_DEPLOYMENT_TARGET 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'
Skip Montanaro6dead952003-09-25 14:50:04 +0000313ac_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.
Jack Jansen6b08a402004-06-03 12:41:45 +00001445 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001446 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001447 define_xopen_source=no;;
1448 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001449 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001450 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001451 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001452 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1453 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1454 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1455 # This should hopefully be fixed in FreeBSD 4.9
1456 FreeBSD/4.8* | Darwin/6* )
1457 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001458 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1459 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1460 # has another value. By not (re)defining it, the defaults come in place.
1461 AIX/4)
1462 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001463esac
1464
1465if test $define_xopen_source = yes
1466then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001467
1468cat >>confdefs.h <<\_ACEOF
1469#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001470_ACEOF
1471
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001472
1473 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1474 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1475 # several APIs are not declared. Since this is also needed in some
1476 # cases for HP-UX, we define it globally.
1477
1478
1479cat >>confdefs.h <<\_ACEOF
1480#define _XOPEN_SOURCE_EXTENDED 1
1481_ACEOF
1482
1483
1484cat >>confdefs.h <<\_ACEOF
1485#define _POSIX_C_SOURCE 200112L
1486_ACEOF
1487
1488
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001489fi
1490
Guido van Rossum91922671997-10-09 20:24:13 +00001491#
1492# SGI compilers allow the specification of the both the ABI and the
1493# ISA on the command line. Depending on the values of these switches,
1494# different and often incompatable code will be generated.
1495#
1496# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1497# thus supply support for various ABI/ISA combinations. The MACHDEP
1498# variable is also adjusted.
1499#
1500
1501if test ! -z "$SGI_ABI"
1502then
1503 CC="cc $SGI_ABI"
1504 LDFLAGS="$SGI_ABI $LDFLAGS"
1505 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1506fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001507echo "$as_me:$LINENO: result: $MACHDEP" >&5
1508echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001509
Jack Jansen83f898c2002-12-30 22:23:40 +00001510# And add extra plat-mac for darwin
1511
Jack Jansen7b59b422003-03-17 15:44:10 +00001512
Jack Jansen83f898c2002-12-30 22:23:40 +00001513echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1514echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1515if test -z "$EXTRAPLATDIR"
1516then
1517 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001518 darwin)
1519 EXTRAPLATDIR="\$(PLATMACDIRS)"
1520 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1521 ;;
1522 *)
1523 EXTRAPLATDIR=""
1524 EXTRAMACHDEPPATH=""
1525 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001526 esac
1527fi
1528echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1529echo "${ECHO_T}$EXTRAPLATDIR" >&6
1530
Jack Jansen6b08a402004-06-03 12:41:45 +00001531# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1532# it may influence the way we can build extensions, so distutils
1533# needs to check it
1534
1535CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1536
Guido van Rossum627b2d71993-12-24 10:39:16 +00001537# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001538
1539# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1540# for debug/optimization stuff. BASECFLAGS is for flags that are required
1541# just to get things to compile and link. Users are free to override OPT
1542# when running configure or make. The build should not break if they do.
1543# BASECFLAGS should generally not be messed with, however.
1544
1545# XXX shouldn't some/most/all of this code be merged with the stuff later
1546# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001547echo "$as_me:$LINENO: checking for --without-gcc" >&5
1548echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1549
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001550# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001551if test "${with_gcc+set}" = set; then
1552 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001553
Guido van Rossum7f43da71994-08-01 12:15:30 +00001554 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001555 no) CC=cc
1556 without_gcc=yes;;
1557 yes) CC=gcc
1558 without_gcc=no;;
1559 *) CC=$withval
1560 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001561 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001562else
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001564 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001565 AIX*) CC=cc_r
1566 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001567 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001568 case $BE_HOST_CPU in
1569 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001570 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001571 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001572 BASECFLAGS="$BASECFLAGS -export pragma"
1573 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001574 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001575 ;;
1576 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001577 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001578 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001579 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001580 ;;
1581 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1583echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1584 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001585 ;;
1586 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001587 AR="\$(srcdir)/Modules/ar_beos"
1588 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001589 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001590 Monterey*)
1591 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001592 without_gcc=;;
1593 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001594 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001595fi;
1596echo "$as_me:$LINENO: result: $without_gcc" >&5
1597echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001598
1599
Guido van Rossum95012191999-12-16 17:50:52 +00001600
Fred Drakea1a84e72001-03-06 05:52:16 +00001601MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001602echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1603echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1604
Guido van Rossum95012191999-12-16 17:50:52 +00001605# Check whether --with-cxx or --without-cxx was given.
1606if test "${with_cxx+set}" = set; then
1607 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001608
Martin v. Löwis22352952000-12-13 17:37:02 +00001609 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001610 case $withval in
1611 no) CXX=
1612 with_cxx=no;;
1613 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001614 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001615 with_cxx=$withval;;
1616 esac
1617else
Martin v. Löwis11437992002-04-12 09:54:03 +00001618
Guido van Rossum95012191999-12-16 17:50:52 +00001619 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001620 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001621
Martin v. Löwis11437992002-04-12 09:54:03 +00001622fi;
1623echo "$as_me:$LINENO: result: $with_cxx" >&5
1624echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001625
1626if test "$with_cxx" = "yes"
1627then
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1629echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1630 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001631fi
1632
1633
1634
1635
Martin v. Löwis11437992002-04-12 09:54:03 +00001636if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001637then
1638 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1639do
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 # 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 +00001641set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001642echo "$as_me:$LINENO: checking for $ac_word" >&5
1643echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1644if test "${ac_cv_prog_CXX+set}" = set; then
1645 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001646else
1647 if test -n "$CXX"; then
1648 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1649else
Martin v. Löwis11437992002-04-12 09:54:03 +00001650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1651for as_dir in $PATH
1652do
1653 IFS=$as_save_IFS
1654 test -z "$as_dir" && as_dir=.
1655 for ac_exec_ext in '' $ac_executable_extensions; do
1656 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1657 ac_cv_prog_CXX="$ac_prog"
1658 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1659 break 2
1660 fi
1661done
1662done
1663
Martin v. Löwis22352952000-12-13 17:37:02 +00001664fi
1665fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001666CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001667if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001668 echo "$as_me:$LINENO: result: $CXX" >&5
1669echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001670else
Martin v. Löwis11437992002-04-12 09:54:03 +00001671 echo "$as_me:$LINENO: result: no" >&5
1672echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001673fi
1674
Martin v. Löwis11437992002-04-12 09:54:03 +00001675 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001676done
1677test -n "$CXX" || CXX="notfound"
1678
1679 if test "$CXX" = "notfound"
1680 then
1681 CXX=
1682 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001683 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001684ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001685ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1686ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1687ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1688 cat >conftest.$ac_ext <<_ACEOF
1689#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001690/* confdefs.h. */
1691_ACEOF
1692cat confdefs.h >>conftest.$ac_ext
1693cat >>conftest.$ac_ext <<_ACEOF
1694/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001695
Martin v. Löwis11437992002-04-12 09:54:03 +00001696int
1697main ()
1698{
Michael W. Hudson54241132001-12-07 15:38:26 +00001699
Martin v. Löwis11437992002-04-12 09:54:03 +00001700 ;
1701 return 0;
1702}
1703_ACEOF
1704ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001705ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001706# Try to create an executable without -o first, disregard a.out.
1707# It will help us diagnose broken compilers, and finding out an intuition
1708# of exeext.
1709echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1710echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1711ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1712if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1713 (eval $ac_link_default) 2>&5
1714 ac_status=$?
1715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1716 (exit $ac_status); }; then
1717 # Find the output, starting from the most likely. This scheme is
1718# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1719# resort.
1720
1721# Be careful to initialize this variable, since it used to be cached.
1722# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1723ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001724# b.out is created by i960 compilers.
1725for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1726do
1727 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001729 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1730 ;;
1731 conftest.$ac_ext )
1732 # This is the source file.
1733 ;;
1734 [ab].out )
1735 # We found the default executable, but exeext='' is most
1736 # certainly right.
1737 break;;
1738 *.* )
1739 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1740 # FIXME: I believe we export ac_cv_exeext for Libtool,
1741 # but it would be cool to find out if it's true. Does anybody
1742 # maintain Libtool? --akim.
1743 export ac_cv_exeext
1744 break;;
1745 * )
1746 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 esac
1748done
1749else
1750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001751sed 's/^/| /' conftest.$ac_ext >&5
1752
1753{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1754See \`config.log' for more details." >&5
1755echo "$as_me: error: C++ compiler cannot create executables
1756See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001757 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001758fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001759
1760ac_exeext=$ac_cv_exeext
1761echo "$as_me:$LINENO: result: $ac_file" >&5
1762echo "${ECHO_T}$ac_file" >&6
1763
1764# Check the compiler produces executables we can run. If not, either
1765# the compiler is broken, or we cross compile.
1766echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1767echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1768# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1769# If not cross compiling, check that we can run a simple program.
1770if test "$cross_compiling" != yes; then
1771 if { ac_try='./$ac_file'
1772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1773 (eval $ac_try) 2>&5
1774 ac_status=$?
1775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1776 (exit $ac_status); }; }; then
1777 cross_compiling=no
1778 else
1779 if test "$cross_compiling" = maybe; then
1780 cross_compiling=yes
1781 else
1782 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001783If you meant to cross compile, use \`--host'.
1784See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001785echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001786If you meant to cross compile, use \`--host'.
1787See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001788 { (exit 1); exit 1; }; }
1789 fi
1790 fi
1791fi
1792echo "$as_me:$LINENO: result: yes" >&5
1793echo "${ECHO_T}yes" >&6
1794
Skip Montanaro6dead952003-09-25 14:50:04 +00001795rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001796ac_clean_files=$ac_clean_files_save
1797# Check the compiler produces executables we can run. If not, either
1798# the compiler is broken, or we cross compile.
1799echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1800echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1801echo "$as_me:$LINENO: result: $cross_compiling" >&5
1802echo "${ECHO_T}$cross_compiling" >&6
1803
1804echo "$as_me:$LINENO: checking for suffix of executables" >&5
1805echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1807 (eval $ac_link) 2>&5
1808 ac_status=$?
1809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1810 (exit $ac_status); }; then
1811 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1812# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1813# work properly (i.e., refer to `conftest.exe'), while it won't with
1814# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001815for ac_file in conftest.exe conftest conftest.*; do
1816 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001818 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001819 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1820 export ac_cv_exeext
1821 break;;
1822 * ) break;;
1823 esac
1824done
1825else
Skip Montanaro6dead952003-09-25 14:50:04 +00001826 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1827See \`config.log' for more details." >&5
1828echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1829See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001830 { (exit 1); exit 1; }; }
1831fi
1832
1833rm -f conftest$ac_cv_exeext
1834echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1835echo "${ECHO_T}$ac_cv_exeext" >&6
1836
1837rm -f conftest.$ac_ext
1838EXEEXT=$ac_cv_exeext
1839ac_exeext=$EXEEXT
1840
1841 ac_ext=c
1842ac_cpp='$CPP $CPPFLAGS'
1843ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1844ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1845ac_compiler_gnu=$ac_cv_c_compiler_gnu
1846
1847
Martin v. Löwis22352952000-12-13 17:37:02 +00001848
1849 fi
1850fi
1851
Guido van Rossum8b131c51995-03-09 14:10:13 +00001852# If the user switches compilers, we can't believe the cache
1853if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1854then
Martin v. Löwis11437992002-04-12 09:54:03 +00001855 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1856(it is also a good idea to do 'make clean' before compiling)" >&5
1857echo "$as_me: error: cached CC is different -- throw away $cache_file
1858(it is also a good idea to do 'make clean' before compiling)" >&2;}
1859 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001860fi
1861
Martin v. Löwis11437992002-04-12 09:54:03 +00001862ac_ext=c
1863ac_cpp='$CPP $CPPFLAGS'
1864ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1865ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1866ac_compiler_gnu=$ac_cv_c_compiler_gnu
1867if test -n "$ac_tool_prefix"; then
1868 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1869set dummy ${ac_tool_prefix}gcc; ac_word=$2
1870echo "$as_me:$LINENO: checking for $ac_word" >&5
1871echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1872if test "${ac_cv_prog_CC+set}" = set; then
1873 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001874else
1875 if test -n "$CC"; then
1876 ac_cv_prog_CC="$CC" # Let the user override the test.
1877else
Martin v. Löwis11437992002-04-12 09:54:03 +00001878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1879for as_dir in $PATH
1880do
1881 IFS=$as_save_IFS
1882 test -z "$as_dir" && as_dir=.
1883 for ac_exec_ext in '' $ac_executable_extensions; do
1884 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1885 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1886 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1887 break 2
1888 fi
1889done
1890done
1891
Jack Jansendd19cf82001-12-06 22:36:17 +00001892fi
1893fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001894CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001895if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 echo "$as_me:$LINENO: result: $CC" >&5
1897echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001898else
Martin v. Löwis11437992002-04-12 09:54:03 +00001899 echo "$as_me:$LINENO: result: no" >&5
1900echo "${ECHO_T}no" >&6
1901fi
1902
1903fi
1904if test -z "$ac_cv_prog_CC"; then
1905 ac_ct_CC=$CC
1906 # Extract the first word of "gcc", so it can be a program name with args.
1907set dummy gcc; ac_word=$2
1908echo "$as_me:$LINENO: checking for $ac_word" >&5
1909echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1910if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1911 echo $ECHO_N "(cached) $ECHO_C" >&6
1912else
1913 if test -n "$ac_ct_CC"; then
1914 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1915else
1916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1917for as_dir in $PATH
1918do
1919 IFS=$as_save_IFS
1920 test -z "$as_dir" && as_dir=.
1921 for ac_exec_ext in '' $ac_executable_extensions; do
1922 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1923 ac_cv_prog_ac_ct_CC="gcc"
1924 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1925 break 2
1926 fi
1927done
1928done
1929
1930fi
1931fi
1932ac_ct_CC=$ac_cv_prog_ac_ct_CC
1933if test -n "$ac_ct_CC"; then
1934 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1935echo "${ECHO_T}$ac_ct_CC" >&6
1936else
1937 echo "$as_me:$LINENO: result: no" >&5
1938echo "${ECHO_T}no" >&6
1939fi
1940
1941 CC=$ac_ct_CC
1942else
1943 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001944fi
1945
Jack Jansendd19cf82001-12-06 22:36:17 +00001946if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001947 if test -n "$ac_tool_prefix"; then
1948 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1949set dummy ${ac_tool_prefix}cc; ac_word=$2
1950echo "$as_me:$LINENO: checking for $ac_word" >&5
1951echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1952if test "${ac_cv_prog_CC+set}" = set; then
1953 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001954else
1955 if test -n "$CC"; then
1956 ac_cv_prog_CC="$CC" # Let the user override the test.
1957else
Martin v. Löwis11437992002-04-12 09:54:03 +00001958as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1959for as_dir in $PATH
1960do
1961 IFS=$as_save_IFS
1962 test -z "$as_dir" && as_dir=.
1963 for ac_exec_ext in '' $ac_executable_extensions; do
1964 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1965 ac_cv_prog_CC="${ac_tool_prefix}cc"
1966 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1967 break 2
1968 fi
1969done
1970done
1971
1972fi
1973fi
1974CC=$ac_cv_prog_CC
1975if test -n "$CC"; then
1976 echo "$as_me:$LINENO: result: $CC" >&5
1977echo "${ECHO_T}$CC" >&6
1978else
1979 echo "$as_me:$LINENO: result: no" >&5
1980echo "${ECHO_T}no" >&6
1981fi
1982
1983fi
1984if test -z "$ac_cv_prog_CC"; then
1985 ac_ct_CC=$CC
1986 # Extract the first word of "cc", so it can be a program name with args.
1987set dummy cc; ac_word=$2
1988echo "$as_me:$LINENO: checking for $ac_word" >&5
1989echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1990if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1991 echo $ECHO_N "(cached) $ECHO_C" >&6
1992else
1993 if test -n "$ac_ct_CC"; then
1994 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1995else
1996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1997for as_dir in $PATH
1998do
1999 IFS=$as_save_IFS
2000 test -z "$as_dir" && as_dir=.
2001 for ac_exec_ext in '' $ac_executable_extensions; do
2002 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2003 ac_cv_prog_ac_ct_CC="cc"
2004 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2005 break 2
2006 fi
2007done
2008done
2009
2010fi
2011fi
2012ac_ct_CC=$ac_cv_prog_ac_ct_CC
2013if test -n "$ac_ct_CC"; then
2014 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2015echo "${ECHO_T}$ac_ct_CC" >&6
2016else
2017 echo "$as_me:$LINENO: result: no" >&5
2018echo "${ECHO_T}no" >&6
2019fi
2020
2021 CC=$ac_ct_CC
2022else
2023 CC="$ac_cv_prog_CC"
2024fi
2025
2026fi
2027if test -z "$CC"; then
2028 # Extract the first word of "cc", so it can be a program name with args.
2029set dummy cc; ac_word=$2
2030echo "$as_me:$LINENO: checking for $ac_word" >&5
2031echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2032if test "${ac_cv_prog_CC+set}" = set; then
2033 echo $ECHO_N "(cached) $ECHO_C" >&6
2034else
2035 if test -n "$CC"; then
2036 ac_cv_prog_CC="$CC" # Let the user override the test.
2037else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002038 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2040for as_dir in $PATH
2041do
2042 IFS=$as_save_IFS
2043 test -z "$as_dir" && as_dir=.
2044 for ac_exec_ext in '' $ac_executable_extensions; do
2045 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2046 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2047 ac_prog_rejected=yes
2048 continue
2049 fi
2050 ac_cv_prog_CC="cc"
2051 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2052 break 2
2053 fi
2054done
2055done
2056
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002057if test $ac_prog_rejected = yes; then
2058 # We found a bogon in the path, so make sure we never use it.
2059 set dummy $ac_cv_prog_CC
2060 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002061 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002062 # We chose a different compiler from the bogus one.
2063 # However, it has the same basename, so the bogon will be chosen
2064 # first if we set CC to just the basename; use the full file name.
2065 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002066 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002067 fi
2068fi
2069fi
2070fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002071CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002072if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002073 echo "$as_me:$LINENO: result: $CC" >&5
2074echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002075else
Martin v. Löwis11437992002-04-12 09:54:03 +00002076 echo "$as_me:$LINENO: result: no" >&5
2077echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002078fi
2079
Martin v. Löwis11437992002-04-12 09:54:03 +00002080fi
2081if test -z "$CC"; then
2082 if test -n "$ac_tool_prefix"; then
2083 for ac_prog in cl
2084 do
2085 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2086set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2087echo "$as_me:$LINENO: checking for $ac_word" >&5
2088echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2089if test "${ac_cv_prog_CC+set}" = set; then
2090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002091else
2092 if test -n "$CC"; then
2093 ac_cv_prog_CC="$CC" # Let the user override the test.
2094else
Martin v. Löwis11437992002-04-12 09:54:03 +00002095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2096for as_dir in $PATH
2097do
2098 IFS=$as_save_IFS
2099 test -z "$as_dir" && as_dir=.
2100 for ac_exec_ext in '' $ac_executable_extensions; do
2101 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2102 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2103 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2104 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002105 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002106done
2107done
2108
2109fi
2110fi
2111CC=$ac_cv_prog_CC
2112if test -n "$CC"; then
2113 echo "$as_me:$LINENO: result: $CC" >&5
2114echo "${ECHO_T}$CC" >&6
2115else
2116 echo "$as_me:$LINENO: result: no" >&5
2117echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002118fi
2119
Martin v. Löwis11437992002-04-12 09:54:03 +00002120 test -n "$CC" && break
2121 done
2122fi
2123if test -z "$CC"; then
2124 ac_ct_CC=$CC
2125 for ac_prog in cl
2126do
2127 # Extract the first word of "$ac_prog", so it can be a program name with args.
2128set dummy $ac_prog; ac_word=$2
2129echo "$as_me:$LINENO: checking for $ac_word" >&5
2130echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2131if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2132 echo $ECHO_N "(cached) $ECHO_C" >&6
2133else
2134 if test -n "$ac_ct_CC"; then
2135 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2136else
2137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2138for as_dir in $PATH
2139do
2140 IFS=$as_save_IFS
2141 test -z "$as_dir" && as_dir=.
2142 for ac_exec_ext in '' $ac_executable_extensions; do
2143 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2144 ac_cv_prog_ac_ct_CC="$ac_prog"
2145 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2146 break 2
2147 fi
2148done
2149done
Jack Jansendd19cf82001-12-06 22:36:17 +00002150
Martin v. Löwis11437992002-04-12 09:54:03 +00002151fi
2152fi
2153ac_ct_CC=$ac_cv_prog_ac_ct_CC
2154if test -n "$ac_ct_CC"; then
2155 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2156echo "${ECHO_T}$ac_ct_CC" >&6
2157else
2158 echo "$as_me:$LINENO: result: no" >&5
2159echo "${ECHO_T}no" >&6
2160fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002161
Martin v. Löwis11437992002-04-12 09:54:03 +00002162 test -n "$ac_ct_CC" && break
2163done
Michael W. Hudson54241132001-12-07 15:38:26 +00002164
Martin v. Löwis11437992002-04-12 09:54:03 +00002165 CC=$ac_ct_CC
2166fi
2167
2168fi
2169
2170
Skip Montanaro6dead952003-09-25 14:50:04 +00002171test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2172See \`config.log' for more details." >&5
2173echo "$as_me: error: no acceptable C compiler found in \$PATH
2174See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002175 { (exit 1); exit 1; }; }
2176
2177# Provide some information about the compiler.
2178echo "$as_me:$LINENO:" \
2179 "checking for C compiler version" >&5
2180ac_compiler=`set X $ac_compile; echo $2`
2181{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2182 (eval $ac_compiler --version </dev/null >&5) 2>&5
2183 ac_status=$?
2184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2185 (exit $ac_status); }
2186{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2187 (eval $ac_compiler -v </dev/null >&5) 2>&5
2188 ac_status=$?
2189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2190 (exit $ac_status); }
2191{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2192 (eval $ac_compiler -V </dev/null >&5) 2>&5
2193 ac_status=$?
2194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2195 (exit $ac_status); }
2196
2197cat >conftest.$ac_ext <<_ACEOF
2198#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002199/* confdefs.h. */
2200_ACEOF
2201cat confdefs.h >>conftest.$ac_ext
2202cat >>conftest.$ac_ext <<_ACEOF
2203/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002204
Martin v. Löwis11437992002-04-12 09:54:03 +00002205int
2206main ()
2207{
2208
2209 ;
2210 return 0;
2211}
2212_ACEOF
2213ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002214ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002215# Try to create an executable without -o first, disregard a.out.
2216# It will help us diagnose broken compilers, and finding out an intuition
2217# of exeext.
2218echo "$as_me:$LINENO: checking for C compiler default output" >&5
2219echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2220ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2221if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2222 (eval $ac_link_default) 2>&5
2223 ac_status=$?
2224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2225 (exit $ac_status); }; then
2226 # Find the output, starting from the most likely. This scheme is
2227# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2228# resort.
2229
2230# Be careful to initialize this variable, since it used to be cached.
2231# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2232ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002233# b.out is created by i960 compilers.
2234for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2235do
2236 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002237 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002238 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2239 ;;
2240 conftest.$ac_ext )
2241 # This is the source file.
2242 ;;
2243 [ab].out )
2244 # We found the default executable, but exeext='' is most
2245 # certainly right.
2246 break;;
2247 *.* )
2248 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2249 # FIXME: I believe we export ac_cv_exeext for Libtool,
2250 # but it would be cool to find out if it's true. Does anybody
2251 # maintain Libtool? --akim.
2252 export ac_cv_exeext
2253 break;;
2254 * )
2255 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002256 esac
2257done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002258else
Martin v. Löwis11437992002-04-12 09:54:03 +00002259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002260sed 's/^/| /' conftest.$ac_ext >&5
2261
2262{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2263See \`config.log' for more details." >&5
2264echo "$as_me: error: C compiler cannot create executables
2265See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002266 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002267fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002268
Martin v. Löwis11437992002-04-12 09:54:03 +00002269ac_exeext=$ac_cv_exeext
2270echo "$as_me:$LINENO: result: $ac_file" >&5
2271echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002272
Martin v. Löwis11437992002-04-12 09:54:03 +00002273# Check the compiler produces executables we can run. If not, either
2274# the compiler is broken, or we cross compile.
2275echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2276echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2277# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2278# If not cross compiling, check that we can run a simple program.
2279if test "$cross_compiling" != yes; then
2280 if { ac_try='./$ac_file'
2281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2282 (eval $ac_try) 2>&5
2283 ac_status=$?
2284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2285 (exit $ac_status); }; }; then
2286 cross_compiling=no
2287 else
2288 if test "$cross_compiling" = maybe; then
2289 cross_compiling=yes
2290 else
2291 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002292If you meant to cross compile, use \`--host'.
2293See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002294echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002295If you meant to cross compile, use \`--host'.
2296See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002297 { (exit 1); exit 1; }; }
2298 fi
2299 fi
2300fi
2301echo "$as_me:$LINENO: result: yes" >&5
2302echo "${ECHO_T}yes" >&6
2303
Skip Montanaro6dead952003-09-25 14:50:04 +00002304rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002305ac_clean_files=$ac_clean_files_save
2306# Check the compiler produces executables we can run. If not, either
2307# the compiler is broken, or we cross compile.
2308echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2309echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2310echo "$as_me:$LINENO: result: $cross_compiling" >&5
2311echo "${ECHO_T}$cross_compiling" >&6
2312
2313echo "$as_me:$LINENO: checking for suffix of executables" >&5
2314echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2315if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2316 (eval $ac_link) 2>&5
2317 ac_status=$?
2318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2319 (exit $ac_status); }; then
2320 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2321# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2322# work properly (i.e., refer to `conftest.exe'), while it won't with
2323# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002324for ac_file in conftest.exe conftest conftest.*; do
2325 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002326 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002327 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002328 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2329 export ac_cv_exeext
2330 break;;
2331 * ) break;;
2332 esac
2333done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002334else
Skip Montanaro6dead952003-09-25 14:50:04 +00002335 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2336See \`config.log' for more details." >&5
2337echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2338See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002339 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002340fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002341
Martin v. Löwis11437992002-04-12 09:54:03 +00002342rm -f conftest$ac_cv_exeext
2343echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2344echo "${ECHO_T}$ac_cv_exeext" >&6
2345
2346rm -f conftest.$ac_ext
2347EXEEXT=$ac_cv_exeext
2348ac_exeext=$EXEEXT
2349echo "$as_me:$LINENO: checking for suffix of object files" >&5
2350echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2351if test "${ac_cv_objext+set}" = set; then
2352 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002353else
Martin v. Löwis11437992002-04-12 09:54:03 +00002354 cat >conftest.$ac_ext <<_ACEOF
2355#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002356/* confdefs.h. */
2357_ACEOF
2358cat confdefs.h >>conftest.$ac_ext
2359cat >>conftest.$ac_ext <<_ACEOF
2360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002361
Martin v. Löwis11437992002-04-12 09:54:03 +00002362int
2363main ()
2364{
2365
2366 ;
2367 return 0;
2368}
2369_ACEOF
2370rm -f conftest.o conftest.obj
2371if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2372 (eval $ac_compile) 2>&5
2373 ac_status=$?
2374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2375 (exit $ac_status); }; then
2376 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2377 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002378 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002379 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2380 break;;
2381 esac
2382done
2383else
2384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002385sed 's/^/| /' conftest.$ac_ext >&5
2386
2387{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2388See \`config.log' for more details." >&5
2389echo "$as_me: error: cannot compute suffix of object files: cannot compile
2390See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002391 { (exit 1); exit 1; }; }
2392fi
2393
2394rm -f conftest.$ac_cv_objext conftest.$ac_ext
2395fi
2396echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2397echo "${ECHO_T}$ac_cv_objext" >&6
2398OBJEXT=$ac_cv_objext
2399ac_objext=$OBJEXT
2400echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2401echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2402if test "${ac_cv_c_compiler_gnu+set}" = set; then
2403 echo $ECHO_N "(cached) $ECHO_C" >&6
2404else
2405 cat >conftest.$ac_ext <<_ACEOF
2406#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002407/* confdefs.h. */
2408_ACEOF
2409cat confdefs.h >>conftest.$ac_ext
2410cat >>conftest.$ac_ext <<_ACEOF
2411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002412
Martin v. Löwis11437992002-04-12 09:54:03 +00002413int
2414main ()
2415{
2416#ifndef __GNUC__
2417 choke me
2418#endif
2419
2420 ;
2421 return 0;
2422}
2423_ACEOF
2424rm -f conftest.$ac_objext
2425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2426 (eval $ac_compile) 2>&5
2427 ac_status=$?
2428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2429 (exit $ac_status); } &&
2430 { ac_try='test -s conftest.$ac_objext'
2431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2432 (eval $ac_try) 2>&5
2433 ac_status=$?
2434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2435 (exit $ac_status); }; }; then
2436 ac_compiler_gnu=yes
2437else
2438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002439sed 's/^/| /' conftest.$ac_ext >&5
2440
Martin v. Löwis11437992002-04-12 09:54:03 +00002441ac_compiler_gnu=no
2442fi
2443rm -f conftest.$ac_objext conftest.$ac_ext
2444ac_cv_c_compiler_gnu=$ac_compiler_gnu
2445
2446fi
2447echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2448echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2449GCC=`test $ac_compiler_gnu = yes && echo yes`
2450ac_test_CFLAGS=${CFLAGS+set}
2451ac_save_CFLAGS=$CFLAGS
2452CFLAGS="-g"
2453echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2454echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2455if test "${ac_cv_prog_cc_g+set}" = set; then
2456 echo $ECHO_N "(cached) $ECHO_C" >&6
2457else
2458 cat >conftest.$ac_ext <<_ACEOF
2459#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002460/* confdefs.h. */
2461_ACEOF
2462cat confdefs.h >>conftest.$ac_ext
2463cat >>conftest.$ac_ext <<_ACEOF
2464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002465
Martin v. Löwis11437992002-04-12 09:54:03 +00002466int
2467main ()
2468{
2469
2470 ;
2471 return 0;
2472}
2473_ACEOF
2474rm -f conftest.$ac_objext
2475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2476 (eval $ac_compile) 2>&5
2477 ac_status=$?
2478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2479 (exit $ac_status); } &&
2480 { ac_try='test -s conftest.$ac_objext'
2481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2482 (eval $ac_try) 2>&5
2483 ac_status=$?
2484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2485 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002486 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002487else
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002489sed 's/^/| /' conftest.$ac_ext >&5
2490
Martin v. Löwis11437992002-04-12 09:54:03 +00002491ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002492fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002493rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002494fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002495echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2496echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002497if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002499elif test $ac_cv_prog_cc_g = yes; then
2500 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002501 CFLAGS="-g -O2"
2502 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002503 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002504 fi
2505else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002506 if test "$GCC" = yes; then
2507 CFLAGS="-O2"
2508 else
2509 CFLAGS=
2510 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002511fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002512echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2513echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2514if test "${ac_cv_prog_cc_stdc+set}" = set; then
2515 echo $ECHO_N "(cached) $ECHO_C" >&6
2516else
2517 ac_cv_prog_cc_stdc=no
2518ac_save_CC=$CC
2519cat >conftest.$ac_ext <<_ACEOF
2520#line $LINENO "configure"
2521/* confdefs.h. */
2522_ACEOF
2523cat confdefs.h >>conftest.$ac_ext
2524cat >>conftest.$ac_ext <<_ACEOF
2525/* end confdefs.h. */
2526#include <stdarg.h>
2527#include <stdio.h>
2528#include <sys/types.h>
2529#include <sys/stat.h>
2530/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2531struct buf { int x; };
2532FILE * (*rcsopen) (struct buf *, struct stat *, int);
2533static char *e (p, i)
2534 char **p;
2535 int i;
2536{
2537 return p[i];
2538}
2539static char *f (char * (*g) (char **, int), char **p, ...)
2540{
2541 char *s;
2542 va_list v;
2543 va_start (v,p);
2544 s = g (p, va_arg (v,int));
2545 va_end (v);
2546 return s;
2547}
2548int test (int i, double x);
2549struct s1 {int (*f) (int a);};
2550struct s2 {int (*f) (double a);};
2551int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2552int argc;
2553char **argv;
2554int
2555main ()
2556{
2557return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2558 ;
2559 return 0;
2560}
2561_ACEOF
2562# Don't try gcc -ansi; that turns off useful extensions and
2563# breaks some systems' header files.
2564# AIX -qlanglvl=ansi
2565# Ultrix and OSF/1 -std1
2566# HP-UX 10.20 and later -Ae
2567# HP-UX older versions -Aa -D_HPUX_SOURCE
2568# SVR4 -Xc -D__EXTENSIONS__
2569for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2570do
2571 CC="$ac_save_CC $ac_arg"
2572 rm -f conftest.$ac_objext
2573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2574 (eval $ac_compile) 2>&5
2575 ac_status=$?
2576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2577 (exit $ac_status); } &&
2578 { ac_try='test -s conftest.$ac_objext'
2579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2580 (eval $ac_try) 2>&5
2581 ac_status=$?
2582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2583 (exit $ac_status); }; }; then
2584 ac_cv_prog_cc_stdc=$ac_arg
2585break
2586else
2587 echo "$as_me: failed program was:" >&5
2588sed 's/^/| /' conftest.$ac_ext >&5
2589
2590fi
2591rm -f conftest.$ac_objext
2592done
2593rm -f conftest.$ac_ext conftest.$ac_objext
2594CC=$ac_save_CC
2595
2596fi
2597
2598case "x$ac_cv_prog_cc_stdc" in
2599 x|xno)
2600 echo "$as_me:$LINENO: result: none needed" >&5
2601echo "${ECHO_T}none needed" >&6 ;;
2602 *)
2603 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2604echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2605 CC="$CC $ac_cv_prog_cc_stdc" ;;
2606esac
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608# Some people use a C++ compiler to compile C. Since we use `exit',
2609# in C++ we need to declare it. In case someone uses the same compiler
2610# for both compiling C and C++ we need to have the C++ compiler decide
2611# the declaration of exit, since it's the most demanding environment.
2612cat >conftest.$ac_ext <<_ACEOF
2613#ifndef __cplusplus
2614 choke me
2615#endif
2616_ACEOF
2617rm -f conftest.$ac_objext
2618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2619 (eval $ac_compile) 2>&5
2620 ac_status=$?
2621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2622 (exit $ac_status); } &&
2623 { ac_try='test -s conftest.$ac_objext'
2624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2625 (eval $ac_try) 2>&5
2626 ac_status=$?
2627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2628 (exit $ac_status); }; }; then
2629 for ac_declaration in \
2630 ''\
2631 '#include <stdlib.h>' \
2632 'extern "C" void std::exit (int) throw (); using std::exit;' \
2633 'extern "C" void std::exit (int); using std::exit;' \
2634 'extern "C" void exit (int) throw ();' \
2635 'extern "C" void exit (int);' \
2636 'void exit (int);'
2637do
2638 cat >conftest.$ac_ext <<_ACEOF
2639#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002640/* confdefs.h. */
2641_ACEOF
2642cat confdefs.h >>conftest.$ac_ext
2643cat >>conftest.$ac_ext <<_ACEOF
2644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002645#include <stdlib.h>
2646$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002647int
2648main ()
2649{
2650exit (42);
2651 ;
2652 return 0;
2653}
2654_ACEOF
2655rm -f conftest.$ac_objext
2656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2657 (eval $ac_compile) 2>&5
2658 ac_status=$?
2659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660 (exit $ac_status); } &&
2661 { ac_try='test -s conftest.$ac_objext'
2662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2663 (eval $ac_try) 2>&5
2664 ac_status=$?
2665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2666 (exit $ac_status); }; }; then
2667 :
2668else
2669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002670sed 's/^/| /' conftest.$ac_ext >&5
2671
Martin v. Löwis11437992002-04-12 09:54:03 +00002672continue
2673fi
2674rm -f conftest.$ac_objext conftest.$ac_ext
2675 cat >conftest.$ac_ext <<_ACEOF
2676#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002677/* confdefs.h. */
2678_ACEOF
2679cat confdefs.h >>conftest.$ac_ext
2680cat >>conftest.$ac_ext <<_ACEOF
2681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002682$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002683int
2684main ()
2685{
2686exit (42);
2687 ;
2688 return 0;
2689}
2690_ACEOF
2691rm -f conftest.$ac_objext
2692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2693 (eval $ac_compile) 2>&5
2694 ac_status=$?
2695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2696 (exit $ac_status); } &&
2697 { ac_try='test -s conftest.$ac_objext'
2698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2699 (eval $ac_try) 2>&5
2700 ac_status=$?
2701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2702 (exit $ac_status); }; }; then
2703 break
2704else
2705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002706sed 's/^/| /' conftest.$ac_ext >&5
2707
Martin v. Löwis11437992002-04-12 09:54:03 +00002708fi
2709rm -f conftest.$ac_objext conftest.$ac_ext
2710done
2711rm -f conftest*
2712if test -n "$ac_declaration"; then
2713 echo '#ifdef __cplusplus' >>confdefs.h
2714 echo $ac_declaration >>confdefs.h
2715 echo '#endif' >>confdefs.h
2716fi
2717
2718else
2719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002720sed 's/^/| /' conftest.$ac_ext >&5
2721
Martin v. Löwis11437992002-04-12 09:54:03 +00002722fi
2723rm -f conftest.$ac_objext conftest.$ac_ext
2724ac_ext=c
2725ac_cpp='$CPP $CPPFLAGS'
2726ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2727ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2728ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002729
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002730
2731# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002732
2733ac_ext=c
2734ac_cpp='$CPP $CPPFLAGS'
2735ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2736ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2737ac_compiler_gnu=$ac_cv_c_compiler_gnu
2738echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2739echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002740# On Suns, sometimes $CPP names a directory.
2741if test -n "$CPP" && test -d "$CPP"; then
2742 CPP=
2743fi
2744if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 if test "${ac_cv_prog_CPP+set}" = set; then
2746 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002747else
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 # Double quotes because CPP needs to be expanded
2749 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2750 do
2751 ac_preproc_ok=false
2752for ac_c_preproc_warn_flag in '' yes
2753do
2754 # Use a header file that comes with gcc, so configuring glibc
2755 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002756 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2757 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002758 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002759 # not just through cpp. "Syntax error" is here to catch this case.
2760 cat >conftest.$ac_ext <<_ACEOF
2761#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002762/* confdefs.h. */
2763_ACEOF
2764cat confdefs.h >>conftest.$ac_ext
2765cat >>conftest.$ac_ext <<_ACEOF
2766/* end confdefs.h. */
2767#ifdef __STDC__
2768# include <limits.h>
2769#else
2770# include <assert.h>
2771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 Syntax error
2773_ACEOF
2774if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2775 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2776 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002777 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 rm -f conftest.er1
2779 cat conftest.err >&5
2780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2781 (exit $ac_status); } >/dev/null; then
2782 if test -s conftest.err; then
2783 ac_cpp_err=$ac_c_preproc_warn_flag
2784 else
2785 ac_cpp_err=
2786 fi
2787else
2788 ac_cpp_err=yes
2789fi
2790if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002791 :
2792else
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002794sed 's/^/| /' conftest.$ac_ext >&5
2795
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 # Broken: fails on valid input.
2797continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002798fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002799rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002800
Martin v. Löwis11437992002-04-12 09:54:03 +00002801 # OK, works on sane cases. Now check whether non-existent headers
2802 # can be detected and how.
2803 cat >conftest.$ac_ext <<_ACEOF
2804#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002805/* confdefs.h. */
2806_ACEOF
2807cat confdefs.h >>conftest.$ac_ext
2808cat >>conftest.$ac_ext <<_ACEOF
2809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002810#include <ac_nonexistent.h>
2811_ACEOF
2812if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2813 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2814 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002815 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002816 rm -f conftest.er1
2817 cat conftest.err >&5
2818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2819 (exit $ac_status); } >/dev/null; then
2820 if test -s conftest.err; then
2821 ac_cpp_err=$ac_c_preproc_warn_flag
2822 else
2823 ac_cpp_err=
2824 fi
2825else
2826 ac_cpp_err=yes
2827fi
2828if test -z "$ac_cpp_err"; then
2829 # Broken: success on invalid input.
2830continue
2831else
2832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002833sed 's/^/| /' conftest.$ac_ext >&5
2834
Martin v. Löwis11437992002-04-12 09:54:03 +00002835 # Passes both tests.
2836ac_preproc_ok=:
2837break
2838fi
2839rm -f conftest.err conftest.$ac_ext
2840
2841done
2842# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2843rm -f conftest.err conftest.$ac_ext
2844if $ac_preproc_ok; then
2845 break
2846fi
2847
2848 done
2849 ac_cv_prog_CPP=$CPP
2850
2851fi
2852 CPP=$ac_cv_prog_CPP
2853else
2854 ac_cv_prog_CPP=$CPP
2855fi
2856echo "$as_me:$LINENO: result: $CPP" >&5
2857echo "${ECHO_T}$CPP" >&6
2858ac_preproc_ok=false
2859for ac_c_preproc_warn_flag in '' yes
2860do
2861 # Use a header file that comes with gcc, so configuring glibc
2862 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002863 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2864 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002865 # On the NeXT, cc -E runs the code through the compiler's parser,
2866 # not just through cpp. "Syntax error" is here to catch this case.
2867 cat >conftest.$ac_ext <<_ACEOF
2868#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002869/* confdefs.h. */
2870_ACEOF
2871cat confdefs.h >>conftest.$ac_ext
2872cat >>conftest.$ac_ext <<_ACEOF
2873/* end confdefs.h. */
2874#ifdef __STDC__
2875# include <limits.h>
2876#else
2877# include <assert.h>
2878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002879 Syntax error
2880_ACEOF
2881if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2882 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2883 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002884 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002885 rm -f conftest.er1
2886 cat conftest.err >&5
2887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2888 (exit $ac_status); } >/dev/null; then
2889 if test -s conftest.err; then
2890 ac_cpp_err=$ac_c_preproc_warn_flag
2891 else
2892 ac_cpp_err=
2893 fi
2894else
2895 ac_cpp_err=yes
2896fi
2897if test -z "$ac_cpp_err"; then
2898 :
2899else
2900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002901sed 's/^/| /' conftest.$ac_ext >&5
2902
Martin v. Löwis11437992002-04-12 09:54:03 +00002903 # Broken: fails on valid input.
2904continue
2905fi
2906rm -f conftest.err conftest.$ac_ext
2907
2908 # OK, works on sane cases. Now check whether non-existent headers
2909 # can be detected and how.
2910 cat >conftest.$ac_ext <<_ACEOF
2911#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002912/* confdefs.h. */
2913_ACEOF
2914cat confdefs.h >>conftest.$ac_ext
2915cat >>conftest.$ac_ext <<_ACEOF
2916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002917#include <ac_nonexistent.h>
2918_ACEOF
2919if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2920 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2921 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002922 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002923 rm -f conftest.er1
2924 cat conftest.err >&5
2925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2926 (exit $ac_status); } >/dev/null; then
2927 if test -s conftest.err; then
2928 ac_cpp_err=$ac_c_preproc_warn_flag
2929 else
2930 ac_cpp_err=
2931 fi
2932else
2933 ac_cpp_err=yes
2934fi
2935if test -z "$ac_cpp_err"; then
2936 # Broken: success on invalid input.
2937continue
2938else
2939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002940sed 's/^/| /' conftest.$ac_ext >&5
2941
Martin v. Löwis11437992002-04-12 09:54:03 +00002942 # Passes both tests.
2943ac_preproc_ok=:
2944break
2945fi
2946rm -f conftest.err conftest.$ac_ext
2947
2948done
2949# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2950rm -f conftest.err conftest.$ac_ext
2951if $ac_preproc_ok; then
2952 :
2953else
Skip Montanaro6dead952003-09-25 14:50:04 +00002954 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2955See \`config.log' for more details." >&5
2956echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2957See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002958 { (exit 1); exit 1; }; }
2959fi
2960
2961ac_ext=c
2962ac_cpp='$CPP $CPPFLAGS'
2963ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2964ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2965ac_compiler_gnu=$ac_cv_c_compiler_gnu
2966
2967
Skip Montanaro6dead952003-09-25 14:50:04 +00002968echo "$as_me:$LINENO: checking for egrep" >&5
2969echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2970if test "${ac_cv_prog_egrep+set}" = set; then
2971 echo $ECHO_N "(cached) $ECHO_C" >&6
2972else
2973 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2974 then ac_cv_prog_egrep='grep -E'
2975 else ac_cv_prog_egrep='egrep'
2976 fi
2977fi
2978echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2979echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2980 EGREP=$ac_cv_prog_egrep
2981
2982
Martin v. Löwis11437992002-04-12 09:54:03 +00002983
2984echo "$as_me:$LINENO: checking for AIX" >&5
2985echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2986cat >conftest.$ac_ext <<_ACEOF
2987#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002988/* confdefs.h. */
2989_ACEOF
2990cat confdefs.h >>conftest.$ac_ext
2991cat >>conftest.$ac_ext <<_ACEOF
2992/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993#ifdef _AIX
2994 yes
2995#endif
2996
Martin v. Löwis11437992002-04-12 09:54:03 +00002997_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002999 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003000 echo "$as_me:$LINENO: result: yes" >&5
3001echo "${ECHO_T}yes" >&6
3002cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003003#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003004_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003005
3006else
Martin v. Löwis11437992002-04-12 09:54:03 +00003007 echo "$as_me:$LINENO: result: no" >&5
3008echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003009fi
3010rm -f conftest*
3011
Michael W. Hudson54241132001-12-07 15:38:26 +00003012
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003013
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003014# Check for unsupported systems
3015case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003016Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003017 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3018 echo See README for details.
3019 exit 1;;
3020esac
3021
Michael W. Hudson54241132001-12-07 15:38:26 +00003022
Martin v. Löwis11437992002-04-12 09:54:03 +00003023echo "$as_me:$LINENO: checking for --with-suffix" >&5
3024echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003025
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003026# Check whether --with-suffix or --without-suffix was given.
3027if test "${with_suffix+set}" = set; then
3028 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003029
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003030 case $withval in
3031 no) EXEEXT=;;
3032 yes) EXEEXT=.exe;;
3033 *) EXEEXT=$withval;;
3034 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003035fi;
3036echo "$as_me:$LINENO: result: $EXEEXT" >&5
3037echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003038
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003039# Test whether we're running on a non-case-sensitive system, in which
3040# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003041
Martin v. Löwis11437992002-04-12 09:54:03 +00003042echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3043echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003044if test ! -d CaseSensitiveTestDir; then
3045mkdir CaseSensitiveTestDir
3046fi
3047
3048if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003049then
Martin v. Löwis11437992002-04-12 09:54:03 +00003050 echo "$as_me:$LINENO: result: yes" >&5
3051echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003052 BUILDEXEEXT=.exe
3053else
Martin v. Löwis11437992002-04-12 09:54:03 +00003054 echo "$as_me:$LINENO: result: no" >&5
3055echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003056 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003057fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003058rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003059
Guido van Rossumdd997f71998-10-07 19:58:26 +00003060case $MACHDEP in
3061bsdos*)
3062 case $CC in
3063 gcc) CC="$CC -D_HAVE_BSDI";;
3064 esac;;
3065esac
3066
Guido van Rossum24b1e751997-08-21 02:29:16 +00003067case $ac_sys_system in
3068hp*|HP*)
3069 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003070 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003071 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003072Monterey*)
3073 case $CC in
3074 cc) CC="$CC -Wl,-Bexport";;
3075 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003076SunOS*)
3077 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003078
3079cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003080#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003081_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003082
3083 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003084esac
3085
Michael W. Hudson54241132001-12-07 15:38:26 +00003086
3087
Martin v. Löwis11437992002-04-12 09:54:03 +00003088echo "$as_me:$LINENO: checking LIBRARY" >&5
3089echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003090if test -z "$LIBRARY"
3091then
3092 LIBRARY='libpython$(VERSION).a'
3093fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003094echo "$as_me:$LINENO: result: $LIBRARY" >&5
3095echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003096
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003097# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003098# name of the library into which to insert object files). BLDLIBRARY is also
3099# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3100# is blank as the main program is not linked directly against LDLIBRARY.
3101# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3102# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3103# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3104# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003105#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003106# RUNSHARED is used to run shared python without installed libraries
3107#
3108# INSTSONAME is the name of the shared library that will be use to install
3109# on the system - some systems like version suffix, others don't
3110
3111
Michael W. Hudson54241132001-12-07 15:38:26 +00003112
3113
3114
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003115
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003116LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003117BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003118INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003119DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003120LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003121RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003122
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003123# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003124# If CXX is set, and if it is needed to link a main function that was
3125# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3126# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003127# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003128# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003129
Martin v. Löwis11437992002-04-12 09:54:03 +00003130echo "$as_me:$LINENO: checking LINKCC" >&5
3131echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003132if test -z "$LINKCC"
3133then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003134 if test -z "$CXX"; then
3135 LINKCC="\$(PURIFY) \$(CC)"
3136 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003137 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003138 $CXX -c conftest.$ac_ext 2>&5
3139 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3140 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3141 then
3142 LINKCC="\$(PURIFY) \$(CC)"
3143 else
3144 LINKCC="\$(PURIFY) \$(CXX)"
3145 fi
3146 rm -fr conftest*
3147 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003148 case $ac_sys_system in
3149 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003150 exp_extra="\"\""
3151 if test $ac_sys_release -ge 5 -o \
3152 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3153 exp_extra="."
3154 fi
3155 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003156 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003157 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003158 esac
3159fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003160echo "$as_me:$LINENO: result: $LINKCC" >&5
3161echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003162
Martin v. Löwis11437992002-04-12 09:54:03 +00003163echo "$as_me:$LINENO: checking for --enable-shared" >&5
3164echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003165# Check whether --enable-shared or --disable-shared was given.
3166if test "${enable_shared+set}" = set; then
3167 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003168
Martin v. Löwis11437992002-04-12 09:54:03 +00003169fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003170
3171if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003172then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003173 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003174 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003175 enable_shared="yes";;
3176 *)
3177 enable_shared="no";;
3178 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003180echo "$as_me:$LINENO: result: $enable_shared" >&5
3181echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003182
3183
Martin v. Löwis11437992002-04-12 09:54:03 +00003184echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3185echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003186
Guido van Rossumb8552162001-09-05 14:58:11 +00003187# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3188# library that we build, but we do not want to link against it (we
3189# will find it with a -framework option). For this reason there is an
3190# extra variable BLDLIBRARY against which Python and the extension
3191# modules are linked, BLDLIBRARY. This is normally the same as
3192# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003193if test "$enable_framework"
3194then
3195 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003196 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003197 BLDLIBRARY=''
3198else
3199 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003200fi
Jack Jansene578a632001-08-15 01:27:14 +00003201
Martin v. Löwis1142de32002-03-29 16:28:31 +00003202# Other platforms follow
3203if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003204
3205cat >>confdefs.h <<\_ACEOF
3206#define Py_ENABLE_SHARED 1
3207_ACEOF
3208
Martin v. Löwis1142de32002-03-29 16:28:31 +00003209 case $ac_sys_system in
3210 BeOS*)
3211 LDLIBRARY='libpython$(VERSION).so'
3212 ;;
3213 CYGWIN*)
3214 LDLIBRARY='libpython$(VERSION).dll.a'
3215 DLLLIBRARY='libpython$(VERSION).dll'
3216 ;;
3217 SunOS*)
3218 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003219 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003220 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003221 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003222 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003223 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003224 LDLIBRARY='libpython$(VERSION).so'
3225 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003226 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003227 INSTSONAME="$LDLIBRARY".$SOVERSION
3228 ;;
3229 hp*|HP*)
3230 LDLIBRARY='libpython$(VERSION).sl'
3231 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003232 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003233 ;;
3234 OSF*)
3235 LDLIBRARY='libpython$(VERSION).so'
3236 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003237 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003238 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003239 atheos*)
3240 LDLIBRARY='libpython$(VERSION).so'
3241 BLDLIBRARY='-L. -lpython$(VERSION)'
3242 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3243 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003244 esac
Jason Tishler30765592003-09-04 11:04:06 +00003245else # shared is disabled
3246 case $ac_sys_system in
3247 CYGWIN*)
3248 BLDLIBRARY='$(LIBRARY)'
3249 LDLIBRARY='libpython$(VERSION).dll.a'
3250 ;;
3251 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003252fi
3253
Martin v. Löwis11437992002-04-12 09:54:03 +00003254echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3255echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003256
Martin v. Löwis11437992002-04-12 09:54:03 +00003257if test -n "$ac_tool_prefix"; then
3258 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3259set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3260echo "$as_me:$LINENO: checking for $ac_word" >&5
3261echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3262if test "${ac_cv_prog_RANLIB+set}" = set; then
3263 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003264else
3265 if test -n "$RANLIB"; then
3266 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3267else
Martin v. Löwis11437992002-04-12 09:54:03 +00003268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3269for as_dir in $PATH
3270do
3271 IFS=$as_save_IFS
3272 test -z "$as_dir" && as_dir=.
3273 for ac_exec_ext in '' $ac_executable_extensions; do
3274 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3275 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3276 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3277 break 2
3278 fi
3279done
3280done
3281
Guido van Rossum627b2d71993-12-24 10:39:16 +00003282fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003283fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003284RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003285if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003286 echo "$as_me:$LINENO: result: $RANLIB" >&5
3287echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003288else
Martin v. Löwis11437992002-04-12 09:54:03 +00003289 echo "$as_me:$LINENO: result: no" >&5
3290echo "${ECHO_T}no" >&6
3291fi
3292
3293fi
3294if test -z "$ac_cv_prog_RANLIB"; then
3295 ac_ct_RANLIB=$RANLIB
3296 # Extract the first word of "ranlib", so it can be a program name with args.
3297set dummy ranlib; ac_word=$2
3298echo "$as_me:$LINENO: checking for $ac_word" >&5
3299echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3300if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3301 echo $ECHO_N "(cached) $ECHO_C" >&6
3302else
3303 if test -n "$ac_ct_RANLIB"; then
3304 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3305else
3306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3307for as_dir in $PATH
3308do
3309 IFS=$as_save_IFS
3310 test -z "$as_dir" && as_dir=.
3311 for ac_exec_ext in '' $ac_executable_extensions; do
3312 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3313 ac_cv_prog_ac_ct_RANLIB="ranlib"
3314 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3315 break 2
3316 fi
3317done
3318done
3319
3320 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3321fi
3322fi
3323ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3324if test -n "$ac_ct_RANLIB"; then
3325 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3326echo "${ECHO_T}$ac_ct_RANLIB" >&6
3327else
3328 echo "$as_me:$LINENO: result: no" >&5
3329echo "${ECHO_T}no" >&6
3330fi
3331
3332 RANLIB=$ac_ct_RANLIB
3333else
3334 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003335fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003336
3337
Guido van Rossum7f43da71994-08-01 12:15:30 +00003338for ac_prog in ar aal
3339do
Martin v. Löwis11437992002-04-12 09:54:03 +00003340 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003341set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003342echo "$as_me:$LINENO: checking for $ac_word" >&5
3343echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3344if test "${ac_cv_prog_AR+set}" = set; then
3345 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003346else
3347 if test -n "$AR"; then
3348 ac_cv_prog_AR="$AR" # Let the user override the test.
3349else
Martin v. Löwis11437992002-04-12 09:54:03 +00003350as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3351for as_dir in $PATH
3352do
3353 IFS=$as_save_IFS
3354 test -z "$as_dir" && as_dir=.
3355 for ac_exec_ext in '' $ac_executable_extensions; do
3356 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3357 ac_cv_prog_AR="$ac_prog"
3358 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3359 break 2
3360 fi
3361done
3362done
3363
Guido van Rossum7f43da71994-08-01 12:15:30 +00003364fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003366AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003367if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003368 echo "$as_me:$LINENO: result: $AR" >&5
3369echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003370else
Martin v. Löwis11437992002-04-12 09:54:03 +00003371 echo "$as_me:$LINENO: result: no" >&5
3372echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003373fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003374
Martin v. Löwis11437992002-04-12 09:54:03 +00003375 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003376done
3377test -n "$AR" || AR="ar"
3378
Michael W. Hudson54241132001-12-07 15:38:26 +00003379
Neil Schemenauera42c8272001-03-31 00:01:55 +00003380case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003381bsdos*|hp*|HP*)
3382 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003383 if test -z "$INSTALL"
3384 then
3385 INSTALL="${srcdir}/install-sh -c"
3386 fi
3387esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003388ac_aux_dir=
3389for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3390 if test -f $ac_dir/install-sh; then
3391 ac_aux_dir=$ac_dir
3392 ac_install_sh="$ac_aux_dir/install-sh -c"
3393 break
3394 elif test -f $ac_dir/install.sh; then
3395 ac_aux_dir=$ac_dir
3396 ac_install_sh="$ac_aux_dir/install.sh -c"
3397 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 elif test -f $ac_dir/shtool; then
3399 ac_aux_dir=$ac_dir
3400 ac_install_sh="$ac_aux_dir/shtool install -c"
3401 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003402 fi
3403done
3404if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003405 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3406echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3407 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003408fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003409ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3410ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3411ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003412
3413# Find a good install program. We prefer a C program (faster),
3414# so one script is as good as another. But avoid the broken or
3415# incompatible versions:
3416# SysV /etc/install, /usr/sbin/install
3417# SunOS /usr/etc/install
3418# IRIX /sbin/install
3419# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003420# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003421# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3422# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3423# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3424# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003425echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3426echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003427if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003428if test "${ac_cv_path_install+set}" = set; then
3429 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003430else
Martin v. Löwis11437992002-04-12 09:54:03 +00003431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3432for as_dir in $PATH
3433do
3434 IFS=$as_save_IFS
3435 test -z "$as_dir" && as_dir=.
3436 # Account for people who put trailing slashes in PATH elements.
3437case $as_dir/ in
3438 ./ | .// | /cC/* | \
3439 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3440 /usr/ucb/* ) ;;
3441 *)
3442 # OSF1 and SCO ODT 3.0 have their own names for install.
3443 # Don't use installbsd from OSF since it installs stuff as root
3444 # by default.
3445 for ac_prog in ginstall scoinst install; do
3446 for ac_exec_ext in '' $ac_executable_extensions; do
3447 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3448 if test $ac_prog = install &&
3449 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3450 # AIX install. It has an incompatible calling convention.
3451 :
3452 elif test $ac_prog = install &&
3453 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3454 # program-specific install script used by HP pwplus--don't use.
3455 :
3456 else
3457 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3458 break 3
3459 fi
3460 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003461 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 done
3463 ;;
3464esac
3465done
3466
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003467
3468fi
3469 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003471 else
3472 # As a last resort, use the slow shell script. We don't cache a
3473 # path for INSTALL within a source directory, because that will
3474 # break other packages using the cache if that directory is
3475 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003477 fi
3478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003479echo "$as_me:$LINENO: result: $INSTALL" >&5
3480echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003481
3482# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3483# It thinks the first close brace ends the variable substitution.
3484test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3485
Martin v. Löwis11437992002-04-12 09:54:03 +00003486test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003487
3488test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3489
Michael W. Hudson54241132001-12-07 15:38:26 +00003490
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003491# Not every filesystem supports hard links
3492
3493if test -z "$LN" ; then
3494 case $ac_sys_system in
3495 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003496 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003497 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003498 *) LN=ln;;
3499 esac
3500fi
3501
Fred Drake109d9862001-07-11 06:27:56 +00003502# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003503echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3504echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3505
Fred Drake109d9862001-07-11 06:27:56 +00003506# Check whether --with-pydebug or --without-pydebug was given.
3507if test "${with_pydebug+set}" = set; then
3508 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003509
Fred Drake109d9862001-07-11 06:27:56 +00003510if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003511then
3512
3513cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003514#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003515_ACEOF
3516
3517 echo "$as_me:$LINENO: result: yes" >&5
3518echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003519 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003520else echo "$as_me:$LINENO: result: no" >&5
3521echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003522fi
3523else
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 echo "$as_me:$LINENO: result: no" >&5
3525echo "${ECHO_T}no" >&6
3526fi;
Fred Drake109d9862001-07-11 06:27:56 +00003527
Skip Montanarodecc6a42003-01-01 20:07:49 +00003528# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3529# merged with this chunk of code?
3530
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003531# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003532# ------------------------
3533# (The following bit of code is complicated enough - please keep things
3534# indented properly. Just pretend you're editing Python code. ;-)
3535
3536# There are two parallel sets of case statements below, one that checks to
3537# see if OPT was set and one that does BASECFLAGS setting based upon
3538# compiler and platform. BASECFLAGS tweaks need to be made even if the
3539# user set OPT.
3540
3541# tweak OPT based on compiler and platform, only if the user didn't set
3542# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003543
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003544if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003545then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003546 case $GCC in
3547 yes)
3548 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003549 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003550 if test "$Py_DEBUG" = 'true' ; then
3551 # Optimization messes up debuggers, so turn it off for
3552 # debug builds.
3553 OPT="-g -Wall -Wstrict-prototypes"
3554 else
3555 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003556 fi
3557 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003558 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003559 OPT="-O3 -Wall -Wstrict-prototypes"
3560 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003561 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003562 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003563 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3564 ;;
3565 esac
Fred Drake109d9862001-07-11 06:27:56 +00003566 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003567
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003568 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003569 OPT="-O"
3570 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003571 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003572
3573 # The current (beta) Monterey compiler dies with optimizations
3574 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003575 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003576 Monterey*)
3577 OPT=""
3578 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003579 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003580
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003581fi
3582
Skip Montanarodecc6a42003-01-01 20:07:49 +00003583
3584# tweak BASECFLAGS based on compiler and platform
3585case $GCC in
3586yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003587 # Python violates C99 rules, by casting between incompatible
3588 # pointer types. GCC may generate bad code as a result of that,
3589 # so use -fno-strict-aliasing if supported.
3590 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3591echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3592 ac_save_cc="$CC"
3593 CC="$CC -fno-strict-aliasing"
3594 if test "$cross_compiling" = yes; then
3595 ac_cv_no_strict_aliasing_ok=no
3596else
3597 cat >conftest.$ac_ext <<_ACEOF
3598#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003599/* confdefs.h. */
3600_ACEOF
3601cat confdefs.h >>conftest.$ac_ext
3602cat >>conftest.$ac_ext <<_ACEOF
3603/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003604int main() { return 0; }
3605_ACEOF
3606rm -f conftest$ac_exeext
3607if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3608 (eval $ac_link) 2>&5
3609 ac_status=$?
3610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3611 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3613 (eval $ac_try) 2>&5
3614 ac_status=$?
3615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3616 (exit $ac_status); }; }; then
3617 ac_cv_no_strict_aliasing_ok=yes
3618else
3619 echo "$as_me: program exited with status $ac_status" >&5
3620echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003621sed 's/^/| /' conftest.$ac_ext >&5
3622
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003623( exit $ac_status )
3624ac_cv_no_strict_aliasing_ok=no
3625fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003626rm -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 +00003627fi
3628 CC="$ac_save_cc"
3629 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3630echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3631 if test $ac_cv_no_strict_aliasing_ok = yes
3632 then
3633 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3634 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003635 case $ac_sys_system in
3636 SCO_SV*)
3637 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3638 ;;
3639 # is there any other compiler on Darwin besides gcc?
3640 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003641 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003642 ;;
3643 esac
3644 ;;
3645
3646*)
3647 case $ac_sys_system in
3648 OpenUNIX*|UnixWare*)
3649 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3650 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003651 OSF*)
3652 BASECFLAGS="$BASECFLAGS -ieee -std"
3653 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003654 SCO_SV*)
3655 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3656 ;;
3657 esac
3658 ;;
3659esac
3660
Fred Drakee1ceaa02001-12-04 20:55:47 +00003661if test "$Py_DEBUG" = 'true'; then
3662 :
3663else
3664 OPT="-DNDEBUG $OPT"
3665fi
3666
Guido van Rossum563e7081996-09-10 18:20:48 +00003667if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003668then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003669 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003670fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003671
Martin v. Löwis11437992002-04-12 09:54:03 +00003672echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3673echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3674if test "${ac_cv_opt_olimit_ok+set}" = set; then
3675 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003676else
3677 ac_save_cc="$CC"
3678CC="$CC -OPT:Olimit=0"
3679if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003680 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003681else
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 cat >conftest.$ac_ext <<_ACEOF
3683#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003684/* confdefs.h. */
3685_ACEOF
3686cat confdefs.h >>conftest.$ac_ext
3687cat >>conftest.$ac_ext <<_ACEOF
3688/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003689int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690_ACEOF
3691rm -f conftest$ac_exeext
3692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3693 (eval $ac_link) 2>&5
3694 ac_status=$?
3695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3698 (eval $ac_try) 2>&5
3699 ac_status=$?
3700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3701 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003702 ac_cv_opt_olimit_ok=yes
3703else
Martin v. Löwis11437992002-04-12 09:54:03 +00003704 echo "$as_me: program exited with status $ac_status" >&5
3705echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003706sed 's/^/| /' conftest.$ac_ext >&5
3707
Martin v. Löwis11437992002-04-12 09:54:03 +00003708( exit $ac_status )
3709ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003710fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003711rm -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 +00003712fi
Guido van Rossum91922671997-10-09 20:24:13 +00003713CC="$ac_save_cc"
3714fi
3715
Martin v. Löwis11437992002-04-12 09:54:03 +00003716echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3717echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003718if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003719 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003720 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3721 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3722 # environment?
3723 Darwin*)
3724 ;;
3725 *)
3726 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3727 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003728 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003729else
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3731echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3732 if test "${ac_cv_olimit_ok+set}" = set; then
3733 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003734else
3735 ac_save_cc="$CC"
3736 CC="$CC -Olimit 1500"
3737 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003738 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003739else
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 cat >conftest.$ac_ext <<_ACEOF
3741#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003742/* confdefs.h. */
3743_ACEOF
3744cat confdefs.h >>conftest.$ac_ext
3745cat >>conftest.$ac_ext <<_ACEOF
3746/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003747int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003748_ACEOF
3749rm -f conftest$ac_exeext
3750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3751 (eval $ac_link) 2>&5
3752 ac_status=$?
3753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3754 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3756 (eval $ac_try) 2>&5
3757 ac_status=$?
3758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3759 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003760 ac_cv_olimit_ok=yes
3761else
Martin v. Löwis11437992002-04-12 09:54:03 +00003762 echo "$as_me: program exited with status $ac_status" >&5
3763echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003764sed 's/^/| /' conftest.$ac_ext >&5
3765
Martin v. Löwis11437992002-04-12 09:54:03 +00003766( exit $ac_status )
3767ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003768fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003769rm -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 +00003770fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003771 CC="$ac_save_cc"
3772fi
3773
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3775echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003776 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003777 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003778 fi
3779fi
3780
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003781# On some compilers, pthreads are available without further options
3782# (e.g. MacOS X). On some of these systems, the compiler will not
3783# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3784# So we have to see first whether pthreads are available without
3785# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003786echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3787echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3788if test "${ac_cv_pthread_is_default+set}" = set; then
3789 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003790else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003791 if test "$cross_compiling" = yes; then
3792 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003793else
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 cat >conftest.$ac_ext <<_ACEOF
3795#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003796/* confdefs.h. */
3797_ACEOF
3798cat confdefs.h >>conftest.$ac_ext
3799cat >>conftest.$ac_ext <<_ACEOF
3800/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003801
Martin v. Löwis130fb172001-07-19 11:00:41 +00003802#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003803
3804void* routine(void* p){return NULL;}
3805
3806int main(){
3807 pthread_t p;
3808 if(pthread_create(&p,NULL,routine,NULL)!=0)
3809 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003810 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003811 return 0;
3812}
3813
Martin v. Löwis11437992002-04-12 09:54:03 +00003814_ACEOF
3815rm -f conftest$ac_exeext
3816if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3817 (eval $ac_link) 2>&5
3818 ac_status=$?
3819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3820 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3822 (eval $ac_try) 2>&5
3823 ac_status=$?
3824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3825 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003826
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003827 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003828 ac_cv_kthread=no
3829 ac_cv_pthread=no
3830
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003831else
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 echo "$as_me: program exited with status $ac_status" >&5
3833echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003834sed 's/^/| /' conftest.$ac_ext >&5
3835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836( exit $ac_status )
3837ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003838fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003839rm -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 +00003840fi
3841
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003842fi
3843
Martin v. Löwis11437992002-04-12 09:54:03 +00003844echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3845echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003846
Michael W. Hudson54241132001-12-07 15:38:26 +00003847
Martin v. Löwis11437992002-04-12 09:54:03 +00003848if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003849then
3850 ac_cv_kpthread=no
3851else
3852# -Kpthread, if available, provides the right #defines
3853# and linker options to make pthread_create available
3854# Some compilers won't report that they do not support -Kpthread,
3855# so we need to run a program to see whether it really made the
3856# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003857echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3858echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3859if test "${ac_cv_kpthread+set}" = set; then
3860 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003861else
3862 ac_save_cc="$CC"
3863CC="$CC -Kpthread"
3864if test "$cross_compiling" = yes; then
3865 ac_cv_kpthread=no
3866else
Martin v. Löwis11437992002-04-12 09:54:03 +00003867 cat >conftest.$ac_ext <<_ACEOF
3868#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003869/* confdefs.h. */
3870_ACEOF
3871cat confdefs.h >>conftest.$ac_ext
3872cat >>conftest.$ac_ext <<_ACEOF
3873/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003874
3875#include <pthread.h>
3876
3877void* routine(void* p){return NULL;}
3878
3879int main(){
3880 pthread_t p;
3881 if(pthread_create(&p,NULL,routine,NULL)!=0)
3882 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003883 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003884 return 0;
3885}
3886
Martin v. Löwis11437992002-04-12 09:54:03 +00003887_ACEOF
3888rm -f conftest$ac_exeext
3889if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3890 (eval $ac_link) 2>&5
3891 ac_status=$?
3892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3893 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3895 (eval $ac_try) 2>&5
3896 ac_status=$?
3897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3898 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003899 ac_cv_kpthread=yes
3900else
Martin v. Löwis11437992002-04-12 09:54:03 +00003901 echo "$as_me: program exited with status $ac_status" >&5
3902echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003903sed 's/^/| /' conftest.$ac_ext >&5
3904
Martin v. Löwis11437992002-04-12 09:54:03 +00003905( exit $ac_status )
3906ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003907fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003908rm -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 +00003909fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003910CC="$ac_save_cc"
3911fi
3912
Martin v. Löwis11437992002-04-12 09:54:03 +00003913echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3914echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003915fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003916
Skip Montanarod8d39a02003-07-10 20:44:10 +00003917if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003918then
3919# -Kthread, if available, provides the right #defines
3920# and linker options to make pthread_create available
3921# Some compilers won't report that they do not support -Kthread,
3922# so we need to run a program to see whether it really made the
3923# function available.
3924echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3925echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3926if test "${ac_cv_kthread+set}" = set; then
3927 echo $ECHO_N "(cached) $ECHO_C" >&6
3928else
3929 ac_save_cc="$CC"
3930CC="$CC -Kthread"
3931if test "$cross_compiling" = yes; then
3932 ac_cv_kthread=no
3933else
3934 cat >conftest.$ac_ext <<_ACEOF
3935#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003936/* confdefs.h. */
3937_ACEOF
3938cat confdefs.h >>conftest.$ac_ext
3939cat >>conftest.$ac_ext <<_ACEOF
3940/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003941
3942#include <pthread.h>
3943
3944void* routine(void* p){return NULL;}
3945
3946int main(){
3947 pthread_t p;
3948 if(pthread_create(&p,NULL,routine,NULL)!=0)
3949 return 1;
3950 (void)pthread_detach(p);
3951 return 0;
3952}
3953
3954_ACEOF
3955rm -f conftest$ac_exeext
3956if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3957 (eval $ac_link) 2>&5
3958 ac_status=$?
3959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3960 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3962 (eval $ac_try) 2>&5
3963 ac_status=$?
3964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3965 (exit $ac_status); }; }; then
3966 ac_cv_kthread=yes
3967else
3968 echo "$as_me: program exited with status $ac_status" >&5
3969echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003970sed 's/^/| /' conftest.$ac_ext >&5
3971
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003972( exit $ac_status )
3973ac_cv_kthread=no
3974fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003975rm -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 +00003976fi
3977CC="$ac_save_cc"
3978fi
3979
3980echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3981echo "${ECHO_T}$ac_cv_kthread" >&6
3982fi
3983
Skip Montanarod8d39a02003-07-10 20:44:10 +00003984if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003985then
3986# -pthread, if available, provides the right #defines
3987# and linker options to make pthread_create available
3988# Some compilers won't report that they do not support -pthread,
3989# so we need to run a program to see whether it really made the
3990# function available.
3991echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3992echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3993if test "${ac_cv_thread+set}" = set; then
3994 echo $ECHO_N "(cached) $ECHO_C" >&6
3995else
3996 ac_save_cc="$CC"
3997CC="$CC -pthread"
3998if test "$cross_compiling" = yes; then
3999 ac_cv_pthread=no
4000else
4001 cat >conftest.$ac_ext <<_ACEOF
4002#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004003/* confdefs.h. */
4004_ACEOF
4005cat confdefs.h >>conftest.$ac_ext
4006cat >>conftest.$ac_ext <<_ACEOF
4007/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004008
4009#include <pthread.h>
4010
4011void* routine(void* p){return NULL;}
4012
4013int main(){
4014 pthread_t p;
4015 if(pthread_create(&p,NULL,routine,NULL)!=0)
4016 return 1;
4017 (void)pthread_detach(p);
4018 return 0;
4019}
4020
4021_ACEOF
4022rm -f conftest$ac_exeext
4023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4024 (eval $ac_link) 2>&5
4025 ac_status=$?
4026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4029 (eval $ac_try) 2>&5
4030 ac_status=$?
4031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4032 (exit $ac_status); }; }; then
4033 ac_cv_pthread=yes
4034else
4035 echo "$as_me: program exited with status $ac_status" >&5
4036echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004037sed 's/^/| /' conftest.$ac_ext >&5
4038
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004039( exit $ac_status )
4040ac_cv_pthread=no
4041fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004042rm -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 +00004043fi
4044CC="$ac_save_cc"
4045fi
4046
4047echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4048echo "${ECHO_T}$ac_cv_pthread" >&6
4049fi
4050
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004051# If we have set a CC compiler flag for thread support then
4052# check if it works for CXX, too.
4053ac_cv_cxx_thread=no
4054if test ! -z "$CXX"
4055then
4056echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4057echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4058ac_save_cxx="$CXX"
4059
4060if test "$ac_cv_kpthread" = "yes"
4061then
4062 CXX="$CXX -Kpthread"
4063 ac_cv_cxx_thread=yes
4064elif test "$ac_cv_kthread" = "yes"
4065then
4066 CXX="$CXX -Kthread"
4067 ac_cv_cxx_thread=yes
4068elif test "$ac_cv_pthread" = "yes"
4069then
4070 CXX="$CXX -pthread"
4071 ac_cv_cxx_thread=yes
4072fi
4073
4074if test $ac_cv_cxx_thread = yes
4075then
4076 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4077 $CXX -c conftest.$ac_ext 2>&5
4078 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4079 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4080 then
4081 ac_cv_cxx_thread=yes
4082 else
4083 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004084 fi
4085 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004086fi
4087fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004088CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004089echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4090echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4091
Michael W. Hudson54241132001-12-07 15:38:26 +00004092
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004093# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004094echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4095echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4096if test "${ac_cv_header_stdc+set}" = set; then
4097 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004098else
Martin v. Löwis11437992002-04-12 09:54:03 +00004099 cat >conftest.$ac_ext <<_ACEOF
4100#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004101/* confdefs.h. */
4102_ACEOF
4103cat confdefs.h >>conftest.$ac_ext
4104cat >>conftest.$ac_ext <<_ACEOF
4105/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004106#include <stdlib.h>
4107#include <stdarg.h>
4108#include <string.h>
4109#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004110
Skip Montanaro6dead952003-09-25 14:50:04 +00004111int
4112main ()
4113{
4114
4115 ;
4116 return 0;
4117}
Martin v. Löwis11437992002-04-12 09:54:03 +00004118_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004119rm -f conftest.$ac_objext
4120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4121 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004122 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004124 (exit $ac_status); } &&
4125 { ac_try='test -s conftest.$ac_objext'
4126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4127 (eval $ac_try) 2>&5
4128 ac_status=$?
4129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4130 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004131 ac_cv_header_stdc=yes
4132else
Martin v. Löwis11437992002-04-12 09:54:03 +00004133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004134sed 's/^/| /' conftest.$ac_ext >&5
4135
4136ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004137fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004138rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004139
4140if test $ac_cv_header_stdc = yes; then
4141 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 cat >conftest.$ac_ext <<_ACEOF
4143#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004144/* confdefs.h. */
4145_ACEOF
4146cat confdefs.h >>conftest.$ac_ext
4147cat >>conftest.$ac_ext <<_ACEOF
4148/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004150
4151_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004153 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004154 :
4155else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004156 ac_cv_header_stdc=no
4157fi
4158rm -f conftest*
4159
4160fi
4161
4162if test $ac_cv_header_stdc = yes; then
4163 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 cat >conftest.$ac_ext <<_ACEOF
4165#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004166/* confdefs.h. */
4167_ACEOF
4168cat confdefs.h >>conftest.$ac_ext
4169cat >>conftest.$ac_ext <<_ACEOF
4170/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004172
4173_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004175 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004176 :
4177else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004178 ac_cv_header_stdc=no
4179fi
4180rm -f conftest*
4181
4182fi
4183
4184if test $ac_cv_header_stdc = yes; then
4185 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004186 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004187 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004188else
Martin v. Löwis11437992002-04-12 09:54:03 +00004189 cat >conftest.$ac_ext <<_ACEOF
4190#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004191/* confdefs.h. */
4192_ACEOF
4193cat confdefs.h >>conftest.$ac_ext
4194cat >>conftest.$ac_ext <<_ACEOF
4195/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004196#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004197#if ((' ' & 0x0FF) == 0x020)
4198# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4199# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4200#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004201# define ISLOWER(c) \
4202 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 || ('j' <= (c) && (c) <= 'r') \
4204 || ('s' <= (c) && (c) <= 'z'))
4205# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4206#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004207
Martin v. Löwis11437992002-04-12 09:54:03 +00004208#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4209int
4210main ()
4211{
4212 int i;
4213 for (i = 0; i < 256; i++)
4214 if (XOR (islower (i), ISLOWER (i))
4215 || toupper (i) != TOUPPER (i))
4216 exit(2);
4217 exit (0);
4218}
4219_ACEOF
4220rm -f conftest$ac_exeext
4221if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4222 (eval $ac_link) 2>&5
4223 ac_status=$?
4224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4225 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4227 (eval $ac_try) 2>&5
4228 ac_status=$?
4229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4230 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231 :
4232else
Martin v. Löwis11437992002-04-12 09:54:03 +00004233 echo "$as_me: program exited with status $ac_status" >&5
4234echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004235sed 's/^/| /' conftest.$ac_ext >&5
4236
Martin v. Löwis11437992002-04-12 09:54:03 +00004237( exit $ac_status )
4238ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004239fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004240rm -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 +00004241fi
4242fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004243fi
4244echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4245echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004246if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004247
4248cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004249#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004250_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004251
4252fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004253
Skip Montanarob9820a32004-01-17 00:16:12 +00004254# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4265 inttypes.h stdint.h unistd.h
4266do
4267as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4268echo "$as_me:$LINENO: checking for $ac_header" >&5
4269echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4270if eval "test \"\${$as_ac_Header+set}\" = set"; then
4271 echo $ECHO_N "(cached) $ECHO_C" >&6
4272else
4273 cat >conftest.$ac_ext <<_ACEOF
4274#line $LINENO "configure"
4275/* confdefs.h. */
4276_ACEOF
4277cat confdefs.h >>conftest.$ac_ext
4278cat >>conftest.$ac_ext <<_ACEOF
4279/* end confdefs.h. */
4280$ac_includes_default
4281
4282#include <$ac_header>
4283_ACEOF
4284rm -f conftest.$ac_objext
4285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4286 (eval $ac_compile) 2>&5
4287 ac_status=$?
4288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4289 (exit $ac_status); } &&
4290 { ac_try='test -s conftest.$ac_objext'
4291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4292 (eval $ac_try) 2>&5
4293 ac_status=$?
4294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4295 (exit $ac_status); }; }; then
4296 eval "$as_ac_Header=yes"
4297else
4298 echo "$as_me: failed program was:" >&5
4299sed 's/^/| /' conftest.$ac_ext >&5
4300
4301eval "$as_ac_Header=no"
4302fi
4303rm -f conftest.$ac_objext conftest.$ac_ext
4304fi
4305echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4306echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4307if test `eval echo '${'$as_ac_Header'}'` = yes; then
4308 cat >>confdefs.h <<_ACEOF
4309#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4310_ACEOF
4311
4312fi
4313
4314done
4315
4316
Martin v. Löwis11437992002-04-12 09:54:03 +00004317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
Skip Montanaro7befb992004-02-10 16:50:21 +00004353for ac_header in dlfcn.h fcntl.h grp.h langinfo.h \
4354libintl.h ncurses.h poll.h pthread.h \
4355stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004356unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004357sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004358sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00004359sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004360sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4361bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004362do
Martin v. Löwis11437992002-04-12 09:54:03 +00004363as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4364if eval "test \"\${$as_ac_Header+set}\" = set"; then
4365 echo "$as_me:$LINENO: checking for $ac_header" >&5
4366echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4367if eval "test \"\${$as_ac_Header+set}\" = set"; then
4368 echo $ECHO_N "(cached) $ECHO_C" >&6
4369fi
4370echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4371echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004372else
Martin v. Löwis11437992002-04-12 09:54:03 +00004373 # Is the header compilable?
4374echo "$as_me:$LINENO: checking $ac_header usability" >&5
4375echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4376cat >conftest.$ac_ext <<_ACEOF
4377#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004378/* confdefs.h. */
4379_ACEOF
4380cat confdefs.h >>conftest.$ac_ext
4381cat >>conftest.$ac_ext <<_ACEOF
4382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004383$ac_includes_default
4384#include <$ac_header>
4385_ACEOF
4386rm -f conftest.$ac_objext
4387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4388 (eval $ac_compile) 2>&5
4389 ac_status=$?
4390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4391 (exit $ac_status); } &&
4392 { ac_try='test -s conftest.$ac_objext'
4393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4394 (eval $ac_try) 2>&5
4395 ac_status=$?
4396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4397 (exit $ac_status); }; }; then
4398 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004399else
Martin v. Löwis11437992002-04-12 09:54:03 +00004400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004401sed 's/^/| /' conftest.$ac_ext >&5
4402
Martin v. Löwis11437992002-04-12 09:54:03 +00004403ac_header_compiler=no
4404fi
4405rm -f conftest.$ac_objext conftest.$ac_ext
4406echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4407echo "${ECHO_T}$ac_header_compiler" >&6
4408
4409# Is the header present?
4410echo "$as_me:$LINENO: checking $ac_header presence" >&5
4411echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4412cat >conftest.$ac_ext <<_ACEOF
4413#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004414/* confdefs.h. */
4415_ACEOF
4416cat confdefs.h >>conftest.$ac_ext
4417cat >>conftest.$ac_ext <<_ACEOF
4418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004419#include <$ac_header>
4420_ACEOF
4421if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4422 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4423 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004424 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004425 rm -f conftest.er1
4426 cat conftest.err >&5
4427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4428 (exit $ac_status); } >/dev/null; then
4429 if test -s conftest.err; then
4430 ac_cpp_err=$ac_c_preproc_warn_flag
4431 else
4432 ac_cpp_err=
4433 fi
4434else
4435 ac_cpp_err=yes
4436fi
4437if test -z "$ac_cpp_err"; then
4438 ac_header_preproc=yes
4439else
4440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004441sed 's/^/| /' conftest.$ac_ext >&5
4442
Martin v. Löwis11437992002-04-12 09:54:03 +00004443 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004444fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004445rm -f conftest.err conftest.$ac_ext
4446echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4447echo "${ECHO_T}$ac_header_preproc" >&6
4448
4449# So? What about this header?
4450case $ac_header_compiler:$ac_header_preproc in
4451 yes:no )
4452 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4453echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4454 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004455echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4456 (
4457 cat <<\_ASBOX
4458## ------------------------------------ ##
4459## Report this to bug-autoconf@gnu.org. ##
4460## ------------------------------------ ##
4461_ASBOX
4462 ) |
4463 sed "s/^/$as_me: WARNING: /" >&2
4464 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004465 no:yes )
4466 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4467echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4468 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4469echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4470 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004471echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4472 (
4473 cat <<\_ASBOX
4474## ------------------------------------ ##
4475## Report this to bug-autoconf@gnu.org. ##
4476## ------------------------------------ ##
4477_ASBOX
4478 ) |
4479 sed "s/^/$as_me: WARNING: /" >&2
4480 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004481esac
4482echo "$as_me:$LINENO: checking for $ac_header" >&5
4483echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4484if eval "test \"\${$as_ac_Header+set}\" = set"; then
4485 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004486else
Martin v. Löwis11437992002-04-12 09:54:03 +00004487 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004488fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004489echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4490echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4491
4492fi
4493if test `eval echo '${'$as_ac_Header'}'` = yes; then
4494 cat >>confdefs.h <<_ACEOF
4495#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4496_ACEOF
4497
4498fi
4499
Guido van Rossum627b2d71993-12-24 10:39:16 +00004500done
4501
Martin v. Löwis11437992002-04-12 09:54:03 +00004502
4503
4504
4505
4506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004507ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004508for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4509 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4510echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4511echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4512if eval "test \"\${$as_ac_Header+set}\" = set"; then
4513 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004514else
Martin v. Löwis11437992002-04-12 09:54:03 +00004515 cat >conftest.$ac_ext <<_ACEOF
4516#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004517/* confdefs.h. */
4518_ACEOF
4519cat confdefs.h >>conftest.$ac_ext
4520cat >>conftest.$ac_ext <<_ACEOF
4521/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004522#include <sys/types.h>
4523#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004524
Martin v. Löwis11437992002-04-12 09:54:03 +00004525int
4526main ()
4527{
4528if ((DIR *) 0)
4529return 0;
4530 ;
4531 return 0;
4532}
4533_ACEOF
4534rm -f conftest.$ac_objext
4535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4536 (eval $ac_compile) 2>&5
4537 ac_status=$?
4538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4539 (exit $ac_status); } &&
4540 { ac_try='test -s conftest.$ac_objext'
4541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4542 (eval $ac_try) 2>&5
4543 ac_status=$?
4544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4545 (exit $ac_status); }; }; then
4546 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004547else
Martin v. Löwis11437992002-04-12 09:54:03 +00004548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004549sed 's/^/| /' conftest.$ac_ext >&5
4550
Martin v. Löwis11437992002-04-12 09:54:03 +00004551eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004552fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004553rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004554fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004555echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4556echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4557if test `eval echo '${'$as_ac_Header'}'` = yes; then
4558 cat >>confdefs.h <<_ACEOF
4559#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4560_ACEOF
4561
4562ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004563fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004564
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004565done
4566# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4567if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004568 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4569echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4570if test "${ac_cv_search_opendir+set}" = set; then
4571 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004572else
Martin v. Löwis11437992002-04-12 09:54:03 +00004573 ac_func_search_save_LIBS=$LIBS
4574ac_cv_search_opendir=no
4575cat >conftest.$ac_ext <<_ACEOF
4576#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004577/* confdefs.h. */
4578_ACEOF
4579cat confdefs.h >>conftest.$ac_ext
4580cat >>conftest.$ac_ext <<_ACEOF
4581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004582
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004583/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004584#ifdef __cplusplus
4585extern "C"
4586#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004587/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004588 builtin and then its argument prototype would still apply. */
4589char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004590int
4591main ()
4592{
4593opendir ();
4594 ;
4595 return 0;
4596}
4597_ACEOF
4598rm -f conftest.$ac_objext conftest$ac_exeext
4599if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4600 (eval $ac_link) 2>&5
4601 ac_status=$?
4602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4603 (exit $ac_status); } &&
4604 { ac_try='test -s conftest$ac_exeext'
4605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4606 (eval $ac_try) 2>&5
4607 ac_status=$?
4608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4609 (exit $ac_status); }; }; then
4610 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004611else
Martin v. Löwis11437992002-04-12 09:54:03 +00004612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004613sed 's/^/| /' conftest.$ac_ext >&5
4614
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004615fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004616rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4617if test "$ac_cv_search_opendir" = no; then
4618 for ac_lib in dir; do
4619 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4620 cat >conftest.$ac_ext <<_ACEOF
4621#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004622/* confdefs.h. */
4623_ACEOF
4624cat confdefs.h >>conftest.$ac_ext
4625cat >>conftest.$ac_ext <<_ACEOF
4626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004627
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004628/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004629#ifdef __cplusplus
4630extern "C"
4631#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004632/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004633 builtin and then its argument prototype would still apply. */
4634char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004635int
4636main ()
4637{
4638opendir ();
4639 ;
4640 return 0;
4641}
4642_ACEOF
4643rm -f conftest.$ac_objext conftest$ac_exeext
4644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4645 (eval $ac_link) 2>&5
4646 ac_status=$?
4647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4648 (exit $ac_status); } &&
4649 { ac_try='test -s conftest$ac_exeext'
4650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4651 (eval $ac_try) 2>&5
4652 ac_status=$?
4653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4654 (exit $ac_status); }; }; then
4655 ac_cv_search_opendir="-l$ac_lib"
4656break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004657else
Martin v. Löwis11437992002-04-12 09:54:03 +00004658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004659sed 's/^/| /' conftest.$ac_ext >&5
4660
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004661fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004662rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4663 done
4664fi
4665LIBS=$ac_func_search_save_LIBS
4666fi
4667echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4668echo "${ECHO_T}$ac_cv_search_opendir" >&6
4669if test "$ac_cv_search_opendir" != no; then
4670 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004671
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004672fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004673
Michael W. Hudson54241132001-12-07 15:38:26 +00004674else
Martin v. Löwis11437992002-04-12 09:54:03 +00004675 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4676echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4677if test "${ac_cv_search_opendir+set}" = set; then
4678 echo $ECHO_N "(cached) $ECHO_C" >&6
4679else
4680 ac_func_search_save_LIBS=$LIBS
4681ac_cv_search_opendir=no
4682cat >conftest.$ac_ext <<_ACEOF
4683#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004684/* confdefs.h. */
4685_ACEOF
4686cat confdefs.h >>conftest.$ac_ext
4687cat >>conftest.$ac_ext <<_ACEOF
4688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004689
4690/* Override any gcc2 internal prototype to avoid an error. */
4691#ifdef __cplusplus
4692extern "C"
4693#endif
4694/* We use char because int might match the return type of a gcc2
4695 builtin and then its argument prototype would still apply. */
4696char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004697int
4698main ()
4699{
4700opendir ();
4701 ;
4702 return 0;
4703}
4704_ACEOF
4705rm -f conftest.$ac_objext conftest$ac_exeext
4706if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4707 (eval $ac_link) 2>&5
4708 ac_status=$?
4709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4710 (exit $ac_status); } &&
4711 { ac_try='test -s conftest$ac_exeext'
4712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4713 (eval $ac_try) 2>&5
4714 ac_status=$?
4715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4716 (exit $ac_status); }; }; then
4717 ac_cv_search_opendir="none required"
4718else
4719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004720sed 's/^/| /' conftest.$ac_ext >&5
4721
Martin v. Löwis11437992002-04-12 09:54:03 +00004722fi
4723rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4724if test "$ac_cv_search_opendir" = no; then
4725 for ac_lib in x; do
4726 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4727 cat >conftest.$ac_ext <<_ACEOF
4728#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004729/* confdefs.h. */
4730_ACEOF
4731cat confdefs.h >>conftest.$ac_ext
4732cat >>conftest.$ac_ext <<_ACEOF
4733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004734
4735/* Override any gcc2 internal prototype to avoid an error. */
4736#ifdef __cplusplus
4737extern "C"
4738#endif
4739/* We use char because int might match the return type of a gcc2
4740 builtin and then its argument prototype would still apply. */
4741char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004742int
4743main ()
4744{
4745opendir ();
4746 ;
4747 return 0;
4748}
4749_ACEOF
4750rm -f conftest.$ac_objext conftest$ac_exeext
4751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4752 (eval $ac_link) 2>&5
4753 ac_status=$?
4754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4755 (exit $ac_status); } &&
4756 { ac_try='test -s conftest$ac_exeext'
4757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4758 (eval $ac_try) 2>&5
4759 ac_status=$?
4760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4761 (exit $ac_status); }; }; then
4762 ac_cv_search_opendir="-l$ac_lib"
4763break
4764else
4765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004766sed 's/^/| /' conftest.$ac_ext >&5
4767
Martin v. Löwis11437992002-04-12 09:54:03 +00004768fi
4769rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4770 done
4771fi
4772LIBS=$ac_func_search_save_LIBS
4773fi
4774echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4775echo "${ECHO_T}$ac_cv_search_opendir" >&6
4776if test "$ac_cv_search_opendir" != no; then
4777 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4778
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004779fi
4780
4781fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004782
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004783echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4784echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4785if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4786 echo $ECHO_N "(cached) $ECHO_C" >&6
4787else
4788 cat >conftest.$ac_ext <<_ACEOF
4789#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004790/* confdefs.h. */
4791_ACEOF
4792cat confdefs.h >>conftest.$ac_ext
4793cat >>conftest.$ac_ext <<_ACEOF
4794/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004795#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004796int
4797main ()
4798{
4799return makedev(0, 0);
4800 ;
4801 return 0;
4802}
4803_ACEOF
4804rm -f conftest.$ac_objext conftest$ac_exeext
4805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4806 (eval $ac_link) 2>&5
4807 ac_status=$?
4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); } &&
4810 { ac_try='test -s conftest$ac_exeext'
4811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4812 (eval $ac_try) 2>&5
4813 ac_status=$?
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); }; }; then
4816 ac_cv_header_sys_types_h_makedev=yes
4817else
4818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004819sed 's/^/| /' conftest.$ac_ext >&5
4820
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004821ac_cv_header_sys_types_h_makedev=no
4822fi
4823rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4824
4825fi
4826echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4827echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4828
4829if test $ac_cv_header_sys_types_h_makedev = no; then
4830if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4831 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4832echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4833if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4834 echo $ECHO_N "(cached) $ECHO_C" >&6
4835fi
4836echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4837echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4838else
4839 # Is the header compilable?
4840echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4841echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4842cat >conftest.$ac_ext <<_ACEOF
4843#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004844/* confdefs.h. */
4845_ACEOF
4846cat confdefs.h >>conftest.$ac_ext
4847cat >>conftest.$ac_ext <<_ACEOF
4848/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004849$ac_includes_default
4850#include <sys/mkdev.h>
4851_ACEOF
4852rm -f conftest.$ac_objext
4853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4854 (eval $ac_compile) 2>&5
4855 ac_status=$?
4856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4857 (exit $ac_status); } &&
4858 { ac_try='test -s conftest.$ac_objext'
4859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4860 (eval $ac_try) 2>&5
4861 ac_status=$?
4862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4863 (exit $ac_status); }; }; then
4864 ac_header_compiler=yes
4865else
4866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004867sed 's/^/| /' conftest.$ac_ext >&5
4868
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004869ac_header_compiler=no
4870fi
4871rm -f conftest.$ac_objext conftest.$ac_ext
4872echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4873echo "${ECHO_T}$ac_header_compiler" >&6
4874
4875# Is the header present?
4876echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4877echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4878cat >conftest.$ac_ext <<_ACEOF
4879#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004880/* confdefs.h. */
4881_ACEOF
4882cat confdefs.h >>conftest.$ac_ext
4883cat >>conftest.$ac_ext <<_ACEOF
4884/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004885#include <sys/mkdev.h>
4886_ACEOF
4887if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4888 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4889 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004890 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004891 rm -f conftest.er1
4892 cat conftest.err >&5
4893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4894 (exit $ac_status); } >/dev/null; then
4895 if test -s conftest.err; then
4896 ac_cpp_err=$ac_c_preproc_warn_flag
4897 else
4898 ac_cpp_err=
4899 fi
4900else
4901 ac_cpp_err=yes
4902fi
4903if test -z "$ac_cpp_err"; then
4904 ac_header_preproc=yes
4905else
4906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004907sed 's/^/| /' conftest.$ac_ext >&5
4908
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004909 ac_header_preproc=no
4910fi
4911rm -f conftest.err conftest.$ac_ext
4912echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4913echo "${ECHO_T}$ac_header_preproc" >&6
4914
4915# So? What about this header?
4916case $ac_header_compiler:$ac_header_preproc in
4917 yes:no )
4918 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4919echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4920 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004921echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4922 (
4923 cat <<\_ASBOX
4924## ------------------------------------ ##
4925## Report this to bug-autoconf@gnu.org. ##
4926## ------------------------------------ ##
4927_ASBOX
4928 ) |
4929 sed "s/^/$as_me: WARNING: /" >&2
4930 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004931 no:yes )
4932 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4933echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4934 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4935echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4936 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004937echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4938 (
4939 cat <<\_ASBOX
4940## ------------------------------------ ##
4941## Report this to bug-autoconf@gnu.org. ##
4942## ------------------------------------ ##
4943_ASBOX
4944 ) |
4945 sed "s/^/$as_me: WARNING: /" >&2
4946 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004947esac
4948echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4949echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4950if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4951 echo $ECHO_N "(cached) $ECHO_C" >&6
4952else
4953 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4954fi
4955echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4956echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4957
4958fi
4959if test $ac_cv_header_sys_mkdev_h = yes; then
4960
4961cat >>confdefs.h <<\_ACEOF
4962#define MAJOR_IN_MKDEV 1
4963_ACEOF
4964
4965fi
4966
4967
4968
4969 if test $ac_cv_header_sys_mkdev_h = no; then
4970 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4971 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4972echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4973if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4974 echo $ECHO_N "(cached) $ECHO_C" >&6
4975fi
4976echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4977echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4978else
4979 # Is the header compilable?
4980echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4981echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4982cat >conftest.$ac_ext <<_ACEOF
4983#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004984/* confdefs.h. */
4985_ACEOF
4986cat confdefs.h >>conftest.$ac_ext
4987cat >>conftest.$ac_ext <<_ACEOF
4988/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004989$ac_includes_default
4990#include <sys/sysmacros.h>
4991_ACEOF
4992rm -f conftest.$ac_objext
4993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4994 (eval $ac_compile) 2>&5
4995 ac_status=$?
4996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997 (exit $ac_status); } &&
4998 { ac_try='test -s conftest.$ac_objext'
4999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5000 (eval $ac_try) 2>&5
5001 ac_status=$?
5002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5003 (exit $ac_status); }; }; then
5004 ac_header_compiler=yes
5005else
5006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005007sed 's/^/| /' conftest.$ac_ext >&5
5008
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005009ac_header_compiler=no
5010fi
5011rm -f conftest.$ac_objext conftest.$ac_ext
5012echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5013echo "${ECHO_T}$ac_header_compiler" >&6
5014
5015# Is the header present?
5016echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5017echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5018cat >conftest.$ac_ext <<_ACEOF
5019#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005020/* confdefs.h. */
5021_ACEOF
5022cat confdefs.h >>conftest.$ac_ext
5023cat >>conftest.$ac_ext <<_ACEOF
5024/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005025#include <sys/sysmacros.h>
5026_ACEOF
5027if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5028 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5029 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005030 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005031 rm -f conftest.er1
5032 cat conftest.err >&5
5033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5034 (exit $ac_status); } >/dev/null; then
5035 if test -s conftest.err; then
5036 ac_cpp_err=$ac_c_preproc_warn_flag
5037 else
5038 ac_cpp_err=
5039 fi
5040else
5041 ac_cpp_err=yes
5042fi
5043if test -z "$ac_cpp_err"; then
5044 ac_header_preproc=yes
5045else
5046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005047sed 's/^/| /' conftest.$ac_ext >&5
5048
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005049 ac_header_preproc=no
5050fi
5051rm -f conftest.err conftest.$ac_ext
5052echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5053echo "${ECHO_T}$ac_header_preproc" >&6
5054
5055# So? What about this header?
5056case $ac_header_compiler:$ac_header_preproc in
5057 yes:no )
5058 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5059echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5060 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005061echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5062 (
5063 cat <<\_ASBOX
5064## ------------------------------------ ##
5065## Report this to bug-autoconf@gnu.org. ##
5066## ------------------------------------ ##
5067_ASBOX
5068 ) |
5069 sed "s/^/$as_me: WARNING: /" >&2
5070 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005071 no:yes )
5072 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5073echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5074 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5075echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5076 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005077echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5078 (
5079 cat <<\_ASBOX
5080## ------------------------------------ ##
5081## Report this to bug-autoconf@gnu.org. ##
5082## ------------------------------------ ##
5083_ASBOX
5084 ) |
5085 sed "s/^/$as_me: WARNING: /" >&2
5086 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005087esac
5088echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5089echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5090if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5091 echo $ECHO_N "(cached) $ECHO_C" >&6
5092else
5093 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5094fi
5095echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5096echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5097
5098fi
5099if test $ac_cv_header_sys_sysmacros_h = yes; then
5100
5101cat >>confdefs.h <<\_ACEOF
5102#define MAJOR_IN_SYSMACROS 1
5103_ACEOF
5104
5105fi
5106
5107
5108 fi
5109fi
5110
Michael W. Hudson54241132001-12-07 15:38:26 +00005111
Guido van Rossum627b2d71993-12-24 10:39:16 +00005112# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005113was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005114echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5115echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5116cat >conftest.$ac_ext <<_ACEOF
5117#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005118/* confdefs.h. */
5119_ACEOF
5120cat confdefs.h >>conftest.$ac_ext
5121cat >>conftest.$ac_ext <<_ACEOF
5122/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005123#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005124
5125_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005127 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005128 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005129else
Martin v. Löwis11437992002-04-12 09:54:03 +00005130
5131
5132cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005133#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005134_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005135
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005136
Guido van Rossum627b2d71993-12-24 10:39:16 +00005137fi
5138rm -f conftest*
5139
Martin v. Löwis11437992002-04-12 09:54:03 +00005140echo "$as_me:$LINENO: result: $was_it_defined" >&5
5141echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005142
Neal Norwitz11690112002-07-30 01:08:28 +00005143# Check whether using makedev requires defining _OSF_SOURCE
5144echo "$as_me:$LINENO: checking for makedev" >&5
5145echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5146cat >conftest.$ac_ext <<_ACEOF
5147#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005148/* confdefs.h. */
5149_ACEOF
5150cat confdefs.h >>conftest.$ac_ext
5151cat >>conftest.$ac_ext <<_ACEOF
5152/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005153#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005154int
5155main ()
5156{
5157 makedev(0, 0)
5158 ;
5159 return 0;
5160}
5161_ACEOF
5162rm -f conftest.$ac_objext conftest$ac_exeext
5163if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5164 (eval $ac_link) 2>&5
5165 ac_status=$?
5166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5167 (exit $ac_status); } &&
5168 { ac_try='test -s conftest$ac_exeext'
5169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5170 (eval $ac_try) 2>&5
5171 ac_status=$?
5172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5173 (exit $ac_status); }; }; then
5174 ac_cv_has_makedev=yes
5175else
5176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005177sed 's/^/| /' conftest.$ac_ext >&5
5178
Neal Norwitz11690112002-07-30 01:08:28 +00005179ac_cv_has_makedev=no
5180fi
5181rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5182if test "$ac_cv_has_makedev" = "no"; then
5183 # we didn't link, try if _OSF_SOURCE will allow us to link
5184 cat >conftest.$ac_ext <<_ACEOF
5185#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005186/* confdefs.h. */
5187_ACEOF
5188cat confdefs.h >>conftest.$ac_ext
5189cat >>conftest.$ac_ext <<_ACEOF
5190/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005191
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005192#define _OSF_SOURCE 1
5193#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005194
Neal Norwitz11690112002-07-30 01:08:28 +00005195int
5196main ()
5197{
5198 makedev(0, 0)
5199 ;
5200 return 0;
5201}
5202_ACEOF
5203rm -f conftest.$ac_objext conftest$ac_exeext
5204if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5205 (eval $ac_link) 2>&5
5206 ac_status=$?
5207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5208 (exit $ac_status); } &&
5209 { ac_try='test -s conftest$ac_exeext'
5210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5211 (eval $ac_try) 2>&5
5212 ac_status=$?
5213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5214 (exit $ac_status); }; }; then
5215 ac_cv_has_makedev=yes
5216else
5217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005218sed 's/^/| /' conftest.$ac_ext >&5
5219
Neal Norwitz11690112002-07-30 01:08:28 +00005220ac_cv_has_makedev=no
5221fi
5222rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5223 if test "$ac_cv_has_makedev" = "yes"; then
5224
5225cat >>confdefs.h <<\_ACEOF
5226#define _OSF_SOURCE 1
5227_ACEOF
5228
5229 fi
5230fi
5231echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5232echo "${ECHO_T}$ac_cv_has_makedev" >&6
5233if test "$ac_cv_has_makedev" = "yes"; then
5234
5235cat >>confdefs.h <<\_ACEOF
5236#define HAVE_MAKEDEV 1
5237_ACEOF
5238
5239fi
5240
Martin v. Löwis399a6892002-10-04 10:22:02 +00005241# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5242# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5243# defined, but the compiler does not support pragma redefine_extname,
5244# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5245# structures (such as rlimit64) without declaring them. As a
5246# work-around, disable LFS on such configurations
5247
5248use_lfs=yes
5249echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5250echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5251cat >conftest.$ac_ext <<_ACEOF
5252#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005253/* confdefs.h. */
5254_ACEOF
5255cat confdefs.h >>conftest.$ac_ext
5256cat >>conftest.$ac_ext <<_ACEOF
5257/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005258
5259#define _LARGEFILE_SOURCE 1
5260#define _FILE_OFFSET_BITS 64
5261#include <sys/resource.h>
5262
Martin v. Löwis399a6892002-10-04 10:22:02 +00005263int
5264main ()
5265{
5266struct rlimit foo;
5267 ;
5268 return 0;
5269}
5270_ACEOF
5271rm -f conftest.$ac_objext
5272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5273 (eval $ac_compile) 2>&5
5274 ac_status=$?
5275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276 (exit $ac_status); } &&
5277 { ac_try='test -s conftest.$ac_objext'
5278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5279 (eval $ac_try) 2>&5
5280 ac_status=$?
5281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5282 (exit $ac_status); }; }; then
5283 sol_lfs_bug=no
5284else
5285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005286sed 's/^/| /' conftest.$ac_ext >&5
5287
Martin v. Löwis399a6892002-10-04 10:22:02 +00005288sol_lfs_bug=yes
5289fi
5290rm -f conftest.$ac_objext conftest.$ac_ext
5291echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5292echo "${ECHO_T}$sol_lfs_bug" >&6
5293if test "$sol_lfs_bug" = "yes"; then
5294 use_lfs=no
5295fi
5296
5297if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005298# Two defines needed to enable largefile support on various platforms
5299# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005300
Martin v. Löwis11437992002-04-12 09:54:03 +00005301cat >>confdefs.h <<\_ACEOF
5302#define _LARGEFILE_SOURCE 1
5303_ACEOF
5304
5305
5306cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005307#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005308_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005309
Martin v. Löwis399a6892002-10-04 10:22:02 +00005310fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005311
Guido van Rossum84e7b241996-08-19 21:59:00 +00005312# Add some code to confdefs.h so that the test for off_t works on SCO
5313cat >> confdefs.h <<\EOF
5314#if defined(SCO_DS)
5315#undef _OFF_T
5316#endif
5317EOF
5318
Guido van Rossumef2255b2000-03-10 22:30:29 +00005319# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005320echo "$as_me:$LINENO: checking for mode_t" >&5
5321echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5322if test "${ac_cv_type_mode_t+set}" = set; then
5323 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005324else
Martin v. Löwis11437992002-04-12 09:54:03 +00005325 cat >conftest.$ac_ext <<_ACEOF
5326#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005327/* confdefs.h. */
5328_ACEOF
5329cat confdefs.h >>conftest.$ac_ext
5330cat >>conftest.$ac_ext <<_ACEOF
5331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005332$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005333int
5334main ()
5335{
5336if ((mode_t *) 0)
5337 return 0;
5338if (sizeof (mode_t))
5339 return 0;
5340 ;
5341 return 0;
5342}
5343_ACEOF
5344rm -f conftest.$ac_objext
5345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5346 (eval $ac_compile) 2>&5
5347 ac_status=$?
5348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5349 (exit $ac_status); } &&
5350 { ac_try='test -s conftest.$ac_objext'
5351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5352 (eval $ac_try) 2>&5
5353 ac_status=$?
5354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5355 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005356 ac_cv_type_mode_t=yes
5357else
Martin v. Löwis11437992002-04-12 09:54:03 +00005358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005359sed 's/^/| /' conftest.$ac_ext >&5
5360
Martin v. Löwis11437992002-04-12 09:54:03 +00005361ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005363rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005365echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5366echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5367if test $ac_cv_type_mode_t = yes; then
5368 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005369else
Martin v. Löwis11437992002-04-12 09:54:03 +00005370
5371cat >>confdefs.h <<_ACEOF
5372#define mode_t int
5373_ACEOF
5374
5375fi
5376
5377echo "$as_me:$LINENO: checking for off_t" >&5
5378echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5379if test "${ac_cv_type_off_t+set}" = set; then
5380 echo $ECHO_N "(cached) $ECHO_C" >&6
5381else
5382 cat >conftest.$ac_ext <<_ACEOF
5383#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005384/* confdefs.h. */
5385_ACEOF
5386cat confdefs.h >>conftest.$ac_ext
5387cat >>conftest.$ac_ext <<_ACEOF
5388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005389$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005390int
5391main ()
5392{
5393if ((off_t *) 0)
5394 return 0;
5395if (sizeof (off_t))
5396 return 0;
5397 ;
5398 return 0;
5399}
5400_ACEOF
5401rm -f conftest.$ac_objext
5402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5403 (eval $ac_compile) 2>&5
5404 ac_status=$?
5405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5406 (exit $ac_status); } &&
5407 { ac_try='test -s conftest.$ac_objext'
5408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5409 (eval $ac_try) 2>&5
5410 ac_status=$?
5411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005413 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005414else
Martin v. Löwis11437992002-04-12 09:54:03 +00005415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005416sed 's/^/| /' conftest.$ac_ext >&5
5417
Martin v. Löwis11437992002-04-12 09:54:03 +00005418ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005419fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005420rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005421fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005422echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5423echo "${ECHO_T}$ac_cv_type_off_t" >&6
5424if test $ac_cv_type_off_t = yes; then
5425 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005426else
Martin v. Löwis11437992002-04-12 09:54:03 +00005427
5428cat >>confdefs.h <<_ACEOF
5429#define off_t long
5430_ACEOF
5431
5432fi
5433
5434echo "$as_me:$LINENO: checking for pid_t" >&5
5435echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5436if test "${ac_cv_type_pid_t+set}" = set; then
5437 echo $ECHO_N "(cached) $ECHO_C" >&6
5438else
5439 cat >conftest.$ac_ext <<_ACEOF
5440#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005441/* confdefs.h. */
5442_ACEOF
5443cat confdefs.h >>conftest.$ac_ext
5444cat >>conftest.$ac_ext <<_ACEOF
5445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005446$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005447int
5448main ()
5449{
5450if ((pid_t *) 0)
5451 return 0;
5452if (sizeof (pid_t))
5453 return 0;
5454 ;
5455 return 0;
5456}
5457_ACEOF
5458rm -f conftest.$ac_objext
5459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5460 (eval $ac_compile) 2>&5
5461 ac_status=$?
5462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5463 (exit $ac_status); } &&
5464 { ac_try='test -s conftest.$ac_objext'
5465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5466 (eval $ac_try) 2>&5
5467 ac_status=$?
5468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5469 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005470 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005471else
Martin v. Löwis11437992002-04-12 09:54:03 +00005472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005473sed 's/^/| /' conftest.$ac_ext >&5
5474
Martin v. Löwis11437992002-04-12 09:54:03 +00005475ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005476fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005477rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005479echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5480echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5481if test $ac_cv_type_pid_t = yes; then
5482 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005483else
Martin v. Löwis11437992002-04-12 09:54:03 +00005484
5485cat >>confdefs.h <<_ACEOF
5486#define pid_t int
5487_ACEOF
5488
5489fi
5490
5491echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5492echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5493if test "${ac_cv_type_signal+set}" = set; then
5494 echo $ECHO_N "(cached) $ECHO_C" >&6
5495else
5496 cat >conftest.$ac_ext <<_ACEOF
5497#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005498/* confdefs.h. */
5499_ACEOF
5500cat confdefs.h >>conftest.$ac_ext
5501cat >>conftest.$ac_ext <<_ACEOF
5502/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005503#include <sys/types.h>
5504#include <signal.h>
5505#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005506# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005507#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005508#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005509extern "C" void (*signal (int, void (*)(int)))(int);
5510#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005511void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005512#endif
5513
Martin v. Löwis11437992002-04-12 09:54:03 +00005514int
5515main ()
5516{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005517int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005518 ;
5519 return 0;
5520}
5521_ACEOF
5522rm -f conftest.$ac_objext
5523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5524 (eval $ac_compile) 2>&5
5525 ac_status=$?
5526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5527 (exit $ac_status); } &&
5528 { ac_try='test -s conftest.$ac_objext'
5529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5530 (eval $ac_try) 2>&5
5531 ac_status=$?
5532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5533 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005534 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005535else
Martin v. Löwis11437992002-04-12 09:54:03 +00005536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005537sed 's/^/| /' conftest.$ac_ext >&5
5538
Martin v. Löwis11437992002-04-12 09:54:03 +00005539ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005541rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005542fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005543echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5544echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005545
Martin v. Löwis11437992002-04-12 09:54:03 +00005546cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005547#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005548_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005549
Michael W. Hudson54241132001-12-07 15:38:26 +00005550
Martin v. Löwis11437992002-04-12 09:54:03 +00005551echo "$as_me:$LINENO: checking for size_t" >&5
5552echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5553if test "${ac_cv_type_size_t+set}" = set; then
5554 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005555else
Martin v. Löwis11437992002-04-12 09:54:03 +00005556 cat >conftest.$ac_ext <<_ACEOF
5557#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005558/* confdefs.h. */
5559_ACEOF
5560cat confdefs.h >>conftest.$ac_ext
5561cat >>conftest.$ac_ext <<_ACEOF
5562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005563$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005564int
5565main ()
5566{
5567if ((size_t *) 0)
5568 return 0;
5569if (sizeof (size_t))
5570 return 0;
5571 ;
5572 return 0;
5573}
5574_ACEOF
5575rm -f conftest.$ac_objext
5576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5577 (eval $ac_compile) 2>&5
5578 ac_status=$?
5579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5580 (exit $ac_status); } &&
5581 { ac_try='test -s conftest.$ac_objext'
5582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5583 (eval $ac_try) 2>&5
5584 ac_status=$?
5585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5586 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005587 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005588else
Martin v. Löwis11437992002-04-12 09:54:03 +00005589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005590sed 's/^/| /' conftest.$ac_ext >&5
5591
Martin v. Löwis11437992002-04-12 09:54:03 +00005592ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005593fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005594rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005595fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005596echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5597echo "${ECHO_T}$ac_cv_type_size_t" >&6
5598if test $ac_cv_type_size_t = yes; then
5599 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005600else
Martin v. Löwis11437992002-04-12 09:54:03 +00005601
5602cat >>confdefs.h <<_ACEOF
5603#define size_t unsigned
5604_ACEOF
5605
5606fi
5607
5608echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5609echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5610if test "${ac_cv_type_uid_t+set}" = set; then
5611 echo $ECHO_N "(cached) $ECHO_C" >&6
5612else
5613 cat >conftest.$ac_ext <<_ACEOF
5614#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005615/* confdefs.h. */
5616_ACEOF
5617cat confdefs.h >>conftest.$ac_ext
5618cat >>conftest.$ac_ext <<_ACEOF
5619/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005620#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005621
5622_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005624 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005625 ac_cv_type_uid_t=yes
5626else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005627 ac_cv_type_uid_t=no
5628fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005629rm -f conftest*
5630
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005631fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005632echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5633echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005634if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005635
Martin v. Löwis11437992002-04-12 09:54:03 +00005636cat >>confdefs.h <<\_ACEOF
5637#define uid_t int
5638_ACEOF
5639
5640
5641cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005642#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005643_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005644
5645fi
5646
Jack Jansendd19cf82001-12-06 22:36:17 +00005647
Michael W. Hudson54241132001-12-07 15:38:26 +00005648# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005649# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005650echo "$as_me:$LINENO: checking for int" >&5
5651echo $ECHO_N "checking for int... $ECHO_C" >&6
5652if test "${ac_cv_type_int+set}" = set; then
5653 echo $ECHO_N "(cached) $ECHO_C" >&6
5654else
5655 cat >conftest.$ac_ext <<_ACEOF
5656#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005657/* confdefs.h. */
5658_ACEOF
5659cat confdefs.h >>conftest.$ac_ext
5660cat >>conftest.$ac_ext <<_ACEOF
5661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005662$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005663int
5664main ()
5665{
5666if ((int *) 0)
5667 return 0;
5668if (sizeof (int))
5669 return 0;
5670 ;
5671 return 0;
5672}
5673_ACEOF
5674rm -f conftest.$ac_objext
5675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5676 (eval $ac_compile) 2>&5
5677 ac_status=$?
5678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5679 (exit $ac_status); } &&
5680 { ac_try='test -s conftest.$ac_objext'
5681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5682 (eval $ac_try) 2>&5
5683 ac_status=$?
5684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5685 (exit $ac_status); }; }; then
5686 ac_cv_type_int=yes
5687else
5688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005689sed 's/^/| /' conftest.$ac_ext >&5
5690
Martin v. Löwis11437992002-04-12 09:54:03 +00005691ac_cv_type_int=no
5692fi
5693rm -f conftest.$ac_objext conftest.$ac_ext
5694fi
5695echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5696echo "${ECHO_T}$ac_cv_type_int" >&6
5697
5698echo "$as_me:$LINENO: checking size of int" >&5
5699echo $ECHO_N "checking size of int... $ECHO_C" >&6
5700if test "${ac_cv_sizeof_int+set}" = set; then
5701 echo $ECHO_N "(cached) $ECHO_C" >&6
5702else
5703 if test "$ac_cv_type_int" = yes; then
5704 # The cast to unsigned long works around a bug in the HP C Compiler
5705 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5706 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5707 # This bug is HP SR number 8606223364.
5708 if test "$cross_compiling" = yes; then
5709 # Depending upon the size, compute the lo and hi bounds.
5710cat >conftest.$ac_ext <<_ACEOF
5711#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005712/* confdefs.h. */
5713_ACEOF
5714cat confdefs.h >>conftest.$ac_ext
5715cat >>conftest.$ac_ext <<_ACEOF
5716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005717$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005718int
5719main ()
5720{
5721static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5722test_array [0] = 0
5723
5724 ;
5725 return 0;
5726}
5727_ACEOF
5728rm -f conftest.$ac_objext
5729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5730 (eval $ac_compile) 2>&5
5731 ac_status=$?
5732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5733 (exit $ac_status); } &&
5734 { ac_try='test -s conftest.$ac_objext'
5735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5736 (eval $ac_try) 2>&5
5737 ac_status=$?
5738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5739 (exit $ac_status); }; }; then
5740 ac_lo=0 ac_mid=0
5741 while :; do
5742 cat >conftest.$ac_ext <<_ACEOF
5743#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005744/* confdefs.h. */
5745_ACEOF
5746cat confdefs.h >>conftest.$ac_ext
5747cat >>conftest.$ac_ext <<_ACEOF
5748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005749$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005750int
5751main ()
5752{
5753static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5754test_array [0] = 0
5755
5756 ;
5757 return 0;
5758}
5759_ACEOF
5760rm -f conftest.$ac_objext
5761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5762 (eval $ac_compile) 2>&5
5763 ac_status=$?
5764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5765 (exit $ac_status); } &&
5766 { ac_try='test -s conftest.$ac_objext'
5767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5768 (eval $ac_try) 2>&5
5769 ac_status=$?
5770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5771 (exit $ac_status); }; }; then
5772 ac_hi=$ac_mid; break
5773else
5774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005775sed 's/^/| /' conftest.$ac_ext >&5
5776
Martin v. Löwis11437992002-04-12 09:54:03 +00005777ac_lo=`expr $ac_mid + 1`
5778 if test $ac_lo -le $ac_mid; then
5779 ac_lo= ac_hi=
5780 break
5781 fi
5782 ac_mid=`expr 2 '*' $ac_mid + 1`
5783fi
5784rm -f conftest.$ac_objext conftest.$ac_ext
5785 done
5786else
5787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005788sed 's/^/| /' conftest.$ac_ext >&5
5789
Martin v. Löwis11437992002-04-12 09:54:03 +00005790cat >conftest.$ac_ext <<_ACEOF
5791#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005792/* confdefs.h. */
5793_ACEOF
5794cat confdefs.h >>conftest.$ac_ext
5795cat >>conftest.$ac_ext <<_ACEOF
5796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005797$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005798int
5799main ()
5800{
5801static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5802test_array [0] = 0
5803
5804 ;
5805 return 0;
5806}
5807_ACEOF
5808rm -f conftest.$ac_objext
5809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5810 (eval $ac_compile) 2>&5
5811 ac_status=$?
5812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5813 (exit $ac_status); } &&
5814 { ac_try='test -s conftest.$ac_objext'
5815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5816 (eval $ac_try) 2>&5
5817 ac_status=$?
5818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5819 (exit $ac_status); }; }; then
5820 ac_hi=-1 ac_mid=-1
5821 while :; do
5822 cat >conftest.$ac_ext <<_ACEOF
5823#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005824/* confdefs.h. */
5825_ACEOF
5826cat confdefs.h >>conftest.$ac_ext
5827cat >>conftest.$ac_ext <<_ACEOF
5828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005829$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005830int
5831main ()
5832{
5833static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5834test_array [0] = 0
5835
5836 ;
5837 return 0;
5838}
5839_ACEOF
5840rm -f conftest.$ac_objext
5841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5842 (eval $ac_compile) 2>&5
5843 ac_status=$?
5844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5845 (exit $ac_status); } &&
5846 { ac_try='test -s conftest.$ac_objext'
5847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5848 (eval $ac_try) 2>&5
5849 ac_status=$?
5850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5851 (exit $ac_status); }; }; then
5852 ac_lo=$ac_mid; break
5853else
5854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005855sed 's/^/| /' conftest.$ac_ext >&5
5856
Martin v. Löwis11437992002-04-12 09:54:03 +00005857ac_hi=`expr '(' $ac_mid ')' - 1`
5858 if test $ac_mid -le $ac_hi; then
5859 ac_lo= ac_hi=
5860 break
5861 fi
5862 ac_mid=`expr 2 '*' $ac_mid`
5863fi
5864rm -f conftest.$ac_objext conftest.$ac_ext
5865 done
5866else
5867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005868sed 's/^/| /' conftest.$ac_ext >&5
5869
Martin v. Löwis11437992002-04-12 09:54:03 +00005870ac_lo= ac_hi=
5871fi
5872rm -f conftest.$ac_objext conftest.$ac_ext
5873fi
5874rm -f conftest.$ac_objext conftest.$ac_ext
5875# Binary search between lo and hi bounds.
5876while test "x$ac_lo" != "x$ac_hi"; do
5877 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5878 cat >conftest.$ac_ext <<_ACEOF
5879#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005880/* confdefs.h. */
5881_ACEOF
5882cat confdefs.h >>conftest.$ac_ext
5883cat >>conftest.$ac_ext <<_ACEOF
5884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005885$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005886int
5887main ()
5888{
5889static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5890test_array [0] = 0
5891
5892 ;
5893 return 0;
5894}
5895_ACEOF
5896rm -f conftest.$ac_objext
5897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5898 (eval $ac_compile) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); } &&
5902 { ac_try='test -s conftest.$ac_objext'
5903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5904 (eval $ac_try) 2>&5
5905 ac_status=$?
5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907 (exit $ac_status); }; }; then
5908 ac_hi=$ac_mid
5909else
5910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005911sed 's/^/| /' conftest.$ac_ext >&5
5912
Martin v. Löwis11437992002-04-12 09:54:03 +00005913ac_lo=`expr '(' $ac_mid ')' + 1`
5914fi
5915rm -f conftest.$ac_objext conftest.$ac_ext
5916done
5917case $ac_lo in
5918?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005919'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5920See \`config.log' for more details." >&5
5921echo "$as_me: error: cannot compute sizeof (int), 77
5922See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005923 { (exit 1); exit 1; }; } ;;
5924esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005925else
5926 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005927 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5928See \`config.log' for more details." >&5
5929echo "$as_me: error: cannot run test program while cross compiling
5930See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005931 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005932else
Martin v. Löwis11437992002-04-12 09:54:03 +00005933 cat >conftest.$ac_ext <<_ACEOF
5934#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005935/* confdefs.h. */
5936_ACEOF
5937cat confdefs.h >>conftest.$ac_ext
5938cat >>conftest.$ac_ext <<_ACEOF
5939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005940$ac_includes_default
5941long longval () { return (long) (sizeof (int)); }
5942unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005943#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005944#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005945int
5946main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005947{
Martin v. Löwis11437992002-04-12 09:54:03 +00005948
5949 FILE *f = fopen ("conftest.val", "w");
5950 if (! f)
5951 exit (1);
5952 if (((long) (sizeof (int))) < 0)
5953 {
5954 long i = longval ();
5955 if (i != ((long) (sizeof (int))))
5956 exit (1);
5957 fprintf (f, "%ld\n", i);
5958 }
5959 else
5960 {
5961 unsigned long i = ulongval ();
5962 if (i != ((long) (sizeof (int))))
5963 exit (1);
5964 fprintf (f, "%lu\n", i);
5965 }
5966 exit (ferror (f) || fclose (f) != 0);
5967
5968 ;
5969 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005970}
Martin v. Löwis11437992002-04-12 09:54:03 +00005971_ACEOF
5972rm -f conftest$ac_exeext
5973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5974 (eval $ac_link) 2>&5
5975 ac_status=$?
5976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5977 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5979 (eval $ac_try) 2>&5
5980 ac_status=$?
5981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5982 (exit $ac_status); }; }; then
5983 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005984else
Martin v. Löwis11437992002-04-12 09:54:03 +00005985 echo "$as_me: program exited with status $ac_status" >&5
5986echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005987sed 's/^/| /' conftest.$ac_ext >&5
5988
Martin v. Löwis11437992002-04-12 09:54:03 +00005989( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00005990{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5991See \`config.log' for more details." >&5
5992echo "$as_me: error: cannot compute sizeof (int), 77
5993See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005994 { (exit 1); exit 1; }; }
5995fi
Skip Montanaro6dead952003-09-25 14:50:04 +00005996rm -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 +00005997fi
5998fi
5999rm -f conftest.val
6000else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006001 ac_cv_sizeof_int=0
6002fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006003fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006004echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6005echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6006cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006007#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006008_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006009
6010
Martin v. Löwis11437992002-04-12 09:54:03 +00006011echo "$as_me:$LINENO: checking for long" >&5
6012echo $ECHO_N "checking for long... $ECHO_C" >&6
6013if test "${ac_cv_type_long+set}" = set; then
6014 echo $ECHO_N "(cached) $ECHO_C" >&6
6015else
6016 cat >conftest.$ac_ext <<_ACEOF
6017#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006018/* confdefs.h. */
6019_ACEOF
6020cat confdefs.h >>conftest.$ac_ext
6021cat >>conftest.$ac_ext <<_ACEOF
6022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006023$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006024int
6025main ()
6026{
6027if ((long *) 0)
6028 return 0;
6029if (sizeof (long))
6030 return 0;
6031 ;
6032 return 0;
6033}
6034_ACEOF
6035rm -f conftest.$ac_objext
6036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6037 (eval $ac_compile) 2>&5
6038 ac_status=$?
6039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6040 (exit $ac_status); } &&
6041 { ac_try='test -s conftest.$ac_objext'
6042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6043 (eval $ac_try) 2>&5
6044 ac_status=$?
6045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6046 (exit $ac_status); }; }; then
6047 ac_cv_type_long=yes
6048else
6049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006050sed 's/^/| /' conftest.$ac_ext >&5
6051
Martin v. Löwis11437992002-04-12 09:54:03 +00006052ac_cv_type_long=no
6053fi
6054rm -f conftest.$ac_objext conftest.$ac_ext
6055fi
6056echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6057echo "${ECHO_T}$ac_cv_type_long" >&6
6058
6059echo "$as_me:$LINENO: checking size of long" >&5
6060echo $ECHO_N "checking size of long... $ECHO_C" >&6
6061if test "${ac_cv_sizeof_long+set}" = set; then
6062 echo $ECHO_N "(cached) $ECHO_C" >&6
6063else
6064 if test "$ac_cv_type_long" = yes; then
6065 # The cast to unsigned long works around a bug in the HP C Compiler
6066 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6067 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6068 # This bug is HP SR number 8606223364.
6069 if test "$cross_compiling" = yes; then
6070 # Depending upon the size, compute the lo and hi bounds.
6071cat >conftest.$ac_ext <<_ACEOF
6072#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006073/* confdefs.h. */
6074_ACEOF
6075cat confdefs.h >>conftest.$ac_ext
6076cat >>conftest.$ac_ext <<_ACEOF
6077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006078$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006079int
6080main ()
6081{
6082static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6083test_array [0] = 0
6084
6085 ;
6086 return 0;
6087}
6088_ACEOF
6089rm -f conftest.$ac_objext
6090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6091 (eval $ac_compile) 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); } &&
6095 { ac_try='test -s conftest.$ac_objext'
6096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6097 (eval $ac_try) 2>&5
6098 ac_status=$?
6099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6100 (exit $ac_status); }; }; then
6101 ac_lo=0 ac_mid=0
6102 while :; do
6103 cat >conftest.$ac_ext <<_ACEOF
6104#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006105/* confdefs.h. */
6106_ACEOF
6107cat confdefs.h >>conftest.$ac_ext
6108cat >>conftest.$ac_ext <<_ACEOF
6109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006110$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006111int
6112main ()
6113{
6114static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6115test_array [0] = 0
6116
6117 ;
6118 return 0;
6119}
6120_ACEOF
6121rm -f conftest.$ac_objext
6122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6123 (eval $ac_compile) 2>&5
6124 ac_status=$?
6125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6126 (exit $ac_status); } &&
6127 { ac_try='test -s conftest.$ac_objext'
6128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6129 (eval $ac_try) 2>&5
6130 ac_status=$?
6131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6132 (exit $ac_status); }; }; then
6133 ac_hi=$ac_mid; break
6134else
6135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006136sed 's/^/| /' conftest.$ac_ext >&5
6137
Martin v. Löwis11437992002-04-12 09:54:03 +00006138ac_lo=`expr $ac_mid + 1`
6139 if test $ac_lo -le $ac_mid; then
6140 ac_lo= ac_hi=
6141 break
6142 fi
6143 ac_mid=`expr 2 '*' $ac_mid + 1`
6144fi
6145rm -f conftest.$ac_objext conftest.$ac_ext
6146 done
6147else
6148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006149sed 's/^/| /' conftest.$ac_ext >&5
6150
Martin v. Löwis11437992002-04-12 09:54:03 +00006151cat >conftest.$ac_ext <<_ACEOF
6152#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006153/* confdefs.h. */
6154_ACEOF
6155cat confdefs.h >>conftest.$ac_ext
6156cat >>conftest.$ac_ext <<_ACEOF
6157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006158$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006159int
6160main ()
6161{
6162static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6163test_array [0] = 0
6164
6165 ;
6166 return 0;
6167}
6168_ACEOF
6169rm -f conftest.$ac_objext
6170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6171 (eval $ac_compile) 2>&5
6172 ac_status=$?
6173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6174 (exit $ac_status); } &&
6175 { ac_try='test -s conftest.$ac_objext'
6176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6177 (eval $ac_try) 2>&5
6178 ac_status=$?
6179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180 (exit $ac_status); }; }; then
6181 ac_hi=-1 ac_mid=-1
6182 while :; do
6183 cat >conftest.$ac_ext <<_ACEOF
6184#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006185/* confdefs.h. */
6186_ACEOF
6187cat confdefs.h >>conftest.$ac_ext
6188cat >>conftest.$ac_ext <<_ACEOF
6189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006190$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006191int
6192main ()
6193{
6194static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6195test_array [0] = 0
6196
6197 ;
6198 return 0;
6199}
6200_ACEOF
6201rm -f conftest.$ac_objext
6202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6203 (eval $ac_compile) 2>&5
6204 ac_status=$?
6205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6206 (exit $ac_status); } &&
6207 { ac_try='test -s conftest.$ac_objext'
6208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6209 (eval $ac_try) 2>&5
6210 ac_status=$?
6211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6212 (exit $ac_status); }; }; then
6213 ac_lo=$ac_mid; break
6214else
6215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006216sed 's/^/| /' conftest.$ac_ext >&5
6217
Martin v. Löwis11437992002-04-12 09:54:03 +00006218ac_hi=`expr '(' $ac_mid ')' - 1`
6219 if test $ac_mid -le $ac_hi; then
6220 ac_lo= ac_hi=
6221 break
6222 fi
6223 ac_mid=`expr 2 '*' $ac_mid`
6224fi
6225rm -f conftest.$ac_objext conftest.$ac_ext
6226 done
6227else
6228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006229sed 's/^/| /' conftest.$ac_ext >&5
6230
Martin v. Löwis11437992002-04-12 09:54:03 +00006231ac_lo= ac_hi=
6232fi
6233rm -f conftest.$ac_objext conftest.$ac_ext
6234fi
6235rm -f conftest.$ac_objext conftest.$ac_ext
6236# Binary search between lo and hi bounds.
6237while test "x$ac_lo" != "x$ac_hi"; do
6238 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6239 cat >conftest.$ac_ext <<_ACEOF
6240#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006241/* confdefs.h. */
6242_ACEOF
6243cat confdefs.h >>conftest.$ac_ext
6244cat >>conftest.$ac_ext <<_ACEOF
6245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006246$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006247int
6248main ()
6249{
6250static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6251test_array [0] = 0
6252
6253 ;
6254 return 0;
6255}
6256_ACEOF
6257rm -f conftest.$ac_objext
6258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6259 (eval $ac_compile) 2>&5
6260 ac_status=$?
6261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6262 (exit $ac_status); } &&
6263 { ac_try='test -s conftest.$ac_objext'
6264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6265 (eval $ac_try) 2>&5
6266 ac_status=$?
6267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6268 (exit $ac_status); }; }; then
6269 ac_hi=$ac_mid
6270else
6271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006272sed 's/^/| /' conftest.$ac_ext >&5
6273
Martin v. Löwis11437992002-04-12 09:54:03 +00006274ac_lo=`expr '(' $ac_mid ')' + 1`
6275fi
6276rm -f conftest.$ac_objext conftest.$ac_ext
6277done
6278case $ac_lo in
6279?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006280'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6281See \`config.log' for more details." >&5
6282echo "$as_me: error: cannot compute sizeof (long), 77
6283See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006284 { (exit 1); exit 1; }; } ;;
6285esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006286else
6287 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006288 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6289See \`config.log' for more details." >&5
6290echo "$as_me: error: cannot run test program while cross compiling
6291See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006292 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006293else
Martin v. Löwis11437992002-04-12 09:54:03 +00006294 cat >conftest.$ac_ext <<_ACEOF
6295#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006296/* confdefs.h. */
6297_ACEOF
6298cat confdefs.h >>conftest.$ac_ext
6299cat >>conftest.$ac_ext <<_ACEOF
6300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006301$ac_includes_default
6302long longval () { return (long) (sizeof (long)); }
6303unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006304#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006305#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006306int
6307main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006308{
Martin v. Löwis11437992002-04-12 09:54:03 +00006309
6310 FILE *f = fopen ("conftest.val", "w");
6311 if (! f)
6312 exit (1);
6313 if (((long) (sizeof (long))) < 0)
6314 {
6315 long i = longval ();
6316 if (i != ((long) (sizeof (long))))
6317 exit (1);
6318 fprintf (f, "%ld\n", i);
6319 }
6320 else
6321 {
6322 unsigned long i = ulongval ();
6323 if (i != ((long) (sizeof (long))))
6324 exit (1);
6325 fprintf (f, "%lu\n", i);
6326 }
6327 exit (ferror (f) || fclose (f) != 0);
6328
6329 ;
6330 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006331}
Martin v. Löwis11437992002-04-12 09:54:03 +00006332_ACEOF
6333rm -f conftest$ac_exeext
6334if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6335 (eval $ac_link) 2>&5
6336 ac_status=$?
6337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6338 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6340 (eval $ac_try) 2>&5
6341 ac_status=$?
6342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6343 (exit $ac_status); }; }; then
6344 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006345else
Martin v. Löwis11437992002-04-12 09:54:03 +00006346 echo "$as_me: program exited with status $ac_status" >&5
6347echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006348sed 's/^/| /' conftest.$ac_ext >&5
6349
Martin v. Löwis11437992002-04-12 09:54:03 +00006350( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006351{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6352See \`config.log' for more details." >&5
6353echo "$as_me: error: cannot compute sizeof (long), 77
6354See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006355 { (exit 1); exit 1; }; }
6356fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006357rm -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 +00006358fi
6359fi
6360rm -f conftest.val
6361else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006362 ac_cv_sizeof_long=0
6363fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006365echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6366echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6367cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006368#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006369_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006370
6371
Martin v. Löwis11437992002-04-12 09:54:03 +00006372echo "$as_me:$LINENO: checking for void *" >&5
6373echo $ECHO_N "checking for void *... $ECHO_C" >&6
6374if test "${ac_cv_type_void_p+set}" = set; then
6375 echo $ECHO_N "(cached) $ECHO_C" >&6
6376else
6377 cat >conftest.$ac_ext <<_ACEOF
6378#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006379/* confdefs.h. */
6380_ACEOF
6381cat confdefs.h >>conftest.$ac_ext
6382cat >>conftest.$ac_ext <<_ACEOF
6383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006384$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006385int
6386main ()
6387{
6388if ((void * *) 0)
6389 return 0;
6390if (sizeof (void *))
6391 return 0;
6392 ;
6393 return 0;
6394}
6395_ACEOF
6396rm -f conftest.$ac_objext
6397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6398 (eval $ac_compile) 2>&5
6399 ac_status=$?
6400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6401 (exit $ac_status); } &&
6402 { ac_try='test -s conftest.$ac_objext'
6403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6404 (eval $ac_try) 2>&5
6405 ac_status=$?
6406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6407 (exit $ac_status); }; }; then
6408 ac_cv_type_void_p=yes
6409else
6410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006411sed 's/^/| /' conftest.$ac_ext >&5
6412
Martin v. Löwis11437992002-04-12 09:54:03 +00006413ac_cv_type_void_p=no
6414fi
6415rm -f conftest.$ac_objext conftest.$ac_ext
6416fi
6417echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6418echo "${ECHO_T}$ac_cv_type_void_p" >&6
6419
6420echo "$as_me:$LINENO: checking size of void *" >&5
6421echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6422if test "${ac_cv_sizeof_void_p+set}" = set; then
6423 echo $ECHO_N "(cached) $ECHO_C" >&6
6424else
6425 if test "$ac_cv_type_void_p" = yes; then
6426 # The cast to unsigned long works around a bug in the HP C Compiler
6427 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6428 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6429 # This bug is HP SR number 8606223364.
6430 if test "$cross_compiling" = yes; then
6431 # Depending upon the size, compute the lo and hi bounds.
6432cat >conftest.$ac_ext <<_ACEOF
6433#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006434/* confdefs.h. */
6435_ACEOF
6436cat confdefs.h >>conftest.$ac_ext
6437cat >>conftest.$ac_ext <<_ACEOF
6438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006439$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006440int
6441main ()
6442{
6443static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6444test_array [0] = 0
6445
6446 ;
6447 return 0;
6448}
6449_ACEOF
6450rm -f conftest.$ac_objext
6451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6452 (eval $ac_compile) 2>&5
6453 ac_status=$?
6454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6455 (exit $ac_status); } &&
6456 { ac_try='test -s conftest.$ac_objext'
6457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6458 (eval $ac_try) 2>&5
6459 ac_status=$?
6460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6461 (exit $ac_status); }; }; then
6462 ac_lo=0 ac_mid=0
6463 while :; do
6464 cat >conftest.$ac_ext <<_ACEOF
6465#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006466/* confdefs.h. */
6467_ACEOF
6468cat confdefs.h >>conftest.$ac_ext
6469cat >>conftest.$ac_ext <<_ACEOF
6470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006471$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006472int
6473main ()
6474{
6475static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6476test_array [0] = 0
6477
6478 ;
6479 return 0;
6480}
6481_ACEOF
6482rm -f conftest.$ac_objext
6483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6484 (eval $ac_compile) 2>&5
6485 ac_status=$?
6486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6487 (exit $ac_status); } &&
6488 { ac_try='test -s conftest.$ac_objext'
6489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6490 (eval $ac_try) 2>&5
6491 ac_status=$?
6492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6493 (exit $ac_status); }; }; then
6494 ac_hi=$ac_mid; break
6495else
6496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006497sed 's/^/| /' conftest.$ac_ext >&5
6498
Martin v. Löwis11437992002-04-12 09:54:03 +00006499ac_lo=`expr $ac_mid + 1`
6500 if test $ac_lo -le $ac_mid; then
6501 ac_lo= ac_hi=
6502 break
6503 fi
6504 ac_mid=`expr 2 '*' $ac_mid + 1`
6505fi
6506rm -f conftest.$ac_objext conftest.$ac_ext
6507 done
6508else
6509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006510sed 's/^/| /' conftest.$ac_ext >&5
6511
Martin v. Löwis11437992002-04-12 09:54:03 +00006512cat >conftest.$ac_ext <<_ACEOF
6513#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006514/* confdefs.h. */
6515_ACEOF
6516cat confdefs.h >>conftest.$ac_ext
6517cat >>conftest.$ac_ext <<_ACEOF
6518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006519$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006520int
6521main ()
6522{
6523static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6524test_array [0] = 0
6525
6526 ;
6527 return 0;
6528}
6529_ACEOF
6530rm -f conftest.$ac_objext
6531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6532 (eval $ac_compile) 2>&5
6533 ac_status=$?
6534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6535 (exit $ac_status); } &&
6536 { ac_try='test -s conftest.$ac_objext'
6537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6538 (eval $ac_try) 2>&5
6539 ac_status=$?
6540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6541 (exit $ac_status); }; }; then
6542 ac_hi=-1 ac_mid=-1
6543 while :; do
6544 cat >conftest.$ac_ext <<_ACEOF
6545#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006546/* confdefs.h. */
6547_ACEOF
6548cat confdefs.h >>conftest.$ac_ext
6549cat >>conftest.$ac_ext <<_ACEOF
6550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006551$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006552int
6553main ()
6554{
6555static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6556test_array [0] = 0
6557
6558 ;
6559 return 0;
6560}
6561_ACEOF
6562rm -f conftest.$ac_objext
6563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6564 (eval $ac_compile) 2>&5
6565 ac_status=$?
6566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6567 (exit $ac_status); } &&
6568 { ac_try='test -s conftest.$ac_objext'
6569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6570 (eval $ac_try) 2>&5
6571 ac_status=$?
6572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6573 (exit $ac_status); }; }; then
6574 ac_lo=$ac_mid; break
6575else
6576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006577sed 's/^/| /' conftest.$ac_ext >&5
6578
Martin v. Löwis11437992002-04-12 09:54:03 +00006579ac_hi=`expr '(' $ac_mid ')' - 1`
6580 if test $ac_mid -le $ac_hi; then
6581 ac_lo= ac_hi=
6582 break
6583 fi
6584 ac_mid=`expr 2 '*' $ac_mid`
6585fi
6586rm -f conftest.$ac_objext conftest.$ac_ext
6587 done
6588else
6589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006590sed 's/^/| /' conftest.$ac_ext >&5
6591
Martin v. Löwis11437992002-04-12 09:54:03 +00006592ac_lo= ac_hi=
6593fi
6594rm -f conftest.$ac_objext conftest.$ac_ext
6595fi
6596rm -f conftest.$ac_objext conftest.$ac_ext
6597# Binary search between lo and hi bounds.
6598while test "x$ac_lo" != "x$ac_hi"; do
6599 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6600 cat >conftest.$ac_ext <<_ACEOF
6601#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006602/* confdefs.h. */
6603_ACEOF
6604cat confdefs.h >>conftest.$ac_ext
6605cat >>conftest.$ac_ext <<_ACEOF
6606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006607$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006608int
6609main ()
6610{
6611static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6612test_array [0] = 0
6613
6614 ;
6615 return 0;
6616}
6617_ACEOF
6618rm -f conftest.$ac_objext
6619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6620 (eval $ac_compile) 2>&5
6621 ac_status=$?
6622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6623 (exit $ac_status); } &&
6624 { ac_try='test -s conftest.$ac_objext'
6625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6626 (eval $ac_try) 2>&5
6627 ac_status=$?
6628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6629 (exit $ac_status); }; }; then
6630 ac_hi=$ac_mid
6631else
6632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006633sed 's/^/| /' conftest.$ac_ext >&5
6634
Martin v. Löwis11437992002-04-12 09:54:03 +00006635ac_lo=`expr '(' $ac_mid ')' + 1`
6636fi
6637rm -f conftest.$ac_objext conftest.$ac_ext
6638done
6639case $ac_lo in
6640?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006641'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6642See \`config.log' for more details." >&5
6643echo "$as_me: error: cannot compute sizeof (void *), 77
6644See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006645 { (exit 1); exit 1; }; } ;;
6646esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006647else
6648 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006649 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6650See \`config.log' for more details." >&5
6651echo "$as_me: error: cannot run test program while cross compiling
6652See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006653 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006654else
Martin v. Löwis11437992002-04-12 09:54:03 +00006655 cat >conftest.$ac_ext <<_ACEOF
6656#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006657/* confdefs.h. */
6658_ACEOF
6659cat confdefs.h >>conftest.$ac_ext
6660cat >>conftest.$ac_ext <<_ACEOF
6661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006662$ac_includes_default
6663long longval () { return (long) (sizeof (void *)); }
6664unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006665#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006666#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006667int
6668main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006669{
Martin v. Löwis11437992002-04-12 09:54:03 +00006670
6671 FILE *f = fopen ("conftest.val", "w");
6672 if (! f)
6673 exit (1);
6674 if (((long) (sizeof (void *))) < 0)
6675 {
6676 long i = longval ();
6677 if (i != ((long) (sizeof (void *))))
6678 exit (1);
6679 fprintf (f, "%ld\n", i);
6680 }
6681 else
6682 {
6683 unsigned long i = ulongval ();
6684 if (i != ((long) (sizeof (void *))))
6685 exit (1);
6686 fprintf (f, "%lu\n", i);
6687 }
6688 exit (ferror (f) || fclose (f) != 0);
6689
6690 ;
6691 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006692}
Martin v. Löwis11437992002-04-12 09:54:03 +00006693_ACEOF
6694rm -f conftest$ac_exeext
6695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6696 (eval $ac_link) 2>&5
6697 ac_status=$?
6698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6699 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6701 (eval $ac_try) 2>&5
6702 ac_status=$?
6703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6704 (exit $ac_status); }; }; then
6705 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006706else
Martin v. Löwis11437992002-04-12 09:54:03 +00006707 echo "$as_me: program exited with status $ac_status" >&5
6708echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006709sed 's/^/| /' conftest.$ac_ext >&5
6710
Martin v. Löwis11437992002-04-12 09:54:03 +00006711( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006712{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6713See \`config.log' for more details." >&5
6714echo "$as_me: error: cannot compute sizeof (void *), 77
6715See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006716 { (exit 1); exit 1; }; }
6717fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006718rm -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 +00006719fi
6720fi
6721rm -f conftest.val
6722else
Guido van Rossumad678af1998-10-02 14:42:15 +00006723 ac_cv_sizeof_void_p=0
6724fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006726echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6727echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6728cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006729#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006730_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006731
6732
Martin v. Löwis11437992002-04-12 09:54:03 +00006733echo "$as_me:$LINENO: checking for short" >&5
6734echo $ECHO_N "checking for short... $ECHO_C" >&6
6735if test "${ac_cv_type_short+set}" = set; then
6736 echo $ECHO_N "(cached) $ECHO_C" >&6
6737else
6738 cat >conftest.$ac_ext <<_ACEOF
6739#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006740/* confdefs.h. */
6741_ACEOF
6742cat confdefs.h >>conftest.$ac_ext
6743cat >>conftest.$ac_ext <<_ACEOF
6744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006745$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006746int
6747main ()
6748{
6749if ((short *) 0)
6750 return 0;
6751if (sizeof (short))
6752 return 0;
6753 ;
6754 return 0;
6755}
6756_ACEOF
6757rm -f conftest.$ac_objext
6758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6759 (eval $ac_compile) 2>&5
6760 ac_status=$?
6761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6762 (exit $ac_status); } &&
6763 { ac_try='test -s conftest.$ac_objext'
6764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6765 (eval $ac_try) 2>&5
6766 ac_status=$?
6767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6768 (exit $ac_status); }; }; then
6769 ac_cv_type_short=yes
6770else
6771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006772sed 's/^/| /' conftest.$ac_ext >&5
6773
Martin v. Löwis11437992002-04-12 09:54:03 +00006774ac_cv_type_short=no
6775fi
6776rm -f conftest.$ac_objext conftest.$ac_ext
6777fi
6778echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6779echo "${ECHO_T}$ac_cv_type_short" >&6
6780
6781echo "$as_me:$LINENO: checking size of short" >&5
6782echo $ECHO_N "checking size of short... $ECHO_C" >&6
6783if test "${ac_cv_sizeof_short+set}" = set; then
6784 echo $ECHO_N "(cached) $ECHO_C" >&6
6785else
6786 if test "$ac_cv_type_short" = yes; then
6787 # The cast to unsigned long works around a bug in the HP C Compiler
6788 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6789 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6790 # This bug is HP SR number 8606223364.
6791 if test "$cross_compiling" = yes; then
6792 # Depending upon the size, compute the lo and hi bounds.
6793cat >conftest.$ac_ext <<_ACEOF
6794#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006795/* confdefs.h. */
6796_ACEOF
6797cat confdefs.h >>conftest.$ac_ext
6798cat >>conftest.$ac_ext <<_ACEOF
6799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006800$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006801int
6802main ()
6803{
6804static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6805test_array [0] = 0
6806
6807 ;
6808 return 0;
6809}
6810_ACEOF
6811rm -f conftest.$ac_objext
6812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6813 (eval $ac_compile) 2>&5
6814 ac_status=$?
6815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6816 (exit $ac_status); } &&
6817 { ac_try='test -s conftest.$ac_objext'
6818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6819 (eval $ac_try) 2>&5
6820 ac_status=$?
6821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6822 (exit $ac_status); }; }; then
6823 ac_lo=0 ac_mid=0
6824 while :; do
6825 cat >conftest.$ac_ext <<_ACEOF
6826#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006827/* confdefs.h. */
6828_ACEOF
6829cat confdefs.h >>conftest.$ac_ext
6830cat >>conftest.$ac_ext <<_ACEOF
6831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006832$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006833int
6834main ()
6835{
6836static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6837test_array [0] = 0
6838
6839 ;
6840 return 0;
6841}
6842_ACEOF
6843rm -f conftest.$ac_objext
6844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6845 (eval $ac_compile) 2>&5
6846 ac_status=$?
6847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6848 (exit $ac_status); } &&
6849 { ac_try='test -s conftest.$ac_objext'
6850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6851 (eval $ac_try) 2>&5
6852 ac_status=$?
6853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6854 (exit $ac_status); }; }; then
6855 ac_hi=$ac_mid; break
6856else
6857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006858sed 's/^/| /' conftest.$ac_ext >&5
6859
Martin v. Löwis11437992002-04-12 09:54:03 +00006860ac_lo=`expr $ac_mid + 1`
6861 if test $ac_lo -le $ac_mid; then
6862 ac_lo= ac_hi=
6863 break
6864 fi
6865 ac_mid=`expr 2 '*' $ac_mid + 1`
6866fi
6867rm -f conftest.$ac_objext conftest.$ac_ext
6868 done
6869else
6870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006871sed 's/^/| /' conftest.$ac_ext >&5
6872
Martin v. Löwis11437992002-04-12 09:54:03 +00006873cat >conftest.$ac_ext <<_ACEOF
6874#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006875/* confdefs.h. */
6876_ACEOF
6877cat confdefs.h >>conftest.$ac_ext
6878cat >>conftest.$ac_ext <<_ACEOF
6879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006880$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006881int
6882main ()
6883{
6884static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6885test_array [0] = 0
6886
6887 ;
6888 return 0;
6889}
6890_ACEOF
6891rm -f conftest.$ac_objext
6892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6893 (eval $ac_compile) 2>&5
6894 ac_status=$?
6895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6896 (exit $ac_status); } &&
6897 { ac_try='test -s conftest.$ac_objext'
6898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6899 (eval $ac_try) 2>&5
6900 ac_status=$?
6901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6902 (exit $ac_status); }; }; then
6903 ac_hi=-1 ac_mid=-1
6904 while :; do
6905 cat >conftest.$ac_ext <<_ACEOF
6906#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006907/* confdefs.h. */
6908_ACEOF
6909cat confdefs.h >>conftest.$ac_ext
6910cat >>conftest.$ac_ext <<_ACEOF
6911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006912$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006913int
6914main ()
6915{
6916static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6917test_array [0] = 0
6918
6919 ;
6920 return 0;
6921}
6922_ACEOF
6923rm -f conftest.$ac_objext
6924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6925 (eval $ac_compile) 2>&5
6926 ac_status=$?
6927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6928 (exit $ac_status); } &&
6929 { ac_try='test -s conftest.$ac_objext'
6930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6931 (eval $ac_try) 2>&5
6932 ac_status=$?
6933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6934 (exit $ac_status); }; }; then
6935 ac_lo=$ac_mid; break
6936else
6937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006938sed 's/^/| /' conftest.$ac_ext >&5
6939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940ac_hi=`expr '(' $ac_mid ')' - 1`
6941 if test $ac_mid -le $ac_hi; then
6942 ac_lo= ac_hi=
6943 break
6944 fi
6945 ac_mid=`expr 2 '*' $ac_mid`
6946fi
6947rm -f conftest.$ac_objext conftest.$ac_ext
6948 done
6949else
6950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006951sed 's/^/| /' conftest.$ac_ext >&5
6952
Martin v. Löwis11437992002-04-12 09:54:03 +00006953ac_lo= ac_hi=
6954fi
6955rm -f conftest.$ac_objext conftest.$ac_ext
6956fi
6957rm -f conftest.$ac_objext conftest.$ac_ext
6958# Binary search between lo and hi bounds.
6959while test "x$ac_lo" != "x$ac_hi"; do
6960 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6961 cat >conftest.$ac_ext <<_ACEOF
6962#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006963/* confdefs.h. */
6964_ACEOF
6965cat confdefs.h >>conftest.$ac_ext
6966cat >>conftest.$ac_ext <<_ACEOF
6967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006968$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006969int
6970main ()
6971{
6972static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6973test_array [0] = 0
6974
6975 ;
6976 return 0;
6977}
6978_ACEOF
6979rm -f conftest.$ac_objext
6980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6981 (eval $ac_compile) 2>&5
6982 ac_status=$?
6983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6984 (exit $ac_status); } &&
6985 { ac_try='test -s conftest.$ac_objext'
6986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6987 (eval $ac_try) 2>&5
6988 ac_status=$?
6989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6990 (exit $ac_status); }; }; then
6991 ac_hi=$ac_mid
6992else
6993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006994sed 's/^/| /' conftest.$ac_ext >&5
6995
Martin v. Löwis11437992002-04-12 09:54:03 +00006996ac_lo=`expr '(' $ac_mid ')' + 1`
6997fi
6998rm -f conftest.$ac_objext conftest.$ac_ext
6999done
7000case $ac_lo in
7001?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007002'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7003See \`config.log' for more details." >&5
7004echo "$as_me: error: cannot compute sizeof (short), 77
7005See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007006 { (exit 1); exit 1; }; } ;;
7007esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007008else
7009 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007010 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7011See \`config.log' for more details." >&5
7012echo "$as_me: error: cannot run test program while cross compiling
7013See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007014 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007015else
Martin v. Löwis11437992002-04-12 09:54:03 +00007016 cat >conftest.$ac_ext <<_ACEOF
7017#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007018/* confdefs.h. */
7019_ACEOF
7020cat confdefs.h >>conftest.$ac_ext
7021cat >>conftest.$ac_ext <<_ACEOF
7022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007023$ac_includes_default
7024long longval () { return (long) (sizeof (short)); }
7025unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007026#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007027#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007028int
7029main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007030{
Martin v. Löwis11437992002-04-12 09:54:03 +00007031
7032 FILE *f = fopen ("conftest.val", "w");
7033 if (! f)
7034 exit (1);
7035 if (((long) (sizeof (short))) < 0)
7036 {
7037 long i = longval ();
7038 if (i != ((long) (sizeof (short))))
7039 exit (1);
7040 fprintf (f, "%ld\n", i);
7041 }
7042 else
7043 {
7044 unsigned long i = ulongval ();
7045 if (i != ((long) (sizeof (short))))
7046 exit (1);
7047 fprintf (f, "%lu\n", i);
7048 }
7049 exit (ferror (f) || fclose (f) != 0);
7050
7051 ;
7052 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007053}
Martin v. Löwis11437992002-04-12 09:54:03 +00007054_ACEOF
7055rm -f conftest$ac_exeext
7056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7057 (eval $ac_link) 2>&5
7058 ac_status=$?
7059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7062 (eval $ac_try) 2>&5
7063 ac_status=$?
7064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7065 (exit $ac_status); }; }; then
7066 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007067else
Martin v. Löwis11437992002-04-12 09:54:03 +00007068 echo "$as_me: program exited with status $ac_status" >&5
7069echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007070sed 's/^/| /' conftest.$ac_ext >&5
7071
Martin v. Löwis11437992002-04-12 09:54:03 +00007072( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007073{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7074See \`config.log' for more details." >&5
7075echo "$as_me: error: cannot compute sizeof (short), 77
7076See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007077 { (exit 1); exit 1; }; }
7078fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007079rm -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 +00007080fi
7081fi
7082rm -f conftest.val
7083else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007084 ac_cv_sizeof_short=0
7085fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007086fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007087echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7088echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7089cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007090#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007091_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007092
7093
Martin v. Löwis11437992002-04-12 09:54:03 +00007094echo "$as_me:$LINENO: checking for float" >&5
7095echo $ECHO_N "checking for float... $ECHO_C" >&6
7096if test "${ac_cv_type_float+set}" = set; then
7097 echo $ECHO_N "(cached) $ECHO_C" >&6
7098else
7099 cat >conftest.$ac_ext <<_ACEOF
7100#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007101/* confdefs.h. */
7102_ACEOF
7103cat confdefs.h >>conftest.$ac_ext
7104cat >>conftest.$ac_ext <<_ACEOF
7105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007106$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007107int
7108main ()
7109{
7110if ((float *) 0)
7111 return 0;
7112if (sizeof (float))
7113 return 0;
7114 ;
7115 return 0;
7116}
7117_ACEOF
7118rm -f conftest.$ac_objext
7119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7120 (eval $ac_compile) 2>&5
7121 ac_status=$?
7122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7123 (exit $ac_status); } &&
7124 { ac_try='test -s conftest.$ac_objext'
7125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7126 (eval $ac_try) 2>&5
7127 ac_status=$?
7128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7129 (exit $ac_status); }; }; then
7130 ac_cv_type_float=yes
7131else
7132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007133sed 's/^/| /' conftest.$ac_ext >&5
7134
Martin v. Löwis11437992002-04-12 09:54:03 +00007135ac_cv_type_float=no
7136fi
7137rm -f conftest.$ac_objext conftest.$ac_ext
7138fi
7139echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7140echo "${ECHO_T}$ac_cv_type_float" >&6
7141
7142echo "$as_me:$LINENO: checking size of float" >&5
7143echo $ECHO_N "checking size of float... $ECHO_C" >&6
7144if test "${ac_cv_sizeof_float+set}" = set; then
7145 echo $ECHO_N "(cached) $ECHO_C" >&6
7146else
7147 if test "$ac_cv_type_float" = yes; then
7148 # The cast to unsigned long works around a bug in the HP C Compiler
7149 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7150 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7151 # This bug is HP SR number 8606223364.
7152 if test "$cross_compiling" = yes; then
7153 # Depending upon the size, compute the lo and hi bounds.
7154cat >conftest.$ac_ext <<_ACEOF
7155#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007156/* confdefs.h. */
7157_ACEOF
7158cat confdefs.h >>conftest.$ac_ext
7159cat >>conftest.$ac_ext <<_ACEOF
7160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007161$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007162int
7163main ()
7164{
7165static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7166test_array [0] = 0
7167
7168 ;
7169 return 0;
7170}
7171_ACEOF
7172rm -f conftest.$ac_objext
7173if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7174 (eval $ac_compile) 2>&5
7175 ac_status=$?
7176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7177 (exit $ac_status); } &&
7178 { ac_try='test -s conftest.$ac_objext'
7179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7180 (eval $ac_try) 2>&5
7181 ac_status=$?
7182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7183 (exit $ac_status); }; }; then
7184 ac_lo=0 ac_mid=0
7185 while :; do
7186 cat >conftest.$ac_ext <<_ACEOF
7187#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007188/* confdefs.h. */
7189_ACEOF
7190cat confdefs.h >>conftest.$ac_ext
7191cat >>conftest.$ac_ext <<_ACEOF
7192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007193$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007194int
7195main ()
7196{
7197static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7198test_array [0] = 0
7199
7200 ;
7201 return 0;
7202}
7203_ACEOF
7204rm -f conftest.$ac_objext
7205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7206 (eval $ac_compile) 2>&5
7207 ac_status=$?
7208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7209 (exit $ac_status); } &&
7210 { ac_try='test -s conftest.$ac_objext'
7211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7212 (eval $ac_try) 2>&5
7213 ac_status=$?
7214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7215 (exit $ac_status); }; }; then
7216 ac_hi=$ac_mid; break
7217else
7218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007219sed 's/^/| /' conftest.$ac_ext >&5
7220
Martin v. Löwis11437992002-04-12 09:54:03 +00007221ac_lo=`expr $ac_mid + 1`
7222 if test $ac_lo -le $ac_mid; then
7223 ac_lo= ac_hi=
7224 break
7225 fi
7226 ac_mid=`expr 2 '*' $ac_mid + 1`
7227fi
7228rm -f conftest.$ac_objext conftest.$ac_ext
7229 done
7230else
7231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007232sed 's/^/| /' conftest.$ac_ext >&5
7233
Martin v. Löwis11437992002-04-12 09:54:03 +00007234cat >conftest.$ac_ext <<_ACEOF
7235#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007236/* confdefs.h. */
7237_ACEOF
7238cat confdefs.h >>conftest.$ac_ext
7239cat >>conftest.$ac_ext <<_ACEOF
7240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007241$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007242int
7243main ()
7244{
7245static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7246test_array [0] = 0
7247
7248 ;
7249 return 0;
7250}
7251_ACEOF
7252rm -f conftest.$ac_objext
7253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7254 (eval $ac_compile) 2>&5
7255 ac_status=$?
7256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7257 (exit $ac_status); } &&
7258 { ac_try='test -s conftest.$ac_objext'
7259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7260 (eval $ac_try) 2>&5
7261 ac_status=$?
7262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7263 (exit $ac_status); }; }; then
7264 ac_hi=-1 ac_mid=-1
7265 while :; do
7266 cat >conftest.$ac_ext <<_ACEOF
7267#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007268/* confdefs.h. */
7269_ACEOF
7270cat confdefs.h >>conftest.$ac_ext
7271cat >>conftest.$ac_ext <<_ACEOF
7272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007273$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007274int
7275main ()
7276{
7277static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7278test_array [0] = 0
7279
7280 ;
7281 return 0;
7282}
7283_ACEOF
7284rm -f conftest.$ac_objext
7285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7286 (eval $ac_compile) 2>&5
7287 ac_status=$?
7288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7289 (exit $ac_status); } &&
7290 { ac_try='test -s conftest.$ac_objext'
7291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7292 (eval $ac_try) 2>&5
7293 ac_status=$?
7294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7295 (exit $ac_status); }; }; then
7296 ac_lo=$ac_mid; break
7297else
7298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007299sed 's/^/| /' conftest.$ac_ext >&5
7300
Martin v. Löwis11437992002-04-12 09:54:03 +00007301ac_hi=`expr '(' $ac_mid ')' - 1`
7302 if test $ac_mid -le $ac_hi; then
7303 ac_lo= ac_hi=
7304 break
7305 fi
7306 ac_mid=`expr 2 '*' $ac_mid`
7307fi
7308rm -f conftest.$ac_objext conftest.$ac_ext
7309 done
7310else
7311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007312sed 's/^/| /' conftest.$ac_ext >&5
7313
Martin v. Löwis11437992002-04-12 09:54:03 +00007314ac_lo= ac_hi=
7315fi
7316rm -f conftest.$ac_objext conftest.$ac_ext
7317fi
7318rm -f conftest.$ac_objext conftest.$ac_ext
7319# Binary search between lo and hi bounds.
7320while test "x$ac_lo" != "x$ac_hi"; do
7321 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7322 cat >conftest.$ac_ext <<_ACEOF
7323#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007324/* confdefs.h. */
7325_ACEOF
7326cat confdefs.h >>conftest.$ac_ext
7327cat >>conftest.$ac_ext <<_ACEOF
7328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007329$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007330int
7331main ()
7332{
7333static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7334test_array [0] = 0
7335
7336 ;
7337 return 0;
7338}
7339_ACEOF
7340rm -f conftest.$ac_objext
7341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7342 (eval $ac_compile) 2>&5
7343 ac_status=$?
7344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7345 (exit $ac_status); } &&
7346 { ac_try='test -s conftest.$ac_objext'
7347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7348 (eval $ac_try) 2>&5
7349 ac_status=$?
7350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7351 (exit $ac_status); }; }; then
7352 ac_hi=$ac_mid
7353else
7354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007355sed 's/^/| /' conftest.$ac_ext >&5
7356
Martin v. Löwis11437992002-04-12 09:54:03 +00007357ac_lo=`expr '(' $ac_mid ')' + 1`
7358fi
7359rm -f conftest.$ac_objext conftest.$ac_ext
7360done
7361case $ac_lo in
7362?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007363'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7364See \`config.log' for more details." >&5
7365echo "$as_me: error: cannot compute sizeof (float), 77
7366See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007367 { (exit 1); exit 1; }; } ;;
7368esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007369else
7370 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007371 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7372See \`config.log' for more details." >&5
7373echo "$as_me: error: cannot run test program while cross compiling
7374See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007375 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007376else
Martin v. Löwis11437992002-04-12 09:54:03 +00007377 cat >conftest.$ac_ext <<_ACEOF
7378#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007379/* confdefs.h. */
7380_ACEOF
7381cat confdefs.h >>conftest.$ac_ext
7382cat >>conftest.$ac_ext <<_ACEOF
7383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007384$ac_includes_default
7385long longval () { return (long) (sizeof (float)); }
7386unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007387#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007388#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007389int
7390main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007391{
Martin v. Löwis11437992002-04-12 09:54:03 +00007392
7393 FILE *f = fopen ("conftest.val", "w");
7394 if (! f)
7395 exit (1);
7396 if (((long) (sizeof (float))) < 0)
7397 {
7398 long i = longval ();
7399 if (i != ((long) (sizeof (float))))
7400 exit (1);
7401 fprintf (f, "%ld\n", i);
7402 }
7403 else
7404 {
7405 unsigned long i = ulongval ();
7406 if (i != ((long) (sizeof (float))))
7407 exit (1);
7408 fprintf (f, "%lu\n", i);
7409 }
7410 exit (ferror (f) || fclose (f) != 0);
7411
7412 ;
7413 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007414}
Martin v. Löwis11437992002-04-12 09:54:03 +00007415_ACEOF
7416rm -f conftest$ac_exeext
7417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7418 (eval $ac_link) 2>&5
7419 ac_status=$?
7420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7421 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7423 (eval $ac_try) 2>&5
7424 ac_status=$?
7425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7426 (exit $ac_status); }; }; then
7427 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007428else
Martin v. Löwis11437992002-04-12 09:54:03 +00007429 echo "$as_me: program exited with status $ac_status" >&5
7430echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007431sed 's/^/| /' conftest.$ac_ext >&5
7432
Martin v. Löwis11437992002-04-12 09:54:03 +00007433( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007434{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7435See \`config.log' for more details." >&5
7436echo "$as_me: error: cannot compute sizeof (float), 77
7437See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007438 { (exit 1); exit 1; }; }
7439fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007440rm -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 +00007441fi
7442fi
7443rm -f conftest.val
7444else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007445 ac_cv_sizeof_float=0
7446fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007447fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007448echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7449echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7450cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007451#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007452_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007453
7454
Martin v. Löwis11437992002-04-12 09:54:03 +00007455echo "$as_me:$LINENO: checking for double" >&5
7456echo $ECHO_N "checking for double... $ECHO_C" >&6
7457if test "${ac_cv_type_double+set}" = set; then
7458 echo $ECHO_N "(cached) $ECHO_C" >&6
7459else
7460 cat >conftest.$ac_ext <<_ACEOF
7461#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007462/* confdefs.h. */
7463_ACEOF
7464cat confdefs.h >>conftest.$ac_ext
7465cat >>conftest.$ac_ext <<_ACEOF
7466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007467$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007468int
7469main ()
7470{
7471if ((double *) 0)
7472 return 0;
7473if (sizeof (double))
7474 return 0;
7475 ;
7476 return 0;
7477}
7478_ACEOF
7479rm -f conftest.$ac_objext
7480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7481 (eval $ac_compile) 2>&5
7482 ac_status=$?
7483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7484 (exit $ac_status); } &&
7485 { ac_try='test -s conftest.$ac_objext'
7486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7487 (eval $ac_try) 2>&5
7488 ac_status=$?
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); }; }; then
7491 ac_cv_type_double=yes
7492else
7493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007494sed 's/^/| /' conftest.$ac_ext >&5
7495
Martin v. Löwis11437992002-04-12 09:54:03 +00007496ac_cv_type_double=no
7497fi
7498rm -f conftest.$ac_objext conftest.$ac_ext
7499fi
7500echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7501echo "${ECHO_T}$ac_cv_type_double" >&6
7502
7503echo "$as_me:$LINENO: checking size of double" >&5
7504echo $ECHO_N "checking size of double... $ECHO_C" >&6
7505if test "${ac_cv_sizeof_double+set}" = set; then
7506 echo $ECHO_N "(cached) $ECHO_C" >&6
7507else
7508 if test "$ac_cv_type_double" = yes; then
7509 # The cast to unsigned long works around a bug in the HP C Compiler
7510 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7511 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7512 # This bug is HP SR number 8606223364.
7513 if test "$cross_compiling" = yes; then
7514 # Depending upon the size, compute the lo and hi bounds.
7515cat >conftest.$ac_ext <<_ACEOF
7516#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007517/* confdefs.h. */
7518_ACEOF
7519cat confdefs.h >>conftest.$ac_ext
7520cat >>conftest.$ac_ext <<_ACEOF
7521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007522$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007523int
7524main ()
7525{
7526static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7527test_array [0] = 0
7528
7529 ;
7530 return 0;
7531}
7532_ACEOF
7533rm -f conftest.$ac_objext
7534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7535 (eval $ac_compile) 2>&5
7536 ac_status=$?
7537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7538 (exit $ac_status); } &&
7539 { ac_try='test -s conftest.$ac_objext'
7540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7541 (eval $ac_try) 2>&5
7542 ac_status=$?
7543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7544 (exit $ac_status); }; }; then
7545 ac_lo=0 ac_mid=0
7546 while :; do
7547 cat >conftest.$ac_ext <<_ACEOF
7548#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007549/* confdefs.h. */
7550_ACEOF
7551cat confdefs.h >>conftest.$ac_ext
7552cat >>conftest.$ac_ext <<_ACEOF
7553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007554$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007555int
7556main ()
7557{
7558static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7559test_array [0] = 0
7560
7561 ;
7562 return 0;
7563}
7564_ACEOF
7565rm -f conftest.$ac_objext
7566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7567 (eval $ac_compile) 2>&5
7568 ac_status=$?
7569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7570 (exit $ac_status); } &&
7571 { ac_try='test -s conftest.$ac_objext'
7572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7573 (eval $ac_try) 2>&5
7574 ac_status=$?
7575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7576 (exit $ac_status); }; }; then
7577 ac_hi=$ac_mid; break
7578else
7579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007580sed 's/^/| /' conftest.$ac_ext >&5
7581
Martin v. Löwis11437992002-04-12 09:54:03 +00007582ac_lo=`expr $ac_mid + 1`
7583 if test $ac_lo -le $ac_mid; then
7584 ac_lo= ac_hi=
7585 break
7586 fi
7587 ac_mid=`expr 2 '*' $ac_mid + 1`
7588fi
7589rm -f conftest.$ac_objext conftest.$ac_ext
7590 done
7591else
7592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007593sed 's/^/| /' conftest.$ac_ext >&5
7594
Martin v. Löwis11437992002-04-12 09:54:03 +00007595cat >conftest.$ac_ext <<_ACEOF
7596#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007597/* confdefs.h. */
7598_ACEOF
7599cat confdefs.h >>conftest.$ac_ext
7600cat >>conftest.$ac_ext <<_ACEOF
7601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007602$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007603int
7604main ()
7605{
7606static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7607test_array [0] = 0
7608
7609 ;
7610 return 0;
7611}
7612_ACEOF
7613rm -f conftest.$ac_objext
7614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7615 (eval $ac_compile) 2>&5
7616 ac_status=$?
7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7618 (exit $ac_status); } &&
7619 { ac_try='test -s conftest.$ac_objext'
7620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7621 (eval $ac_try) 2>&5
7622 ac_status=$?
7623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624 (exit $ac_status); }; }; then
7625 ac_hi=-1 ac_mid=-1
7626 while :; do
7627 cat >conftest.$ac_ext <<_ACEOF
7628#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007629/* confdefs.h. */
7630_ACEOF
7631cat confdefs.h >>conftest.$ac_ext
7632cat >>conftest.$ac_ext <<_ACEOF
7633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007634$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007635int
7636main ()
7637{
7638static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7639test_array [0] = 0
7640
7641 ;
7642 return 0;
7643}
7644_ACEOF
7645rm -f conftest.$ac_objext
7646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7647 (eval $ac_compile) 2>&5
7648 ac_status=$?
7649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7650 (exit $ac_status); } &&
7651 { ac_try='test -s conftest.$ac_objext'
7652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7653 (eval $ac_try) 2>&5
7654 ac_status=$?
7655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7656 (exit $ac_status); }; }; then
7657 ac_lo=$ac_mid; break
7658else
7659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007660sed 's/^/| /' conftest.$ac_ext >&5
7661
Martin v. Löwis11437992002-04-12 09:54:03 +00007662ac_hi=`expr '(' $ac_mid ')' - 1`
7663 if test $ac_mid -le $ac_hi; then
7664 ac_lo= ac_hi=
7665 break
7666 fi
7667 ac_mid=`expr 2 '*' $ac_mid`
7668fi
7669rm -f conftest.$ac_objext conftest.$ac_ext
7670 done
7671else
7672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007673sed 's/^/| /' conftest.$ac_ext >&5
7674
Martin v. Löwis11437992002-04-12 09:54:03 +00007675ac_lo= ac_hi=
7676fi
7677rm -f conftest.$ac_objext conftest.$ac_ext
7678fi
7679rm -f conftest.$ac_objext conftest.$ac_ext
7680# Binary search between lo and hi bounds.
7681while test "x$ac_lo" != "x$ac_hi"; do
7682 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7683 cat >conftest.$ac_ext <<_ACEOF
7684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007685/* confdefs.h. */
7686_ACEOF
7687cat confdefs.h >>conftest.$ac_ext
7688cat >>conftest.$ac_ext <<_ACEOF
7689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007690$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007691int
7692main ()
7693{
7694static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7695test_array [0] = 0
7696
7697 ;
7698 return 0;
7699}
7700_ACEOF
7701rm -f conftest.$ac_objext
7702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7703 (eval $ac_compile) 2>&5
7704 ac_status=$?
7705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7706 (exit $ac_status); } &&
7707 { ac_try='test -s conftest.$ac_objext'
7708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7709 (eval $ac_try) 2>&5
7710 ac_status=$?
7711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7712 (exit $ac_status); }; }; then
7713 ac_hi=$ac_mid
7714else
7715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007716sed 's/^/| /' conftest.$ac_ext >&5
7717
Martin v. Löwis11437992002-04-12 09:54:03 +00007718ac_lo=`expr '(' $ac_mid ')' + 1`
7719fi
7720rm -f conftest.$ac_objext conftest.$ac_ext
7721done
7722case $ac_lo in
7723?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007724'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7725See \`config.log' for more details." >&5
7726echo "$as_me: error: cannot compute sizeof (double), 77
7727See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007728 { (exit 1); exit 1; }; } ;;
7729esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007730else
7731 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007732 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7733See \`config.log' for more details." >&5
7734echo "$as_me: error: cannot run test program while cross compiling
7735See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007736 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007737else
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 cat >conftest.$ac_ext <<_ACEOF
7739#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007740/* confdefs.h. */
7741_ACEOF
7742cat confdefs.h >>conftest.$ac_ext
7743cat >>conftest.$ac_ext <<_ACEOF
7744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007745$ac_includes_default
7746long longval () { return (long) (sizeof (double)); }
7747unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007748#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007749#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007750int
7751main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007752{
Martin v. Löwis11437992002-04-12 09:54:03 +00007753
7754 FILE *f = fopen ("conftest.val", "w");
7755 if (! f)
7756 exit (1);
7757 if (((long) (sizeof (double))) < 0)
7758 {
7759 long i = longval ();
7760 if (i != ((long) (sizeof (double))))
7761 exit (1);
7762 fprintf (f, "%ld\n", i);
7763 }
7764 else
7765 {
7766 unsigned long i = ulongval ();
7767 if (i != ((long) (sizeof (double))))
7768 exit (1);
7769 fprintf (f, "%lu\n", i);
7770 }
7771 exit (ferror (f) || fclose (f) != 0);
7772
7773 ;
7774 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007775}
Martin v. Löwis11437992002-04-12 09:54:03 +00007776_ACEOF
7777rm -f conftest$ac_exeext
7778if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7779 (eval $ac_link) 2>&5
7780 ac_status=$?
7781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7782 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7784 (eval $ac_try) 2>&5
7785 ac_status=$?
7786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7787 (exit $ac_status); }; }; then
7788 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007789else
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 echo "$as_me: program exited with status $ac_status" >&5
7791echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007792sed 's/^/| /' conftest.$ac_ext >&5
7793
Martin v. Löwis11437992002-04-12 09:54:03 +00007794( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007795{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7796See \`config.log' for more details." >&5
7797echo "$as_me: error: cannot compute sizeof (double), 77
7798See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 { (exit 1); exit 1; }; }
7800fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007801rm -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 +00007802fi
7803fi
7804rm -f conftest.val
7805else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007806 ac_cv_sizeof_double=0
7807fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007808fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007809echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7810echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7811cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007812#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007813_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007814
7815
Martin v. Löwis11437992002-04-12 09:54:03 +00007816echo "$as_me:$LINENO: checking for fpos_t" >&5
7817echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7818if test "${ac_cv_type_fpos_t+set}" = set; then
7819 echo $ECHO_N "(cached) $ECHO_C" >&6
7820else
7821 cat >conftest.$ac_ext <<_ACEOF
7822#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007823/* confdefs.h. */
7824_ACEOF
7825cat confdefs.h >>conftest.$ac_ext
7826cat >>conftest.$ac_ext <<_ACEOF
7827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007828$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007829int
7830main ()
7831{
7832if ((fpos_t *) 0)
7833 return 0;
7834if (sizeof (fpos_t))
7835 return 0;
7836 ;
7837 return 0;
7838}
7839_ACEOF
7840rm -f conftest.$ac_objext
7841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7842 (eval $ac_compile) 2>&5
7843 ac_status=$?
7844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7845 (exit $ac_status); } &&
7846 { ac_try='test -s conftest.$ac_objext'
7847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7848 (eval $ac_try) 2>&5
7849 ac_status=$?
7850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851 (exit $ac_status); }; }; then
7852 ac_cv_type_fpos_t=yes
7853else
7854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007855sed 's/^/| /' conftest.$ac_ext >&5
7856
Martin v. Löwis11437992002-04-12 09:54:03 +00007857ac_cv_type_fpos_t=no
7858fi
7859rm -f conftest.$ac_objext conftest.$ac_ext
7860fi
7861echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7862echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7863
7864echo "$as_me:$LINENO: checking size of fpos_t" >&5
7865echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7866if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7867 echo $ECHO_N "(cached) $ECHO_C" >&6
7868else
7869 if test "$ac_cv_type_fpos_t" = yes; then
7870 # The cast to unsigned long works around a bug in the HP C Compiler
7871 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7872 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7873 # This bug is HP SR number 8606223364.
7874 if test "$cross_compiling" = yes; then
7875 # Depending upon the size, compute the lo and hi bounds.
7876cat >conftest.$ac_ext <<_ACEOF
7877#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007878/* confdefs.h. */
7879_ACEOF
7880cat confdefs.h >>conftest.$ac_ext
7881cat >>conftest.$ac_ext <<_ACEOF
7882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007883$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007884int
7885main ()
7886{
7887static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7888test_array [0] = 0
7889
7890 ;
7891 return 0;
7892}
7893_ACEOF
7894rm -f conftest.$ac_objext
7895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7896 (eval $ac_compile) 2>&5
7897 ac_status=$?
7898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7899 (exit $ac_status); } &&
7900 { ac_try='test -s conftest.$ac_objext'
7901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7902 (eval $ac_try) 2>&5
7903 ac_status=$?
7904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7905 (exit $ac_status); }; }; then
7906 ac_lo=0 ac_mid=0
7907 while :; do
7908 cat >conftest.$ac_ext <<_ACEOF
7909#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007910/* confdefs.h. */
7911_ACEOF
7912cat confdefs.h >>conftest.$ac_ext
7913cat >>conftest.$ac_ext <<_ACEOF
7914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007915$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007916int
7917main ()
7918{
7919static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7920test_array [0] = 0
7921
7922 ;
7923 return 0;
7924}
7925_ACEOF
7926rm -f conftest.$ac_objext
7927if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7928 (eval $ac_compile) 2>&5
7929 ac_status=$?
7930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7931 (exit $ac_status); } &&
7932 { ac_try='test -s conftest.$ac_objext'
7933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7934 (eval $ac_try) 2>&5
7935 ac_status=$?
7936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7937 (exit $ac_status); }; }; then
7938 ac_hi=$ac_mid; break
7939else
7940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007941sed 's/^/| /' conftest.$ac_ext >&5
7942
Martin v. Löwis11437992002-04-12 09:54:03 +00007943ac_lo=`expr $ac_mid + 1`
7944 if test $ac_lo -le $ac_mid; then
7945 ac_lo= ac_hi=
7946 break
7947 fi
7948 ac_mid=`expr 2 '*' $ac_mid + 1`
7949fi
7950rm -f conftest.$ac_objext conftest.$ac_ext
7951 done
7952else
7953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007954sed 's/^/| /' conftest.$ac_ext >&5
7955
Martin v. Löwis11437992002-04-12 09:54:03 +00007956cat >conftest.$ac_ext <<_ACEOF
7957#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007958/* confdefs.h. */
7959_ACEOF
7960cat confdefs.h >>conftest.$ac_ext
7961cat >>conftest.$ac_ext <<_ACEOF
7962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007964int
7965main ()
7966{
7967static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7968test_array [0] = 0
7969
7970 ;
7971 return 0;
7972}
7973_ACEOF
7974rm -f conftest.$ac_objext
7975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7976 (eval $ac_compile) 2>&5
7977 ac_status=$?
7978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7979 (exit $ac_status); } &&
7980 { ac_try='test -s conftest.$ac_objext'
7981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7982 (eval $ac_try) 2>&5
7983 ac_status=$?
7984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7985 (exit $ac_status); }; }; then
7986 ac_hi=-1 ac_mid=-1
7987 while :; do
7988 cat >conftest.$ac_ext <<_ACEOF
7989#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007990/* confdefs.h. */
7991_ACEOF
7992cat confdefs.h >>conftest.$ac_ext
7993cat >>conftest.$ac_ext <<_ACEOF
7994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007995$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007996int
7997main ()
7998{
7999static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8000test_array [0] = 0
8001
8002 ;
8003 return 0;
8004}
8005_ACEOF
8006rm -f conftest.$ac_objext
8007if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8008 (eval $ac_compile) 2>&5
8009 ac_status=$?
8010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8011 (exit $ac_status); } &&
8012 { ac_try='test -s conftest.$ac_objext'
8013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8014 (eval $ac_try) 2>&5
8015 ac_status=$?
8016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8017 (exit $ac_status); }; }; then
8018 ac_lo=$ac_mid; break
8019else
8020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008021sed 's/^/| /' conftest.$ac_ext >&5
8022
Martin v. Löwis11437992002-04-12 09:54:03 +00008023ac_hi=`expr '(' $ac_mid ')' - 1`
8024 if test $ac_mid -le $ac_hi; then
8025 ac_lo= ac_hi=
8026 break
8027 fi
8028 ac_mid=`expr 2 '*' $ac_mid`
8029fi
8030rm -f conftest.$ac_objext conftest.$ac_ext
8031 done
8032else
8033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008034sed 's/^/| /' conftest.$ac_ext >&5
8035
Martin v. Löwis11437992002-04-12 09:54:03 +00008036ac_lo= ac_hi=
8037fi
8038rm -f conftest.$ac_objext conftest.$ac_ext
8039fi
8040rm -f conftest.$ac_objext conftest.$ac_ext
8041# Binary search between lo and hi bounds.
8042while test "x$ac_lo" != "x$ac_hi"; do
8043 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8044 cat >conftest.$ac_ext <<_ACEOF
8045#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008046/* confdefs.h. */
8047_ACEOF
8048cat confdefs.h >>conftest.$ac_ext
8049cat >>conftest.$ac_ext <<_ACEOF
8050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008051$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008052int
8053main ()
8054{
8055static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8056test_array [0] = 0
8057
8058 ;
8059 return 0;
8060}
8061_ACEOF
8062rm -f conftest.$ac_objext
8063if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8064 (eval $ac_compile) 2>&5
8065 ac_status=$?
8066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8067 (exit $ac_status); } &&
8068 { ac_try='test -s conftest.$ac_objext'
8069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8070 (eval $ac_try) 2>&5
8071 ac_status=$?
8072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8073 (exit $ac_status); }; }; then
8074 ac_hi=$ac_mid
8075else
8076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008077sed 's/^/| /' conftest.$ac_ext >&5
8078
Martin v. Löwis11437992002-04-12 09:54:03 +00008079ac_lo=`expr '(' $ac_mid ')' + 1`
8080fi
8081rm -f conftest.$ac_objext conftest.$ac_ext
8082done
8083case $ac_lo in
8084?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008085'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8086See \`config.log' for more details." >&5
8087echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8088See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008089 { (exit 1); exit 1; }; } ;;
8090esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008091else
8092 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008093 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8094See \`config.log' for more details." >&5
8095echo "$as_me: error: cannot run test program while cross compiling
8096See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008098else
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 cat >conftest.$ac_ext <<_ACEOF
8100#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008101/* confdefs.h. */
8102_ACEOF
8103cat confdefs.h >>conftest.$ac_ext
8104cat >>conftest.$ac_ext <<_ACEOF
8105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008106$ac_includes_default
8107long longval () { return (long) (sizeof (fpos_t)); }
8108unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008109#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008110#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008111int
8112main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008113{
Martin v. Löwis11437992002-04-12 09:54:03 +00008114
8115 FILE *f = fopen ("conftest.val", "w");
8116 if (! f)
8117 exit (1);
8118 if (((long) (sizeof (fpos_t))) < 0)
8119 {
8120 long i = longval ();
8121 if (i != ((long) (sizeof (fpos_t))))
8122 exit (1);
8123 fprintf (f, "%ld\n", i);
8124 }
8125 else
8126 {
8127 unsigned long i = ulongval ();
8128 if (i != ((long) (sizeof (fpos_t))))
8129 exit (1);
8130 fprintf (f, "%lu\n", i);
8131 }
8132 exit (ferror (f) || fclose (f) != 0);
8133
8134 ;
8135 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008136}
Martin v. Löwis11437992002-04-12 09:54:03 +00008137_ACEOF
8138rm -f conftest$ac_exeext
8139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8140 (eval $ac_link) 2>&5
8141 ac_status=$?
8142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8143 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8145 (eval $ac_try) 2>&5
8146 ac_status=$?
8147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148 (exit $ac_status); }; }; then
8149 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008150else
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 echo "$as_me: program exited with status $ac_status" >&5
8152echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008153sed 's/^/| /' conftest.$ac_ext >&5
8154
Martin v. Löwis11437992002-04-12 09:54:03 +00008155( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008156{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8157See \`config.log' for more details." >&5
8158echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8159See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 { (exit 1); exit 1; }; }
8161fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008162rm -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 +00008163fi
8164fi
8165rm -f conftest.val
8166else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008167 ac_cv_sizeof_fpos_t=0
8168fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008169fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008170echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8171echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8172cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008173#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008174_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008175
Michael W. Hudson54241132001-12-07 15:38:26 +00008176
8177
Martin v. Löwis11437992002-04-12 09:54:03 +00008178echo "$as_me:$LINENO: checking for long long support" >&5
8179echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008180have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008181cat >conftest.$ac_ext <<_ACEOF
8182#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008183/* confdefs.h. */
8184_ACEOF
8185cat confdefs.h >>conftest.$ac_ext
8186cat >>conftest.$ac_ext <<_ACEOF
8187/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008188
Martin v. Löwis11437992002-04-12 09:54:03 +00008189int
8190main ()
8191{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008192long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008193 ;
8194 return 0;
8195}
8196_ACEOF
8197rm -f conftest.$ac_objext
8198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8199 (eval $ac_compile) 2>&5
8200 ac_status=$?
8201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8202 (exit $ac_status); } &&
8203 { ac_try='test -s conftest.$ac_objext'
8204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8205 (eval $ac_try) 2>&5
8206 ac_status=$?
8207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8208 (exit $ac_status); }; }; then
8209
8210
8211cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008212#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008213_ACEOF
8214
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008215 have_long_long=yes
8216
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008217else
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008219sed 's/^/| /' conftest.$ac_ext >&5
8220
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008221fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008222rm -f conftest.$ac_objext conftest.$ac_ext
8223echo "$as_me:$LINENO: result: $have_long_long" >&5
8224echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008225if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008226echo "$as_me:$LINENO: checking for long long" >&5
8227echo $ECHO_N "checking for long long... $ECHO_C" >&6
8228if test "${ac_cv_type_long_long+set}" = set; then
8229 echo $ECHO_N "(cached) $ECHO_C" >&6
8230else
8231 cat >conftest.$ac_ext <<_ACEOF
8232#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008233/* confdefs.h. */
8234_ACEOF
8235cat confdefs.h >>conftest.$ac_ext
8236cat >>conftest.$ac_ext <<_ACEOF
8237/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008238$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008239int
8240main ()
8241{
8242if ((long long *) 0)
8243 return 0;
8244if (sizeof (long long))
8245 return 0;
8246 ;
8247 return 0;
8248}
8249_ACEOF
8250rm -f conftest.$ac_objext
8251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8252 (eval $ac_compile) 2>&5
8253 ac_status=$?
8254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8255 (exit $ac_status); } &&
8256 { ac_try='test -s conftest.$ac_objext'
8257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8258 (eval $ac_try) 2>&5
8259 ac_status=$?
8260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8261 (exit $ac_status); }; }; then
8262 ac_cv_type_long_long=yes
8263else
8264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008265sed 's/^/| /' conftest.$ac_ext >&5
8266
Martin v. Löwis11437992002-04-12 09:54:03 +00008267ac_cv_type_long_long=no
8268fi
8269rm -f conftest.$ac_objext conftest.$ac_ext
8270fi
8271echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8272echo "${ECHO_T}$ac_cv_type_long_long" >&6
8273
8274echo "$as_me:$LINENO: checking size of long long" >&5
8275echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8276if test "${ac_cv_sizeof_long_long+set}" = set; then
8277 echo $ECHO_N "(cached) $ECHO_C" >&6
8278else
8279 if test "$ac_cv_type_long_long" = yes; then
8280 # The cast to unsigned long works around a bug in the HP C Compiler
8281 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8282 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8283 # This bug is HP SR number 8606223364.
8284 if test "$cross_compiling" = yes; then
8285 # Depending upon the size, compute the lo and hi bounds.
8286cat >conftest.$ac_ext <<_ACEOF
8287#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008288/* confdefs.h. */
8289_ACEOF
8290cat confdefs.h >>conftest.$ac_ext
8291cat >>conftest.$ac_ext <<_ACEOF
8292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008293$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008294int
8295main ()
8296{
8297static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8298test_array [0] = 0
8299
8300 ;
8301 return 0;
8302}
8303_ACEOF
8304rm -f conftest.$ac_objext
8305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8306 (eval $ac_compile) 2>&5
8307 ac_status=$?
8308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309 (exit $ac_status); } &&
8310 { ac_try='test -s conftest.$ac_objext'
8311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8312 (eval $ac_try) 2>&5
8313 ac_status=$?
8314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8315 (exit $ac_status); }; }; then
8316 ac_lo=0 ac_mid=0
8317 while :; do
8318 cat >conftest.$ac_ext <<_ACEOF
8319#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008320/* confdefs.h. */
8321_ACEOF
8322cat confdefs.h >>conftest.$ac_ext
8323cat >>conftest.$ac_ext <<_ACEOF
8324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008325$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008326int
8327main ()
8328{
8329static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8330test_array [0] = 0
8331
8332 ;
8333 return 0;
8334}
8335_ACEOF
8336rm -f conftest.$ac_objext
8337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8338 (eval $ac_compile) 2>&5
8339 ac_status=$?
8340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8341 (exit $ac_status); } &&
8342 { ac_try='test -s conftest.$ac_objext'
8343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8344 (eval $ac_try) 2>&5
8345 ac_status=$?
8346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8347 (exit $ac_status); }; }; then
8348 ac_hi=$ac_mid; break
8349else
8350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008351sed 's/^/| /' conftest.$ac_ext >&5
8352
Martin v. Löwis11437992002-04-12 09:54:03 +00008353ac_lo=`expr $ac_mid + 1`
8354 if test $ac_lo -le $ac_mid; then
8355 ac_lo= ac_hi=
8356 break
8357 fi
8358 ac_mid=`expr 2 '*' $ac_mid + 1`
8359fi
8360rm -f conftest.$ac_objext conftest.$ac_ext
8361 done
8362else
8363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008364sed 's/^/| /' conftest.$ac_ext >&5
8365
Martin v. Löwis11437992002-04-12 09:54:03 +00008366cat >conftest.$ac_ext <<_ACEOF
8367#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008368/* confdefs.h. */
8369_ACEOF
8370cat confdefs.h >>conftest.$ac_ext
8371cat >>conftest.$ac_ext <<_ACEOF
8372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008373$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008374int
8375main ()
8376{
8377static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8378test_array [0] = 0
8379
8380 ;
8381 return 0;
8382}
8383_ACEOF
8384rm -f conftest.$ac_objext
8385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8386 (eval $ac_compile) 2>&5
8387 ac_status=$?
8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389 (exit $ac_status); } &&
8390 { ac_try='test -s conftest.$ac_objext'
8391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8392 (eval $ac_try) 2>&5
8393 ac_status=$?
8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395 (exit $ac_status); }; }; then
8396 ac_hi=-1 ac_mid=-1
8397 while :; do
8398 cat >conftest.$ac_ext <<_ACEOF
8399#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008400/* confdefs.h. */
8401_ACEOF
8402cat confdefs.h >>conftest.$ac_ext
8403cat >>conftest.$ac_ext <<_ACEOF
8404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008405$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008406int
8407main ()
8408{
8409static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8410test_array [0] = 0
8411
8412 ;
8413 return 0;
8414}
8415_ACEOF
8416rm -f conftest.$ac_objext
8417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8418 (eval $ac_compile) 2>&5
8419 ac_status=$?
8420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8421 (exit $ac_status); } &&
8422 { ac_try='test -s conftest.$ac_objext'
8423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8424 (eval $ac_try) 2>&5
8425 ac_status=$?
8426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8427 (exit $ac_status); }; }; then
8428 ac_lo=$ac_mid; break
8429else
8430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008431sed 's/^/| /' conftest.$ac_ext >&5
8432
Martin v. Löwis11437992002-04-12 09:54:03 +00008433ac_hi=`expr '(' $ac_mid ')' - 1`
8434 if test $ac_mid -le $ac_hi; then
8435 ac_lo= ac_hi=
8436 break
8437 fi
8438 ac_mid=`expr 2 '*' $ac_mid`
8439fi
8440rm -f conftest.$ac_objext conftest.$ac_ext
8441 done
8442else
8443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008444sed 's/^/| /' conftest.$ac_ext >&5
8445
Martin v. Löwis11437992002-04-12 09:54:03 +00008446ac_lo= ac_hi=
8447fi
8448rm -f conftest.$ac_objext conftest.$ac_ext
8449fi
8450rm -f conftest.$ac_objext conftest.$ac_ext
8451# Binary search between lo and hi bounds.
8452while test "x$ac_lo" != "x$ac_hi"; do
8453 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8454 cat >conftest.$ac_ext <<_ACEOF
8455#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008456/* confdefs.h. */
8457_ACEOF
8458cat confdefs.h >>conftest.$ac_ext
8459cat >>conftest.$ac_ext <<_ACEOF
8460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008461$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008462int
8463main ()
8464{
8465static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8466test_array [0] = 0
8467
8468 ;
8469 return 0;
8470}
8471_ACEOF
8472rm -f conftest.$ac_objext
8473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8474 (eval $ac_compile) 2>&5
8475 ac_status=$?
8476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8477 (exit $ac_status); } &&
8478 { ac_try='test -s conftest.$ac_objext'
8479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8480 (eval $ac_try) 2>&5
8481 ac_status=$?
8482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8483 (exit $ac_status); }; }; then
8484 ac_hi=$ac_mid
8485else
8486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008487sed 's/^/| /' conftest.$ac_ext >&5
8488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489ac_lo=`expr '(' $ac_mid ')' + 1`
8490fi
8491rm -f conftest.$ac_objext conftest.$ac_ext
8492done
8493case $ac_lo in
8494?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008495'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8496See \`config.log' for more details." >&5
8497echo "$as_me: error: cannot compute sizeof (long long), 77
8498See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 { (exit 1); exit 1; }; } ;;
8500esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008501else
8502 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008503 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8504See \`config.log' for more details." >&5
8505echo "$as_me: error: cannot run test program while cross compiling
8506See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008508else
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 cat >conftest.$ac_ext <<_ACEOF
8510#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008511/* confdefs.h. */
8512_ACEOF
8513cat confdefs.h >>conftest.$ac_ext
8514cat >>conftest.$ac_ext <<_ACEOF
8515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008516$ac_includes_default
8517long longval () { return (long) (sizeof (long long)); }
8518unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008519#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008520#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008521int
8522main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008523{
Martin v. Löwis11437992002-04-12 09:54:03 +00008524
8525 FILE *f = fopen ("conftest.val", "w");
8526 if (! f)
8527 exit (1);
8528 if (((long) (sizeof (long long))) < 0)
8529 {
8530 long i = longval ();
8531 if (i != ((long) (sizeof (long long))))
8532 exit (1);
8533 fprintf (f, "%ld\n", i);
8534 }
8535 else
8536 {
8537 unsigned long i = ulongval ();
8538 if (i != ((long) (sizeof (long long))))
8539 exit (1);
8540 fprintf (f, "%lu\n", i);
8541 }
8542 exit (ferror (f) || fclose (f) != 0);
8543
8544 ;
8545 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008546}
Martin v. Löwis11437992002-04-12 09:54:03 +00008547_ACEOF
8548rm -f conftest$ac_exeext
8549if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8550 (eval $ac_link) 2>&5
8551 ac_status=$?
8552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8553 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8555 (eval $ac_try) 2>&5
8556 ac_status=$?
8557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8558 (exit $ac_status); }; }; then
8559 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008560else
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 echo "$as_me: program exited with status $ac_status" >&5
8562echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008563sed 's/^/| /' conftest.$ac_ext >&5
8564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008566{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8567See \`config.log' for more details." >&5
8568echo "$as_me: error: cannot compute sizeof (long long), 77
8569See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 { (exit 1); exit 1; }; }
8571fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008572rm -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 +00008573fi
8574fi
8575rm -f conftest.val
8576else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008577 ac_cv_sizeof_long_long=0
8578fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008579fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008580echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8581echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8582cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008583#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008584_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008585
Michael W. Hudson54241132001-12-07 15:38:26 +00008586
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008587fi
8588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8590echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008591have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008592cat >conftest.$ac_ext <<_ACEOF
8593#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008594/* confdefs.h. */
8595_ACEOF
8596cat confdefs.h >>conftest.$ac_ext
8597cat >>conftest.$ac_ext <<_ACEOF
8598/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600int
8601main ()
8602{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008603uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008604 ;
8605 return 0;
8606}
8607_ACEOF
8608rm -f conftest.$ac_objext
8609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8610 (eval $ac_compile) 2>&5
8611 ac_status=$?
8612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8613 (exit $ac_status); } &&
8614 { ac_try='test -s conftest.$ac_objext'
8615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8616 (eval $ac_try) 2>&5
8617 ac_status=$?
8618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8619 (exit $ac_status); }; }; then
8620
8621
8622cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008623#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008624_ACEOF
8625
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008626 have_uintptr_t=yes
8627
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008628else
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008630sed 's/^/| /' conftest.$ac_ext >&5
8631
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008633rm -f conftest.$ac_objext conftest.$ac_ext
8634echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8635echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008636if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008637echo "$as_me:$LINENO: checking for uintptr_t" >&5
8638echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8639if test "${ac_cv_type_uintptr_t+set}" = set; then
8640 echo $ECHO_N "(cached) $ECHO_C" >&6
8641else
8642 cat >conftest.$ac_ext <<_ACEOF
8643#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008644/* confdefs.h. */
8645_ACEOF
8646cat confdefs.h >>conftest.$ac_ext
8647cat >>conftest.$ac_ext <<_ACEOF
8648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008649$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008650int
8651main ()
8652{
8653if ((uintptr_t *) 0)
8654 return 0;
8655if (sizeof (uintptr_t))
8656 return 0;
8657 ;
8658 return 0;
8659}
8660_ACEOF
8661rm -f conftest.$ac_objext
8662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8663 (eval $ac_compile) 2>&5
8664 ac_status=$?
8665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8666 (exit $ac_status); } &&
8667 { ac_try='test -s conftest.$ac_objext'
8668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8669 (eval $ac_try) 2>&5
8670 ac_status=$?
8671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8672 (exit $ac_status); }; }; then
8673 ac_cv_type_uintptr_t=yes
8674else
8675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008676sed 's/^/| /' conftest.$ac_ext >&5
8677
Martin v. Löwis11437992002-04-12 09:54:03 +00008678ac_cv_type_uintptr_t=no
8679fi
8680rm -f conftest.$ac_objext conftest.$ac_ext
8681fi
8682echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8683echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8684
8685echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8686echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8687if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8688 echo $ECHO_N "(cached) $ECHO_C" >&6
8689else
8690 if test "$ac_cv_type_uintptr_t" = yes; then
8691 # The cast to unsigned long works around a bug in the HP C Compiler
8692 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8693 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8694 # This bug is HP SR number 8606223364.
8695 if test "$cross_compiling" = yes; then
8696 # Depending upon the size, compute the lo and hi bounds.
8697cat >conftest.$ac_ext <<_ACEOF
8698#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008699/* confdefs.h. */
8700_ACEOF
8701cat confdefs.h >>conftest.$ac_ext
8702cat >>conftest.$ac_ext <<_ACEOF
8703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008704$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008705int
8706main ()
8707{
8708static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8709test_array [0] = 0
8710
8711 ;
8712 return 0;
8713}
8714_ACEOF
8715rm -f conftest.$ac_objext
8716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8717 (eval $ac_compile) 2>&5
8718 ac_status=$?
8719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8720 (exit $ac_status); } &&
8721 { ac_try='test -s conftest.$ac_objext'
8722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8723 (eval $ac_try) 2>&5
8724 ac_status=$?
8725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8726 (exit $ac_status); }; }; then
8727 ac_lo=0 ac_mid=0
8728 while :; do
8729 cat >conftest.$ac_ext <<_ACEOF
8730#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008731/* confdefs.h. */
8732_ACEOF
8733cat confdefs.h >>conftest.$ac_ext
8734cat >>conftest.$ac_ext <<_ACEOF
8735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008736$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008737int
8738main ()
8739{
8740static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8741test_array [0] = 0
8742
8743 ;
8744 return 0;
8745}
8746_ACEOF
8747rm -f conftest.$ac_objext
8748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8749 (eval $ac_compile) 2>&5
8750 ac_status=$?
8751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8752 (exit $ac_status); } &&
8753 { ac_try='test -s conftest.$ac_objext'
8754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8755 (eval $ac_try) 2>&5
8756 ac_status=$?
8757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8758 (exit $ac_status); }; }; then
8759 ac_hi=$ac_mid; break
8760else
8761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008762sed 's/^/| /' conftest.$ac_ext >&5
8763
Martin v. Löwis11437992002-04-12 09:54:03 +00008764ac_lo=`expr $ac_mid + 1`
8765 if test $ac_lo -le $ac_mid; then
8766 ac_lo= ac_hi=
8767 break
8768 fi
8769 ac_mid=`expr 2 '*' $ac_mid + 1`
8770fi
8771rm -f conftest.$ac_objext conftest.$ac_ext
8772 done
8773else
8774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008775sed 's/^/| /' conftest.$ac_ext >&5
8776
Martin v. Löwis11437992002-04-12 09:54:03 +00008777cat >conftest.$ac_ext <<_ACEOF
8778#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008779/* confdefs.h. */
8780_ACEOF
8781cat confdefs.h >>conftest.$ac_ext
8782cat >>conftest.$ac_ext <<_ACEOF
8783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008784$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008785int
8786main ()
8787{
8788static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8789test_array [0] = 0
8790
8791 ;
8792 return 0;
8793}
8794_ACEOF
8795rm -f conftest.$ac_objext
8796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8797 (eval $ac_compile) 2>&5
8798 ac_status=$?
8799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8800 (exit $ac_status); } &&
8801 { ac_try='test -s conftest.$ac_objext'
8802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8803 (eval $ac_try) 2>&5
8804 ac_status=$?
8805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8806 (exit $ac_status); }; }; then
8807 ac_hi=-1 ac_mid=-1
8808 while :; do
8809 cat >conftest.$ac_ext <<_ACEOF
8810#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008811/* confdefs.h. */
8812_ACEOF
8813cat confdefs.h >>conftest.$ac_ext
8814cat >>conftest.$ac_ext <<_ACEOF
8815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008816$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008817int
8818main ()
8819{
8820static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8821test_array [0] = 0
8822
8823 ;
8824 return 0;
8825}
8826_ACEOF
8827rm -f conftest.$ac_objext
8828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8829 (eval $ac_compile) 2>&5
8830 ac_status=$?
8831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8832 (exit $ac_status); } &&
8833 { ac_try='test -s conftest.$ac_objext'
8834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8835 (eval $ac_try) 2>&5
8836 ac_status=$?
8837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8838 (exit $ac_status); }; }; then
8839 ac_lo=$ac_mid; break
8840else
8841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008842sed 's/^/| /' conftest.$ac_ext >&5
8843
Martin v. Löwis11437992002-04-12 09:54:03 +00008844ac_hi=`expr '(' $ac_mid ')' - 1`
8845 if test $ac_mid -le $ac_hi; then
8846 ac_lo= ac_hi=
8847 break
8848 fi
8849 ac_mid=`expr 2 '*' $ac_mid`
8850fi
8851rm -f conftest.$ac_objext conftest.$ac_ext
8852 done
8853else
8854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008855sed 's/^/| /' conftest.$ac_ext >&5
8856
Martin v. Löwis11437992002-04-12 09:54:03 +00008857ac_lo= ac_hi=
8858fi
8859rm -f conftest.$ac_objext conftest.$ac_ext
8860fi
8861rm -f conftest.$ac_objext conftest.$ac_ext
8862# Binary search between lo and hi bounds.
8863while test "x$ac_lo" != "x$ac_hi"; do
8864 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8865 cat >conftest.$ac_ext <<_ACEOF
8866#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008867/* confdefs.h. */
8868_ACEOF
8869cat confdefs.h >>conftest.$ac_ext
8870cat >>conftest.$ac_ext <<_ACEOF
8871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008872$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008873int
8874main ()
8875{
8876static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8877test_array [0] = 0
8878
8879 ;
8880 return 0;
8881}
8882_ACEOF
8883rm -f conftest.$ac_objext
8884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8885 (eval $ac_compile) 2>&5
8886 ac_status=$?
8887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8888 (exit $ac_status); } &&
8889 { ac_try='test -s conftest.$ac_objext'
8890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8891 (eval $ac_try) 2>&5
8892 ac_status=$?
8893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8894 (exit $ac_status); }; }; then
8895 ac_hi=$ac_mid
8896else
8897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008898sed 's/^/| /' conftest.$ac_ext >&5
8899
Martin v. Löwis11437992002-04-12 09:54:03 +00008900ac_lo=`expr '(' $ac_mid ')' + 1`
8901fi
8902rm -f conftest.$ac_objext conftest.$ac_ext
8903done
8904case $ac_lo in
8905?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008906'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8907See \`config.log' for more details." >&5
8908echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8909See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 { (exit 1); exit 1; }; } ;;
8911esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008912else
8913 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008914 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8915See \`config.log' for more details." >&5
8916echo "$as_me: error: cannot run test program while cross compiling
8917See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008919else
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 cat >conftest.$ac_ext <<_ACEOF
8921#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008922/* confdefs.h. */
8923_ACEOF
8924cat confdefs.h >>conftest.$ac_ext
8925cat >>conftest.$ac_ext <<_ACEOF
8926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008927$ac_includes_default
8928long longval () { return (long) (sizeof (uintptr_t)); }
8929unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008930#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008931#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008932int
8933main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008934{
Martin v. Löwis11437992002-04-12 09:54:03 +00008935
8936 FILE *f = fopen ("conftest.val", "w");
8937 if (! f)
8938 exit (1);
8939 if (((long) (sizeof (uintptr_t))) < 0)
8940 {
8941 long i = longval ();
8942 if (i != ((long) (sizeof (uintptr_t))))
8943 exit (1);
8944 fprintf (f, "%ld\n", i);
8945 }
8946 else
8947 {
8948 unsigned long i = ulongval ();
8949 if (i != ((long) (sizeof (uintptr_t))))
8950 exit (1);
8951 fprintf (f, "%lu\n", i);
8952 }
8953 exit (ferror (f) || fclose (f) != 0);
8954
8955 ;
8956 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008957}
Martin v. Löwis11437992002-04-12 09:54:03 +00008958_ACEOF
8959rm -f conftest$ac_exeext
8960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8961 (eval $ac_link) 2>&5
8962 ac_status=$?
8963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8964 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8966 (eval $ac_try) 2>&5
8967 ac_status=$?
8968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8969 (exit $ac_status); }; }; then
8970 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008971else
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 echo "$as_me: program exited with status $ac_status" >&5
8973echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008974sed 's/^/| /' conftest.$ac_ext >&5
8975
Martin v. Löwis11437992002-04-12 09:54:03 +00008976( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008977{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8978See \`config.log' for more details." >&5
8979echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8980See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 { (exit 1); exit 1; }; }
8982fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008983rm -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 +00008984fi
8985fi
8986rm -f conftest.val
8987else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008988 ac_cv_sizeof_uintptr_t=0
8989fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008990fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008991echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8992echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8993cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008994#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008995_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008996
Michael W. Hudson54241132001-12-07 15:38:26 +00008997
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008998fi
8999
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009000# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009001echo "$as_me:$LINENO: checking size of off_t" >&5
9002echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9003if test "${ac_cv_sizeof_off_t+set}" = set; then
9004 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009005else
9006 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009007 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009008else
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 cat >conftest.$ac_ext <<_ACEOF
9010#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009011/* confdefs.h. */
9012_ACEOF
9013cat confdefs.h >>conftest.$ac_ext
9014cat >>conftest.$ac_ext <<_ACEOF
9015/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009016#include <stdio.h>
9017#include <sys/types.h>
9018main()
9019{
9020 FILE *f=fopen("conftestval", "w");
9021 if (!f) exit(1);
9022 fprintf(f, "%d\n", sizeof(off_t));
9023 exit(0);
9024}
Martin v. Löwis11437992002-04-12 09:54:03 +00009025_ACEOF
9026rm -f conftest$ac_exeext
9027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9028 (eval $ac_link) 2>&5
9029 ac_status=$?
9030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9033 (eval $ac_try) 2>&5
9034 ac_status=$?
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009037 ac_cv_sizeof_off_t=`cat conftestval`
9038else
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 echo "$as_me: program exited with status $ac_status" >&5
9040echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009041sed 's/^/| /' conftest.$ac_ext >&5
9042
Martin v. Löwis11437992002-04-12 09:54:03 +00009043( exit $ac_status )
9044ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009045fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009046rm -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 +00009047fi
9048
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009049fi
9050
Martin v. Löwis11437992002-04-12 09:54:03 +00009051echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9052echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9053
9054cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009055#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009056_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009057
Michael W. Hudson54241132001-12-07 15:38:26 +00009058
Martin v. Löwis11437992002-04-12 09:54:03 +00009059echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9060echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009061if test "$have_long_long" = yes -a \
9062 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9063 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009064
Martin v. Löwis11437992002-04-12 09:54:03 +00009065cat >>confdefs.h <<\_ACEOF
9066#define HAVE_LARGEFILE_SUPPORT 1
9067_ACEOF
9068
9069 echo "$as_me:$LINENO: result: yes" >&5
9070echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009071else
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 echo "$as_me:$LINENO: result: no" >&5
9073echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009074fi
9075
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009076# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009077echo "$as_me:$LINENO: checking size of time_t" >&5
9078echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9079if test "${ac_cv_sizeof_time_t+set}" = set; then
9080 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009081else
9082 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009083 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009084else
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 cat >conftest.$ac_ext <<_ACEOF
9086#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009087/* confdefs.h. */
9088_ACEOF
9089cat confdefs.h >>conftest.$ac_ext
9090cat >>conftest.$ac_ext <<_ACEOF
9091/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009092#include <stdio.h>
9093#include <time.h>
9094main()
9095{
9096 FILE *f=fopen("conftestval", "w");
9097 if (!f) exit(1);
9098 fprintf(f, "%d\n", sizeof(time_t));
9099 exit(0);
9100}
Martin v. Löwis11437992002-04-12 09:54:03 +00009101_ACEOF
9102rm -f conftest$ac_exeext
9103if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9104 (eval $ac_link) 2>&5
9105 ac_status=$?
9106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9107 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9109 (eval $ac_try) 2>&5
9110 ac_status=$?
9111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9112 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009113 ac_cv_sizeof_time_t=`cat conftestval`
9114else
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 echo "$as_me: program exited with status $ac_status" >&5
9116echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009117sed 's/^/| /' conftest.$ac_ext >&5
9118
Martin v. Löwis11437992002-04-12 09:54:03 +00009119( exit $ac_status )
9120ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009121fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009122rm -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 +00009123fi
9124
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009125fi
9126
Martin v. Löwis11437992002-04-12 09:54:03 +00009127echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9128echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9129
9130cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009131#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009132_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009133
Michael W. Hudson54241132001-12-07 15:38:26 +00009134
9135
Trent Mick635f6fb2000-08-23 21:33:05 +00009136# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009137ac_save_cc="$CC"
9138if test "$ac_cv_kpthread" = "yes"
9139then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009140elif test "$ac_cv_kthread" = "yes"
9141then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009142elif test "$ac_cv_pthread" = "yes"
9143then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009144fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009145echo "$as_me:$LINENO: checking for pthread_t" >&5
9146echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009147have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009148cat >conftest.$ac_ext <<_ACEOF
9149#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009150/* confdefs.h. */
9151_ACEOF
9152cat confdefs.h >>conftest.$ac_ext
9153cat >>conftest.$ac_ext <<_ACEOF
9154/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009155#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009156int
9157main ()
9158{
Guido van Rossum12580492000-09-24 16:47:19 +00009159pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 ;
9161 return 0;
9162}
9163_ACEOF
9164rm -f conftest.$ac_objext
9165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9166 (eval $ac_compile) 2>&5
9167 ac_status=$?
9168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9169 (exit $ac_status); } &&
9170 { ac_try='test -s conftest.$ac_objext'
9171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9172 (eval $ac_try) 2>&5
9173 ac_status=$?
9174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9175 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009176 have_pthread_t=yes
9177else
Martin v. Löwis11437992002-04-12 09:54:03 +00009178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009179sed 's/^/| /' conftest.$ac_ext >&5
9180
Trent Mick635f6fb2000-08-23 21:33:05 +00009181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009182rm -f conftest.$ac_objext conftest.$ac_ext
9183echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9184echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009185if test "$have_pthread_t" = yes ; then
9186 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009187 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9188echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9189 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9190 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009191else
9192 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009193 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009194else
Martin v. Löwis11437992002-04-12 09:54:03 +00009195 cat >conftest.$ac_ext <<_ACEOF
9196#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009197/* confdefs.h. */
9198_ACEOF
9199cat confdefs.h >>conftest.$ac_ext
9200cat >>conftest.$ac_ext <<_ACEOF
9201/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009202#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009203#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009204 main()
9205 {
9206 FILE *f=fopen("conftestval", "w");
9207 if (!f) exit(1);
9208 fprintf(f, "%d\n", sizeof(pthread_t));
9209 exit(0);
9210 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009211_ACEOF
9212rm -f conftest$ac_exeext
9213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9214 (eval $ac_link) 2>&5
9215 ac_status=$?
9216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9217 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9219 (eval $ac_try) 2>&5
9220 ac_status=$?
9221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9222 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009223 ac_cv_sizeof_pthread_t=`cat conftestval`
9224else
Martin v. Löwis11437992002-04-12 09:54:03 +00009225 echo "$as_me: program exited with status $ac_status" >&5
9226echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009227sed 's/^/| /' conftest.$ac_ext >&5
9228
Martin v. Löwis11437992002-04-12 09:54:03 +00009229( exit $ac_status )
9230ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009231fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009232rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009233fi
9234
Trent Mick635f6fb2000-08-23 21:33:05 +00009235fi
9236
Martin v. Löwis11437992002-04-12 09:54:03 +00009237 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9238echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9239
9240cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009241#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009242_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009243
9244fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009245CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009246
Martin v. Löwis11437992002-04-12 09:54:03 +00009247echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9248echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009249# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9250if test "${enable_toolbox_glue+set}" = set; then
9251 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009252
Martin v. Löwis11437992002-04-12 09:54:03 +00009253fi;
Jack Jansene578a632001-08-15 01:27:14 +00009254
9255if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009256then
Jack Jansene578a632001-08-15 01:27:14 +00009257 case $ac_sys_system/$ac_sys_release in
9258 Darwin/*)
9259 enable_toolbox_glue="yes";;
9260 *)
9261 enable_toolbox_glue="no";;
9262 esac
9263fi
9264case "$enable_toolbox_glue" in
9265yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009266 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009267 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009268 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009269
9270cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009271#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009272_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009273
9274 ;;
9275*)
9276 extra_frameworks=""
9277 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009278 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009279 ;;
9280esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009281echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9282echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009283
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009284
9285case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009286 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009287 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009288 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009289 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009291 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009292 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009293 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009294 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009295 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009296esac
9297
Martin v. Löwis11437992002-04-12 09:54:03 +00009298echo "$as_me:$LINENO: checking for --enable-framework" >&5
9299echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009300if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009301then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009302 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009304 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305
Martin v. Löwis11437992002-04-12 09:54:03 +00009306cat >>confdefs.h <<\_ACEOF
9307#define WITH_NEXT_FRAMEWORK 1
9308_ACEOF
9309
9310 echo "$as_me:$LINENO: result: yes" >&5
9311echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009312else
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 echo "$as_me:$LINENO: result: no" >&5
9314echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009315fi
9316
Martin v. Löwis11437992002-04-12 09:54:03 +00009317echo "$as_me:$LINENO: checking for dyld" >&5
9318echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009319case $ac_sys_system/$ac_sys_release in
9320 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009321
Martin v. Löwis11437992002-04-12 09:54:03 +00009322cat >>confdefs.h <<\_ACEOF
9323#define WITH_DYLD 1
9324_ACEOF
9325
9326 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9327echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009328 ;;
9329 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 echo "$as_me:$LINENO: result: no" >&5
9331echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009332 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009333esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009334
Guido van Rossum0a516c91994-09-12 10:58:40 +00009335# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336
Michael W. Hudson54241132001-12-07 15:38:26 +00009337
9338
9339
9340
Guido van Rossum0a516c91994-09-12 10:58:40 +00009341# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009342# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009343echo "$as_me:$LINENO: checking SO" >&5
9344echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009345if test -z "$SO"
9346then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009347 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009348 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009349 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009350 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009351 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009352else
9353 # this might also be a termcap variable, see #610332
9354 echo
9355 echo '====================================================================='
9356 echo '+ +'
9357 echo '+ WARNING: You have set SO in your environment. +'
9358 echo '+ Do you really mean to change the extension for shared libraries? +'
9359 echo '+ Continuing in 10 seconds to let you to ponder. +'
9360 echo '+ +'
9361 echo '====================================================================='
9362 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009364echo "$as_me:$LINENO: result: $SO" >&5
9365echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009366# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009367# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009368# (Shared libraries in this instance are shared modules to be loaded into
9369# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009370echo "$as_me:$LINENO: checking LDSHARED" >&5
9371echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009372if test -z "$LDSHARED"
9373then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009374 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009375 AIX*)
9376 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009377 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009378 ;;
9379 BeOS*)
9380 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009381 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009382 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009383 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009384 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009386 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009387 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009388 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009389 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009390 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009391 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009392 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009393 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9394 if test "$enable_framework" ; then
9395 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009396 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9397 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009398 else
9399 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009400 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009401 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009402 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00009403 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9404 if test "$enable_framework" ; then
9405 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009406 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9407 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009408 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009409 # No framework, use the Python app as bundle-loader
9410 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009411 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009412 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009413 Darwin/*)
9414 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9415 # This allows an extension to be used in any Python
9416 if test ${MACOSX_DEPLOYMENT_TARGET-10.1} '>' 10.2
9417 then
9418 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
9419 BLDSHARED="$LDSHARED"
9420 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
9421 else
9422 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9423 if test "$enable_framework" ; then
9424 # Link against the framework. All externals should be defined.
9425 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9426 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
9427 else
9428 # No framework, use the Python app as bundle-loader
9429 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9430 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
9431 fi
9432 fi
9433 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009434 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009435 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009436 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009437 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009438 then
9439 LDSHARED="cc -shared ${LDFLAGS}"
9440 else
9441 LDSHARED="ld -Bshareable ${LDFLAGS}"
9442 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009443 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009444 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009445 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009446 then LDSHARED='$(CC) -shared'
9447 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009448 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009449 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009450 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009451 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009452 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009453 *) LDSHARED="ld";;
9454 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009455fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009456echo "$as_me:$LINENO: result: $LDSHARED" >&5
9457echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009458BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009459# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009460# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009461echo "$as_me:$LINENO: checking CCSHARED" >&5
9462echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009463if test -z "$CCSHARED"
9464then
Guido van Rossum07397971997-04-29 21:49:50 +00009465 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009466 SunOS*) if test "$GCC" = yes;
9467 then CCSHARED="-fPIC";
9468 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009469 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009470 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009471 else CCSHARED="+z";
9472 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009473 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009474 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009475 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009476 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009477 if test "$GCC" = "yes"
9478 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009479 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009480 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009481 SCO_SV*)
9482 if test "$GCC" = "yes"
9483 then CCSHARED="-fPIC"
9484 else CCSHARED="-Kpic -belf"
9485 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009486 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009487 IRIX*/6*) case $CC in
9488 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009489 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009490 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009491 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009492 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009494echo "$as_me:$LINENO: result: $CCSHARED" >&5
9495echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009496# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009497# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009498echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9499echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009500if test -z "$LINKFORSHARED"
9501then
Guido van Rossum07397971997-04-29 21:49:50 +00009502 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009503 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009504 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009505 LINKFORSHARED="-Wl,-E -Wl,+s";;
9506# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009507 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009508 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009509 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009511 # -u __dummy makes the linker aware of the objc runtime
9512 # in System.framework; otherwise, __objcInit (referenced in
9513 # crt1.o) gets erroneously defined as common, which breaks dynamic
9514 # loading of any modules which reference it in System.framework.
9515 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9516 # not used by the core itself but which needs to be in the core so
9517 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009518 # -prebind is no longer used, because it actually seems to give a
9519 # slowdown in stead of a speedup, maybe due to the large number of
9520 # dynamic loads Python does.
9521 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009522 if test "$enable_framework"
9523 then
Jack Jansenc8607b72003-12-08 01:10:12 +00009524 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework Python"
Jack Jansene578a632001-08-15 01:27:14 +00009525 fi
9526 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009527 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009528 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009529 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009531 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9532 then
9533 LINKFORSHARED="-Wl,--export-dynamic"
9534 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009535 SunOS/5*) case $CC in
9536 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009537 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009538 then
9539 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009540 fi;;
9541 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009542 CYGWIN*)
9543 if test $enable_shared = "no"
9544 then
9545 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9546 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009547 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009548fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009549echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9550echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009551
Michael W. Hudson54241132001-12-07 15:38:26 +00009552
Martin v. Löwis11437992002-04-12 09:54:03 +00009553echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9554echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009555if test ! "$LIBRARY" = "$LDLIBRARY"
9556then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009557 case $ac_sys_system in
9558 CYGWIN*)
9559 # Cygwin needs CCSHARED when building extension DLLs
9560 # but not when building the interpreter DLL.
9561 CFLAGSFORSHARED='';;
9562 *)
9563 CFLAGSFORSHARED='$(CCSHARED)'
9564 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009565fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009566echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9567echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009568
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009569# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9570# library (with --enable-shared).
9571# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009572# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9573# if it is not required, since it creates a dependency of the shared library
9574# to LIBS. This, in turn, means that applications linking the shared libpython
9575# don't need to link LIBS explicitly. The default should be only changed
9576# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009577
9578echo "$as_me:$LINENO: checking SHLIBS" >&5
9579echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9580case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009581 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009582 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009583esac
9584echo "$as_me:$LINENO: result: $SHLIBS" >&5
9585echo "${ECHO_T}$SHLIBS" >&6
9586
9587
Guido van Rossum627b2d71993-12-24 10:39:16 +00009588# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009589
9590echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9591echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9592if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9593 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009594else
Martin v. Löwis11437992002-04-12 09:54:03 +00009595 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009596LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009597cat >conftest.$ac_ext <<_ACEOF
9598#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009599/* confdefs.h. */
9600_ACEOF
9601cat confdefs.h >>conftest.$ac_ext
9602cat >>conftest.$ac_ext <<_ACEOF
9603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009604
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009605/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009606#ifdef __cplusplus
9607extern "C"
9608#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009609/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 builtin and then its argument prototype would still apply. */
9611char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009612int
9613main ()
9614{
9615dlopen ();
9616 ;
9617 return 0;
9618}
9619_ACEOF
9620rm -f conftest.$ac_objext conftest$ac_exeext
9621if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9622 (eval $ac_link) 2>&5
9623 ac_status=$?
9624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9625 (exit $ac_status); } &&
9626 { ac_try='test -s conftest$ac_exeext'
9627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9628 (eval $ac_try) 2>&5
9629 ac_status=$?
9630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9631 (exit $ac_status); }; }; then
9632 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009633else
Martin v. Löwis11437992002-04-12 09:54:03 +00009634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009635sed 's/^/| /' conftest.$ac_ext >&5
9636
Martin v. Löwis11437992002-04-12 09:54:03 +00009637ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009638fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009639rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9640LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009641fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009642echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9643echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9644if test $ac_cv_lib_dl_dlopen = yes; then
9645 cat >>confdefs.h <<_ACEOF
9646#define HAVE_LIBDL 1
9647_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009648
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009649 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009650
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009651fi
9652 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009653
9654echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9655echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9656if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9657 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009658else
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009660LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009661cat >conftest.$ac_ext <<_ACEOF
9662#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* confdefs.h. */
9664_ACEOF
9665cat confdefs.h >>conftest.$ac_ext
9666cat >>conftest.$ac_ext <<_ACEOF
9667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009668
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009669/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009670#ifdef __cplusplus
9671extern "C"
9672#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009673/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 builtin and then its argument prototype would still apply. */
9675char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009676int
9677main ()
9678{
9679shl_load ();
9680 ;
9681 return 0;
9682}
9683_ACEOF
9684rm -f conftest.$ac_objext conftest$ac_exeext
9685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9686 (eval $ac_link) 2>&5
9687 ac_status=$?
9688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9689 (exit $ac_status); } &&
9690 { ac_try='test -s conftest$ac_exeext'
9691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9692 (eval $ac_try) 2>&5
9693 ac_status=$?
9694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9695 (exit $ac_status); }; }; then
9696 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009697else
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009699sed 's/^/| /' conftest.$ac_ext >&5
9700
Martin v. Löwis11437992002-04-12 09:54:03 +00009701ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009702fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009703rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9704LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009705fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009706echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9707echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9708if test $ac_cv_lib_dld_shl_load = yes; then
9709 cat >>confdefs.h <<_ACEOF
9710#define HAVE_LIBDLD 1
9711_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009712
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009713 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009714
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009715fi
9716 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009717
9718# only check for sem_ini if thread support is requested
9719if test "$with_threads" = "yes" -o -z "$with_threads"; then
9720 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009721echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9722if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009724else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009725 ac_func_search_save_LIBS=$LIBS
9726ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009727cat >conftest.$ac_ext <<_ACEOF
9728#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009729/* confdefs.h. */
9730_ACEOF
9731cat confdefs.h >>conftest.$ac_ext
9732cat >>conftest.$ac_ext <<_ACEOF
9733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009734
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009735/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009736#ifdef __cplusplus
9737extern "C"
9738#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009739/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 builtin and then its argument prototype would still apply. */
9741char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009742int
9743main ()
9744{
9745sem_init ();
9746 ;
9747 return 0;
9748}
9749_ACEOF
9750rm -f conftest.$ac_objext conftest$ac_exeext
9751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9752 (eval $ac_link) 2>&5
9753 ac_status=$?
9754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9755 (exit $ac_status); } &&
9756 { ac_try='test -s conftest$ac_exeext'
9757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9758 (eval $ac_try) 2>&5
9759 ac_status=$?
9760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9761 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009762 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009763else
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009765sed 's/^/| /' conftest.$ac_ext >&5
9766
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009767fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009768rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009769if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009770 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009771 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9772 cat >conftest.$ac_ext <<_ACEOF
9773#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009774/* confdefs.h. */
9775_ACEOF
9776cat confdefs.h >>conftest.$ac_ext
9777cat >>conftest.$ac_ext <<_ACEOF
9778/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009779
9780/* Override any gcc2 internal prototype to avoid an error. */
9781#ifdef __cplusplus
9782extern "C"
9783#endif
9784/* We use char because int might match the return type of a gcc2
9785 builtin and then its argument prototype would still apply. */
9786char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009787int
9788main ()
9789{
9790sem_init ();
9791 ;
9792 return 0;
9793}
Martin v. Löwis11437992002-04-12 09:54:03 +00009794_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009795rm -f conftest.$ac_objext conftest$ac_exeext
9796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9797 (eval $ac_link) 2>&5
9798 ac_status=$?
9799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9800 (exit $ac_status); } &&
9801 { ac_try='test -s conftest$ac_exeext'
9802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9803 (eval $ac_try) 2>&5
9804 ac_status=$?
9805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9806 (exit $ac_status); }; }; then
9807 ac_cv_search_sem_init="-l$ac_lib"
9808break
9809else
9810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009811sed 's/^/| /' conftest.$ac_ext >&5
9812
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009813fi
9814rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9815 done
9816fi
9817LIBS=$ac_func_search_save_LIBS
9818fi
9819echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9820echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9821if test "$ac_cv_search_sem_init" != no; then
9822 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009823
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009824fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009825 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009826 # posix4 on Solaris 2.6
9827 # pthread (first!) on Linux
9828fi
9829
Martin v. Löwis19d17342003-06-14 21:03:05 +00009830# check if we need libintl for locale functions
9831echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9832echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9833if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9834 echo $ECHO_N "(cached) $ECHO_C" >&6
9835else
9836 ac_check_lib_save_LIBS=$LIBS
9837LIBS="-lintl $LIBS"
9838cat >conftest.$ac_ext <<_ACEOF
9839#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009840/* confdefs.h. */
9841_ACEOF
9842cat confdefs.h >>conftest.$ac_ext
9843cat >>conftest.$ac_ext <<_ACEOF
9844/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009845
9846/* Override any gcc2 internal prototype to avoid an error. */
9847#ifdef __cplusplus
9848extern "C"
9849#endif
9850/* We use char because int might match the return type of a gcc2
9851 builtin and then its argument prototype would still apply. */
9852char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009853int
9854main ()
9855{
9856textdomain ();
9857 ;
9858 return 0;
9859}
9860_ACEOF
9861rm -f conftest.$ac_objext conftest$ac_exeext
9862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9863 (eval $ac_link) 2>&5
9864 ac_status=$?
9865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9866 (exit $ac_status); } &&
9867 { ac_try='test -s conftest$ac_exeext'
9868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9869 (eval $ac_try) 2>&5
9870 ac_status=$?
9871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9872 (exit $ac_status); }; }; then
9873 ac_cv_lib_intl_textdomain=yes
9874else
9875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009876sed 's/^/| /' conftest.$ac_ext >&5
9877
Martin v. Löwis19d17342003-06-14 21:03:05 +00009878ac_cv_lib_intl_textdomain=no
9879fi
9880rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9881LIBS=$ac_check_lib_save_LIBS
9882fi
9883echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9884echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9885if test $ac_cv_lib_intl_textdomain = yes; then
9886
9887cat >>confdefs.h <<\_ACEOF
9888#define WITH_LIBINTL 1
9889_ACEOF
9890
9891fi
9892
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009893
9894# checks for system dependent C++ extensions support
9895case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9897echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9898 cat >conftest.$ac_ext <<_ACEOF
9899#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009900/* confdefs.h. */
9901_ACEOF
9902cat confdefs.h >>conftest.$ac_ext
9903cat >>conftest.$ac_ext <<_ACEOF
9904/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009905#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009906int
9907main ()
9908{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009909loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009910 ;
9911 return 0;
9912}
9913_ACEOF
9914rm -f conftest.$ac_objext conftest$ac_exeext
9915if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9916 (eval $ac_link) 2>&5
9917 ac_status=$?
9918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9919 (exit $ac_status); } &&
9920 { ac_try='test -s conftest$ac_exeext'
9921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9922 (eval $ac_try) 2>&5
9923 ac_status=$?
9924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9925 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009926
Martin v. Löwis11437992002-04-12 09:54:03 +00009927cat >>confdefs.h <<\_ACEOF
9928#define AIX_GENUINE_CPLUSPLUS 1
9929_ACEOF
9930
9931 echo "$as_me:$LINENO: result: yes" >&5
9932echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009933else
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009935sed 's/^/| /' conftest.$ac_ext >&5
9936
Martin v. Löwis11437992002-04-12 09:54:03 +00009937echo "$as_me:$LINENO: result: no" >&5
9938echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009940rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009941 *) ;;
9942esac
9943
Guido van Rossum70c7f481998-03-26 18:44:10 +00009944# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009945# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +00009946echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9947echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9948if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9949 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009950else
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009952LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009953cat >conftest.$ac_ext <<_ACEOF
9954#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009955/* confdefs.h. */
9956_ACEOF
9957cat confdefs.h >>conftest.$ac_ext
9958cat >>conftest.$ac_ext <<_ACEOF
9959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009961/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009962#ifdef __cplusplus
9963extern "C"
9964#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009965/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009966 builtin and then its argument prototype would still apply. */
9967char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009968int
9969main ()
9970{
9971t_open ();
9972 ;
9973 return 0;
9974}
9975_ACEOF
9976rm -f conftest.$ac_objext conftest$ac_exeext
9977if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9978 (eval $ac_link) 2>&5
9979 ac_status=$?
9980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9981 (exit $ac_status); } &&
9982 { ac_try='test -s conftest$ac_exeext'
9983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9984 (eval $ac_try) 2>&5
9985 ac_status=$?
9986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9987 (exit $ac_status); }; }; then
9988 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009989else
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009991sed 's/^/| /' conftest.$ac_ext >&5
9992
Martin v. Löwis11437992002-04-12 09:54:03 +00009993ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009994fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009995rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9996LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009997fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009998echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9999echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10000if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010001 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010002fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010003 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010004echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10005echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10006if test "${ac_cv_lib_socket_socket+set}" = set; then
10007 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010008else
Martin v. Löwis11437992002-04-12 09:54:03 +000010009 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010010LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010011cat >conftest.$ac_ext <<_ACEOF
10012#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010013/* confdefs.h. */
10014_ACEOF
10015cat confdefs.h >>conftest.$ac_ext
10016cat >>conftest.$ac_ext <<_ACEOF
10017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010018
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010019/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010020#ifdef __cplusplus
10021extern "C"
10022#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010023/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010024 builtin and then its argument prototype would still apply. */
10025char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010026int
10027main ()
10028{
10029socket ();
10030 ;
10031 return 0;
10032}
10033_ACEOF
10034rm -f conftest.$ac_objext conftest$ac_exeext
10035if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10036 (eval $ac_link) 2>&5
10037 ac_status=$?
10038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10039 (exit $ac_status); } &&
10040 { ac_try='test -s conftest$ac_exeext'
10041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10042 (eval $ac_try) 2>&5
10043 ac_status=$?
10044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10045 (exit $ac_status); }; }; then
10046 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010047else
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010049sed 's/^/| /' conftest.$ac_ext >&5
10050
Martin v. Löwis11437992002-04-12 09:54:03 +000010051ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010052fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010053rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10054LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010056echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10057echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10058if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010059 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010060fi
10061 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010062
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010063case "$ac_sys_system" in
10064BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010065echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10066echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10067if test "${ac_cv_lib_net_socket+set}" = set; then
10068 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010069else
Martin v. Löwis11437992002-04-12 09:54:03 +000010070 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010071LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010072cat >conftest.$ac_ext <<_ACEOF
10073#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010074/* confdefs.h. */
10075_ACEOF
10076cat confdefs.h >>conftest.$ac_ext
10077cat >>conftest.$ac_ext <<_ACEOF
10078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010079
Guido van Rossumad678af1998-10-02 14:42:15 +000010080/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010081#ifdef __cplusplus
10082extern "C"
10083#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010084/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 builtin and then its argument prototype would still apply. */
10086char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010087int
10088main ()
10089{
10090socket ();
10091 ;
10092 return 0;
10093}
10094_ACEOF
10095rm -f conftest.$ac_objext conftest$ac_exeext
10096if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10097 (eval $ac_link) 2>&5
10098 ac_status=$?
10099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10100 (exit $ac_status); } &&
10101 { ac_try='test -s conftest$ac_exeext'
10102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10103 (eval $ac_try) 2>&5
10104 ac_status=$?
10105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10106 (exit $ac_status); }; }; then
10107 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010108else
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010110sed 's/^/| /' conftest.$ac_ext >&5
10111
Martin v. Löwis11437992002-04-12 09:54:03 +000010112ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010114rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10115LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010116fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010117echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10118echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10119if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010120 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010121fi
10122 # BeOS
10123;;
10124esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010125
Martin v. Löwis11437992002-04-12 09:54:03 +000010126echo "$as_me:$LINENO: checking for --with-libs" >&5
10127echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10128
Guido van Rossuma68acba1996-07-31 17:36:39 +000010129# Check whether --with-libs or --without-libs was given.
10130if test "${with_libs+set}" = set; then
10131 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010132
10133echo "$as_me:$LINENO: result: $withval" >&5
10134echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010135LIBS="$withval $LIBS"
10136
10137else
Martin v. Löwis11437992002-04-12 09:54:03 +000010138 echo "$as_me:$LINENO: result: no" >&5
10139echo "${ECHO_T}no" >&6
10140fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010141
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010142# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010143
10144
Martin v. Löwis11437992002-04-12 09:54:03 +000010145echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10146echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10147
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010148# Check whether --with-signal-module or --without-signal-module was given.
10149if test "${with_signal_module+set}" = set; then
10150 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010151
Martin v. Löwis11437992002-04-12 09:54:03 +000010152fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010153
10154if test -z "$with_signal_module"
10155then with_signal_module="yes"
10156fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010157echo "$as_me:$LINENO: result: $with_signal_module" >&5
10158echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010159
10160if test "${with_signal_module}" = "yes"; then
10161 USE_SIGNAL_MODULE=""
10162 SIGNAL_OBJS=""
10163else
10164 USE_SIGNAL_MODULE="#"
10165 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10166fi
10167
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010168# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010169
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010170USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010171
Martin v. Löwis11437992002-04-12 09:54:03 +000010172echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10173echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10174
Guido van Rossumec2f0731997-01-22 20:54:01 +000010175
10176# Check whether --with-dec-threads or --without-dec-threads was given.
10177if test "${with_dec_threads+set}" = set; then
10178 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010179
10180echo "$as_me:$LINENO: result: $withval" >&5
10181echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010182LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010183if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010184 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010185fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010186else
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 echo "$as_me:$LINENO: result: no" >&5
10188echo "${ECHO_T}no" >&6
10189fi;
10190
10191# Templates for things AC_DEFINEd more than once.
10192# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010193
10194
Martin v. Löwis11437992002-04-12 09:54:03 +000010195
10196
10197
10198
10199
10200echo "$as_me:$LINENO: checking for --with-threads" >&5
10201echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10202
Guido van Rossumec2f0731997-01-22 20:54:01 +000010203# Check whether --with-threads or --without-threads was given.
10204if test "${with_threads+set}" = set; then
10205 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010206
Martin v. Löwis11437992002-04-12 09:54:03 +000010207fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010208
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010209# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010210
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010211# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010212if test "${with_thread+set}" = set; then
10213 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010214 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010215fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010216
10217if test -z "$with_threads"
10218then with_threads="yes"
10219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010220echo "$as_me:$LINENO: result: $with_threads" >&5
10221echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010222
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010223
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010224if test "$with_threads" = "no"
10225then
10226 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010227elif test "$ac_cv_pthread_is_default" = yes
10228then
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010230#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010231_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010232
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010233 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010235#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010236_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010237
10238 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010240elif test "$ac_cv_kpthread" = "yes"
10241then
10242 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010243 if test "$ac_cv_cxx_thread" = "yes"; then
10244 CXX="$CXX -Kpthread"
10245 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010247#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010248_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010249
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010250 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010251 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010252elif test "$ac_cv_kthread" = "yes"
10253then
10254 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010255 if test "$ac_cv_cxx_thread" = "yes"; then
10256 CXX="$CXX -Kthread"
10257 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010258 cat >>confdefs.h <<\_ACEOF
10259#define WITH_THREAD 1
10260_ACEOF
10261
10262 posix_threads=yes
10263 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010264elif test "$ac_cv_pthread" = "yes"
10265then
10266 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010267 if test "$ac_cv_cxx_thread" = "yes"; then
10268 CXX="$CXX -pthread"
10269 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010270 cat >>confdefs.h <<\_ACEOF
10271#define WITH_THREAD 1
10272_ACEOF
10273
10274 posix_threads=yes
10275 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010276else
10277 if test ! -z "$with_threads" -a -d "$with_threads"
10278 then LDFLAGS="$LDFLAGS -L$with_threads"
10279 fi
10280 if test ! -z "$withval" -a -d "$withval"
10281 then LDFLAGS="$LDFLAGS -L$withval"
10282 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010283
10284 # According to the POSIX spec, a pthreads implementation must
10285 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10287echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10288 cat >conftest.$ac_ext <<_ACEOF
10289#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010290/* confdefs.h. */
10291_ACEOF
10292cat confdefs.h >>conftest.$ac_ext
10293cat >>conftest.$ac_ext <<_ACEOF
10294/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010295
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010296#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010297#ifdef _POSIX_THREADS
10298yes
10299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010300
10301_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010303 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010304 unistd_defines_pthreads=yes
10305else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010306 unistd_defines_pthreads=no
10307fi
10308rm -f conftest*
10309
Martin v. Löwis11437992002-04-12 09:54:03 +000010310 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10311echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010312
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010314#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010315_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010316
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 if test "${ac_cv_header_cthreads_h+set}" = set; then
10318 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10319echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10320if test "${ac_cv_header_cthreads_h+set}" = set; then
10321 echo $ECHO_N "(cached) $ECHO_C" >&6
10322fi
10323echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10324echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010325else
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 # Is the header compilable?
10327echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10328echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10329cat >conftest.$ac_ext <<_ACEOF
10330#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010331/* confdefs.h. */
10332_ACEOF
10333cat confdefs.h >>conftest.$ac_ext
10334cat >>conftest.$ac_ext <<_ACEOF
10335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010336$ac_includes_default
10337#include <cthreads.h>
10338_ACEOF
10339rm -f conftest.$ac_objext
10340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10341 (eval $ac_compile) 2>&5
10342 ac_status=$?
10343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10344 (exit $ac_status); } &&
10345 { ac_try='test -s conftest.$ac_objext'
10346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10347 (eval $ac_try) 2>&5
10348 ac_status=$?
10349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10350 (exit $ac_status); }; }; then
10351 ac_header_compiler=yes
10352else
10353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010354sed 's/^/| /' conftest.$ac_ext >&5
10355
Martin v. Löwis11437992002-04-12 09:54:03 +000010356ac_header_compiler=no
10357fi
10358rm -f conftest.$ac_objext conftest.$ac_ext
10359echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10360echo "${ECHO_T}$ac_header_compiler" >&6
10361
10362# Is the header present?
10363echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10364echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10365cat >conftest.$ac_ext <<_ACEOF
10366#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010367/* confdefs.h. */
10368_ACEOF
10369cat confdefs.h >>conftest.$ac_ext
10370cat >>conftest.$ac_ext <<_ACEOF
10371/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010372#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010373_ACEOF
10374if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10375 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10376 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010377 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 rm -f conftest.er1
10379 cat conftest.err >&5
10380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10381 (exit $ac_status); } >/dev/null; then
10382 if test -s conftest.err; then
10383 ac_cpp_err=$ac_c_preproc_warn_flag
10384 else
10385 ac_cpp_err=
10386 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010387else
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 ac_cpp_err=yes
10389fi
10390if test -z "$ac_cpp_err"; then
10391 ac_header_preproc=yes
10392else
10393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010394sed 's/^/| /' conftest.$ac_ext >&5
10395
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010397fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010398rm -f conftest.err conftest.$ac_ext
10399echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10400echo "${ECHO_T}$ac_header_preproc" >&6
10401
10402# So? What about this header?
10403case $ac_header_compiler:$ac_header_preproc in
10404 yes:no )
10405 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10406echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10407 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010408echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10409 (
10410 cat <<\_ASBOX
10411## ------------------------------------ ##
10412## Report this to bug-autoconf@gnu.org. ##
10413## ------------------------------------ ##
10414_ASBOX
10415 ) |
10416 sed "s/^/$as_me: WARNING: /" >&2
10417 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 no:yes )
10419 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10420echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10421 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10422echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10423 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010424echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10425 (
10426 cat <<\_ASBOX
10427## ------------------------------------ ##
10428## Report this to bug-autoconf@gnu.org. ##
10429## ------------------------------------ ##
10430_ASBOX
10431 ) |
10432 sed "s/^/$as_me: WARNING: /" >&2
10433 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010434esac
10435echo "$as_me:$LINENO: checking for cthreads.h" >&5
10436echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10437if test "${ac_cv_header_cthreads_h+set}" = set; then
10438 echo $ECHO_N "(cached) $ECHO_C" >&6
10439else
10440 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010442echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10443echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10444
10445fi
10446if test $ac_cv_header_cthreads_h = yes; then
10447 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010448#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010449_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010450
Martin v. Löwis11437992002-04-12 09:54:03 +000010451 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010452#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010453_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010454
Martin v. Löwis11437992002-04-12 09:54:03 +000010455
10456cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010457#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010458_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010459
10460 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010461 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010462else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010463
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10465 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10466echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10467if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10468 echo $ECHO_N "(cached) $ECHO_C" >&6
10469fi
10470echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10471echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010472else
Martin v. Löwis11437992002-04-12 09:54:03 +000010473 # Is the header compilable?
10474echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10475echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10476cat >conftest.$ac_ext <<_ACEOF
10477#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010478/* confdefs.h. */
10479_ACEOF
10480cat confdefs.h >>conftest.$ac_ext
10481cat >>conftest.$ac_ext <<_ACEOF
10482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010483$ac_includes_default
10484#include <mach/cthreads.h>
10485_ACEOF
10486rm -f conftest.$ac_objext
10487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10488 (eval $ac_compile) 2>&5
10489 ac_status=$?
10490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10491 (exit $ac_status); } &&
10492 { ac_try='test -s conftest.$ac_objext'
10493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10494 (eval $ac_try) 2>&5
10495 ac_status=$?
10496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10497 (exit $ac_status); }; }; then
10498 ac_header_compiler=yes
10499else
10500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010501sed 's/^/| /' conftest.$ac_ext >&5
10502
Martin v. Löwis11437992002-04-12 09:54:03 +000010503ac_header_compiler=no
10504fi
10505rm -f conftest.$ac_objext conftest.$ac_ext
10506echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10507echo "${ECHO_T}$ac_header_compiler" >&6
10508
10509# Is the header present?
10510echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10511echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10512cat >conftest.$ac_ext <<_ACEOF
10513#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010514/* confdefs.h. */
10515_ACEOF
10516cat confdefs.h >>conftest.$ac_ext
10517cat >>conftest.$ac_ext <<_ACEOF
10518/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010519#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010520_ACEOF
10521if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10522 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10523 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010524 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 rm -f conftest.er1
10526 cat conftest.err >&5
10527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10528 (exit $ac_status); } >/dev/null; then
10529 if test -s conftest.err; then
10530 ac_cpp_err=$ac_c_preproc_warn_flag
10531 else
10532 ac_cpp_err=
10533 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010534else
Martin v. Löwis11437992002-04-12 09:54:03 +000010535 ac_cpp_err=yes
10536fi
10537if test -z "$ac_cpp_err"; then
10538 ac_header_preproc=yes
10539else
10540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010541sed 's/^/| /' conftest.$ac_ext >&5
10542
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010544fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010545rm -f conftest.err conftest.$ac_ext
10546echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10547echo "${ECHO_T}$ac_header_preproc" >&6
10548
10549# So? What about this header?
10550case $ac_header_compiler:$ac_header_preproc in
10551 yes:no )
10552 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10553echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10554 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010555echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10556 (
10557 cat <<\_ASBOX
10558## ------------------------------------ ##
10559## Report this to bug-autoconf@gnu.org. ##
10560## ------------------------------------ ##
10561_ASBOX
10562 ) |
10563 sed "s/^/$as_me: WARNING: /" >&2
10564 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010565 no:yes )
10566 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10567echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10568 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10569echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10570 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010571echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10572 (
10573 cat <<\_ASBOX
10574## ------------------------------------ ##
10575## Report this to bug-autoconf@gnu.org. ##
10576## ------------------------------------ ##
10577_ASBOX
10578 ) |
10579 sed "s/^/$as_me: WARNING: /" >&2
10580 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010581esac
10582echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10583echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10584if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10585 echo $ECHO_N "(cached) $ECHO_C" >&6
10586else
10587 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010588fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010589echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10590echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10591
10592fi
10593if test $ac_cv_header_mach_cthreads_h = yes; then
10594 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010595#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010596_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010597
Martin v. Löwis11437992002-04-12 09:54:03 +000010598 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010599#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010600_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010601
Martin v. Löwis11437992002-04-12 09:54:03 +000010602
10603cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010604#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010605_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010606
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010607 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010608else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010609
Martin v. Löwis11437992002-04-12 09:54:03 +000010610 echo "$as_me:$LINENO: checking for --with-pth" >&5
10611echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10612
10613# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010614if test "${with_pth+set}" = set; then
10615 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010616 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010617echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010618 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010619#define WITH_THREAD 1
10620_ACEOF
10621
10622
10623cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010624#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010625_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010626
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010627 LIBS="-lpth $LIBS"
10628 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010629else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010630 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010631echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010632
10633 # Just looking for pthread_create in libpthread is not enough:
10634 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10635 # So we really have to include pthread.h, and then link.
10636 _libs=$LIBS
10637 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010638 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10639echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10640 cat >conftest.$ac_ext <<_ACEOF
10641#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010642/* confdefs.h. */
10643_ACEOF
10644cat confdefs.h >>conftest.$ac_ext
10645cat >>conftest.$ac_ext <<_ACEOF
10646/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010647#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010648
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010649void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010650int
10651main ()
10652{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010653
10654pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010655 ;
10656 return 0;
10657}
10658_ACEOF
10659rm -f conftest.$ac_objext conftest$ac_exeext
10660if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10661 (eval $ac_link) 2>&5
10662 ac_status=$?
10663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10664 (exit $ac_status); } &&
10665 { ac_try='test -s conftest$ac_exeext'
10666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10667 (eval $ac_try) 2>&5
10668 ac_status=$?
10669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10670 (exit $ac_status); }; }; then
10671
10672 echo "$as_me:$LINENO: result: yes" >&5
10673echo "${ECHO_T}yes" >&6
10674 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010675#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010676_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010677
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010678 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010679 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010680else
Martin v. Löwis11437992002-04-12 09:54:03 +000010681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010682sed 's/^/| /' conftest.$ac_ext >&5
10683
Martin v. Löwis11437992002-04-12 09:54:03 +000010684
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010685 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10687echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10688if test "${ac_cv_func_pthread_detach+set}" = set; then
10689 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010690else
Martin v. Löwis11437992002-04-12 09:54:03 +000010691 cat >conftest.$ac_ext <<_ACEOF
10692#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010693/* confdefs.h. */
10694_ACEOF
10695cat confdefs.h >>conftest.$ac_ext
10696cat >>conftest.$ac_ext <<_ACEOF
10697/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010698/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010699 which can conflict with char pthread_detach (); below.
10700 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010701 <limits.h> exists even on freestanding compilers. Under hpux,
10702 including <limits.h> includes <sys/time.h> and causes problems
10703 checking for functions defined therein. */
10704#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010705# include <limits.h>
10706#else
10707# include <assert.h>
10708#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010709/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010710#ifdef __cplusplus
10711extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010712{
Martin v. Löwis11437992002-04-12 09:54:03 +000010713#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010714/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010715 builtin and then its argument prototype would still apply. */
10716char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010717/* The GNU C library defines this for functions which it implements
10718 to always fail with ENOSYS. Some functions are actually named
10719 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010720#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010721choke me
10722#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010723char (*f) () = pthread_detach;
10724#endif
10725#ifdef __cplusplus
10726}
Guido van Rossumad678af1998-10-02 14:42:15 +000010727#endif
10728
Skip Montanaro6dead952003-09-25 14:50:04 +000010729int
10730main ()
10731{
10732return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 ;
10734 return 0;
10735}
10736_ACEOF
10737rm -f conftest.$ac_objext conftest$ac_exeext
10738if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10739 (eval $ac_link) 2>&5
10740 ac_status=$?
10741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10742 (exit $ac_status); } &&
10743 { ac_try='test -s conftest$ac_exeext'
10744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10745 (eval $ac_try) 2>&5
10746 ac_status=$?
10747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10748 (exit $ac_status); }; }; then
10749 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010750else
Martin v. Löwis11437992002-04-12 09:54:03 +000010751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010752sed 's/^/| /' conftest.$ac_ext >&5
10753
Martin v. Löwis11437992002-04-12 09:54:03 +000010754ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010755fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010756rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010757fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010758echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10759echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10760if test $ac_cv_func_pthread_detach = yes; then
10761 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010762#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010763_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010764
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010765 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010766 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010767else
Guido van Rossumad678af1998-10-02 14:42:15 +000010768
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010769 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10770 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10771echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10772if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10773 echo $ECHO_N "(cached) $ECHO_C" >&6
10774fi
10775echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10776echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10777else
10778 # Is the header compilable?
10779echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10780echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10781cat >conftest.$ac_ext <<_ACEOF
10782#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* confdefs.h. */
10784_ACEOF
10785cat confdefs.h >>conftest.$ac_ext
10786cat >>conftest.$ac_ext <<_ACEOF
10787/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010788$ac_includes_default
10789#include <atheos/threads.h>
10790_ACEOF
10791rm -f conftest.$ac_objext
10792if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10793 (eval $ac_compile) 2>&5
10794 ac_status=$?
10795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10796 (exit $ac_status); } &&
10797 { ac_try='test -s conftest.$ac_objext'
10798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10799 (eval $ac_try) 2>&5
10800 ac_status=$?
10801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10802 (exit $ac_status); }; }; then
10803 ac_header_compiler=yes
10804else
10805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010806sed 's/^/| /' conftest.$ac_ext >&5
10807
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010808ac_header_compiler=no
10809fi
10810rm -f conftest.$ac_objext conftest.$ac_ext
10811echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10812echo "${ECHO_T}$ac_header_compiler" >&6
10813
10814# Is the header present?
10815echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10816echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10817cat >conftest.$ac_ext <<_ACEOF
10818#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010819/* confdefs.h. */
10820_ACEOF
10821cat confdefs.h >>conftest.$ac_ext
10822cat >>conftest.$ac_ext <<_ACEOF
10823/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010824#include <atheos/threads.h>
10825_ACEOF
10826if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10827 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10828 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010829 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010830 rm -f conftest.er1
10831 cat conftest.err >&5
10832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10833 (exit $ac_status); } >/dev/null; then
10834 if test -s conftest.err; then
10835 ac_cpp_err=$ac_c_preproc_warn_flag
10836 else
10837 ac_cpp_err=
10838 fi
10839else
10840 ac_cpp_err=yes
10841fi
10842if test -z "$ac_cpp_err"; then
10843 ac_header_preproc=yes
10844else
10845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010846sed 's/^/| /' conftest.$ac_ext >&5
10847
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010848 ac_header_preproc=no
10849fi
10850rm -f conftest.err conftest.$ac_ext
10851echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10852echo "${ECHO_T}$ac_header_preproc" >&6
10853
10854# So? What about this header?
10855case $ac_header_compiler:$ac_header_preproc in
10856 yes:no )
10857 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10858echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10859 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010860echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10861 (
10862 cat <<\_ASBOX
10863## ------------------------------------ ##
10864## Report this to bug-autoconf@gnu.org. ##
10865## ------------------------------------ ##
10866_ASBOX
10867 ) |
10868 sed "s/^/$as_me: WARNING: /" >&2
10869 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010870 no:yes )
10871 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10872echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10873 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10874echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10875 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010876echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10877 (
10878 cat <<\_ASBOX
10879## ------------------------------------ ##
10880## Report this to bug-autoconf@gnu.org. ##
10881## ------------------------------------ ##
10882_ASBOX
10883 ) |
10884 sed "s/^/$as_me: WARNING: /" >&2
10885 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010886esac
10887echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10888echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10889if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10890 echo $ECHO_N "(cached) $ECHO_C" >&6
10891else
10892 ac_cv_header_atheos_threads_h=$ac_header_preproc
10893fi
10894echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10895echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10896
10897fi
10898if test $ac_cv_header_atheos_threads_h = yes; then
10899 cat >>confdefs.h <<\_ACEOF
10900#define WITH_THREAD 1
10901_ACEOF
10902
10903
10904cat >>confdefs.h <<\_ACEOF
10905#define ATHEOS_THREADS 1
10906_ACEOF
10907
10908 THREADOBJ="Python/thread.o"
10909else
10910
Martin v. Löwis11437992002-04-12 09:54:03 +000010911 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10912 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10913echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10914if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10915 echo $ECHO_N "(cached) $ECHO_C" >&6
10916fi
10917echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10918echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010919else
Martin v. Löwis11437992002-04-12 09:54:03 +000010920 # Is the header compilable?
10921echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10922echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10923cat >conftest.$ac_ext <<_ACEOF
10924#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010925/* confdefs.h. */
10926_ACEOF
10927cat confdefs.h >>conftest.$ac_ext
10928cat >>conftest.$ac_ext <<_ACEOF
10929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010930$ac_includes_default
10931#include <kernel/OS.h>
10932_ACEOF
10933rm -f conftest.$ac_objext
10934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10935 (eval $ac_compile) 2>&5
10936 ac_status=$?
10937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10938 (exit $ac_status); } &&
10939 { ac_try='test -s conftest.$ac_objext'
10940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10941 (eval $ac_try) 2>&5
10942 ac_status=$?
10943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10944 (exit $ac_status); }; }; then
10945 ac_header_compiler=yes
10946else
10947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010948sed 's/^/| /' conftest.$ac_ext >&5
10949
Martin v. Löwis11437992002-04-12 09:54:03 +000010950ac_header_compiler=no
10951fi
10952rm -f conftest.$ac_objext conftest.$ac_ext
10953echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10954echo "${ECHO_T}$ac_header_compiler" >&6
10955
10956# Is the header present?
10957echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10958echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10959cat >conftest.$ac_ext <<_ACEOF
10960#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010961/* confdefs.h. */
10962_ACEOF
10963cat confdefs.h >>conftest.$ac_ext
10964cat >>conftest.$ac_ext <<_ACEOF
10965/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010966#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010967_ACEOF
10968if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10969 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10970 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010971 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010972 rm -f conftest.er1
10973 cat conftest.err >&5
10974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10975 (exit $ac_status); } >/dev/null; then
10976 if test -s conftest.err; then
10977 ac_cpp_err=$ac_c_preproc_warn_flag
10978 else
10979 ac_cpp_err=
10980 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010981else
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 ac_cpp_err=yes
10983fi
10984if test -z "$ac_cpp_err"; then
10985 ac_header_preproc=yes
10986else
10987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010988sed 's/^/| /' conftest.$ac_ext >&5
10989
Martin v. Löwis11437992002-04-12 09:54:03 +000010990 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010991fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010992rm -f conftest.err conftest.$ac_ext
10993echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10994echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010995
Martin v. Löwis11437992002-04-12 09:54:03 +000010996# So? What about this header?
10997case $ac_header_compiler:$ac_header_preproc in
10998 yes:no )
10999 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
11000echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11001 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011002echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11003 (
11004 cat <<\_ASBOX
11005## ------------------------------------ ##
11006## Report this to bug-autoconf@gnu.org. ##
11007## ------------------------------------ ##
11008_ASBOX
11009 ) |
11010 sed "s/^/$as_me: WARNING: /" >&2
11011 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011012 no:yes )
11013 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11014echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11015 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11016echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11017 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011018echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11019 (
11020 cat <<\_ASBOX
11021## ------------------------------------ ##
11022## Report this to bug-autoconf@gnu.org. ##
11023## ------------------------------------ ##
11024_ASBOX
11025 ) |
11026 sed "s/^/$as_me: WARNING: /" >&2
11027 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011028esac
11029echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11030echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11031if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11032 echo $ECHO_N "(cached) $ECHO_C" >&6
11033else
11034 ac_cv_header_kernel_OS_h=$ac_header_preproc
11035fi
11036echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11037echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11038
11039fi
11040if test $ac_cv_header_kernel_OS_h = yes; then
11041 cat >>confdefs.h <<\_ACEOF
11042#define WITH_THREAD 1
11043_ACEOF
11044
11045
11046cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011047#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011048_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011049
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011050 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011051else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011052
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11054echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11055if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11056 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011057else
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011059LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011060cat >conftest.$ac_ext <<_ACEOF
11061#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011062/* confdefs.h. */
11063_ACEOF
11064cat confdefs.h >>conftest.$ac_ext
11065cat >>conftest.$ac_ext <<_ACEOF
11066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011067
Greg Steinadf63d62000-07-05 10:38:09 +000011068/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011069#ifdef __cplusplus
11070extern "C"
11071#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011072/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011073 builtin and then its argument prototype would still apply. */
11074char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011075int
11076main ()
11077{
11078pthread_create ();
11079 ;
11080 return 0;
11081}
11082_ACEOF
11083rm -f conftest.$ac_objext conftest$ac_exeext
11084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11085 (eval $ac_link) 2>&5
11086 ac_status=$?
11087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11088 (exit $ac_status); } &&
11089 { ac_try='test -s conftest$ac_exeext'
11090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11091 (eval $ac_try) 2>&5
11092 ac_status=$?
11093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11094 (exit $ac_status); }; }; then
11095 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011096else
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011098sed 's/^/| /' conftest.$ac_ext >&5
11099
Martin v. Löwis11437992002-04-12 09:54:03 +000011100ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011101fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011102rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11103LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011105echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11106echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11107if test $ac_cv_lib_pthreads_pthread_create = yes; then
11108 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011109#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011110_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011111
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011112 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011113 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011114 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011115else
Greg Steinadf63d62000-07-05 10:38:09 +000011116
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11118echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11119if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11120 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011121else
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011123LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011124cat >conftest.$ac_ext <<_ACEOF
11125#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011126/* confdefs.h. */
11127_ACEOF
11128cat confdefs.h >>conftest.$ac_ext
11129cat >>conftest.$ac_ext <<_ACEOF
11130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011131
Guido van Rossum49545951997-12-02 19:28:29 +000011132/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011133#ifdef __cplusplus
11134extern "C"
11135#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011136/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011137 builtin and then its argument prototype would still apply. */
11138char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011139int
11140main ()
11141{
11142pthread_create ();
11143 ;
11144 return 0;
11145}
11146_ACEOF
11147rm -f conftest.$ac_objext conftest$ac_exeext
11148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11149 (eval $ac_link) 2>&5
11150 ac_status=$?
11151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11152 (exit $ac_status); } &&
11153 { ac_try='test -s conftest$ac_exeext'
11154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11155 (eval $ac_try) 2>&5
11156 ac_status=$?
11157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11158 (exit $ac_status); }; }; then
11159 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011160else
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011162sed 's/^/| /' conftest.$ac_ext >&5
11163
Martin v. Löwis11437992002-04-12 09:54:03 +000011164ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011166rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11167LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011168fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011169echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11170echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11171if test $ac_cv_lib_c_r_pthread_create = yes; then
11172 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011173#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011174_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011175
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011176 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011177 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011178 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011179else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011180
Martin v. Löwis11437992002-04-12 09:54:03 +000011181 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11182echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11183if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11184 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011185else
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011187LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011188cat >conftest.$ac_ext <<_ACEOF
11189#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011190/* confdefs.h. */
11191_ACEOF
11192cat confdefs.h >>conftest.$ac_ext
11193cat >>conftest.$ac_ext <<_ACEOF
11194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011195
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011196/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011197#ifdef __cplusplus
11198extern "C"
11199#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011200/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011201 builtin and then its argument prototype would still apply. */
11202char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011203int
11204main ()
11205{
11206__pthread_create_system ();
11207 ;
11208 return 0;
11209}
11210_ACEOF
11211rm -f conftest.$ac_objext conftest$ac_exeext
11212if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11213 (eval $ac_link) 2>&5
11214 ac_status=$?
11215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11216 (exit $ac_status); } &&
11217 { ac_try='test -s conftest$ac_exeext'
11218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11219 (eval $ac_try) 2>&5
11220 ac_status=$?
11221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11222 (exit $ac_status); }; }; then
11223 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011224else
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011226sed 's/^/| /' conftest.$ac_ext >&5
11227
Martin v. Löwis11437992002-04-12 09:54:03 +000011228ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011229fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011230rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11231LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011232fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011233echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11234echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11235if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11236 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011237#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011238_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011239
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011240 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011241 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011242 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011243else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011244
Martin v. Löwis11437992002-04-12 09:54:03 +000011245 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11246echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11247if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11248 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011249else
Martin v. Löwis11437992002-04-12 09:54:03 +000011250 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011251LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011252cat >conftest.$ac_ext <<_ACEOF
11253#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011254/* confdefs.h. */
11255_ACEOF
11256cat confdefs.h >>conftest.$ac_ext
11257cat >>conftest.$ac_ext <<_ACEOF
11258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011259
Guido van Rossumb93a8621998-05-07 13:27:32 +000011260/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011261#ifdef __cplusplus
11262extern "C"
11263#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011264/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 builtin and then its argument prototype would still apply. */
11266char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011267int
11268main ()
11269{
11270pthread_create ();
11271 ;
11272 return 0;
11273}
11274_ACEOF
11275rm -f conftest.$ac_objext conftest$ac_exeext
11276if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11277 (eval $ac_link) 2>&5
11278 ac_status=$?
11279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11280 (exit $ac_status); } &&
11281 { ac_try='test -s conftest$ac_exeext'
11282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11283 (eval $ac_try) 2>&5
11284 ac_status=$?
11285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11286 (exit $ac_status); }; }; then
11287 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011288else
Martin v. Löwis11437992002-04-12 09:54:03 +000011289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011290sed 's/^/| /' conftest.$ac_ext >&5
11291
Martin v. Löwis11437992002-04-12 09:54:03 +000011292ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011294rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11295LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011296fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011297echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11298echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11299if test $ac_cv_lib_cma_pthread_create = yes; then
11300 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011301#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011302_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011303
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011304 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011305 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011306 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011307else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011308
Martin v. Löwis130fb172001-07-19 11:00:41 +000011309 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011310fi
11311
Guido van Rossum627b2d71993-12-24 10:39:16 +000011312
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011313fi
11314
Guido van Rossum0be3e491997-05-22 20:33:33 +000011315fi
11316
Guido van Rossum49545951997-12-02 19:28:29 +000011317fi
11318
Guido van Rossumb93a8621998-05-07 13:27:32 +000011319fi
11320
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011321
Michael W. Hudson54241132001-12-07 15:38:26 +000011322fi
11323
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011324
11325fi
11326
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011328rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11329fi;
11330fi
11331
11332
11333fi
11334
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011335
Michael W. Hudson54241132001-12-07 15:38:26 +000011336
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11338echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11339if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11340 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011341else
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011343LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011344cat >conftest.$ac_ext <<_ACEOF
11345#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011346/* confdefs.h. */
11347_ACEOF
11348cat confdefs.h >>conftest.$ac_ext
11349cat >>conftest.$ac_ext <<_ACEOF
11350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011351
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011352/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011353#ifdef __cplusplus
11354extern "C"
11355#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011356/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 builtin and then its argument prototype would still apply. */
11358char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011359int
11360main ()
11361{
11362usconfig ();
11363 ;
11364 return 0;
11365}
11366_ACEOF
11367rm -f conftest.$ac_objext conftest$ac_exeext
11368if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11369 (eval $ac_link) 2>&5
11370 ac_status=$?
11371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11372 (exit $ac_status); } &&
11373 { ac_try='test -s conftest$ac_exeext'
11374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11375 (eval $ac_try) 2>&5
11376 ac_status=$?
11377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11378 (exit $ac_status); }; }; then
11379 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011380else
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011382sed 's/^/| /' conftest.$ac_ext >&5
11383
Martin v. Löwis11437992002-04-12 09:54:03 +000011384ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011385fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011386rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11387LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011388fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011389echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11390echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11391if test $ac_cv_lib_mpc_usconfig = yes; then
11392 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011393#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011394_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011395
Martin v. Löwis130fb172001-07-19 11:00:41 +000011396 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011397 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011398 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011399fi
11400
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011401
Neal Norwitza978ab02002-11-02 16:58:05 +000011402 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11404echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11405if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11406 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011407else
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011409LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011410cat >conftest.$ac_ext <<_ACEOF
11411#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011412/* confdefs.h. */
11413_ACEOF
11414cat confdefs.h >>conftest.$ac_ext
11415cat >>conftest.$ac_ext <<_ACEOF
11416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011417
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011418/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011419#ifdef __cplusplus
11420extern "C"
11421#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011422/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011423 builtin and then its argument prototype would still apply. */
11424char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011425int
11426main ()
11427{
11428thr_create ();
11429 ;
11430 return 0;
11431}
11432_ACEOF
11433rm -f conftest.$ac_objext conftest$ac_exeext
11434if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11435 (eval $ac_link) 2>&5
11436 ac_status=$?
11437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11438 (exit $ac_status); } &&
11439 { ac_try='test -s conftest$ac_exeext'
11440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11441 (eval $ac_try) 2>&5
11442 ac_status=$?
11443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11444 (exit $ac_status); }; }; then
11445 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011446else
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011448sed 's/^/| /' conftest.$ac_ext >&5
11449
Martin v. Löwis11437992002-04-12 09:54:03 +000011450ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011452rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11453LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011454fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011455echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11456echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11457if test $ac_cv_lib_thread_thr_create = yes; then
11458 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011459#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011460_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011461
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011462 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011463 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011464 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011465fi
11466
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011467 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011468
Martin v. Löwis130fb172001-07-19 11:00:41 +000011469 if test "$USE_THREAD_MODULE" != "#"
11470 then
11471 # If the above checks didn't disable threads, (at least) OSF1
11472 # needs this '-threads' argument during linking.
11473 case $ac_sys_system in
11474 OSF1) LDLAST=-threads;;
11475 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011476 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011477fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011478
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011479if test "$posix_threads" = "yes"; then
11480 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011481
11482cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011483#define _POSIX_THREADS 1
11484_ACEOF
11485
11486 fi
11487
11488 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11489 case $ac_sys_system/$ac_sys_release in
11490 SunOS/5.6)
11491cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011492#define HAVE_PTHREAD_DESTRUCTOR 1
11493_ACEOF
11494
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011495 ;;
11496 SunOS/5.8)
11497cat >>confdefs.h <<\_ACEOF
11498#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11499_ACEOF
11500
11501 ;;
11502 esac
11503
11504 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11505echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11506 if test "${ac_cv_pthread_system_supported+set}" = set; then
11507 echo $ECHO_N "(cached) $ECHO_C" >&6
11508else
11509 if test "$cross_compiling" = yes; then
11510 ac_cv_pthread_system_supported=no
11511else
11512 cat >conftest.$ac_ext <<_ACEOF
11513#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011514/* confdefs.h. */
11515_ACEOF
11516cat confdefs.h >>conftest.$ac_ext
11517cat >>conftest.$ac_ext <<_ACEOF
11518/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011519#include <pthread.h>
11520 void *foo(void *parm) {
11521 return NULL;
11522 }
11523 main() {
11524 pthread_attr_t attr;
11525 pthread_t id;
11526 if (pthread_attr_init(&attr)) exit(-1);
11527 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11528 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11529 exit(0);
11530 }
11531_ACEOF
11532rm -f conftest$ac_exeext
11533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11534 (eval $ac_link) 2>&5
11535 ac_status=$?
11536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11537 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11539 (eval $ac_try) 2>&5
11540 ac_status=$?
11541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11542 (exit $ac_status); }; }; then
11543 ac_cv_pthread_system_supported=yes
11544else
11545 echo "$as_me: program exited with status $ac_status" >&5
11546echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011547sed 's/^/| /' conftest.$ac_ext >&5
11548
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011549( exit $ac_status )
11550ac_cv_pthread_system_supported=no
11551fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011552rm -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 +000011553fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011554
Guido van Rossum627b2d71993-12-24 10:39:16 +000011555fi
11556
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011557 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11558echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11559 if test "$ac_cv_pthread_system_supported" = "yes"; then
11560
11561cat >>confdefs.h <<\_ACEOF
11562#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11563_ACEOF
11564
11565 fi
11566
11567for ac_func in pthread_sigmask
11568do
11569as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11570echo "$as_me:$LINENO: checking for $ac_func" >&5
11571echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11572if eval "test \"\${$as_ac_var+set}\" = set"; then
11573 echo $ECHO_N "(cached) $ECHO_C" >&6
11574else
11575 cat >conftest.$ac_ext <<_ACEOF
11576#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011577/* confdefs.h. */
11578_ACEOF
11579cat confdefs.h >>conftest.$ac_ext
11580cat >>conftest.$ac_ext <<_ACEOF
11581/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011582/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011583 which can conflict with char $ac_func (); below.
11584 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011585 <limits.h> exists even on freestanding compilers. Under hpux,
11586 including <limits.h> includes <sys/time.h> and causes problems
11587 checking for functions defined therein. */
11588#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011589# include <limits.h>
11590#else
11591# include <assert.h>
11592#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011593/* Override any gcc2 internal prototype to avoid an error. */
11594#ifdef __cplusplus
11595extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011596{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011597#endif
11598/* We use char because int might match the return type of a gcc2
11599 builtin and then its argument prototype would still apply. */
11600char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011601/* The GNU C library defines this for functions which it implements
11602 to always fail with ENOSYS. Some functions are actually named
11603 something starting with __ and the normal name is an alias. */
11604#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11605choke me
11606#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011607char (*f) () = $ac_func;
11608#endif
11609#ifdef __cplusplus
11610}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011611#endif
11612
Skip Montanaro6dead952003-09-25 14:50:04 +000011613int
11614main ()
11615{
11616return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011617 ;
11618 return 0;
11619}
11620_ACEOF
11621rm -f conftest.$ac_objext conftest$ac_exeext
11622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11623 (eval $ac_link) 2>&5
11624 ac_status=$?
11625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11626 (exit $ac_status); } &&
11627 { ac_try='test -s conftest$ac_exeext'
11628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11629 (eval $ac_try) 2>&5
11630 ac_status=$?
11631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11632 (exit $ac_status); }; }; then
11633 eval "$as_ac_var=yes"
11634else
11635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011636sed 's/^/| /' conftest.$ac_ext >&5
11637
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011638eval "$as_ac_var=no"
11639fi
11640rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11641fi
11642echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11643echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11644if test `eval echo '${'$as_ac_var'}'` = yes; then
11645 cat >>confdefs.h <<_ACEOF
11646#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11647_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011648 case $ac_sys_system in
11649 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011650
Jason Tishlerfac083d2003-07-22 15:20:49 +000011651cat >>confdefs.h <<\_ACEOF
11652#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11653_ACEOF
11654
11655 ;;
11656 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011657fi
11658done
11659
11660fi
11661
11662
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011663# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011664
11665
11666echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11667echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011668# Check whether --enable-ipv6 or --disable-ipv6 was given.
11669if test "${enable_ipv6+set}" = set; then
11670 enableval="$enable_ipv6"
11671 case "$enableval" in
11672 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011673 echo "$as_me:$LINENO: result: no" >&5
11674echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011675 ipv6=no
11676 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 *) echo "$as_me:$LINENO: result: yes" >&5
11678echo "${ECHO_T}yes" >&6
11679 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011680#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011681_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011682
11683 ipv6=yes
11684 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011685 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011686else
Martin v. Löwis11437992002-04-12 09:54:03 +000011687
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011688 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 echo "$as_me:$LINENO: result: no" >&5
11690echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011691 ipv6=no
11692
11693else
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 cat >conftest.$ac_ext <<_ACEOF
11695#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011696/* confdefs.h. */
11697_ACEOF
11698cat confdefs.h >>conftest.$ac_ext
11699cat >>conftest.$ac_ext <<_ACEOF
11700/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011701 /* AF_INET6 available check */
11702#include <sys/types.h>
11703#include <sys/socket.h>
11704main()
11705{
11706 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11707 exit(1);
11708 else
11709 exit(0);
11710}
11711
Martin v. Löwis11437992002-04-12 09:54:03 +000011712_ACEOF
11713rm -f conftest$ac_exeext
11714if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11715 (eval $ac_link) 2>&5
11716 ac_status=$?
11717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11718 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11720 (eval $ac_try) 2>&5
11721 ac_status=$?
11722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11723 (exit $ac_status); }; }; then
11724 echo "$as_me:$LINENO: result: yes" >&5
11725echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011726 ipv6=yes
11727else
Martin v. Löwis11437992002-04-12 09:54:03 +000011728 echo "$as_me: program exited with status $ac_status" >&5
11729echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011730sed 's/^/| /' conftest.$ac_ext >&5
11731
Martin v. Löwis11437992002-04-12 09:54:03 +000011732( exit $ac_status )
11733echo "$as_me:$LINENO: result: no" >&5
11734echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011735 ipv6=no
11736fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011737rm -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 +000011738fi
11739
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011740if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011741 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11742echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11743 cat >conftest.$ac_ext <<_ACEOF
11744#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011745/* confdefs.h. */
11746_ACEOF
11747cat confdefs.h >>conftest.$ac_ext
11748cat >>conftest.$ac_ext <<_ACEOF
11749/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011750#include <sys/types.h>
11751#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011752int
11753main ()
11754{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011755struct sockaddr_in6 x;
11756x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011757 ;
11758 return 0;
11759}
11760_ACEOF
11761rm -f conftest.$ac_objext
11762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11763 (eval $ac_compile) 2>&5
11764 ac_status=$?
11765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11766 (exit $ac_status); } &&
11767 { ac_try='test -s conftest.$ac_objext'
11768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11769 (eval $ac_try) 2>&5
11770 ac_status=$?
11771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11772 (exit $ac_status); }; }; then
11773 echo "$as_me:$LINENO: result: yes" >&5
11774echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011775 ipv6=yes
11776else
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011778sed 's/^/| /' conftest.$ac_ext >&5
11779
Martin v. Löwis11437992002-04-12 09:54:03 +000011780echo "$as_me:$LINENO: result: no" >&5
11781echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011782 ipv6=no
11783fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011784rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011785fi
11786
11787if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011788 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011789#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011790_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011791
11792fi
11793
Martin v. Löwis11437992002-04-12 09:54:03 +000011794fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011795
11796ipv6type=unknown
11797ipv6lib=none
11798ipv6trylibc=no
11799
11800if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011801 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11802echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011803 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11804 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011805 case $i in
11806 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011807 cat >conftest.$ac_ext <<_ACEOF
11808#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011809/* confdefs.h. */
11810_ACEOF
11811cat confdefs.h >>conftest.$ac_ext
11812cat >>conftest.$ac_ext <<_ACEOF
11813/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011814
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011815#include <netinet/in.h>
11816#ifdef IPV6_INRIA_VERSION
11817yes
11818#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011819_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011820if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011821 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011822 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011823fi
11824rm -f conftest*
11825
11826 ;;
11827 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011828 cat >conftest.$ac_ext <<_ACEOF
11829#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011830/* confdefs.h. */
11831_ACEOF
11832cat confdefs.h >>conftest.$ac_ext
11833cat >>conftest.$ac_ext <<_ACEOF
11834/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011835
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011836#include <netinet/in.h>
11837#ifdef __KAME__
11838yes
11839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011840_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011842 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011843 ipv6type=$i;
11844 ipv6lib=inet6
11845 ipv6libdir=/usr/local/v6/lib
11846 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011847fi
11848rm -f conftest*
11849
11850 ;;
11851 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011852 cat >conftest.$ac_ext <<_ACEOF
11853#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011854/* confdefs.h. */
11855_ACEOF
11856cat confdefs.h >>conftest.$ac_ext
11857cat >>conftest.$ac_ext <<_ACEOF
11858/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011859
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011860#include <features.h>
11861#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11862yes
11863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011864_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011866 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011867 ipv6type=$i;
11868 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011869fi
11870rm -f conftest*
11871
11872 ;;
11873 linux-inet6)
11874 if test -d /usr/inet6; then
11875 ipv6type=$i
11876 ipv6lib=inet6
11877 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011878 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011879 fi
11880 ;;
11881 solaris)
11882 if test -f /etc/netconfig; then
11883 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11884 ipv6type=$i
11885 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011886 fi
11887 fi
11888 ;;
11889 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011890 cat >conftest.$ac_ext <<_ACEOF
11891#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011892/* confdefs.h. */
11893_ACEOF
11894cat confdefs.h >>conftest.$ac_ext
11895cat >>conftest.$ac_ext <<_ACEOF
11896/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011897
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011898#include <sys/param.h>
11899#ifdef _TOSHIBA_INET6
11900yes
11901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011902_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011904 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011905 ipv6type=$i;
11906 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011907 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011908fi
11909rm -f conftest*
11910
11911 ;;
11912 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011913 cat >conftest.$ac_ext <<_ACEOF
11914#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011915/* confdefs.h. */
11916_ACEOF
11917cat confdefs.h >>conftest.$ac_ext
11918cat >>conftest.$ac_ext <<_ACEOF
11919/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011920
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011921#include </usr/local/v6/include/sys/v6config.h>
11922#ifdef __V6D__
11923yes
11924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011925_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011927 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011928 ipv6type=$i;
11929 ipv6lib=v6;
11930 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011931 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011932fi
11933rm -f conftest*
11934
11935 ;;
11936 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011937 cat >conftest.$ac_ext <<_ACEOF
11938#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011939/* confdefs.h. */
11940_ACEOF
11941cat confdefs.h >>conftest.$ac_ext
11942cat >>conftest.$ac_ext <<_ACEOF
11943/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011945#include <sys/param.h>
11946#ifdef _ZETA_MINAMI_INET6
11947yes
11948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011949_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011951 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011952 ipv6type=$i;
11953 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011954 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011955fi
11956rm -f conftest*
11957
11958 ;;
11959 esac
11960 if test "$ipv6type" != "unknown"; then
11961 break
11962 fi
11963 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011964 echo "$as_me:$LINENO: result: $ipv6type" >&5
11965echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011966fi
11967
11968if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11969 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11970 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11971 echo "using lib$ipv6lib"
11972 else
11973 if test $ipv6trylibc = "yes"; then
11974 echo "using libc"
11975 else
11976 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11977 echo "You need to fetch lib$ipv6lib.a from appropriate"
11978 echo 'ipv6 kit and compile beforehand.'
11979 exit 1
11980 fi
11981 fi
11982fi
11983
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011984# Check for --with-doc-strings
11985echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11986echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11987
11988# Check whether --with-doc-strings or --without-doc-strings was given.
11989if test "${with_doc_strings+set}" = set; then
11990 withval="$with_doc_strings"
11991
11992fi;
11993
11994if test -z "$with_doc_strings"
11995then with_doc_strings="yes"
11996fi
11997if test "$with_doc_strings" != "no"
11998then
11999
12000cat >>confdefs.h <<\_ACEOF
12001#define WITH_DOC_STRINGS 1
12002_ACEOF
12003
12004fi
12005echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12006echo "${ECHO_T}$with_doc_strings" >&6
12007
Neil Schemenauera35c6882001-02-27 04:45:05 +000012008# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012009echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12010echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12011
Neil Schemenauera35c6882001-02-27 04:45:05 +000012012# Check whether --with-pymalloc or --without-pymalloc was given.
12013if test "${with_pymalloc+set}" = set; then
12014 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012015
Martin v. Löwis11437992002-04-12 09:54:03 +000012016fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012017
Neil Schemenauer16c22972002-03-22 15:34:49 +000012018if test -z "$with_pymalloc"
12019then with_pymalloc="yes"
12020fi
12021if test "$with_pymalloc" != "no"
12022then
Martin v. Löwis11437992002-04-12 09:54:03 +000012023
12024cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012025#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012026_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012027
12028fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012029echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12030echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012031
Barry Warsawef82cd72000-06-30 16:21:01 +000012032# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012033echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12034echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12035
Barry Warsawef82cd72000-06-30 16:21:01 +000012036# Check whether --with-wctype-functions or --without-wctype-functions was given.
12037if test "${with_wctype_functions+set}" = set; then
12038 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012039
Barry Warsawef82cd72000-06-30 16:21:01 +000012040if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012041then
12042
12043cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012044#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012045_ACEOF
12046
12047 echo "$as_me:$LINENO: result: yes" >&5
12048echo "${ECHO_T}yes" >&6
12049else echo "$as_me:$LINENO: result: no" >&5
12050echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012051fi
12052else
Martin v. Löwis11437992002-04-12 09:54:03 +000012053 echo "$as_me:$LINENO: result: no" >&5
12054echo "${ECHO_T}no" >&6
12055fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012056
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012057# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012058
Guido van Rossum98935bf2001-09-05 19:13:16 +000012059DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012060
Guido van Rossume97ee181999-12-20 21:27:22 +000012061# the dlopen() function means we might want to use dynload_shlib.o. some
12062# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012063
Thomas Wouters3a584202000-08-05 23:28:51 +000012064for ac_func in dlopen
12065do
Martin v. Löwis11437992002-04-12 09:54:03 +000012066as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12067echo "$as_me:$LINENO: checking for $ac_func" >&5
12068echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12069if eval "test \"\${$as_ac_var+set}\" = set"; then
12070 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012071else
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 cat >conftest.$ac_ext <<_ACEOF
12073#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012074/* confdefs.h. */
12075_ACEOF
12076cat confdefs.h >>conftest.$ac_ext
12077cat >>conftest.$ac_ext <<_ACEOF
12078/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012079/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012080 which can conflict with char $ac_func (); below.
12081 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012082 <limits.h> exists even on freestanding compilers. Under hpux,
12083 including <limits.h> includes <sys/time.h> and causes problems
12084 checking for functions defined therein. */
12085#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012086# include <limits.h>
12087#else
12088# include <assert.h>
12089#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012090/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012091#ifdef __cplusplus
12092extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012093{
Martin v. Löwis11437992002-04-12 09:54:03 +000012094#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012095/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012096 builtin and then its argument prototype would still apply. */
12097char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012098/* The GNU C library defines this for functions which it implements
12099 to always fail with ENOSYS. Some functions are actually named
12100 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012101#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012102choke me
12103#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012104char (*f) () = $ac_func;
12105#endif
12106#ifdef __cplusplus
12107}
Guido van Rossume97ee181999-12-20 21:27:22 +000012108#endif
12109
Skip Montanaro6dead952003-09-25 14:50:04 +000012110int
12111main ()
12112{
12113return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012114 ;
12115 return 0;
12116}
12117_ACEOF
12118rm -f conftest.$ac_objext conftest$ac_exeext
12119if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12120 (eval $ac_link) 2>&5
12121 ac_status=$?
12122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12123 (exit $ac_status); } &&
12124 { ac_try='test -s conftest$ac_exeext'
12125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12126 (eval $ac_try) 2>&5
12127 ac_status=$?
12128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12129 (exit $ac_status); }; }; then
12130 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012131else
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012133sed 's/^/| /' conftest.$ac_ext >&5
12134
Martin v. Löwis11437992002-04-12 09:54:03 +000012135eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012137rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012139echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12140echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12141if test `eval echo '${'$as_ac_var'}'` = yes; then
12142 cat >>confdefs.h <<_ACEOF
12143#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12144_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012145
Guido van Rossume97ee181999-12-20 21:27:22 +000012146fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012147done
Guido van Rossume97ee181999-12-20 21:27:22 +000012148
Michael W. Hudson54241132001-12-07 15:38:26 +000012149
Guido van Rossume97ee181999-12-20 21:27:22 +000012150# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12151# loading of modules.
12152
Martin v. Löwis11437992002-04-12 09:54:03 +000012153echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12154echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012155if test -z "$DYNLOADFILE"
12156then
12157 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012158 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12159 if test "$ac_cv_func_dlopen" = yes
12160 then DYNLOADFILE="dynload_shlib.o"
12161 else DYNLOADFILE="dynload_aix.o"
12162 fi
12163 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012164 BeOS*) DYNLOADFILE="dynload_beos.o";;
12165 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012166 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012167 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012168 *)
12169 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12170 # out any dynamic loading
12171 if test "$ac_cv_func_dlopen" = yes
12172 then DYNLOADFILE="dynload_shlib.o"
12173 else DYNLOADFILE="dynload_stub.o"
12174 fi
12175 ;;
12176 esac
12177fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012178echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12179echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012180if test "$DYNLOADFILE" != "dynload_stub.o"
12181then
Martin v. Löwis11437992002-04-12 09:54:03 +000012182
12183cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012184#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012185_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012186
12187fi
12188
Neil Schemenauer4e425612001-06-19 15:44:15 +000012189# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12190
Michael W. Hudson54241132001-12-07 15:38:26 +000012191
Martin v. Löwis11437992002-04-12 09:54:03 +000012192echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12193echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012194if test -z "$MACHDEP_OBJS"
12195then
Jack Jansene578a632001-08-15 01:27:14 +000012196 MACHDEP_OBJS=$extra_machdep_objs
12197else
12198 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012200echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12201echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012202
Guido van Rossum627b2d71993-12-24 10:39:16 +000012203# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012204
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
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
Martin v. Löwisd5843682002-11-21 20:41:28 +000012275for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012276 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012277 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012278 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012279 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012280 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012281 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012282 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012283 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000012284 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012285 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012286 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012287do
Martin v. Löwis11437992002-04-12 09:54:03 +000012288as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12289echo "$as_me:$LINENO: checking for $ac_func" >&5
12290echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12291if eval "test \"\${$as_ac_var+set}\" = set"; then
12292 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012293else
Martin v. Löwis11437992002-04-12 09:54:03 +000012294 cat >conftest.$ac_ext <<_ACEOF
12295#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012296/* confdefs.h. */
12297_ACEOF
12298cat confdefs.h >>conftest.$ac_ext
12299cat >>conftest.$ac_ext <<_ACEOF
12300/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012301/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012302 which can conflict with char $ac_func (); below.
12303 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012304 <limits.h> exists even on freestanding compilers. Under hpux,
12305 including <limits.h> includes <sys/time.h> and causes problems
12306 checking for functions defined therein. */
12307#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012308# include <limits.h>
12309#else
12310# include <assert.h>
12311#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012312/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012313#ifdef __cplusplus
12314extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012315{
Martin v. Löwis11437992002-04-12 09:54:03 +000012316#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012317/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012318 builtin and then its argument prototype would still apply. */
12319char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012320/* The GNU C library defines this for functions which it implements
12321 to always fail with ENOSYS. Some functions are actually named
12322 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012323#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012324choke me
12325#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012326char (*f) () = $ac_func;
12327#endif
12328#ifdef __cplusplus
12329}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012330#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012331
Skip Montanaro6dead952003-09-25 14:50:04 +000012332int
12333main ()
12334{
12335return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012336 ;
12337 return 0;
12338}
12339_ACEOF
12340rm -f conftest.$ac_objext conftest$ac_exeext
12341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12342 (eval $ac_link) 2>&5
12343 ac_status=$?
12344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12345 (exit $ac_status); } &&
12346 { ac_try='test -s conftest$ac_exeext'
12347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12348 (eval $ac_try) 2>&5
12349 ac_status=$?
12350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12351 (exit $ac_status); }; }; then
12352 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012353else
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012355sed 's/^/| /' conftest.$ac_ext >&5
12356
Martin v. Löwis11437992002-04-12 09:54:03 +000012357eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012358fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012359rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012361echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12362echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12363if test `eval echo '${'$as_ac_var'}'` = yes; then
12364 cat >>confdefs.h <<_ACEOF
12365#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12366_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012367
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012368fi
12369done
12370
Michael W. Hudson54241132001-12-07 15:38:26 +000012371
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012372# For some functions, having a definition is not sufficient, since
12373# we want to take their address.
12374echo "$as_me:$LINENO: checking for chroot" >&5
12375echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12376cat >conftest.$ac_ext <<_ACEOF
12377#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* confdefs.h. */
12379_ACEOF
12380cat confdefs.h >>conftest.$ac_ext
12381cat >>conftest.$ac_ext <<_ACEOF
12382/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012383#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012384int
12385main ()
12386{
12387void *x=chroot
12388 ;
12389 return 0;
12390}
12391_ACEOF
12392rm -f conftest.$ac_objext
12393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12394 (eval $ac_compile) 2>&5
12395 ac_status=$?
12396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12397 (exit $ac_status); } &&
12398 { ac_try='test -s conftest.$ac_objext'
12399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12400 (eval $ac_try) 2>&5
12401 ac_status=$?
12402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12403 (exit $ac_status); }; }; then
12404
12405cat >>confdefs.h <<\_ACEOF
12406#define HAVE_CHROOT 1
12407_ACEOF
12408
12409 echo "$as_me:$LINENO: result: yes" >&5
12410echo "${ECHO_T}yes" >&6
12411else
12412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012413sed 's/^/| /' conftest.$ac_ext >&5
12414
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012415echo "$as_me:$LINENO: result: no" >&5
12416echo "${ECHO_T}no" >&6
12417
12418fi
12419rm -f conftest.$ac_objext conftest.$ac_ext
12420echo "$as_me:$LINENO: checking for link" >&5
12421echo $ECHO_N "checking for link... $ECHO_C" >&6
12422cat >conftest.$ac_ext <<_ACEOF
12423#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012424/* confdefs.h. */
12425_ACEOF
12426cat confdefs.h >>conftest.$ac_ext
12427cat >>conftest.$ac_ext <<_ACEOF
12428/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012429#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012430int
12431main ()
12432{
12433void *x=link
12434 ;
12435 return 0;
12436}
12437_ACEOF
12438rm -f conftest.$ac_objext
12439if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12440 (eval $ac_compile) 2>&5
12441 ac_status=$?
12442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12443 (exit $ac_status); } &&
12444 { ac_try='test -s conftest.$ac_objext'
12445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12446 (eval $ac_try) 2>&5
12447 ac_status=$?
12448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12449 (exit $ac_status); }; }; then
12450
12451cat >>confdefs.h <<\_ACEOF
12452#define HAVE_LINK 1
12453_ACEOF
12454
12455 echo "$as_me:$LINENO: result: yes" >&5
12456echo "${ECHO_T}yes" >&6
12457else
12458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012459sed 's/^/| /' conftest.$ac_ext >&5
12460
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012461echo "$as_me:$LINENO: result: no" >&5
12462echo "${ECHO_T}no" >&6
12463
12464fi
12465rm -f conftest.$ac_objext conftest.$ac_ext
12466echo "$as_me:$LINENO: checking for symlink" >&5
12467echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12468cat >conftest.$ac_ext <<_ACEOF
12469#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012470/* confdefs.h. */
12471_ACEOF
12472cat confdefs.h >>conftest.$ac_ext
12473cat >>conftest.$ac_ext <<_ACEOF
12474/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012475#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012476int
12477main ()
12478{
12479void *x=symlink
12480 ;
12481 return 0;
12482}
12483_ACEOF
12484rm -f conftest.$ac_objext
12485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12486 (eval $ac_compile) 2>&5
12487 ac_status=$?
12488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12489 (exit $ac_status); } &&
12490 { ac_try='test -s conftest.$ac_objext'
12491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12492 (eval $ac_try) 2>&5
12493 ac_status=$?
12494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12495 (exit $ac_status); }; }; then
12496
12497cat >>confdefs.h <<\_ACEOF
12498#define HAVE_SYMLINK 1
12499_ACEOF
12500
12501 echo "$as_me:$LINENO: result: yes" >&5
12502echo "${ECHO_T}yes" >&6
12503else
12504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012505sed 's/^/| /' conftest.$ac_ext >&5
12506
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012507echo "$as_me:$LINENO: result: no" >&5
12508echo "${ECHO_T}no" >&6
12509
12510fi
12511rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012512echo "$as_me:$LINENO: checking for fchdir" >&5
12513echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12514cat >conftest.$ac_ext <<_ACEOF
12515#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012516/* confdefs.h. */
12517_ACEOF
12518cat confdefs.h >>conftest.$ac_ext
12519cat >>conftest.$ac_ext <<_ACEOF
12520/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012521#include <unistd.h>
12522int
12523main ()
12524{
12525void *x=fchdir
12526 ;
12527 return 0;
12528}
12529_ACEOF
12530rm -f conftest.$ac_objext
12531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12532 (eval $ac_compile) 2>&5
12533 ac_status=$?
12534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12535 (exit $ac_status); } &&
12536 { ac_try='test -s conftest.$ac_objext'
12537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12538 (eval $ac_try) 2>&5
12539 ac_status=$?
12540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12541 (exit $ac_status); }; }; then
12542
12543cat >>confdefs.h <<\_ACEOF
12544#define HAVE_FCHDIR 1
12545_ACEOF
12546
12547 echo "$as_me:$LINENO: result: yes" >&5
12548echo "${ECHO_T}yes" >&6
12549else
12550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012551sed 's/^/| /' conftest.$ac_ext >&5
12552
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012553echo "$as_me:$LINENO: result: no" >&5
12554echo "${ECHO_T}no" >&6
12555
12556fi
12557rm -f conftest.$ac_objext conftest.$ac_ext
12558echo "$as_me:$LINENO: checking for fsync" >&5
12559echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12560cat >conftest.$ac_ext <<_ACEOF
12561#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012562/* confdefs.h. */
12563_ACEOF
12564cat confdefs.h >>conftest.$ac_ext
12565cat >>conftest.$ac_ext <<_ACEOF
12566/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012567#include <unistd.h>
12568int
12569main ()
12570{
12571void *x=fsync
12572 ;
12573 return 0;
12574}
12575_ACEOF
12576rm -f conftest.$ac_objext
12577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12578 (eval $ac_compile) 2>&5
12579 ac_status=$?
12580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581 (exit $ac_status); } &&
12582 { ac_try='test -s conftest.$ac_objext'
12583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12584 (eval $ac_try) 2>&5
12585 ac_status=$?
12586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12587 (exit $ac_status); }; }; then
12588
12589cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012590#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012591_ACEOF
12592
12593 echo "$as_me:$LINENO: result: yes" >&5
12594echo "${ECHO_T}yes" >&6
12595else
12596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012597sed 's/^/| /' conftest.$ac_ext >&5
12598
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012599echo "$as_me:$LINENO: result: no" >&5
12600echo "${ECHO_T}no" >&6
12601
12602fi
12603rm -f conftest.$ac_objext conftest.$ac_ext
12604echo "$as_me:$LINENO: checking for fdatasync" >&5
12605echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12606cat >conftest.$ac_ext <<_ACEOF
12607#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012608/* confdefs.h. */
12609_ACEOF
12610cat confdefs.h >>conftest.$ac_ext
12611cat >>conftest.$ac_ext <<_ACEOF
12612/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012613#include <unistd.h>
12614int
12615main ()
12616{
12617void *x=fdatasync
12618 ;
12619 return 0;
12620}
12621_ACEOF
12622rm -f conftest.$ac_objext
12623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12624 (eval $ac_compile) 2>&5
12625 ac_status=$?
12626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12627 (exit $ac_status); } &&
12628 { ac_try='test -s conftest.$ac_objext'
12629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12630 (eval $ac_try) 2>&5
12631 ac_status=$?
12632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633 (exit $ac_status); }; }; then
12634
12635cat >>confdefs.h <<\_ACEOF
12636#define HAVE_FDATASYNC 1
12637_ACEOF
12638
12639 echo "$as_me:$LINENO: result: yes" >&5
12640echo "${ECHO_T}yes" >&6
12641else
12642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012643sed 's/^/| /' conftest.$ac_ext >&5
12644
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012645echo "$as_me:$LINENO: result: no" >&5
12646echo "${ECHO_T}no" >&6
12647
12648fi
12649rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012650
Martin v. Löwisd5843682002-11-21 20:41:28 +000012651# On some systems (eg. FreeBSD 5), we would find a definition of the
12652# functions ctermid_r, setgroups in the library, but no prototype
12653# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12654# address to avoid compiler warnings and potential miscompilations
12655# because of the missing prototypes.
12656
12657echo "$as_me:$LINENO: checking for ctermid_r" >&5
12658echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12659cat >conftest.$ac_ext <<_ACEOF
12660#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012661/* confdefs.h. */
12662_ACEOF
12663cat confdefs.h >>conftest.$ac_ext
12664cat >>conftest.$ac_ext <<_ACEOF
12665/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012666
12667#include "confdefs.h"
12668#include <stdio.h>
12669
Martin v. Löwisd5843682002-11-21 20:41:28 +000012670int
12671main ()
12672{
12673void* p = ctermid_r
12674 ;
12675 return 0;
12676}
12677_ACEOF
12678rm -f conftest.$ac_objext
12679if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12680 (eval $ac_compile) 2>&5
12681 ac_status=$?
12682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12683 (exit $ac_status); } &&
12684 { ac_try='test -s conftest.$ac_objext'
12685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12686 (eval $ac_try) 2>&5
12687 ac_status=$?
12688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12689 (exit $ac_status); }; }; then
12690
12691cat >>confdefs.h <<\_ACEOF
12692#define HAVE_CTERMID_R 1
12693_ACEOF
12694
12695 echo "$as_me:$LINENO: result: yes" >&5
12696echo "${ECHO_T}yes" >&6
12697else
12698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012699sed 's/^/| /' conftest.$ac_ext >&5
12700
Martin v. Löwisd5843682002-11-21 20:41:28 +000012701echo "$as_me:$LINENO: result: no" >&5
12702echo "${ECHO_T}no" >&6
12703
12704fi
12705rm -f conftest.$ac_objext conftest.$ac_ext
12706
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012707echo "$as_me:$LINENO: checking for flock" >&5
12708echo $ECHO_N "checking for flock... $ECHO_C" >&6
12709cat >conftest.$ac_ext <<_ACEOF
12710#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012711/* confdefs.h. */
12712_ACEOF
12713cat confdefs.h >>conftest.$ac_ext
12714cat >>conftest.$ac_ext <<_ACEOF
12715/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012716
12717#include "confdefs.h"
12718#include <sys/file.h>
12719
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012720int
12721main ()
12722{
12723void* p = flock
12724 ;
12725 return 0;
12726}
12727_ACEOF
12728rm -f conftest.$ac_objext
12729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12730 (eval $ac_compile) 2>&5
12731 ac_status=$?
12732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12733 (exit $ac_status); } &&
12734 { ac_try='test -s conftest.$ac_objext'
12735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12736 (eval $ac_try) 2>&5
12737 ac_status=$?
12738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12739 (exit $ac_status); }; }; then
12740
12741cat >>confdefs.h <<\_ACEOF
12742#define HAVE_FLOCK 1
12743_ACEOF
12744
12745 echo "$as_me:$LINENO: result: yes" >&5
12746echo "${ECHO_T}yes" >&6
12747else
12748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012749sed 's/^/| /' conftest.$ac_ext >&5
12750
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012751echo "$as_me:$LINENO: result: no" >&5
12752echo "${ECHO_T}no" >&6
12753
12754fi
12755rm -f conftest.$ac_objext conftest.$ac_ext
12756
12757echo "$as_me:$LINENO: checking for getpagesize" >&5
12758echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12759cat >conftest.$ac_ext <<_ACEOF
12760#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012761/* confdefs.h. */
12762_ACEOF
12763cat confdefs.h >>conftest.$ac_ext
12764cat >>conftest.$ac_ext <<_ACEOF
12765/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012766
12767#include "confdefs.h"
12768#include <unistd.h>
12769
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012770int
12771main ()
12772{
12773void* p = getpagesize
12774 ;
12775 return 0;
12776}
12777_ACEOF
12778rm -f conftest.$ac_objext
12779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12780 (eval $ac_compile) 2>&5
12781 ac_status=$?
12782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12783 (exit $ac_status); } &&
12784 { ac_try='test -s conftest.$ac_objext'
12785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12786 (eval $ac_try) 2>&5
12787 ac_status=$?
12788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12789 (exit $ac_status); }; }; then
12790
12791cat >>confdefs.h <<\_ACEOF
12792#define HAVE_GETPAGESIZE 1
12793_ACEOF
12794
12795 echo "$as_me:$LINENO: result: yes" >&5
12796echo "${ECHO_T}yes" >&6
12797else
12798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012799sed 's/^/| /' conftest.$ac_ext >&5
12800
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012801echo "$as_me:$LINENO: result: no" >&5
12802echo "${ECHO_T}no" >&6
12803
12804fi
12805rm -f conftest.$ac_objext conftest.$ac_ext
12806
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012807for ac_prog in true
12808do
12809 # Extract the first word of "$ac_prog", so it can be a program name with args.
12810set dummy $ac_prog; ac_word=$2
12811echo "$as_me:$LINENO: checking for $ac_word" >&5
12812echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12813if test "${ac_cv_prog_TRUE+set}" = set; then
12814 echo $ECHO_N "(cached) $ECHO_C" >&6
12815else
12816 if test -n "$TRUE"; then
12817 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12818else
12819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12820for as_dir in $PATH
12821do
12822 IFS=$as_save_IFS
12823 test -z "$as_dir" && as_dir=.
12824 for ac_exec_ext in '' $ac_executable_extensions; do
12825 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12826 ac_cv_prog_TRUE="$ac_prog"
12827 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12828 break 2
12829 fi
12830done
12831done
12832
12833fi
12834fi
12835TRUE=$ac_cv_prog_TRUE
12836if test -n "$TRUE"; then
12837 echo "$as_me:$LINENO: result: $TRUE" >&5
12838echo "${ECHO_T}$TRUE" >&6
12839else
12840 echo "$as_me:$LINENO: result: no" >&5
12841echo "${ECHO_T}no" >&6
12842fi
12843
12844 test -n "$TRUE" && break
12845done
12846test -n "$TRUE" || TRUE="/bin/true"
12847
12848
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012849echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12850echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12851if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12852 echo $ECHO_N "(cached) $ECHO_C" >&6
12853else
12854 ac_check_lib_save_LIBS=$LIBS
12855LIBS="-lc $LIBS"
12856cat >conftest.$ac_ext <<_ACEOF
12857#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012858/* confdefs.h. */
12859_ACEOF
12860cat confdefs.h >>conftest.$ac_ext
12861cat >>conftest.$ac_ext <<_ACEOF
12862/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012863
12864/* Override any gcc2 internal prototype to avoid an error. */
12865#ifdef __cplusplus
12866extern "C"
12867#endif
12868/* We use char because int might match the return type of a gcc2
12869 builtin and then its argument prototype would still apply. */
12870char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012871int
12872main ()
12873{
12874inet_aton ();
12875 ;
12876 return 0;
12877}
12878_ACEOF
12879rm -f conftest.$ac_objext conftest$ac_exeext
12880if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12881 (eval $ac_link) 2>&5
12882 ac_status=$?
12883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12884 (exit $ac_status); } &&
12885 { ac_try='test -s conftest$ac_exeext'
12886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12887 (eval $ac_try) 2>&5
12888 ac_status=$?
12889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12890 (exit $ac_status); }; }; then
12891 ac_cv_lib_c_inet_aton=yes
12892else
12893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012894sed 's/^/| /' conftest.$ac_ext >&5
12895
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012896ac_cv_lib_c_inet_aton=no
12897fi
12898rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12899LIBS=$ac_check_lib_save_LIBS
12900fi
12901echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12902echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12903if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012904 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012905else
12906
12907echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12908echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12909if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12910 echo $ECHO_N "(cached) $ECHO_C" >&6
12911else
12912 ac_check_lib_save_LIBS=$LIBS
12913LIBS="-lresolv $LIBS"
12914cat >conftest.$ac_ext <<_ACEOF
12915#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012916/* confdefs.h. */
12917_ACEOF
12918cat confdefs.h >>conftest.$ac_ext
12919cat >>conftest.$ac_ext <<_ACEOF
12920/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012921
12922/* Override any gcc2 internal prototype to avoid an error. */
12923#ifdef __cplusplus
12924extern "C"
12925#endif
12926/* We use char because int might match the return type of a gcc2
12927 builtin and then its argument prototype would still apply. */
12928char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012929int
12930main ()
12931{
12932inet_aton ();
12933 ;
12934 return 0;
12935}
12936_ACEOF
12937rm -f conftest.$ac_objext conftest$ac_exeext
12938if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12939 (eval $ac_link) 2>&5
12940 ac_status=$?
12941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12942 (exit $ac_status); } &&
12943 { ac_try='test -s conftest$ac_exeext'
12944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12945 (eval $ac_try) 2>&5
12946 ac_status=$?
12947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12948 (exit $ac_status); }; }; then
12949 ac_cv_lib_resolv_inet_aton=yes
12950else
12951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012952sed 's/^/| /' conftest.$ac_ext >&5
12953
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012954ac_cv_lib_resolv_inet_aton=no
12955fi
12956rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12957LIBS=$ac_check_lib_save_LIBS
12958fi
12959echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12960echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12961if test $ac_cv_lib_resolv_inet_aton = yes; then
12962 cat >>confdefs.h <<_ACEOF
12963#define HAVE_LIBRESOLV 1
12964_ACEOF
12965
12966 LIBS="-lresolv $LIBS"
12967
12968fi
12969
12970
12971fi
12972
12973
Martin v. Löwise9416172003-05-03 10:12:45 +000012974echo "$as_me:$LINENO: checking for hstrerror" >&5
12975echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12976cat >conftest.$ac_ext <<_ACEOF
12977#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012978/* confdefs.h. */
12979_ACEOF
12980cat confdefs.h >>conftest.$ac_ext
12981cat >>conftest.$ac_ext <<_ACEOF
12982/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012983
12984#include "confdefs.h"
12985#include <netdb.h>
12986
Martin v. Löwise9416172003-05-03 10:12:45 +000012987int
12988main ()
12989{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012990void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012991 ;
12992 return 0;
12993}
12994_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012995rm -f conftest.$ac_objext conftest$ac_exeext
12996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12997 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012998 ac_status=$?
12999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13000 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013001 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13003 (eval $ac_try) 2>&5
13004 ac_status=$?
13005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13006 (exit $ac_status); }; }; then
13007
13008cat >>confdefs.h <<\_ACEOF
13009#define HAVE_HSTRERROR 1
13010_ACEOF
13011
13012 echo "$as_me:$LINENO: result: yes" >&5
13013echo "${ECHO_T}yes" >&6
13014else
13015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013016sed 's/^/| /' conftest.$ac_ext >&5
13017
Martin v. Löwise9416172003-05-03 10:12:45 +000013018echo "$as_me:$LINENO: result: no" >&5
13019echo "${ECHO_T}no" >&6
13020
13021fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013022rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013023
13024echo "$as_me:$LINENO: checking for inet_aton" >&5
13025echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13026cat >conftest.$ac_ext <<_ACEOF
13027#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013028/* confdefs.h. */
13029_ACEOF
13030cat confdefs.h >>conftest.$ac_ext
13031cat >>conftest.$ac_ext <<_ACEOF
13032/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013033
13034#include "confdefs.h"
13035#include <sys/socket.h>
13036#include <netinet/in.h>
13037#include <arpa/inet.h>
13038
Martin v. Löwise9416172003-05-03 10:12:45 +000013039int
13040main ()
13041{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013042void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013043 ;
13044 return 0;
13045}
13046_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013047rm -f conftest.$ac_objext conftest$ac_exeext
13048if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13049 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013050 ac_status=$?
13051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13052 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013053 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13055 (eval $ac_try) 2>&5
13056 ac_status=$?
13057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13058 (exit $ac_status); }; }; then
13059
13060cat >>confdefs.h <<\_ACEOF
13061#define HAVE_INET_ATON 1
13062_ACEOF
13063
13064 echo "$as_me:$LINENO: result: yes" >&5
13065echo "${ECHO_T}yes" >&6
13066else
13067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013068sed 's/^/| /' conftest.$ac_ext >&5
13069
Martin v. Löwise9416172003-05-03 10:12:45 +000013070echo "$as_me:$LINENO: result: no" >&5
13071echo "${ECHO_T}no" >&6
13072
13073fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013074rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013075
13076echo "$as_me:$LINENO: checking for inet_pton" >&5
13077echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13078cat >conftest.$ac_ext <<_ACEOF
13079#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013080/* confdefs.h. */
13081_ACEOF
13082cat confdefs.h >>conftest.$ac_ext
13083cat >>conftest.$ac_ext <<_ACEOF
13084/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013085
13086#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013087#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013088#include <sys/socket.h>
13089#include <netinet/in.h>
13090#include <arpa/inet.h>
13091
Martin v. Löwise9416172003-05-03 10:12:45 +000013092int
13093main ()
13094{
13095void* p = inet_pton
13096 ;
13097 return 0;
13098}
13099_ACEOF
13100rm -f conftest.$ac_objext
13101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13102 (eval $ac_compile) 2>&5
13103 ac_status=$?
13104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13105 (exit $ac_status); } &&
13106 { ac_try='test -s conftest.$ac_objext'
13107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13108 (eval $ac_try) 2>&5
13109 ac_status=$?
13110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13111 (exit $ac_status); }; }; then
13112
13113cat >>confdefs.h <<\_ACEOF
13114#define HAVE_INET_PTON 1
13115_ACEOF
13116
13117 echo "$as_me:$LINENO: result: yes" >&5
13118echo "${ECHO_T}yes" >&6
13119else
13120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013121sed 's/^/| /' conftest.$ac_ext >&5
13122
Martin v. Löwise9416172003-05-03 10:12:45 +000013123echo "$as_me:$LINENO: result: no" >&5
13124echo "${ECHO_T}no" >&6
13125
13126fi
13127rm -f conftest.$ac_objext conftest.$ac_ext
13128
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013129# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013130echo "$as_me:$LINENO: checking for setgroups" >&5
13131echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13132cat >conftest.$ac_ext <<_ACEOF
13133#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013134/* confdefs.h. */
13135_ACEOF
13136cat confdefs.h >>conftest.$ac_ext
13137cat >>conftest.$ac_ext <<_ACEOF
13138/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013139
13140#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013141#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013142#ifdef HAVE_GRP_H
13143#include <grp.h>
13144#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013145
Martin v. Löwisd5843682002-11-21 20:41:28 +000013146int
13147main ()
13148{
13149void* p = setgroups
13150 ;
13151 return 0;
13152}
13153_ACEOF
13154rm -f conftest.$ac_objext
13155if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13156 (eval $ac_compile) 2>&5
13157 ac_status=$?
13158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13159 (exit $ac_status); } &&
13160 { ac_try='test -s conftest.$ac_objext'
13161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13162 (eval $ac_try) 2>&5
13163 ac_status=$?
13164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13165 (exit $ac_status); }; }; then
13166
13167cat >>confdefs.h <<\_ACEOF
13168#define HAVE_SETGROUPS 1
13169_ACEOF
13170
13171 echo "$as_me:$LINENO: result: yes" >&5
13172echo "${ECHO_T}yes" >&6
13173else
13174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013175sed 's/^/| /' conftest.$ac_ext >&5
13176
Martin v. Löwisd5843682002-11-21 20:41:28 +000013177echo "$as_me:$LINENO: result: no" >&5
13178echo "${ECHO_T}no" >&6
13179
13180fi
13181rm -f conftest.$ac_objext conftest.$ac_ext
13182
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013183# check for openpty and forkpty
13184
Martin v. Löwis11437992002-04-12 09:54:03 +000013185
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013186for ac_func in openpty
13187do
Martin v. Löwis11437992002-04-12 09:54:03 +000013188as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13189echo "$as_me:$LINENO: checking for $ac_func" >&5
13190echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13191if eval "test \"\${$as_ac_var+set}\" = set"; then
13192 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013193else
Martin v. Löwis11437992002-04-12 09:54:03 +000013194 cat >conftest.$ac_ext <<_ACEOF
13195#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013196/* confdefs.h. */
13197_ACEOF
13198cat confdefs.h >>conftest.$ac_ext
13199cat >>conftest.$ac_ext <<_ACEOF
13200/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013201/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013202 which can conflict with char $ac_func (); below.
13203 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013204 <limits.h> exists even on freestanding compilers. Under hpux,
13205 including <limits.h> includes <sys/time.h> and causes problems
13206 checking for functions defined therein. */
13207#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013208# include <limits.h>
13209#else
13210# include <assert.h>
13211#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013212/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013213#ifdef __cplusplus
13214extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013215{
Martin v. Löwis11437992002-04-12 09:54:03 +000013216#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013217/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013218 builtin and then its argument prototype would still apply. */
13219char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013220/* The GNU C library defines this for functions which it implements
13221 to always fail with ENOSYS. Some functions are actually named
13222 something starting with __ and the normal name is an alias. */
13223#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13224choke me
13225#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013226char (*f) () = $ac_func;
13227#endif
13228#ifdef __cplusplus
13229}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013230#endif
13231
Skip Montanaro6dead952003-09-25 14:50:04 +000013232int
13233main ()
13234{
13235return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013236 ;
13237 return 0;
13238}
13239_ACEOF
13240rm -f conftest.$ac_objext conftest$ac_exeext
13241if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13242 (eval $ac_link) 2>&5
13243 ac_status=$?
13244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13245 (exit $ac_status); } &&
13246 { ac_try='test -s conftest$ac_exeext'
13247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13248 (eval $ac_try) 2>&5
13249 ac_status=$?
13250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13251 (exit $ac_status); }; }; then
13252 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013253else
Martin v. Löwis11437992002-04-12 09:54:03 +000013254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013255sed 's/^/| /' conftest.$ac_ext >&5
13256
Martin v. Löwis11437992002-04-12 09:54:03 +000013257eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013259rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013260fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013261echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13262echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13263if test `eval echo '${'$as_ac_var'}'` = yes; then
13264 cat >>confdefs.h <<_ACEOF
13265#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13266_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013267
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013268else
Martin v. Löwis11437992002-04-12 09:54:03 +000013269 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13270echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13271if test "${ac_cv_lib_util_openpty+set}" = set; then
13272 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013273else
Martin v. Löwis11437992002-04-12 09:54:03 +000013274 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013275LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013276cat >conftest.$ac_ext <<_ACEOF
13277#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013278/* confdefs.h. */
13279_ACEOF
13280cat confdefs.h >>conftest.$ac_ext
13281cat >>conftest.$ac_ext <<_ACEOF
13282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013283
Fred Drake8cef4cf2000-06-28 16:40:38 +000013284/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013285#ifdef __cplusplus
13286extern "C"
13287#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013288/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 builtin and then its argument prototype would still apply. */
13290char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013291int
13292main ()
13293{
13294openpty ();
13295 ;
13296 return 0;
13297}
13298_ACEOF
13299rm -f conftest.$ac_objext conftest$ac_exeext
13300if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13301 (eval $ac_link) 2>&5
13302 ac_status=$?
13303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13304 (exit $ac_status); } &&
13305 { ac_try='test -s conftest$ac_exeext'
13306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13307 (eval $ac_try) 2>&5
13308 ac_status=$?
13309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13310 (exit $ac_status); }; }; then
13311 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013312else
Martin v. Löwis11437992002-04-12 09:54:03 +000013313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013314sed 's/^/| /' conftest.$ac_ext >&5
13315
Martin v. Löwis11437992002-04-12 09:54:03 +000013316ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013317fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013318rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13319LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013321echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13322echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13323if test $ac_cv_lib_util_openpty = yes; then
13324 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013325#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013326_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013327 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013328fi
13329
13330fi
13331done
13332
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
Fred Drake8cef4cf2000-06-28 16:40:38 +000013334for ac_func in forkpty
13335do
Martin v. Löwis11437992002-04-12 09:54:03 +000013336as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13337echo "$as_me:$LINENO: checking for $ac_func" >&5
13338echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13339if eval "test \"\${$as_ac_var+set}\" = set"; then
13340 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013341else
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 cat >conftest.$ac_ext <<_ACEOF
13343#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013344/* confdefs.h. */
13345_ACEOF
13346cat confdefs.h >>conftest.$ac_ext
13347cat >>conftest.$ac_ext <<_ACEOF
13348/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013349/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013350 which can conflict with char $ac_func (); below.
13351 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013352 <limits.h> exists even on freestanding compilers. Under hpux,
13353 including <limits.h> includes <sys/time.h> and causes problems
13354 checking for functions defined therein. */
13355#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013356# include <limits.h>
13357#else
13358# include <assert.h>
13359#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013360/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013361#ifdef __cplusplus
13362extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013363{
Martin v. Löwis11437992002-04-12 09:54:03 +000013364#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013365/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 builtin and then its argument prototype would still apply. */
13367char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013368/* The GNU C library defines this for functions which it implements
13369 to always fail with ENOSYS. Some functions are actually named
13370 something starting with __ and the normal name is an alias. */
13371#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13372choke me
13373#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013374char (*f) () = $ac_func;
13375#endif
13376#ifdef __cplusplus
13377}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013378#endif
13379
Skip Montanaro6dead952003-09-25 14:50:04 +000013380int
13381main ()
13382{
13383return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013384 ;
13385 return 0;
13386}
13387_ACEOF
13388rm -f conftest.$ac_objext conftest$ac_exeext
13389if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13390 (eval $ac_link) 2>&5
13391 ac_status=$?
13392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13393 (exit $ac_status); } &&
13394 { ac_try='test -s conftest$ac_exeext'
13395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13396 (eval $ac_try) 2>&5
13397 ac_status=$?
13398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399 (exit $ac_status); }; }; then
13400 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013401else
Martin v. Löwis11437992002-04-12 09:54:03 +000013402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013403sed 's/^/| /' conftest.$ac_ext >&5
13404
Martin v. Löwis11437992002-04-12 09:54:03 +000013405eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013406fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013408fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013409echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13410echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13411if test `eval echo '${'$as_ac_var'}'` = yes; then
13412 cat >>confdefs.h <<_ACEOF
13413#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13414_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013415
Fred Drake8cef4cf2000-06-28 16:40:38 +000013416else
Martin v. Löwis11437992002-04-12 09:54:03 +000013417 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13418echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13419if test "${ac_cv_lib_util_forkpty+set}" = set; then
13420 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013421else
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013423LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013424cat >conftest.$ac_ext <<_ACEOF
13425#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013426/* confdefs.h. */
13427_ACEOF
13428cat confdefs.h >>conftest.$ac_ext
13429cat >>conftest.$ac_ext <<_ACEOF
13430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013431
Fred Drake8cef4cf2000-06-28 16:40:38 +000013432/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013433#ifdef __cplusplus
13434extern "C"
13435#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013436/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 builtin and then its argument prototype would still apply. */
13438char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013439int
13440main ()
13441{
13442forkpty ();
13443 ;
13444 return 0;
13445}
13446_ACEOF
13447rm -f conftest.$ac_objext conftest$ac_exeext
13448if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13449 (eval $ac_link) 2>&5
13450 ac_status=$?
13451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13452 (exit $ac_status); } &&
13453 { ac_try='test -s conftest$ac_exeext'
13454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13455 (eval $ac_try) 2>&5
13456 ac_status=$?
13457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13458 (exit $ac_status); }; }; then
13459 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013460else
Martin v. Löwis11437992002-04-12 09:54:03 +000013461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013462sed 's/^/| /' conftest.$ac_ext >&5
13463
Martin v. Löwis11437992002-04-12 09:54:03 +000013464ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013465fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013466rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13467LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013468fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013469echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13470echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13471if test $ac_cv_lib_util_forkpty = yes; then
13472 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013473#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013474_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013475 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013476fi
13477
13478fi
13479done
13480
Jack Jansendd19cf82001-12-06 22:36:17 +000013481
Michael W. Hudson54241132001-12-07 15:38:26 +000013482# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013483
13484
13485
13486
13487
13488
Fred Drake8cef4cf2000-06-28 16:40:38 +000013489for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13490do
Martin v. Löwis11437992002-04-12 09:54:03 +000013491as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13492echo "$as_me:$LINENO: checking for $ac_func" >&5
13493echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13494if eval "test \"\${$as_ac_var+set}\" = set"; then
13495 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013496else
Martin v. Löwis11437992002-04-12 09:54:03 +000013497 cat >conftest.$ac_ext <<_ACEOF
13498#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013499/* confdefs.h. */
13500_ACEOF
13501cat confdefs.h >>conftest.$ac_ext
13502cat >>conftest.$ac_ext <<_ACEOF
13503/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013504/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013505 which can conflict with char $ac_func (); below.
13506 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013507 <limits.h> exists even on freestanding compilers. Under hpux,
13508 including <limits.h> includes <sys/time.h> and causes problems
13509 checking for functions defined therein. */
13510#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013511# include <limits.h>
13512#else
13513# include <assert.h>
13514#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013515/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013516#ifdef __cplusplus
13517extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013518{
Martin v. Löwis11437992002-04-12 09:54:03 +000013519#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013520/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 builtin and then its argument prototype would still apply. */
13522char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013523/* The GNU C library defines this for functions which it implements
13524 to always fail with ENOSYS. Some functions are actually named
13525 something starting with __ and the normal name is an alias. */
13526#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13527choke me
13528#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013529char (*f) () = $ac_func;
13530#endif
13531#ifdef __cplusplus
13532}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013533#endif
13534
Skip Montanaro6dead952003-09-25 14:50:04 +000013535int
13536main ()
13537{
13538return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013539 ;
13540 return 0;
13541}
13542_ACEOF
13543rm -f conftest.$ac_objext conftest$ac_exeext
13544if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13545 (eval $ac_link) 2>&5
13546 ac_status=$?
13547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13548 (exit $ac_status); } &&
13549 { ac_try='test -s conftest$ac_exeext'
13550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13551 (eval $ac_try) 2>&5
13552 ac_status=$?
13553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13554 (exit $ac_status); }; }; then
13555 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013556else
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013558sed 's/^/| /' conftest.$ac_ext >&5
13559
Martin v. Löwis11437992002-04-12 09:54:03 +000013560eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013562rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013564echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13565echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13566if test `eval echo '${'$as_ac_var'}'` = yes; then
13567 cat >>confdefs.h <<_ACEOF
13568#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13569_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013570
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013571fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013572done
13573
Michael W. Hudson54241132001-12-07 15:38:26 +000013574
Martin v. Löwis11437992002-04-12 09:54:03 +000013575
13576
13577
13578
13579
Martin v. Löwis1142de32002-03-29 16:28:31 +000013580for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013581do
Martin v. Löwis11437992002-04-12 09:54:03 +000013582as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13583echo "$as_me:$LINENO: checking for $ac_func" >&5
13584echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13585if eval "test \"\${$as_ac_var+set}\" = set"; then
13586 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013587else
Martin v. Löwis11437992002-04-12 09:54:03 +000013588 cat >conftest.$ac_ext <<_ACEOF
13589#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013590/* confdefs.h. */
13591_ACEOF
13592cat confdefs.h >>conftest.$ac_ext
13593cat >>conftest.$ac_ext <<_ACEOF
13594/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013595/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013596 which can conflict with char $ac_func (); below.
13597 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013598 <limits.h> exists even on freestanding compilers. Under hpux,
13599 including <limits.h> includes <sys/time.h> and causes problems
13600 checking for functions defined therein. */
13601#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013602# include <limits.h>
13603#else
13604# include <assert.h>
13605#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013606/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013607#ifdef __cplusplus
13608extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013609{
Martin v. Löwis11437992002-04-12 09:54:03 +000013610#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013611/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013612 builtin and then its argument prototype would still apply. */
13613char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013614/* The GNU C library defines this for functions which it implements
13615 to always fail with ENOSYS. Some functions are actually named
13616 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013617#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013618choke me
13619#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013620char (*f) () = $ac_func;
13621#endif
13622#ifdef __cplusplus
13623}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013624#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013625
Skip Montanaro6dead952003-09-25 14:50:04 +000013626int
13627main ()
13628{
13629return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013630 ;
13631 return 0;
13632}
13633_ACEOF
13634rm -f conftest.$ac_objext conftest$ac_exeext
13635if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13636 (eval $ac_link) 2>&5
13637 ac_status=$?
13638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13639 (exit $ac_status); } &&
13640 { ac_try='test -s conftest$ac_exeext'
13641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13642 (eval $ac_try) 2>&5
13643 ac_status=$?
13644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645 (exit $ac_status); }; }; then
13646 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013647else
Martin v. Löwis11437992002-04-12 09:54:03 +000013648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013649sed 's/^/| /' conftest.$ac_ext >&5
13650
Martin v. Löwis11437992002-04-12 09:54:03 +000013651eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013653rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013655echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13656echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13657if test `eval echo '${'$as_ac_var'}'` = yes; then
13658 cat >>confdefs.h <<_ACEOF
13659#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13660_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013661
Martin v. Löwis1142de32002-03-29 16:28:31 +000013662else
Martin v. Löwis11437992002-04-12 09:54:03 +000013663 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013664fi
13665done
13666
13667
Martin v. Löwis11437992002-04-12 09:54:03 +000013668
Martin v. Löwis1142de32002-03-29 16:28:31 +000013669for ac_func in getpgrp
13670do
Martin v. Löwis11437992002-04-12 09:54:03 +000013671as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13672echo "$as_me:$LINENO: checking for $ac_func" >&5
13673echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13674if eval "test \"\${$as_ac_var+set}\" = set"; then
13675 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013676else
Martin v. Löwis11437992002-04-12 09:54:03 +000013677 cat >conftest.$ac_ext <<_ACEOF
13678#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013679/* confdefs.h. */
13680_ACEOF
13681cat confdefs.h >>conftest.$ac_ext
13682cat >>conftest.$ac_ext <<_ACEOF
13683/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013684/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013685 which can conflict with char $ac_func (); below.
13686 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013687 <limits.h> exists even on freestanding compilers. Under hpux,
13688 including <limits.h> includes <sys/time.h> and causes problems
13689 checking for functions defined therein. */
13690#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013691# include <limits.h>
13692#else
13693# include <assert.h>
13694#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013695/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013696#ifdef __cplusplus
13697extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013698{
Martin v. Löwis11437992002-04-12 09:54:03 +000013699#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013700/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013701 builtin and then its argument prototype would still apply. */
13702char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013703/* The GNU C library defines this for functions which it implements
13704 to always fail with ENOSYS. Some functions are actually named
13705 something starting with __ and the normal name is an alias. */
13706#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13707choke me
13708#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013709char (*f) () = $ac_func;
13710#endif
13711#ifdef __cplusplus
13712}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013713#endif
13714
Skip Montanaro6dead952003-09-25 14:50:04 +000013715int
13716main ()
13717{
13718return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013719 ;
13720 return 0;
13721}
13722_ACEOF
13723rm -f conftest.$ac_objext conftest$ac_exeext
13724if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13725 (eval $ac_link) 2>&5
13726 ac_status=$?
13727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13728 (exit $ac_status); } &&
13729 { ac_try='test -s conftest$ac_exeext'
13730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13731 (eval $ac_try) 2>&5
13732 ac_status=$?
13733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13734 (exit $ac_status); }; }; then
13735 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013736else
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013738sed 's/^/| /' conftest.$ac_ext >&5
13739
Martin v. Löwis11437992002-04-12 09:54:03 +000013740eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013741fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013742rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013743fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013744echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13745echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13746if test `eval echo '${'$as_ac_var'}'` = yes; then
13747 cat >>confdefs.h <<_ACEOF
13748#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13749_ACEOF
13750 cat >conftest.$ac_ext <<_ACEOF
13751#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013752/* confdefs.h. */
13753_ACEOF
13754cat confdefs.h >>conftest.$ac_ext
13755cat >>conftest.$ac_ext <<_ACEOF
13756/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013757#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013758int
13759main ()
13760{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013761getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013762 ;
13763 return 0;
13764}
13765_ACEOF
13766rm -f conftest.$ac_objext
13767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13768 (eval $ac_compile) 2>&5
13769 ac_status=$?
13770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13771 (exit $ac_status); } &&
13772 { ac_try='test -s conftest.$ac_objext'
13773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13774 (eval $ac_try) 2>&5
13775 ac_status=$?
13776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13777 (exit $ac_status); }; }; then
13778
13779cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013780#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013781_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013782
Martin v. Löwis11437992002-04-12 09:54:03 +000013783
Guido van Rossumf78abae1997-01-21 22:02:36 +000013784else
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013786sed 's/^/| /' conftest.$ac_ext >&5
13787
Guido van Rossum627b2d71993-12-24 10:39:16 +000013788fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013789rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013790
Guido van Rossum627b2d71993-12-24 10:39:16 +000013791fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013792done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013793
Jack Jansen150753c2003-03-29 22:07:47 +000013794
13795for ac_func in setpgrp
13796do
13797as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13798echo "$as_me:$LINENO: checking for $ac_func" >&5
13799echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13800if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013801 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802else
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 cat >conftest.$ac_ext <<_ACEOF
13804#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013805/* confdefs.h. */
13806_ACEOF
13807cat confdefs.h >>conftest.$ac_ext
13808cat >>conftest.$ac_ext <<_ACEOF
13809/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013810/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013811 which can conflict with char $ac_func (); below.
13812 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013813 <limits.h> exists even on freestanding compilers. Under hpux,
13814 including <limits.h> includes <sys/time.h> and causes problems
13815 checking for functions defined therein. */
13816#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013817# include <limits.h>
13818#else
13819# include <assert.h>
13820#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013821/* Override any gcc2 internal prototype to avoid an error. */
13822#ifdef __cplusplus
13823extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013824{
Martin v. Löwis11437992002-04-12 09:54:03 +000013825#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013826/* We use char because int might match the return type of a gcc2
13827 builtin and then its argument prototype would still apply. */
13828char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013829/* The GNU C library defines this for functions which it implements
13830 to always fail with ENOSYS. Some functions are actually named
13831 something starting with __ and the normal name is an alias. */
13832#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13833choke me
13834#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013835char (*f) () = $ac_func;
13836#endif
13837#ifdef __cplusplus
13838}
Jack Jansen150753c2003-03-29 22:07:47 +000013839#endif
13840
Skip Montanaro6dead952003-09-25 14:50:04 +000013841int
13842main ()
13843{
13844return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013845 ;
13846 return 0;
13847}
13848_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013849rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013850if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13851 (eval $ac_link) 2>&5
13852 ac_status=$?
13853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013854 (exit $ac_status); } &&
13855 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13857 (eval $ac_try) 2>&5
13858 ac_status=$?
13859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13860 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013861 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013862else
Jack Jansen150753c2003-03-29 22:07:47 +000013863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013864sed 's/^/| /' conftest.$ac_ext >&5
13865
Jack Jansen150753c2003-03-29 22:07:47 +000013866eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013867fi
Jack Jansen150753c2003-03-29 22:07:47 +000013868rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013869fi
Jack Jansen150753c2003-03-29 22:07:47 +000013870echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13871echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13872if test `eval echo '${'$as_ac_var'}'` = yes; then
13873 cat >>confdefs.h <<_ACEOF
13874#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13875_ACEOF
13876 cat >conftest.$ac_ext <<_ACEOF
13877#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013878/* confdefs.h. */
13879_ACEOF
13880cat confdefs.h >>conftest.$ac_ext
13881cat >>conftest.$ac_ext <<_ACEOF
13882/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013883#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013884int
13885main ()
13886{
13887setpgrp(0,0);
13888 ;
13889 return 0;
13890}
13891_ACEOF
13892rm -f conftest.$ac_objext
13893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13894 (eval $ac_compile) 2>&5
13895 ac_status=$?
13896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13897 (exit $ac_status); } &&
13898 { ac_try='test -s conftest.$ac_objext'
13899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13900 (eval $ac_try) 2>&5
13901 ac_status=$?
13902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13903 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013904
13905cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013906#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013907_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013908
Jack Jansen150753c2003-03-29 22:07:47 +000013909
13910else
13911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013912sed 's/^/| /' conftest.$ac_ext >&5
13913
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013914fi
Jack Jansen150753c2003-03-29 22:07:47 +000013915rm -f conftest.$ac_objext conftest.$ac_ext
13916
13917fi
13918done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013919
Martin v. Löwis11437992002-04-12 09:54:03 +000013920
Thomas Wouters3a584202000-08-05 23:28:51 +000013921for ac_func in gettimeofday
13922do
Martin v. Löwis11437992002-04-12 09:54:03 +000013923as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13924echo "$as_me:$LINENO: checking for $ac_func" >&5
13925echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13926if eval "test \"\${$as_ac_var+set}\" = set"; then
13927 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013928else
Martin v. Löwis11437992002-04-12 09:54:03 +000013929 cat >conftest.$ac_ext <<_ACEOF
13930#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013931/* confdefs.h. */
13932_ACEOF
13933cat confdefs.h >>conftest.$ac_ext
13934cat >>conftest.$ac_ext <<_ACEOF
13935/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013936/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013937 which can conflict with char $ac_func (); below.
13938 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013939 <limits.h> exists even on freestanding compilers. Under hpux,
13940 including <limits.h> includes <sys/time.h> and causes problems
13941 checking for functions defined therein. */
13942#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013943# include <limits.h>
13944#else
13945# include <assert.h>
13946#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013947/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013948#ifdef __cplusplus
13949extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013950{
Martin v. Löwis11437992002-04-12 09:54:03 +000013951#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013952/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013953 builtin and then its argument prototype would still apply. */
13954char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013955/* The GNU C library defines this for functions which it implements
13956 to always fail with ENOSYS. Some functions are actually named
13957 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013958#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013959choke me
13960#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013961char (*f) () = $ac_func;
13962#endif
13963#ifdef __cplusplus
13964}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013965#endif
13966
Skip Montanaro6dead952003-09-25 14:50:04 +000013967int
13968main ()
13969{
13970return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013971 ;
13972 return 0;
13973}
13974_ACEOF
13975rm -f conftest.$ac_objext conftest$ac_exeext
13976if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13977 (eval $ac_link) 2>&5
13978 ac_status=$?
13979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13980 (exit $ac_status); } &&
13981 { ac_try='test -s conftest$ac_exeext'
13982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13983 (eval $ac_try) 2>&5
13984 ac_status=$?
13985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13986 (exit $ac_status); }; }; then
13987 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013988else
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013990sed 's/^/| /' conftest.$ac_ext >&5
13991
Martin v. Löwis11437992002-04-12 09:54:03 +000013992eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013993fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013994rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013996echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13997echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13998if test `eval echo '${'$as_ac_var'}'` = yes; then
13999 cat >>confdefs.h <<_ACEOF
14000#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14001_ACEOF
14002 cat >conftest.$ac_ext <<_ACEOF
14003#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014004/* confdefs.h. */
14005_ACEOF
14006cat confdefs.h >>conftest.$ac_ext
14007cat >>conftest.$ac_ext <<_ACEOF
14008/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014009#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014010int
14011main ()
14012{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014013gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014014 ;
14015 return 0;
14016}
14017_ACEOF
14018rm -f conftest.$ac_objext
14019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14020 (eval $ac_compile) 2>&5
14021 ac_status=$?
14022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14023 (exit $ac_status); } &&
14024 { ac_try='test -s conftest.$ac_objext'
14025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14026 (eval $ac_try) 2>&5
14027 ac_status=$?
14028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14029 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014030 :
14031else
Martin v. Löwis11437992002-04-12 09:54:03 +000014032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014033sed 's/^/| /' conftest.$ac_ext >&5
14034
Martin v. Löwis11437992002-04-12 09:54:03 +000014035
14036cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014037#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014038_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014039
Martin v. Löwis11437992002-04-12 09:54:03 +000014040
Guido van Rossum627b2d71993-12-24 10:39:16 +000014041fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014042rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014043
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014044fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014045done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014046
Michael W. Hudson54241132001-12-07 15:38:26 +000014047
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014048echo "$as_me:$LINENO: checking for major" >&5
14049echo $ECHO_N "checking for major... $ECHO_C" >&6
14050cat >conftest.$ac_ext <<_ACEOF
14051#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014052/* confdefs.h. */
14053_ACEOF
14054cat confdefs.h >>conftest.$ac_ext
14055cat >>conftest.$ac_ext <<_ACEOF
14056/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014057
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014058#if defined(MAJOR_IN_MKDEV)
14059#include <sys/mkdev.h>
14060#elif defined(MAJOR_IN_SYSMACROS)
14061#include <sys/sysmacros.h>
14062#else
14063#include <sys/types.h>
14064#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014065
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014066int
14067main ()
14068{
14069
14070 makedev(major(0),minor(0));
14071
14072 ;
14073 return 0;
14074}
14075_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014076rm -f conftest.$ac_objext conftest$ac_exeext
14077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14078 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014079 ac_status=$?
14080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14081 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014082 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14084 (eval $ac_try) 2>&5
14085 ac_status=$?
14086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14087 (exit $ac_status); }; }; then
14088
14089
14090cat >>confdefs.h <<\_ACEOF
14091#define HAVE_DEVICE_MACROS 1
14092_ACEOF
14093
14094 echo "$as_me:$LINENO: result: yes" >&5
14095echo "${ECHO_T}yes" >&6
14096
14097else
14098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014099sed 's/^/| /' conftest.$ac_ext >&5
14100
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014101
14102 echo "$as_me:$LINENO: result: no" >&5
14103echo "${ECHO_T}no" >&6
14104
14105fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014106rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014107
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014108# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014109# for [no]getaddrinfo in netdb.h.
14110echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14111echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14112cat >conftest.$ac_ext <<_ACEOF
14113#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014114/* confdefs.h. */
14115_ACEOF
14116cat confdefs.h >>conftest.$ac_ext
14117cat >>conftest.$ac_ext <<_ACEOF
14118/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014119
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014120#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014121#include <sys/socket.h>
14122#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014123#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014124
Martin v. Löwis11437992002-04-12 09:54:03 +000014125int
14126main ()
14127{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014128
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014129getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014130
Martin v. Löwis11437992002-04-12 09:54:03 +000014131 ;
14132 return 0;
14133}
14134_ACEOF
14135rm -f conftest.$ac_objext conftest$ac_exeext
14136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14137 (eval $ac_link) 2>&5
14138 ac_status=$?
14139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14140 (exit $ac_status); } &&
14141 { ac_try='test -s conftest$ac_exeext'
14142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14143 (eval $ac_try) 2>&5
14144 ac_status=$?
14145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14146 (exit $ac_status); }; }; then
14147
14148echo "$as_me:$LINENO: result: yes" >&5
14149echo "${ECHO_T}yes" >&6
14150echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14151echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014152if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014153 echo "$as_me:$LINENO: result: buggy" >&5
14154echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014155buggygetaddrinfo=yes
14156else
Martin v. Löwis11437992002-04-12 09:54:03 +000014157 cat >conftest.$ac_ext <<_ACEOF
14158#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014159/* confdefs.h. */
14160_ACEOF
14161cat confdefs.h >>conftest.$ac_ext
14162cat >>conftest.$ac_ext <<_ACEOF
14163/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014164
14165#include <sys/types.h>
14166#include <netdb.h>
14167#include <string.h>
14168#include <sys/socket.h>
14169#include <netinet/in.h>
14170
14171main()
14172{
14173 int passive, gaierr, inet4 = 0, inet6 = 0;
14174 struct addrinfo hints, *ai, *aitop;
14175 char straddr[INET6_ADDRSTRLEN], strport[16];
14176
14177 for (passive = 0; passive <= 1; passive++) {
14178 memset(&hints, 0, sizeof(hints));
14179 hints.ai_family = AF_UNSPEC;
14180 hints.ai_flags = passive ? AI_PASSIVE : 0;
14181 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000014182 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014183 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14184 (void)gai_strerror(gaierr);
14185 goto bad;
14186 }
14187 for (ai = aitop; ai; ai = ai->ai_next) {
14188 if (ai->ai_addr == NULL ||
14189 ai->ai_addrlen == 0 ||
14190 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14191 straddr, sizeof(straddr), strport, sizeof(strport),
14192 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14193 goto bad;
14194 }
14195 switch (ai->ai_family) {
14196 case AF_INET:
14197 if (strcmp(strport, "54321") != 0) {
14198 goto bad;
14199 }
14200 if (passive) {
14201 if (strcmp(straddr, "0.0.0.0") != 0) {
14202 goto bad;
14203 }
14204 } else {
14205 if (strcmp(straddr, "127.0.0.1") != 0) {
14206 goto bad;
14207 }
14208 }
14209 inet4++;
14210 break;
14211 case AF_INET6:
14212 if (strcmp(strport, "54321") != 0) {
14213 goto bad;
14214 }
14215 if (passive) {
14216 if (strcmp(straddr, "::") != 0) {
14217 goto bad;
14218 }
14219 } else {
14220 if (strcmp(straddr, "::1") != 0) {
14221 goto bad;
14222 }
14223 }
14224 inet6++;
14225 break;
14226 case AF_UNSPEC:
14227 goto bad;
14228 break;
14229 default:
14230 /* another family support? */
14231 break;
14232 }
14233 }
14234 }
14235
14236 if (!(inet4 == 0 || inet4 == 2))
14237 goto bad;
14238 if (!(inet6 == 0 || inet6 == 2))
14239 goto bad;
14240
14241 if (aitop)
14242 freeaddrinfo(aitop);
14243 exit(0);
14244
14245 bad:
14246 if (aitop)
14247 freeaddrinfo(aitop);
14248 exit(1);
14249}
14250
Martin v. Löwis11437992002-04-12 09:54:03 +000014251_ACEOF
14252rm -f conftest$ac_exeext
14253if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14254 (eval $ac_link) 2>&5
14255 ac_status=$?
14256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14257 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14259 (eval $ac_try) 2>&5
14260 ac_status=$?
14261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14262 (exit $ac_status); }; }; then
14263 echo "$as_me:$LINENO: result: good" >&5
14264echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014265buggygetaddrinfo=no
14266else
Martin v. Löwis11437992002-04-12 09:54:03 +000014267 echo "$as_me: program exited with status $ac_status" >&5
14268echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014269sed 's/^/| /' conftest.$ac_ext >&5
14270
Martin v. Löwis11437992002-04-12 09:54:03 +000014271( exit $ac_status )
14272echo "$as_me:$LINENO: result: buggy" >&5
14273echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014274buggygetaddrinfo=yes
14275fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014276rm -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 +000014277fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014278else
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014280sed 's/^/| /' conftest.$ac_ext >&5
14281
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
14283echo "$as_me:$LINENO: result: no" >&5
14284echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014285buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014286
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014287fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014288rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014289
14290if test "$buggygetaddrinfo" = "yes"; then
14291 if test "$ipv6" = "yes"; then
14292 echo 'Fatal: You must get working getaddrinfo() function.'
14293 echo ' or you can specify "--disable-ipv6"'.
14294 exit 1
14295 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014296else
Martin v. Löwis11437992002-04-12 09:54:03 +000014297
14298cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014299#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014300_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014301
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014304for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014305do
Martin v. Löwis11437992002-04-12 09:54:03 +000014306as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14307echo "$as_me:$LINENO: checking for $ac_func" >&5
14308echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14309if eval "test \"\${$as_ac_var+set}\" = set"; then
14310 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014311else
Martin v. Löwis11437992002-04-12 09:54:03 +000014312 cat >conftest.$ac_ext <<_ACEOF
14313#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014314/* confdefs.h. */
14315_ACEOF
14316cat confdefs.h >>conftest.$ac_ext
14317cat >>conftest.$ac_ext <<_ACEOF
14318/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014319/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014320 which can conflict with char $ac_func (); below.
14321 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014322 <limits.h> exists even on freestanding compilers. Under hpux,
14323 including <limits.h> includes <sys/time.h> and causes problems
14324 checking for functions defined therein. */
14325#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014326# include <limits.h>
14327#else
14328# include <assert.h>
14329#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014330/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014331#ifdef __cplusplus
14332extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014333{
Martin v. Löwis11437992002-04-12 09:54:03 +000014334#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014335/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014336 builtin and then its argument prototype would still apply. */
14337char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014338/* The GNU C library defines this for functions which it implements
14339 to always fail with ENOSYS. Some functions are actually named
14340 something starting with __ and the normal name is an alias. */
14341#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14342choke me
14343#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014344char (*f) () = $ac_func;
14345#endif
14346#ifdef __cplusplus
14347}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014348#endif
14349
Skip Montanaro6dead952003-09-25 14:50:04 +000014350int
14351main ()
14352{
14353return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014354 ;
14355 return 0;
14356}
14357_ACEOF
14358rm -f conftest.$ac_objext conftest$ac_exeext
14359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14360 (eval $ac_link) 2>&5
14361 ac_status=$?
14362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14363 (exit $ac_status); } &&
14364 { ac_try='test -s conftest$ac_exeext'
14365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14366 (eval $ac_try) 2>&5
14367 ac_status=$?
14368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14369 (exit $ac_status); }; }; then
14370 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014371else
Martin v. Löwis11437992002-04-12 09:54:03 +000014372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014373sed 's/^/| /' conftest.$ac_ext >&5
14374
Martin v. Löwis11437992002-04-12 09:54:03 +000014375eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014376fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014377rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014378fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014379echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14380echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14381if test `eval echo '${'$as_ac_var'}'` = yes; then
14382 cat >>confdefs.h <<_ACEOF
14383#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14384_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014385
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014386fi
14387done
14388
Michael W. Hudson54241132001-12-07 15:38:26 +000014389
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014390# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014391echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14392echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14393if test "${ac_cv_header_time+set}" = set; then
14394 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014395else
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 cat >conftest.$ac_ext <<_ACEOF
14397#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014398/* confdefs.h. */
14399_ACEOF
14400cat confdefs.h >>conftest.$ac_ext
14401cat >>conftest.$ac_ext <<_ACEOF
14402/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014403#include <sys/types.h>
14404#include <sys/time.h>
14405#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014406
Martin v. Löwis11437992002-04-12 09:54:03 +000014407int
14408main ()
14409{
14410if ((struct tm *) 0)
14411return 0;
14412 ;
14413 return 0;
14414}
14415_ACEOF
14416rm -f conftest.$ac_objext
14417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14418 (eval $ac_compile) 2>&5
14419 ac_status=$?
14420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14421 (exit $ac_status); } &&
14422 { ac_try='test -s conftest.$ac_objext'
14423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14424 (eval $ac_try) 2>&5
14425 ac_status=$?
14426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14427 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014428 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014429else
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014431sed 's/^/| /' conftest.$ac_ext >&5
14432
Martin v. Löwis11437992002-04-12 09:54:03 +000014433ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014435rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014436fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014437echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14438echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014439if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
14441cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014442#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014443_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014444
14445fi
14446
Martin v. Löwis11437992002-04-12 09:54:03 +000014447echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14448echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14449if test "${ac_cv_struct_tm+set}" = set; then
14450 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014451else
Martin v. Löwis11437992002-04-12 09:54:03 +000014452 cat >conftest.$ac_ext <<_ACEOF
14453#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014454/* confdefs.h. */
14455_ACEOF
14456cat confdefs.h >>conftest.$ac_ext
14457cat >>conftest.$ac_ext <<_ACEOF
14458/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014459#include <sys/types.h>
14460#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014461
Martin v. Löwis11437992002-04-12 09:54:03 +000014462int
14463main ()
14464{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014465struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 ;
14467 return 0;
14468}
14469_ACEOF
14470rm -f conftest.$ac_objext
14471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14472 (eval $ac_compile) 2>&5
14473 ac_status=$?
14474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14475 (exit $ac_status); } &&
14476 { ac_try='test -s conftest.$ac_objext'
14477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14478 (eval $ac_try) 2>&5
14479 ac_status=$?
14480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14481 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014482 ac_cv_struct_tm=time.h
14483else
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014485sed 's/^/| /' conftest.$ac_ext >&5
14486
Martin v. Löwis11437992002-04-12 09:54:03 +000014487ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014488fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014489rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014490fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014491echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14492echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014493if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014494
14495cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014496#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014497_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014498
14499fi
14500
Martin v. Löwis11437992002-04-12 09:54:03 +000014501echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14502echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14503if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14504 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014505else
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 cat >conftest.$ac_ext <<_ACEOF
14507#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014508/* confdefs.h. */
14509_ACEOF
14510cat confdefs.h >>conftest.$ac_ext
14511cat >>conftest.$ac_ext <<_ACEOF
14512/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014513#include <sys/types.h>
14514#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014515
14516
Martin v. Löwis11437992002-04-12 09:54:03 +000014517int
14518main ()
14519{
14520static struct tm ac_aggr;
14521if (ac_aggr.tm_zone)
14522return 0;
14523 ;
14524 return 0;
14525}
14526_ACEOF
14527rm -f conftest.$ac_objext
14528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14529 (eval $ac_compile) 2>&5
14530 ac_status=$?
14531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14532 (exit $ac_status); } &&
14533 { ac_try='test -s conftest.$ac_objext'
14534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14535 (eval $ac_try) 2>&5
14536 ac_status=$?
14537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14538 (exit $ac_status); }; }; then
14539 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014540else
Martin v. Löwis11437992002-04-12 09:54:03 +000014541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014542sed 's/^/| /' conftest.$ac_ext >&5
14543
14544cat >conftest.$ac_ext <<_ACEOF
14545#line $LINENO "configure"
14546/* confdefs.h. */
14547_ACEOF
14548cat confdefs.h >>conftest.$ac_ext
14549cat >>conftest.$ac_ext <<_ACEOF
14550/* end confdefs.h. */
14551#include <sys/types.h>
14552#include <$ac_cv_struct_tm>
14553
14554
14555int
14556main ()
14557{
14558static struct tm ac_aggr;
14559if (sizeof ac_aggr.tm_zone)
14560return 0;
14561 ;
14562 return 0;
14563}
14564_ACEOF
14565rm -f conftest.$ac_objext
14566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14567 (eval $ac_compile) 2>&5
14568 ac_status=$?
14569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14570 (exit $ac_status); } &&
14571 { ac_try='test -s conftest.$ac_objext'
14572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14573 (eval $ac_try) 2>&5
14574 ac_status=$?
14575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14576 (exit $ac_status); }; }; then
14577 ac_cv_member_struct_tm_tm_zone=yes
14578else
14579 echo "$as_me: failed program was:" >&5
14580sed 's/^/| /' conftest.$ac_ext >&5
14581
Martin v. Löwis11437992002-04-12 09:54:03 +000014582ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014583fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014584rm -f conftest.$ac_objext conftest.$ac_ext
14585fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014586rm -f conftest.$ac_objext conftest.$ac_ext
14587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014588echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14589echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14590if test $ac_cv_member_struct_tm_tm_zone = yes; then
14591
14592cat >>confdefs.h <<_ACEOF
14593#define HAVE_STRUCT_TM_TM_ZONE 1
14594_ACEOF
14595
14596
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014597fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014598
Martin v. Löwis11437992002-04-12 09:54:03 +000014599if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14600
14601cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014602#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014603_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014604
14605else
Martin v. Löwis11437992002-04-12 09:54:03 +000014606 echo "$as_me:$LINENO: checking for tzname" >&5
14607echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14608if test "${ac_cv_var_tzname+set}" = set; then
14609 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014610else
Martin v. Löwis11437992002-04-12 09:54:03 +000014611 cat >conftest.$ac_ext <<_ACEOF
14612#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014613/* confdefs.h. */
14614_ACEOF
14615cat confdefs.h >>conftest.$ac_ext
14616cat >>conftest.$ac_ext <<_ACEOF
14617/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014618#include <time.h>
14619#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014620extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014622
Martin v. Löwis11437992002-04-12 09:54:03 +000014623int
14624main ()
14625{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014626atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014627 ;
14628 return 0;
14629}
14630_ACEOF
14631rm -f conftest.$ac_objext conftest$ac_exeext
14632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14633 (eval $ac_link) 2>&5
14634 ac_status=$?
14635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14636 (exit $ac_status); } &&
14637 { ac_try='test -s conftest$ac_exeext'
14638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14639 (eval $ac_try) 2>&5
14640 ac_status=$?
14641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14642 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014643 ac_cv_var_tzname=yes
14644else
Martin v. Löwis11437992002-04-12 09:54:03 +000014645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014646sed 's/^/| /' conftest.$ac_ext >&5
14647
Martin v. Löwis11437992002-04-12 09:54:03 +000014648ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014649fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014650rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014652echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14653echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014654 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014655
14656cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014657#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014658_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014659
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014660 fi
14661fi
14662
Martin v. Löwis11437992002-04-12 09:54:03 +000014663echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14664echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14665if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14666 echo $ECHO_N "(cached) $ECHO_C" >&6
14667else
14668 cat >conftest.$ac_ext <<_ACEOF
14669#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014670/* confdefs.h. */
14671_ACEOF
14672cat confdefs.h >>conftest.$ac_ext
14673cat >>conftest.$ac_ext <<_ACEOF
14674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014675$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014676int
14677main ()
14678{
14679static struct stat ac_aggr;
14680if (ac_aggr.st_rdev)
14681return 0;
14682 ;
14683 return 0;
14684}
14685_ACEOF
14686rm -f conftest.$ac_objext
14687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14688 (eval $ac_compile) 2>&5
14689 ac_status=$?
14690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14691 (exit $ac_status); } &&
14692 { ac_try='test -s conftest.$ac_objext'
14693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14694 (eval $ac_try) 2>&5
14695 ac_status=$?
14696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14697 (exit $ac_status); }; }; then
14698 ac_cv_member_struct_stat_st_rdev=yes
14699else
14700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014701sed 's/^/| /' conftest.$ac_ext >&5
14702
14703cat >conftest.$ac_ext <<_ACEOF
14704#line $LINENO "configure"
14705/* confdefs.h. */
14706_ACEOF
14707cat confdefs.h >>conftest.$ac_ext
14708cat >>conftest.$ac_ext <<_ACEOF
14709/* end confdefs.h. */
14710$ac_includes_default
14711int
14712main ()
14713{
14714static struct stat ac_aggr;
14715if (sizeof ac_aggr.st_rdev)
14716return 0;
14717 ;
14718 return 0;
14719}
14720_ACEOF
14721rm -f conftest.$ac_objext
14722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14723 (eval $ac_compile) 2>&5
14724 ac_status=$?
14725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14726 (exit $ac_status); } &&
14727 { ac_try='test -s conftest.$ac_objext'
14728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14729 (eval $ac_try) 2>&5
14730 ac_status=$?
14731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14732 (exit $ac_status); }; }; then
14733 ac_cv_member_struct_stat_st_rdev=yes
14734else
14735 echo "$as_me: failed program was:" >&5
14736sed 's/^/| /' conftest.$ac_ext >&5
14737
Martin v. Löwis11437992002-04-12 09:54:03 +000014738ac_cv_member_struct_stat_st_rdev=no
14739fi
14740rm -f conftest.$ac_objext conftest.$ac_ext
14741fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014742rm -f conftest.$ac_objext conftest.$ac_ext
14743fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014744echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14745echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14746if test $ac_cv_member_struct_stat_st_rdev = yes; then
14747
14748cat >>confdefs.h <<_ACEOF
14749#define HAVE_STRUCT_STAT_ST_RDEV 1
14750_ACEOF
14751
14752
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014753fi
14754
Martin v. Löwis11437992002-04-12 09:54:03 +000014755echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14756echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14757if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14758 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014759else
Martin v. Löwis11437992002-04-12 09:54:03 +000014760 cat >conftest.$ac_ext <<_ACEOF
14761#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014762/* confdefs.h. */
14763_ACEOF
14764cat confdefs.h >>conftest.$ac_ext
14765cat >>conftest.$ac_ext <<_ACEOF
14766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014767$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014768int
14769main ()
14770{
14771static struct stat ac_aggr;
14772if (ac_aggr.st_blksize)
14773return 0;
14774 ;
14775 return 0;
14776}
14777_ACEOF
14778rm -f conftest.$ac_objext
14779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14780 (eval $ac_compile) 2>&5
14781 ac_status=$?
14782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14783 (exit $ac_status); } &&
14784 { ac_try='test -s conftest.$ac_objext'
14785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14786 (eval $ac_try) 2>&5
14787 ac_status=$?
14788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14789 (exit $ac_status); }; }; then
14790 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014791else
Martin v. Löwis11437992002-04-12 09:54:03 +000014792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014793sed 's/^/| /' conftest.$ac_ext >&5
14794
14795cat >conftest.$ac_ext <<_ACEOF
14796#line $LINENO "configure"
14797/* confdefs.h. */
14798_ACEOF
14799cat confdefs.h >>conftest.$ac_ext
14800cat >>conftest.$ac_ext <<_ACEOF
14801/* end confdefs.h. */
14802$ac_includes_default
14803int
14804main ()
14805{
14806static struct stat ac_aggr;
14807if (sizeof ac_aggr.st_blksize)
14808return 0;
14809 ;
14810 return 0;
14811}
14812_ACEOF
14813rm -f conftest.$ac_objext
14814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14815 (eval $ac_compile) 2>&5
14816 ac_status=$?
14817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14818 (exit $ac_status); } &&
14819 { ac_try='test -s conftest.$ac_objext'
14820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14821 (eval $ac_try) 2>&5
14822 ac_status=$?
14823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14824 (exit $ac_status); }; }; then
14825 ac_cv_member_struct_stat_st_blksize=yes
14826else
14827 echo "$as_me: failed program was:" >&5
14828sed 's/^/| /' conftest.$ac_ext >&5
14829
Martin v. Löwis11437992002-04-12 09:54:03 +000014830ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014832rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014833fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014834rm -f conftest.$ac_objext conftest.$ac_ext
14835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014836echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14837echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14838if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014839
Martin v. Löwis11437992002-04-12 09:54:03 +000014840cat >>confdefs.h <<_ACEOF
14841#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14842_ACEOF
14843
14844
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014845fi
14846
Martin v. Löwis11437992002-04-12 09:54:03 +000014847echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14848echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14849if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14850 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014851else
Martin v. Löwis11437992002-04-12 09:54:03 +000014852 cat >conftest.$ac_ext <<_ACEOF
14853#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014854/* confdefs.h. */
14855_ACEOF
14856cat confdefs.h >>conftest.$ac_ext
14857cat >>conftest.$ac_ext <<_ACEOF
14858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014859$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014860int
14861main ()
14862{
14863static struct stat ac_aggr;
14864if (ac_aggr.st_blocks)
14865return 0;
14866 ;
14867 return 0;
14868}
14869_ACEOF
14870rm -f conftest.$ac_objext
14871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14872 (eval $ac_compile) 2>&5
14873 ac_status=$?
14874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14875 (exit $ac_status); } &&
14876 { ac_try='test -s conftest.$ac_objext'
14877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14878 (eval $ac_try) 2>&5
14879 ac_status=$?
14880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14881 (exit $ac_status); }; }; then
14882 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014883else
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014885sed 's/^/| /' conftest.$ac_ext >&5
14886
14887cat >conftest.$ac_ext <<_ACEOF
14888#line $LINENO "configure"
14889/* confdefs.h. */
14890_ACEOF
14891cat confdefs.h >>conftest.$ac_ext
14892cat >>conftest.$ac_ext <<_ACEOF
14893/* end confdefs.h. */
14894$ac_includes_default
14895int
14896main ()
14897{
14898static struct stat ac_aggr;
14899if (sizeof ac_aggr.st_blocks)
14900return 0;
14901 ;
14902 return 0;
14903}
14904_ACEOF
14905rm -f conftest.$ac_objext
14906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14907 (eval $ac_compile) 2>&5
14908 ac_status=$?
14909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14910 (exit $ac_status); } &&
14911 { ac_try='test -s conftest.$ac_objext'
14912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14913 (eval $ac_try) 2>&5
14914 ac_status=$?
14915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14916 (exit $ac_status); }; }; then
14917 ac_cv_member_struct_stat_st_blocks=yes
14918else
14919 echo "$as_me: failed program was:" >&5
14920sed 's/^/| /' conftest.$ac_ext >&5
14921
Martin v. Löwis11437992002-04-12 09:54:03 +000014922ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014923fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014924rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014925fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014926rm -f conftest.$ac_objext conftest.$ac_ext
14927fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014928echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14929echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14930if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014931
Martin v. Löwis11437992002-04-12 09:54:03 +000014932cat >>confdefs.h <<_ACEOF
14933#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14934_ACEOF
14935
14936
14937cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014938#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014939_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014940
14941else
Martin v. Löwis11437992002-04-12 09:54:03 +000014942 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014943fi
14944
Michael W. Hudson54241132001-12-07 15:38:26 +000014945
Martin v. Löwis11437992002-04-12 09:54:03 +000014946
14947echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14948echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14949if test "${ac_cv_header_time_altzone+set}" = set; then
14950 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014951else
Martin v. Löwis11437992002-04-12 09:54:03 +000014952 cat >conftest.$ac_ext <<_ACEOF
14953#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014954/* confdefs.h. */
14955_ACEOF
14956cat confdefs.h >>conftest.$ac_ext
14957cat >>conftest.$ac_ext <<_ACEOF
14958/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014959#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014960int
14961main ()
14962{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014963return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014964 ;
14965 return 0;
14966}
14967_ACEOF
14968rm -f conftest.$ac_objext
14969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14970 (eval $ac_compile) 2>&5
14971 ac_status=$?
14972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14973 (exit $ac_status); } &&
14974 { ac_try='test -s conftest.$ac_objext'
14975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14976 (eval $ac_try) 2>&5
14977 ac_status=$?
14978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14979 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014980 ac_cv_header_time_altzone=yes
14981else
Martin v. Löwis11437992002-04-12 09:54:03 +000014982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014983sed 's/^/| /' conftest.$ac_ext >&5
14984
Martin v. Löwis11437992002-04-12 09:54:03 +000014985ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014986fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014987rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014988fi
14989
Martin v. Löwis11437992002-04-12 09:54:03 +000014990echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14991echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014992if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014993
14994cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014995#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014996_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014997
14998fi
14999
Guido van Rossumda88dad1995-01-26 00:46:29 +000015000was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015001echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15002echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15003cat >conftest.$ac_ext <<_ACEOF
15004#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015005/* confdefs.h. */
15006_ACEOF
15007cat confdefs.h >>conftest.$ac_ext
15008cat >>conftest.$ac_ext <<_ACEOF
15009/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015010
15011#include <sys/types.h>
15012#include <sys/select.h>
15013#include <sys/time.h>
15014
Martin v. Löwis11437992002-04-12 09:54:03 +000015015int
15016main ()
15017{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015018;
Martin v. Löwis11437992002-04-12 09:54:03 +000015019 ;
15020 return 0;
15021}
15022_ACEOF
15023rm -f conftest.$ac_objext
15024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15025 (eval $ac_compile) 2>&5
15026 ac_status=$?
15027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15028 (exit $ac_status); } &&
15029 { ac_try='test -s conftest.$ac_objext'
15030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15031 (eval $ac_try) 2>&5
15032 ac_status=$?
15033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15034 (exit $ac_status); }; }; then
15035
15036
15037cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015038#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015039_ACEOF
15040
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015041 was_it_defined=yes
15042
Guido van Rossumf78abae1997-01-21 22:02:36 +000015043else
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015045sed 's/^/| /' conftest.$ac_ext >&5
15046
Guido van Rossum7f43da71994-08-01 12:15:30 +000015047fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015048rm -f conftest.$ac_objext conftest.$ac_ext
15049echo "$as_me:$LINENO: result: $was_it_defined" >&5
15050echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015051
Martin v. Löwis11437992002-04-12 09:54:03 +000015052echo "$as_me:$LINENO: checking for addrinfo" >&5
15053echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15054if test "${ac_cv_struct_addrinfo+set}" = set; then
15055 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015056else
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 cat >conftest.$ac_ext <<_ACEOF
15058#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015059/* confdefs.h. */
15060_ACEOF
15061cat confdefs.h >>conftest.$ac_ext
15062cat >>conftest.$ac_ext <<_ACEOF
15063/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015064
15065# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015066int
15067main ()
15068{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015069struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 ;
15071 return 0;
15072}
15073_ACEOF
15074rm -f conftest.$ac_objext
15075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15076 (eval $ac_compile) 2>&5
15077 ac_status=$?
15078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15079 (exit $ac_status); } &&
15080 { ac_try='test -s conftest.$ac_objext'
15081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15082 (eval $ac_try) 2>&5
15083 ac_status=$?
15084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15085 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015086 ac_cv_struct_addrinfo=yes
15087else
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015089sed 's/^/| /' conftest.$ac_ext >&5
15090
Martin v. Löwis11437992002-04-12 09:54:03 +000015091ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015092fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015093rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015094fi
15095
Martin v. Löwis11437992002-04-12 09:54:03 +000015096echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15097echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015098if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015099
15100cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015101#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015102_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015103
15104fi
15105
Martin v. Löwis11437992002-04-12 09:54:03 +000015106echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15107echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15108if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15109 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015110else
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 cat >conftest.$ac_ext <<_ACEOF
15112#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015113/* confdefs.h. */
15114_ACEOF
15115cat confdefs.h >>conftest.$ac_ext
15116cat >>conftest.$ac_ext <<_ACEOF
15117/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015118
15119# include <sys/types.h>
15120# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015121int
15122main ()
15123{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015124struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 ;
15126 return 0;
15127}
15128_ACEOF
15129rm -f conftest.$ac_objext
15130if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15131 (eval $ac_compile) 2>&5
15132 ac_status=$?
15133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15134 (exit $ac_status); } &&
15135 { ac_try='test -s conftest.$ac_objext'
15136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15137 (eval $ac_try) 2>&5
15138 ac_status=$?
15139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15140 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015141 ac_cv_struct_sockaddr_storage=yes
15142else
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015144sed 's/^/| /' conftest.$ac_ext >&5
15145
Martin v. Löwis11437992002-04-12 09:54:03 +000015146ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015147fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015148rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015149fi
15150
Martin v. Löwis11437992002-04-12 09:54:03 +000015151echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15152echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015153if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015154
15155cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015156#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015157_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015158
15159fi
15160
Guido van Rossum627b2d71993-12-24 10:39:16 +000015161# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015162
Michael W. Hudson54241132001-12-07 15:38:26 +000015163
Martin v. Löwis11437992002-04-12 09:54:03 +000015164echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15165echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15166if test "${ac_cv_c_char_unsigned+set}" = set; then
15167 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015168else
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 cat >conftest.$ac_ext <<_ACEOF
15170#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015171/* confdefs.h. */
15172_ACEOF
15173cat confdefs.h >>conftest.$ac_ext
15174cat >>conftest.$ac_ext <<_ACEOF
15175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015176$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015177int
15178main ()
15179{
15180static int test_array [1 - 2 * !(((char) -1) < 0)];
15181test_array [0] = 0
15182
15183 ;
15184 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015185}
Martin v. Löwis11437992002-04-12 09:54:03 +000015186_ACEOF
15187rm -f conftest.$ac_objext
15188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15189 (eval $ac_compile) 2>&5
15190 ac_status=$?
15191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15192 (exit $ac_status); } &&
15193 { ac_try='test -s conftest.$ac_objext'
15194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15195 (eval $ac_try) 2>&5
15196 ac_status=$?
15197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15198 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015199 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015200else
15201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015202sed 's/^/| /' conftest.$ac_ext >&5
15203
Martin v. Löwis11437992002-04-12 09:54:03 +000015204ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015206rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015207fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015208echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15209echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015210if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015212#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015213_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015214
15215fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015216
Martin v. Löwis11437992002-04-12 09:54:03 +000015217echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15218echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15219if test "${ac_cv_c_const+set}" = set; then
15220 echo $ECHO_N "(cached) $ECHO_C" >&6
15221else
15222 cat >conftest.$ac_ext <<_ACEOF
15223#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015224/* confdefs.h. */
15225_ACEOF
15226cat confdefs.h >>conftest.$ac_ext
15227cat >>conftest.$ac_ext <<_ACEOF
15228/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015229
Martin v. Löwis11437992002-04-12 09:54:03 +000015230int
15231main ()
15232{
15233/* FIXME: Include the comments suggested by Paul. */
15234#ifndef __cplusplus
15235 /* Ultrix mips cc rejects this. */
15236 typedef int charset[2];
15237 const charset x;
15238 /* SunOS 4.1.1 cc rejects this. */
15239 char const *const *ccp;
15240 char **p;
15241 /* NEC SVR4.0.2 mips cc rejects this. */
15242 struct point {int x, y;};
15243 static struct point const zero = {0,0};
15244 /* AIX XL C 1.02.0.0 rejects this.
15245 It does not let you subtract one const X* pointer from another in
15246 an arm of an if-expression whose if-part is not a constant
15247 expression */
15248 const char *g = "string";
15249 ccp = &g + (g ? g-g : 0);
15250 /* HPUX 7.0 cc rejects these. */
15251 ++ccp;
15252 p = (char**) ccp;
15253 ccp = (char const *const *) p;
15254 { /* SCO 3.2v4 cc rejects this. */
15255 char *t;
15256 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015257
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 *t++ = 0;
15259 }
15260 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15261 int x[] = {25, 17};
15262 const int *foo = &x[0];
15263 ++foo;
15264 }
15265 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15266 typedef const int *iptr;
15267 iptr p = 0;
15268 ++p;
15269 }
15270 { /* AIX XL C 1.02.0.0 rejects this saying
15271 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15272 struct s { int j; const int *ap[3]; };
15273 struct s *b; b->j = 5;
15274 }
15275 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15276 const int foo = 10;
15277 }
15278#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015279
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 ;
15281 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015282}
Martin v. Löwis11437992002-04-12 09:54:03 +000015283_ACEOF
15284rm -f conftest.$ac_objext
15285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15286 (eval $ac_compile) 2>&5
15287 ac_status=$?
15288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15289 (exit $ac_status); } &&
15290 { ac_try='test -s conftest.$ac_objext'
15291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15292 (eval $ac_try) 2>&5
15293 ac_status=$?
15294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15295 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015296 ac_cv_c_const=yes
15297else
Martin v. Löwis11437992002-04-12 09:54:03 +000015298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015299sed 's/^/| /' conftest.$ac_ext >&5
15300
Martin v. Löwis11437992002-04-12 09:54:03 +000015301ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015303rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015304fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015305echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15306echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015307if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015308
15309cat >>confdefs.h <<\_ACEOF
15310#define const
15311_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015312
15313fi
15314
Michael W. Hudson54241132001-12-07 15:38:26 +000015315
Guido van Rossumda88dad1995-01-26 00:46:29 +000015316works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015317echo "$as_me:$LINENO: checking for working volatile" >&5
15318echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15319cat >conftest.$ac_ext <<_ACEOF
15320#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015321/* confdefs.h. */
15322_ACEOF
15323cat confdefs.h >>conftest.$ac_ext
15324cat >>conftest.$ac_ext <<_ACEOF
15325/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015326
Martin v. Löwis11437992002-04-12 09:54:03 +000015327int
15328main ()
15329{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015330volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015331 ;
15332 return 0;
15333}
15334_ACEOF
15335rm -f conftest.$ac_objext
15336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15337 (eval $ac_compile) 2>&5
15338 ac_status=$?
15339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15340 (exit $ac_status); } &&
15341 { ac_try='test -s conftest.$ac_objext'
15342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15343 (eval $ac_try) 2>&5
15344 ac_status=$?
15345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15346 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015347 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015348else
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015350sed 's/^/| /' conftest.$ac_ext >&5
15351
Martin v. Löwis11437992002-04-12 09:54:03 +000015352
15353cat >>confdefs.h <<\_ACEOF
15354#define volatile
15355_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015356
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015357
Guido van Rossum627b2d71993-12-24 10:39:16 +000015358fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015359rm -f conftest.$ac_objext conftest.$ac_ext
15360echo "$as_me:$LINENO: result: $works" >&5
15361echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015362
Guido van Rossumda88dad1995-01-26 00:46:29 +000015363works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015364echo "$as_me:$LINENO: checking for working signed char" >&5
15365echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15366cat >conftest.$ac_ext <<_ACEOF
15367#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015368/* confdefs.h. */
15369_ACEOF
15370cat confdefs.h >>conftest.$ac_ext
15371cat >>conftest.$ac_ext <<_ACEOF
15372/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015373
Martin v. Löwis11437992002-04-12 09:54:03 +000015374int
15375main ()
15376{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015377signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015378 ;
15379 return 0;
15380}
15381_ACEOF
15382rm -f conftest.$ac_objext
15383if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15384 (eval $ac_compile) 2>&5
15385 ac_status=$?
15386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15387 (exit $ac_status); } &&
15388 { ac_try='test -s conftest.$ac_objext'
15389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15390 (eval $ac_try) 2>&5
15391 ac_status=$?
15392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15393 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015394 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015395else
Martin v. Löwis11437992002-04-12 09:54:03 +000015396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015397sed 's/^/| /' conftest.$ac_ext >&5
15398
Martin v. Löwis11437992002-04-12 09:54:03 +000015399
15400cat >>confdefs.h <<\_ACEOF
15401#define signed
15402_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015403
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015404
Guido van Rossum7f43da71994-08-01 12:15:30 +000015405fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015406rm -f conftest.$ac_objext conftest.$ac_ext
15407echo "$as_me:$LINENO: result: $works" >&5
15408echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015409
Guido van Rossumda88dad1995-01-26 00:46:29 +000015410have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015411echo "$as_me:$LINENO: checking for prototypes" >&5
15412echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15413cat >conftest.$ac_ext <<_ACEOF
15414#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015415/* confdefs.h. */
15416_ACEOF
15417cat confdefs.h >>conftest.$ac_ext
15418cat >>conftest.$ac_ext <<_ACEOF
15419/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015420int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015421int
15422main ()
15423{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015424return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015425 ;
15426 return 0;
15427}
15428_ACEOF
15429rm -f conftest.$ac_objext
15430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15431 (eval $ac_compile) 2>&5
15432 ac_status=$?
15433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15434 (exit $ac_status); } &&
15435 { ac_try='test -s conftest.$ac_objext'
15436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15437 (eval $ac_try) 2>&5
15438 ac_status=$?
15439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15440 (exit $ac_status); }; }; then
15441
15442
15443cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015444#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015445_ACEOF
15446
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015447 have_prototypes=yes
15448
Guido van Rossumf78abae1997-01-21 22:02:36 +000015449else
Martin v. Löwis11437992002-04-12 09:54:03 +000015450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015451sed 's/^/| /' conftest.$ac_ext >&5
15452
Guido van Rossum7f43da71994-08-01 12:15:30 +000015453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015454rm -f conftest.$ac_objext conftest.$ac_ext
15455echo "$as_me:$LINENO: result: $have_prototypes" >&5
15456echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015457
Guido van Rossumda88dad1995-01-26 00:46:29 +000015458works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015459echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15460echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15461cat >conftest.$ac_ext <<_ACEOF
15462#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015463/* confdefs.h. */
15464_ACEOF
15465cat confdefs.h >>conftest.$ac_ext
15466cat >>conftest.$ac_ext <<_ACEOF
15467/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015468
15469#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015470int foo(int x, ...) {
15471 va_list va;
15472 va_start(va, x);
15473 va_arg(va, int);
15474 va_arg(va, char *);
15475 va_arg(va, double);
15476 return 0;
15477}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015478
Martin v. Löwis11437992002-04-12 09:54:03 +000015479int
15480main ()
15481{
Guido van Rossum90eea071996-08-30 20:58:57 +000015482return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015483 ;
15484 return 0;
15485}
15486_ACEOF
15487rm -f conftest.$ac_objext
15488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15489 (eval $ac_compile) 2>&5
15490 ac_status=$?
15491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15492 (exit $ac_status); } &&
15493 { ac_try='test -s conftest.$ac_objext'
15494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15495 (eval $ac_try) 2>&5
15496 ac_status=$?
15497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15498 (exit $ac_status); }; }; then
15499
15500
15501cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015502#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015503_ACEOF
15504
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015505 works=yes
15506
Guido van Rossumf78abae1997-01-21 22:02:36 +000015507else
Martin v. Löwis11437992002-04-12 09:54:03 +000015508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015509sed 's/^/| /' conftest.$ac_ext >&5
15510
Guido van Rossum627b2d71993-12-24 10:39:16 +000015511fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015512rm -f conftest.$ac_objext conftest.$ac_ext
15513echo "$as_me:$LINENO: result: $works" >&5
15514echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015515
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015516# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015517echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15518echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15519cat >conftest.$ac_ext <<_ACEOF
15520#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015521/* confdefs.h. */
15522_ACEOF
15523cat confdefs.h >>conftest.$ac_ext
15524cat >>conftest.$ac_ext <<_ACEOF
15525/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015526#include <sys/types.h>
15527#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015528int
15529main ()
15530{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015531struct sockaddr x;
15532x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015533 ;
15534 return 0;
15535}
15536_ACEOF
15537rm -f conftest.$ac_objext
15538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15539 (eval $ac_compile) 2>&5
15540 ac_status=$?
15541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15542 (exit $ac_status); } &&
15543 { ac_try='test -s conftest.$ac_objext'
15544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15545 (eval $ac_try) 2>&5
15546 ac_status=$?
15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15548 (exit $ac_status); }; }; then
15549 echo "$as_me:$LINENO: result: yes" >&5
15550echo "${ECHO_T}yes" >&6
15551
15552cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015553#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015554_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015555
15556else
Martin v. Löwis11437992002-04-12 09:54:03 +000015557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015558sed 's/^/| /' conftest.$ac_ext >&5
15559
Martin v. Löwis11437992002-04-12 09:54:03 +000015560echo "$as_me:$LINENO: result: no" >&5
15561echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015562fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015563rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015564
Guido van Rossumda88dad1995-01-26 00:46:29 +000015565va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015566echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15567echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15568cat >conftest.$ac_ext <<_ACEOF
15569#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015570/* confdefs.h. */
15571_ACEOF
15572cat confdefs.h >>conftest.$ac_ext
15573cat >>conftest.$ac_ext <<_ACEOF
15574/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015575
15576#ifdef HAVE_STDARG_PROTOTYPES
15577#include <stdarg.h>
15578#else
15579#include <varargs.h>
15580#endif
15581
Martin v. Löwis11437992002-04-12 09:54:03 +000015582int
15583main ()
15584{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015585va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015586 ;
15587 return 0;
15588}
15589_ACEOF
15590rm -f conftest.$ac_objext
15591if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15592 (eval $ac_compile) 2>&5
15593 ac_status=$?
15594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15595 (exit $ac_status); } &&
15596 { ac_try='test -s conftest.$ac_objext'
15597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15598 (eval $ac_try) 2>&5
15599 ac_status=$?
15600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15601 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015602 :
15603else
Martin v. Löwis11437992002-04-12 09:54:03 +000015604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015605sed 's/^/| /' conftest.$ac_ext >&5
15606
Martin v. Löwis11437992002-04-12 09:54:03 +000015607
15608
15609cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015610#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015611_ACEOF
15612
Guido van Rossumda88dad1995-01-26 00:46:29 +000015613 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015614
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015615fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015616rm -f conftest.$ac_objext conftest.$ac_ext
15617echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15618echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015619
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015620# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015621
15622
15623
15624echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15625echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15626if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15627 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015628else
Martin v. Löwis11437992002-04-12 09:54:03 +000015629 cat >conftest.$ac_ext <<_ACEOF
15630#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015631/* confdefs.h. */
15632_ACEOF
15633cat confdefs.h >>conftest.$ac_ext
15634cat >>conftest.$ac_ext <<_ACEOF
15635/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015636/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015637 which can conflict with char gethostbyname_r (); below.
15638 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015639 <limits.h> exists even on freestanding compilers. Under hpux,
15640 including <limits.h> includes <sys/time.h> and causes problems
15641 checking for functions defined therein. */
15642#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015643# include <limits.h>
15644#else
15645# include <assert.h>
15646#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015647/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015648#ifdef __cplusplus
15649extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015650{
Martin v. Löwis11437992002-04-12 09:54:03 +000015651#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015652/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 builtin and then its argument prototype would still apply. */
15654char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015655/* The GNU C library defines this for functions which it implements
15656 to always fail with ENOSYS. Some functions are actually named
15657 something starting with __ and the normal name is an alias. */
15658#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15659choke me
15660#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015661char (*f) () = gethostbyname_r;
15662#endif
15663#ifdef __cplusplus
15664}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015665#endif
15666
Skip Montanaro6dead952003-09-25 14:50:04 +000015667int
15668main ()
15669{
15670return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015671 ;
15672 return 0;
15673}
15674_ACEOF
15675rm -f conftest.$ac_objext conftest$ac_exeext
15676if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15677 (eval $ac_link) 2>&5
15678 ac_status=$?
15679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15680 (exit $ac_status); } &&
15681 { ac_try='test -s conftest$ac_exeext'
15682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15683 (eval $ac_try) 2>&5
15684 ac_status=$?
15685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15686 (exit $ac_status); }; }; then
15687 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015688else
Martin v. Löwis11437992002-04-12 09:54:03 +000015689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015690sed 's/^/| /' conftest.$ac_ext >&5
15691
Martin v. Löwis11437992002-04-12 09:54:03 +000015692ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015693fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015695fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015696echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15697echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15698if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015699
Martin v. Löwis11437992002-04-12 09:54:03 +000015700 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015701#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015702_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015703
Martin v. Löwis11437992002-04-12 09:54:03 +000015704 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15705echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015706 OLD_CFLAGS=$CFLAGS
15707 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 cat >conftest.$ac_ext <<_ACEOF
15709#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015710/* confdefs.h. */
15711_ACEOF
15712cat confdefs.h >>conftest.$ac_ext
15713cat >>conftest.$ac_ext <<_ACEOF
15714/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015715
15716# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015717
Martin v. Löwis11437992002-04-12 09:54:03 +000015718int
15719main ()
15720{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015721
15722 char *name;
15723 struct hostent *he, *res;
15724 char buffer[2048];
15725 int buflen = 2048;
15726 int h_errnop;
15727
15728 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015729
15730 ;
15731 return 0;
15732}
15733_ACEOF
15734rm -f conftest.$ac_objext
15735if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15736 (eval $ac_compile) 2>&5
15737 ac_status=$?
15738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15739 (exit $ac_status); } &&
15740 { ac_try='test -s conftest.$ac_objext'
15741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15742 (eval $ac_try) 2>&5
15743 ac_status=$?
15744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15745 (exit $ac_status); }; }; then
15746
15747 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015748#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015749_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015750
Martin v. Löwis11437992002-04-12 09:54:03 +000015751
15752cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015753#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015754_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015755
Martin v. Löwis11437992002-04-12 09:54:03 +000015756 echo "$as_me:$LINENO: result: yes" >&5
15757echo "${ECHO_T}yes" >&6
15758
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015759else
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015761sed 's/^/| /' conftest.$ac_ext >&5
15762
Martin v. Löwis11437992002-04-12 09:54:03 +000015763
15764 echo "$as_me:$LINENO: result: no" >&5
15765echo "${ECHO_T}no" >&6
15766 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15767echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15768 cat >conftest.$ac_ext <<_ACEOF
15769#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015770/* confdefs.h. */
15771_ACEOF
15772cat confdefs.h >>conftest.$ac_ext
15773cat >>conftest.$ac_ext <<_ACEOF
15774/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015775
15776# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015777
Martin v. Löwis11437992002-04-12 09:54:03 +000015778int
15779main ()
15780{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015781
15782 char *name;
15783 struct hostent *he;
15784 char buffer[2048];
15785 int buflen = 2048;
15786 int h_errnop;
15787
15788 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015789
15790 ;
15791 return 0;
15792}
15793_ACEOF
15794rm -f conftest.$ac_objext
15795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15796 (eval $ac_compile) 2>&5
15797 ac_status=$?
15798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15799 (exit $ac_status); } &&
15800 { ac_try='test -s conftest.$ac_objext'
15801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15802 (eval $ac_try) 2>&5
15803 ac_status=$?
15804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15805 (exit $ac_status); }; }; then
15806
15807 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015808#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015809_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015810
Martin v. Löwis11437992002-04-12 09:54:03 +000015811
15812cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015813#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015814_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 echo "$as_me:$LINENO: result: yes" >&5
15817echo "${ECHO_T}yes" >&6
15818
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015819else
Martin v. Löwis11437992002-04-12 09:54:03 +000015820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015821sed 's/^/| /' conftest.$ac_ext >&5
15822
Martin v. Löwis11437992002-04-12 09:54:03 +000015823
15824 echo "$as_me:$LINENO: result: no" >&5
15825echo "${ECHO_T}no" >&6
15826 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15827echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15828 cat >conftest.$ac_ext <<_ACEOF
15829#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015830/* confdefs.h. */
15831_ACEOF
15832cat confdefs.h >>conftest.$ac_ext
15833cat >>conftest.$ac_ext <<_ACEOF
15834/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015835
15836# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015837
Martin v. Löwis11437992002-04-12 09:54:03 +000015838int
15839main ()
15840{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015841
15842 char *name;
15843 struct hostent *he;
15844 struct hostent_data data;
15845
15846 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015847
15848 ;
15849 return 0;
15850}
15851_ACEOF
15852rm -f conftest.$ac_objext
15853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15854 (eval $ac_compile) 2>&5
15855 ac_status=$?
15856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15857 (exit $ac_status); } &&
15858 { ac_try='test -s conftest.$ac_objext'
15859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15860 (eval $ac_try) 2>&5
15861 ac_status=$?
15862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15863 (exit $ac_status); }; }; then
15864
15865 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015866#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015867_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015868
Martin v. Löwis11437992002-04-12 09:54:03 +000015869
15870cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015871#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015872_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015873
Martin v. Löwis11437992002-04-12 09:54:03 +000015874 echo "$as_me:$LINENO: result: yes" >&5
15875echo "${ECHO_T}yes" >&6
15876
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015877else
Martin v. Löwis11437992002-04-12 09:54:03 +000015878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015879sed 's/^/| /' conftest.$ac_ext >&5
15880
Martin v. Löwis11437992002-04-12 09:54:03 +000015881
15882 echo "$as_me:$LINENO: result: no" >&5
15883echo "${ECHO_T}no" >&6
15884
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015885fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015886rm -f conftest.$ac_objext conftest.$ac_ext
15887
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015888fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015889rm -f conftest.$ac_objext conftest.$ac_ext
15890
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015891fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015892rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015893 CFLAGS=$OLD_CFLAGS
15894
15895else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015896
Martin v. Löwis11437992002-04-12 09:54:03 +000015897
15898for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015899do
Martin v. Löwis11437992002-04-12 09:54:03 +000015900as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15901echo "$as_me:$LINENO: checking for $ac_func" >&5
15902echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15903if eval "test \"\${$as_ac_var+set}\" = set"; then
15904 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015905else
Martin v. Löwis11437992002-04-12 09:54:03 +000015906 cat >conftest.$ac_ext <<_ACEOF
15907#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015908/* confdefs.h. */
15909_ACEOF
15910cat confdefs.h >>conftest.$ac_ext
15911cat >>conftest.$ac_ext <<_ACEOF
15912/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015913/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015914 which can conflict with char $ac_func (); below.
15915 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015916 <limits.h> exists even on freestanding compilers. Under hpux,
15917 including <limits.h> includes <sys/time.h> and causes problems
15918 checking for functions defined therein. */
15919#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015920# include <limits.h>
15921#else
15922# include <assert.h>
15923#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015924/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015925#ifdef __cplusplus
15926extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015927{
Martin v. Löwis11437992002-04-12 09:54:03 +000015928#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015929/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015930 builtin and then its argument prototype would still apply. */
15931char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015932/* The GNU C library defines this for functions which it implements
15933 to always fail with ENOSYS. Some functions are actually named
15934 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015935#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015936choke me
15937#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015938char (*f) () = $ac_func;
15939#endif
15940#ifdef __cplusplus
15941}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015942#endif
15943
Skip Montanaro6dead952003-09-25 14:50:04 +000015944int
15945main ()
15946{
15947return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015948 ;
15949 return 0;
15950}
15951_ACEOF
15952rm -f conftest.$ac_objext conftest$ac_exeext
15953if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15954 (eval $ac_link) 2>&5
15955 ac_status=$?
15956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15957 (exit $ac_status); } &&
15958 { ac_try='test -s conftest$ac_exeext'
15959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15960 (eval $ac_try) 2>&5
15961 ac_status=$?
15962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15963 (exit $ac_status); }; }; then
15964 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015965else
Martin v. Löwis11437992002-04-12 09:54:03 +000015966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015967sed 's/^/| /' conftest.$ac_ext >&5
15968
Martin v. Löwis11437992002-04-12 09:54:03 +000015969eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015970fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015971rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015972fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015973echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15974echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15975if test `eval echo '${'$as_ac_var'}'` = yes; then
15976 cat >>confdefs.h <<_ACEOF
15977#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15978_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015979
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015980fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015981done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015982
Michael W. Hudson54241132001-12-07 15:38:26 +000015983
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015984fi
15985
Michael W. Hudson54241132001-12-07 15:38:26 +000015986
15987
15988
15989
15990
15991
Guido van Rossum627b2d71993-12-24 10:39:16 +000015992# checks for system services
15993# (none yet)
15994
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015995# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015996echo "$as_me:$LINENO: checking for __fpu_control" >&5
15997echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15998if test "${ac_cv_func___fpu_control+set}" = set; then
15999 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016000else
Martin v. Löwis11437992002-04-12 09:54:03 +000016001 cat >conftest.$ac_ext <<_ACEOF
16002#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016003/* confdefs.h. */
16004_ACEOF
16005cat confdefs.h >>conftest.$ac_ext
16006cat >>conftest.$ac_ext <<_ACEOF
16007/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016008/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016009 which can conflict with char __fpu_control (); below.
16010 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016011 <limits.h> exists even on freestanding compilers. Under hpux,
16012 including <limits.h> includes <sys/time.h> and causes problems
16013 checking for functions defined therein. */
16014#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016015# include <limits.h>
16016#else
16017# include <assert.h>
16018#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016019/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016020#ifdef __cplusplus
16021extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016022{
Martin v. Löwis11437992002-04-12 09:54:03 +000016023#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016024/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016025 builtin and then its argument prototype would still apply. */
16026char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016027/* The GNU C library defines this for functions which it implements
16028 to always fail with ENOSYS. Some functions are actually named
16029 something starting with __ and the normal name is an alias. */
16030#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16031choke me
16032#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016033char (*f) () = __fpu_control;
16034#endif
16035#ifdef __cplusplus
16036}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016037#endif
16038
Skip Montanaro6dead952003-09-25 14:50:04 +000016039int
16040main ()
16041{
16042return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016043 ;
16044 return 0;
16045}
16046_ACEOF
16047rm -f conftest.$ac_objext conftest$ac_exeext
16048if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16049 (eval $ac_link) 2>&5
16050 ac_status=$?
16051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16052 (exit $ac_status); } &&
16053 { ac_try='test -s conftest$ac_exeext'
16054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16055 (eval $ac_try) 2>&5
16056 ac_status=$?
16057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16058 (exit $ac_status); }; }; then
16059 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016060else
Martin v. Löwis11437992002-04-12 09:54:03 +000016061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016062sed 's/^/| /' conftest.$ac_ext >&5
16063
Martin v. Löwis11437992002-04-12 09:54:03 +000016064ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016066rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016068echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16069echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16070if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016071 :
16072else
Martin v. Löwis11437992002-04-12 09:54:03 +000016073
16074echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16075echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16076if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16077 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016078else
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016080LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016081cat >conftest.$ac_ext <<_ACEOF
16082#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016083/* confdefs.h. */
16084_ACEOF
16085cat confdefs.h >>conftest.$ac_ext
16086cat >>conftest.$ac_ext <<_ACEOF
16087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016088
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016089/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016090#ifdef __cplusplus
16091extern "C"
16092#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016093/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 builtin and then its argument prototype would still apply. */
16095char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016096int
16097main ()
16098{
16099__fpu_control ();
16100 ;
16101 return 0;
16102}
16103_ACEOF
16104rm -f conftest.$ac_objext conftest$ac_exeext
16105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16106 (eval $ac_link) 2>&5
16107 ac_status=$?
16108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16109 (exit $ac_status); } &&
16110 { ac_try='test -s conftest$ac_exeext'
16111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16112 (eval $ac_try) 2>&5
16113 ac_status=$?
16114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16115 (exit $ac_status); }; }; then
16116 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016117else
Martin v. Löwis11437992002-04-12 09:54:03 +000016118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016119sed 's/^/| /' conftest.$ac_ext >&5
16120
Martin v. Löwis11437992002-04-12 09:54:03 +000016121ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016122fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016123rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16124LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016126echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16127echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16128if test $ac_cv_lib_ieee___fpu_control = yes; then
16129 cat >>confdefs.h <<_ACEOF
16130#define HAVE_LIBIEEE 1
16131_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016132
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016133 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016134
Guido van Rossum627b2d71993-12-24 10:39:16 +000016135fi
16136
Michael W. Hudson54241132001-12-07 15:38:26 +000016137
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016138fi
16139
Michael W. Hudson54241132001-12-07 15:38:26 +000016140
Guido van Rossum7f253911997-05-09 02:42:48 +000016141# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016142echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16143echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16144
Guido van Rossum7f253911997-05-09 02:42:48 +000016145# Check whether --with-fpectl or --without-fpectl was given.
16146if test "${with_fpectl+set}" = set; then
16147 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016148
Guido van Rossum7f253911997-05-09 02:42:48 +000016149if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016150then
16151
16152cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016153#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016154_ACEOF
16155
16156 echo "$as_me:$LINENO: result: yes" >&5
16157echo "${ECHO_T}yes" >&6
16158else echo "$as_me:$LINENO: result: no" >&5
16159echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016160fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016161else
Martin v. Löwis11437992002-04-12 09:54:03 +000016162 echo "$as_me:$LINENO: result: no" >&5
16163echo "${ECHO_T}no" >&6
16164fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016165
Guido van Rossum7f43da71994-08-01 12:15:30 +000016166# check for --with-libm=...
16167
Guido van Rossum563e7081996-09-10 18:20:48 +000016168case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016169Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016170BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016171*) LIBM=-lm
16172esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016173echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16174echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16175
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016176# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016177if test "${with_libm+set}" = set; then
16178 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016179
Guido van Rossum7f253911997-05-09 02:42:48 +000016180if test "$withval" = no
16181then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016182 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16183echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016184elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016185then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016186 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16187echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16188else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16189echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16190 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016191fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016192else
Martin v. Löwis11437992002-04-12 09:54:03 +000016193 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16194echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16195fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016196
16197# check for --with-libc=...
16198
Martin v. Löwis11437992002-04-12 09:54:03 +000016199echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16200echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16201
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016202# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016203if test "${with_libc+set}" = set; then
16204 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016205
Guido van Rossum7f253911997-05-09 02:42:48 +000016206if test "$withval" = no
16207then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016208 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16209echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016210elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016211then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16213echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16214else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16215echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16216 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016217fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016218else
Martin v. Löwis11437992002-04-12 09:54:03 +000016219 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16220echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16221fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016222
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016223# check for hypot() in math library
16224LIBS_SAVE=$LIBS
16225LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016226
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016227for ac_func in hypot
16228do
Martin v. Löwis11437992002-04-12 09:54:03 +000016229as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16230echo "$as_me:$LINENO: checking for $ac_func" >&5
16231echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16232if eval "test \"\${$as_ac_var+set}\" = set"; then
16233 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016234else
Martin v. Löwis11437992002-04-12 09:54:03 +000016235 cat >conftest.$ac_ext <<_ACEOF
16236#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016237/* confdefs.h. */
16238_ACEOF
16239cat confdefs.h >>conftest.$ac_ext
16240cat >>conftest.$ac_ext <<_ACEOF
16241/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016242/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016243 which can conflict with char $ac_func (); below.
16244 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016245 <limits.h> exists even on freestanding compilers. Under hpux,
16246 including <limits.h> includes <sys/time.h> and causes problems
16247 checking for functions defined therein. */
16248#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016249# include <limits.h>
16250#else
16251# include <assert.h>
16252#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016253/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016254#ifdef __cplusplus
16255extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016256{
Martin v. Löwis11437992002-04-12 09:54:03 +000016257#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016258/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 builtin and then its argument prototype would still apply. */
16260char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016261/* The GNU C library defines this for functions which it implements
16262 to always fail with ENOSYS. Some functions are actually named
16263 something starting with __ and the normal name is an alias. */
16264#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16265choke me
16266#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016267char (*f) () = $ac_func;
16268#endif
16269#ifdef __cplusplus
16270}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016271#endif
16272
Skip Montanaro6dead952003-09-25 14:50:04 +000016273int
16274main ()
16275{
16276return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 ;
16278 return 0;
16279}
16280_ACEOF
16281rm -f conftest.$ac_objext conftest$ac_exeext
16282if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16283 (eval $ac_link) 2>&5
16284 ac_status=$?
16285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16286 (exit $ac_status); } &&
16287 { ac_try='test -s conftest$ac_exeext'
16288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16289 (eval $ac_try) 2>&5
16290 ac_status=$?
16291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16292 (exit $ac_status); }; }; then
16293 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016294else
Martin v. Löwis11437992002-04-12 09:54:03 +000016295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016296sed 's/^/| /' conftest.$ac_ext >&5
16297
Martin v. Löwis11437992002-04-12 09:54:03 +000016298eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016300rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016301fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016302echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16303echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16304if test `eval echo '${'$as_ac_var'}'` = yes; then
16305 cat >>confdefs.h <<_ACEOF
16306#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16307_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016308
Michael W. Hudson54241132001-12-07 15:38:26 +000016309else
Martin v. Löwis11437992002-04-12 09:54:03 +000016310 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016311fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016312done
16313
Michael W. Hudson54241132001-12-07 15:38:26 +000016314
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016315LIBS=$LIBS_SAVE
16316
Guido van Rossumef2255b2000-03-10 22:30:29 +000016317# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016318if test "${ac_cv_header_wchar_h+set}" = set; then
16319 echo "$as_me:$LINENO: checking for wchar.h" >&5
16320echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16321if test "${ac_cv_header_wchar_h+set}" = set; then
16322 echo $ECHO_N "(cached) $ECHO_C" >&6
16323fi
16324echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16325echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016326else
Martin v. Löwis11437992002-04-12 09:54:03 +000016327 # Is the header compilable?
16328echo "$as_me:$LINENO: checking wchar.h usability" >&5
16329echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16330cat >conftest.$ac_ext <<_ACEOF
16331#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016332/* confdefs.h. */
16333_ACEOF
16334cat confdefs.h >>conftest.$ac_ext
16335cat >>conftest.$ac_ext <<_ACEOF
16336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016337$ac_includes_default
16338#include <wchar.h>
16339_ACEOF
16340rm -f conftest.$ac_objext
16341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16342 (eval $ac_compile) 2>&5
16343 ac_status=$?
16344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16345 (exit $ac_status); } &&
16346 { ac_try='test -s conftest.$ac_objext'
16347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16348 (eval $ac_try) 2>&5
16349 ac_status=$?
16350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16351 (exit $ac_status); }; }; then
16352 ac_header_compiler=yes
16353else
16354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016355sed 's/^/| /' conftest.$ac_ext >&5
16356
Martin v. Löwis11437992002-04-12 09:54:03 +000016357ac_header_compiler=no
16358fi
16359rm -f conftest.$ac_objext conftest.$ac_ext
16360echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16361echo "${ECHO_T}$ac_header_compiler" >&6
16362
16363# Is the header present?
16364echo "$as_me:$LINENO: checking wchar.h presence" >&5
16365echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16366cat >conftest.$ac_ext <<_ACEOF
16367#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016368/* confdefs.h. */
16369_ACEOF
16370cat confdefs.h >>conftest.$ac_ext
16371cat >>conftest.$ac_ext <<_ACEOF
16372/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016373#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016374_ACEOF
16375if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16376 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16377 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016378 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016379 rm -f conftest.er1
16380 cat conftest.err >&5
16381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16382 (exit $ac_status); } >/dev/null; then
16383 if test -s conftest.err; then
16384 ac_cpp_err=$ac_c_preproc_warn_flag
16385 else
16386 ac_cpp_err=
16387 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016388else
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 ac_cpp_err=yes
16390fi
16391if test -z "$ac_cpp_err"; then
16392 ac_header_preproc=yes
16393else
16394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016395sed 's/^/| /' conftest.$ac_ext >&5
16396
Martin v. Löwis11437992002-04-12 09:54:03 +000016397 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016399rm -f conftest.err conftest.$ac_ext
16400echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16401echo "${ECHO_T}$ac_header_preproc" >&6
16402
16403# So? What about this header?
16404case $ac_header_compiler:$ac_header_preproc in
16405 yes:no )
16406 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16407echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16408 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016409echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16410 (
16411 cat <<\_ASBOX
16412## ------------------------------------ ##
16413## Report this to bug-autoconf@gnu.org. ##
16414## ------------------------------------ ##
16415_ASBOX
16416 ) |
16417 sed "s/^/$as_me: WARNING: /" >&2
16418 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016419 no:yes )
16420 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16421echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16422 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16423echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16424 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016425echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16426 (
16427 cat <<\_ASBOX
16428## ------------------------------------ ##
16429## Report this to bug-autoconf@gnu.org. ##
16430## ------------------------------------ ##
16431_ASBOX
16432 ) |
16433 sed "s/^/$as_me: WARNING: /" >&2
16434 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016435esac
16436echo "$as_me:$LINENO: checking for wchar.h" >&5
16437echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16438if test "${ac_cv_header_wchar_h+set}" = set; then
16439 echo $ECHO_N "(cached) $ECHO_C" >&6
16440else
16441 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016443echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16444echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16445
16446fi
16447if test $ac_cv_header_wchar_h = yes; then
16448
16449
16450cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016451#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016452_ACEOF
16453
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016454 wchar_h="yes"
16455
Guido van Rossumef2255b2000-03-10 22:30:29 +000016456else
Martin v. Löwis11437992002-04-12 09:54:03 +000016457 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016458
16459fi
16460
Michael W. Hudson54241132001-12-07 15:38:26 +000016461
Martin v. Löwis11437992002-04-12 09:54:03 +000016462
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016463# determine wchar_t size
16464if test "$wchar_h" = yes
16465then
Martin v. Löwis11437992002-04-12 09:54:03 +000016466 echo "$as_me:$LINENO: checking for wchar_t" >&5
16467echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16468if test "${ac_cv_type_wchar_t+set}" = set; then
16469 echo $ECHO_N "(cached) $ECHO_C" >&6
16470else
16471 cat >conftest.$ac_ext <<_ACEOF
16472#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016473/* confdefs.h. */
16474_ACEOF
16475cat confdefs.h >>conftest.$ac_ext
16476cat >>conftest.$ac_ext <<_ACEOF
16477/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016478#include <wchar.h>
16479
Martin v. Löwis11437992002-04-12 09:54:03 +000016480int
16481main ()
16482{
16483if ((wchar_t *) 0)
16484 return 0;
16485if (sizeof (wchar_t))
16486 return 0;
16487 ;
16488 return 0;
16489}
16490_ACEOF
16491rm -f conftest.$ac_objext
16492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16493 (eval $ac_compile) 2>&5
16494 ac_status=$?
16495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16496 (exit $ac_status); } &&
16497 { ac_try='test -s conftest.$ac_objext'
16498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16499 (eval $ac_try) 2>&5
16500 ac_status=$?
16501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16502 (exit $ac_status); }; }; then
16503 ac_cv_type_wchar_t=yes
16504else
16505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016506sed 's/^/| /' conftest.$ac_ext >&5
16507
Martin v. Löwis11437992002-04-12 09:54:03 +000016508ac_cv_type_wchar_t=no
16509fi
16510rm -f conftest.$ac_objext conftest.$ac_ext
16511fi
16512echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16513echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16514
16515echo "$as_me:$LINENO: checking size of wchar_t" >&5
16516echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16517if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16518 echo $ECHO_N "(cached) $ECHO_C" >&6
16519else
16520 if test "$ac_cv_type_wchar_t" = yes; then
16521 # The cast to unsigned long works around a bug in the HP C Compiler
16522 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16523 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16524 # This bug is HP SR number 8606223364.
16525 if test "$cross_compiling" = yes; then
16526 # Depending upon the size, compute the lo and hi bounds.
16527cat >conftest.$ac_ext <<_ACEOF
16528#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016529/* confdefs.h. */
16530_ACEOF
16531cat confdefs.h >>conftest.$ac_ext
16532cat >>conftest.$ac_ext <<_ACEOF
16533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016534#include <wchar.h>
16535
Martin v. Löwis11437992002-04-12 09:54:03 +000016536int
16537main ()
16538{
16539static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16540test_array [0] = 0
16541
16542 ;
16543 return 0;
16544}
16545_ACEOF
16546rm -f conftest.$ac_objext
16547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16548 (eval $ac_compile) 2>&5
16549 ac_status=$?
16550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16551 (exit $ac_status); } &&
16552 { ac_try='test -s conftest.$ac_objext'
16553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16554 (eval $ac_try) 2>&5
16555 ac_status=$?
16556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557 (exit $ac_status); }; }; then
16558 ac_lo=0 ac_mid=0
16559 while :; do
16560 cat >conftest.$ac_ext <<_ACEOF
16561#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016562/* confdefs.h. */
16563_ACEOF
16564cat confdefs.h >>conftest.$ac_ext
16565cat >>conftest.$ac_ext <<_ACEOF
16566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016567#include <wchar.h>
16568
Martin v. Löwis11437992002-04-12 09:54:03 +000016569int
16570main ()
16571{
16572static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16573test_array [0] = 0
16574
16575 ;
16576 return 0;
16577}
16578_ACEOF
16579rm -f conftest.$ac_objext
16580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16581 (eval $ac_compile) 2>&5
16582 ac_status=$?
16583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16584 (exit $ac_status); } &&
16585 { ac_try='test -s conftest.$ac_objext'
16586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16587 (eval $ac_try) 2>&5
16588 ac_status=$?
16589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16590 (exit $ac_status); }; }; then
16591 ac_hi=$ac_mid; break
16592else
16593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016594sed 's/^/| /' conftest.$ac_ext >&5
16595
Martin v. Löwis11437992002-04-12 09:54:03 +000016596ac_lo=`expr $ac_mid + 1`
16597 if test $ac_lo -le $ac_mid; then
16598 ac_lo= ac_hi=
16599 break
16600 fi
16601 ac_mid=`expr 2 '*' $ac_mid + 1`
16602fi
16603rm -f conftest.$ac_objext conftest.$ac_ext
16604 done
16605else
16606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016607sed 's/^/| /' conftest.$ac_ext >&5
16608
Martin v. Löwis11437992002-04-12 09:54:03 +000016609cat >conftest.$ac_ext <<_ACEOF
16610#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016611/* confdefs.h. */
16612_ACEOF
16613cat confdefs.h >>conftest.$ac_ext
16614cat >>conftest.$ac_ext <<_ACEOF
16615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016616#include <wchar.h>
16617
Martin v. Löwis11437992002-04-12 09:54:03 +000016618int
16619main ()
16620{
16621static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16622test_array [0] = 0
16623
16624 ;
16625 return 0;
16626}
16627_ACEOF
16628rm -f conftest.$ac_objext
16629if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16630 (eval $ac_compile) 2>&5
16631 ac_status=$?
16632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16633 (exit $ac_status); } &&
16634 { ac_try='test -s conftest.$ac_objext'
16635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16636 (eval $ac_try) 2>&5
16637 ac_status=$?
16638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16639 (exit $ac_status); }; }; then
16640 ac_hi=-1 ac_mid=-1
16641 while :; do
16642 cat >conftest.$ac_ext <<_ACEOF
16643#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016644/* confdefs.h. */
16645_ACEOF
16646cat confdefs.h >>conftest.$ac_ext
16647cat >>conftest.$ac_ext <<_ACEOF
16648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016649#include <wchar.h>
16650
Martin v. Löwis11437992002-04-12 09:54:03 +000016651int
16652main ()
16653{
16654static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16655test_array [0] = 0
16656
16657 ;
16658 return 0;
16659}
16660_ACEOF
16661rm -f conftest.$ac_objext
16662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16663 (eval $ac_compile) 2>&5
16664 ac_status=$?
16665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16666 (exit $ac_status); } &&
16667 { ac_try='test -s conftest.$ac_objext'
16668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16669 (eval $ac_try) 2>&5
16670 ac_status=$?
16671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16672 (exit $ac_status); }; }; then
16673 ac_lo=$ac_mid; break
16674else
16675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016676sed 's/^/| /' conftest.$ac_ext >&5
16677
Martin v. Löwis11437992002-04-12 09:54:03 +000016678ac_hi=`expr '(' $ac_mid ')' - 1`
16679 if test $ac_mid -le $ac_hi; then
16680 ac_lo= ac_hi=
16681 break
16682 fi
16683 ac_mid=`expr 2 '*' $ac_mid`
16684fi
16685rm -f conftest.$ac_objext conftest.$ac_ext
16686 done
16687else
16688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016689sed 's/^/| /' conftest.$ac_ext >&5
16690
Martin v. Löwis11437992002-04-12 09:54:03 +000016691ac_lo= ac_hi=
16692fi
16693rm -f conftest.$ac_objext conftest.$ac_ext
16694fi
16695rm -f conftest.$ac_objext conftest.$ac_ext
16696# Binary search between lo and hi bounds.
16697while test "x$ac_lo" != "x$ac_hi"; do
16698 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16699 cat >conftest.$ac_ext <<_ACEOF
16700#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016701/* confdefs.h. */
16702_ACEOF
16703cat confdefs.h >>conftest.$ac_ext
16704cat >>conftest.$ac_ext <<_ACEOF
16705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016706#include <wchar.h>
16707
Martin v. Löwis11437992002-04-12 09:54:03 +000016708int
16709main ()
16710{
16711static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16712test_array [0] = 0
16713
16714 ;
16715 return 0;
16716}
16717_ACEOF
16718rm -f conftest.$ac_objext
16719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16720 (eval $ac_compile) 2>&5
16721 ac_status=$?
16722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16723 (exit $ac_status); } &&
16724 { ac_try='test -s conftest.$ac_objext'
16725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16726 (eval $ac_try) 2>&5
16727 ac_status=$?
16728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16729 (exit $ac_status); }; }; then
16730 ac_hi=$ac_mid
16731else
16732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016733sed 's/^/| /' conftest.$ac_ext >&5
16734
Martin v. Löwis11437992002-04-12 09:54:03 +000016735ac_lo=`expr '(' $ac_mid ')' + 1`
16736fi
16737rm -f conftest.$ac_objext conftest.$ac_ext
16738done
16739case $ac_lo in
16740?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016741'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16742See \`config.log' for more details." >&5
16743echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16744See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 { (exit 1); exit 1; }; } ;;
16746esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016747else
16748 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016749 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16750See \`config.log' for more details." >&5
16751echo "$as_me: error: cannot run test program while cross compiling
16752See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016753 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016754else
Martin v. Löwis11437992002-04-12 09:54:03 +000016755 cat >conftest.$ac_ext <<_ACEOF
16756#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016757/* confdefs.h. */
16758_ACEOF
16759cat confdefs.h >>conftest.$ac_ext
16760cat >>conftest.$ac_ext <<_ACEOF
16761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016762#include <wchar.h>
16763
16764long longval () { return (long) (sizeof (wchar_t)); }
16765unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016766#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016767#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016768int
16769main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016770{
Martin v. Löwis11437992002-04-12 09:54:03 +000016771
16772 FILE *f = fopen ("conftest.val", "w");
16773 if (! f)
16774 exit (1);
16775 if (((long) (sizeof (wchar_t))) < 0)
16776 {
16777 long i = longval ();
16778 if (i != ((long) (sizeof (wchar_t))))
16779 exit (1);
16780 fprintf (f, "%ld\n", i);
16781 }
16782 else
16783 {
16784 unsigned long i = ulongval ();
16785 if (i != ((long) (sizeof (wchar_t))))
16786 exit (1);
16787 fprintf (f, "%lu\n", i);
16788 }
16789 exit (ferror (f) || fclose (f) != 0);
16790
16791 ;
16792 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016793}
Martin v. Löwis11437992002-04-12 09:54:03 +000016794_ACEOF
16795rm -f conftest$ac_exeext
16796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16797 (eval $ac_link) 2>&5
16798 ac_status=$?
16799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16802 (eval $ac_try) 2>&5
16803 ac_status=$?
16804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16805 (exit $ac_status); }; }; then
16806 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016807else
Martin v. Löwis11437992002-04-12 09:54:03 +000016808 echo "$as_me: program exited with status $ac_status" >&5
16809echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016810sed 's/^/| /' conftest.$ac_ext >&5
16811
Martin v. Löwis11437992002-04-12 09:54:03 +000016812( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000016813{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16814See \`config.log' for more details." >&5
16815echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16816See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016817 { (exit 1); exit 1; }; }
16818fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016819rm -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 +000016820fi
16821fi
16822rm -f conftest.val
16823else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016824 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016825fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016826fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016827echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16828echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16829cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016830#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016831_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016832
Michael W. Hudson54241132001-12-07 15:38:26 +000016833
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016834fi
16835
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016836echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16837echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16838have_ucs4_tcl=no
16839cat >conftest.$ac_ext <<_ACEOF
16840#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016841/* confdefs.h. */
16842_ACEOF
16843cat confdefs.h >>conftest.$ac_ext
16844cat >>conftest.$ac_ext <<_ACEOF
16845/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016846
16847#include <tcl.h>
16848#if TCL_UTF_MAX != 6
16849# error "NOT UCS4_TCL"
16850#endif
16851int
16852main ()
16853{
16854
16855 ;
16856 return 0;
16857}
16858_ACEOF
16859rm -f conftest.$ac_objext
16860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16861 (eval $ac_compile) 2>&5
16862 ac_status=$?
16863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16864 (exit $ac_status); } &&
16865 { ac_try='test -s conftest.$ac_objext'
16866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16867 (eval $ac_try) 2>&5
16868 ac_status=$?
16869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16870 (exit $ac_status); }; }; then
16871
16872
16873cat >>confdefs.h <<\_ACEOF
16874#define HAVE_UCS4_TCL 1
16875_ACEOF
16876
16877 have_ucs4_tcl=yes
16878
16879else
16880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016881sed 's/^/| /' conftest.$ac_ext >&5
16882
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016883fi
16884rm -f conftest.$ac_objext conftest.$ac_ext
16885echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
16886echo "${ECHO_T}$have_ucs4_tcl" >&6
16887
Skip Montanaro6dead952003-09-25 14:50:04 +000016888# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016889if test "$wchar_h" = yes
16890then
16891 # check whether wchar_t is signed or not
16892 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
16893echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
16894 if test "${ac_cv_wchar_t_signed+set}" = set; then
16895 echo $ECHO_N "(cached) $ECHO_C" >&6
16896else
16897
16898 if test "$cross_compiling" = yes; then
16899 ac_cv_wchar_t_signed=yes
16900else
16901 cat >conftest.$ac_ext <<_ACEOF
16902#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016903/* confdefs.h. */
16904_ACEOF
16905cat confdefs.h >>conftest.$ac_ext
16906cat >>conftest.$ac_ext <<_ACEOF
16907/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016908
16909 #include <wchar.h>
16910 int main()
16911 {
16912 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
16913 }
16914
16915_ACEOF
16916rm -f conftest$ac_exeext
16917if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16918 (eval $ac_link) 2>&5
16919 ac_status=$?
16920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16921 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16923 (eval $ac_try) 2>&5
16924 ac_status=$?
16925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16926 (exit $ac_status); }; }; then
16927 ac_cv_wchar_t_signed=yes
16928else
16929 echo "$as_me: program exited with status $ac_status" >&5
16930echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016931sed 's/^/| /' conftest.$ac_ext >&5
16932
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016933( exit $ac_status )
16934ac_cv_wchar_t_signed=no
16935fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016936rm -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 +000016937fi
16938fi
16939
16940 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
16941echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
16942fi
16943
Martin v. Löwis11437992002-04-12 09:54:03 +000016944echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16945echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016946# Check whether --enable-unicode or --disable-unicode was given.
16947if test "${enable_unicode+set}" = set; then
16948 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016949
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016950else
16951 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016952fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016953
16954if test $enable_unicode = yes
16955then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016956 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016957 case "$have_ucs4_tcl" in
16958 yes) enable_unicode="ucs4"
16959 ;;
16960 *) enable_unicode="ucs2"
16961 ;;
16962 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016963fi
16964
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016965
16966
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016967case "$enable_unicode" in
16968ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016969 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016970#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016971_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016972
16973 ;;
16974ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016975 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016976#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016977_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016978
16979 ;;
16980esac
16981
Michael W. Hudson54241132001-12-07 15:38:26 +000016982
Martin v. Löwis11437992002-04-12 09:54:03 +000016983
16984
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016985
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016986if test "$enable_unicode" = "no"
16987then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016988 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016989 echo "$as_me:$LINENO: result: not used" >&5
16990echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016991else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016992 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016993
16994cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016995#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016996_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016997
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016998
16999 # wchar_t is only usable if it maps to an unsigned type
17000 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17001 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017002 then
17003 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017004
Martin v. Löwis11437992002-04-12 09:54:03 +000017005cat >>confdefs.h <<\_ACEOF
17006#define HAVE_USABLE_WCHAR_T 1
17007_ACEOF
17008
17009 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017010#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017011_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017012
17013 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17014 then
17015 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017016 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017017#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017018_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017019
17020 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17021 then
17022 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017023 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017024#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017025_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017026
17027 else
17028 PY_UNICODE_TYPE="no type found"
17029 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017030 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17031echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017032fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017033
17034# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017035echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17036echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17037if test "${ac_cv_c_bigendian+set}" = set; then
17038 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017039else
Martin v. Löwis11437992002-04-12 09:54:03 +000017040 # See if sys/param.h defines the BYTE_ORDER macro.
17041cat >conftest.$ac_ext <<_ACEOF
17042#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017043/* confdefs.h. */
17044_ACEOF
17045cat confdefs.h >>conftest.$ac_ext
17046cat >>conftest.$ac_ext <<_ACEOF
17047/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017048#include <sys/types.h>
17049#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017050
Martin v. Löwis11437992002-04-12 09:54:03 +000017051int
17052main ()
17053{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017054#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17055 bogus endian macros
17056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017057
17058 ;
17059 return 0;
17060}
17061_ACEOF
17062rm -f conftest.$ac_objext
17063if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17064 (eval $ac_compile) 2>&5
17065 ac_status=$?
17066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17067 (exit $ac_status); } &&
17068 { ac_try='test -s conftest.$ac_objext'
17069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17070 (eval $ac_try) 2>&5
17071 ac_status=$?
17072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17073 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017074 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017075cat >conftest.$ac_ext <<_ACEOF
17076#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017077/* confdefs.h. */
17078_ACEOF
17079cat confdefs.h >>conftest.$ac_ext
17080cat >>conftest.$ac_ext <<_ACEOF
17081/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017082#include <sys/types.h>
17083#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017084
Martin v. Löwis11437992002-04-12 09:54:03 +000017085int
17086main ()
17087{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017088#if BYTE_ORDER != BIG_ENDIAN
17089 not big endian
17090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017091
17092 ;
17093 return 0;
17094}
17095_ACEOF
17096rm -f conftest.$ac_objext
17097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17098 (eval $ac_compile) 2>&5
17099 ac_status=$?
17100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17101 (exit $ac_status); } &&
17102 { ac_try='test -s conftest.$ac_objext'
17103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17104 (eval $ac_try) 2>&5
17105 ac_status=$?
17106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17107 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017108 ac_cv_c_bigendian=yes
17109else
Martin v. Löwis11437992002-04-12 09:54:03 +000017110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017111sed 's/^/| /' conftest.$ac_ext >&5
17112
Martin v. Löwis11437992002-04-12 09:54:03 +000017113ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017114fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017115rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017116else
Martin v. Löwis11437992002-04-12 09:54:03 +000017117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017118sed 's/^/| /' conftest.$ac_ext >&5
17119
Martin v. Löwis11437992002-04-12 09:54:03 +000017120# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017121if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017122 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017123 ac_cv_c_bigendian=unknown
17124 cat >conftest.$ac_ext <<_ACEOF
17125#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017126/* confdefs.h. */
17127_ACEOF
17128cat confdefs.h >>conftest.$ac_ext
17129cat >>conftest.$ac_ext <<_ACEOF
17130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017131short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17132short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17133void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17134short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17135short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17136void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017137int
17138main ()
17139{
17140 _ascii (); _ebcdic ();
17141 ;
17142 return 0;
17143}
17144_ACEOF
17145rm -f conftest.$ac_objext
17146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17147 (eval $ac_compile) 2>&5
17148 ac_status=$?
17149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17150 (exit $ac_status); } &&
17151 { ac_try='test -s conftest.$ac_objext'
17152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17153 (eval $ac_try) 2>&5
17154 ac_status=$?
17155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17156 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017157 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017158 ac_cv_c_bigendian=yes
17159fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017160if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017161 if test "$ac_cv_c_bigendian" = unknown; then
17162 ac_cv_c_bigendian=no
17163 else
17164 # finding both strings is unlikely to happen, but who knows?
17165 ac_cv_c_bigendian=unknown
17166 fi
17167fi
17168else
17169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017170sed 's/^/| /' conftest.$ac_ext >&5
17171
Martin v. Löwis11437992002-04-12 09:54:03 +000017172fi
17173rm -f conftest.$ac_objext conftest.$ac_ext
17174else
17175 cat >conftest.$ac_ext <<_ACEOF
17176#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017177/* confdefs.h. */
17178_ACEOF
17179cat confdefs.h >>conftest.$ac_ext
17180cat >>conftest.$ac_ext <<_ACEOF
17181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017182int
17183main ()
17184{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017185 /* Are we little or big endian? From Harbison&Steele. */
17186 union
17187 {
17188 long l;
17189 char c[sizeof (long)];
17190 } u;
17191 u.l = 1;
17192 exit (u.c[sizeof (long) - 1] == 1);
17193}
Martin v. Löwis11437992002-04-12 09:54:03 +000017194_ACEOF
17195rm -f conftest$ac_exeext
17196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17197 (eval $ac_link) 2>&5
17198 ac_status=$?
17199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17200 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17202 (eval $ac_try) 2>&5
17203 ac_status=$?
17204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17205 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017206 ac_cv_c_bigendian=no
17207else
Martin v. Löwis11437992002-04-12 09:54:03 +000017208 echo "$as_me: program exited with status $ac_status" >&5
17209echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017210sed 's/^/| /' conftest.$ac_ext >&5
17211
Martin v. Löwis11437992002-04-12 09:54:03 +000017212( exit $ac_status )
17213ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017214fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017215rm -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 +000017216fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017217fi
17218rm -f conftest.$ac_objext conftest.$ac_ext
17219fi
17220echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17221echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17222case $ac_cv_c_bigendian in
17223 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017224
Martin v. Löwis11437992002-04-12 09:54:03 +000017225cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017226#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017227_ACEOF
17228 ;;
17229 no)
17230 ;;
17231 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017232 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017233presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017234echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017235presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17236 { (exit 1); exit 1; }; } ;;
17237esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017238
Michael W. Hudson54241132001-12-07 15:38:26 +000017239
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017240# Check whether right shifting a negative integer extends the sign bit
17241# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017242echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17243echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17244if test "${ac_cv_rshift_extends_sign+set}" = set; then
17245 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017246else
Martin v. Löwis11437992002-04-12 09:54:03 +000017247
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017248if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017249 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017250else
Martin v. Löwis11437992002-04-12 09:54:03 +000017251 cat >conftest.$ac_ext <<_ACEOF
17252#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017253/* confdefs.h. */
17254_ACEOF
17255cat confdefs.h >>conftest.$ac_ext
17256cat >>conftest.$ac_ext <<_ACEOF
17257/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017258
17259int main()
17260{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017261 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017262}
17263
Martin v. Löwis11437992002-04-12 09:54:03 +000017264_ACEOF
17265rm -f conftest$ac_exeext
17266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17267 (eval $ac_link) 2>&5
17268 ac_status=$?
17269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17270 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17272 (eval $ac_try) 2>&5
17273 ac_status=$?
17274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17275 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017276 ac_cv_rshift_extends_sign=yes
17277else
Martin v. Löwis11437992002-04-12 09:54:03 +000017278 echo "$as_me: program exited with status $ac_status" >&5
17279echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017280sed 's/^/| /' conftest.$ac_ext >&5
17281
Martin v. Löwis11437992002-04-12 09:54:03 +000017282( exit $ac_status )
17283ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017284fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017285rm -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 +000017286fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017287fi
17288
Martin v. Löwis11437992002-04-12 09:54:03 +000017289echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17290echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017291if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017292then
Martin v. Löwis11437992002-04-12 09:54:03 +000017293
17294cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017295#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017296_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017297
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017298fi
17299
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017300# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017301echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17302echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17303if test "${ac_cv_have_getc_unlocked+set}" = set; then
17304 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017305else
Martin v. Löwis11437992002-04-12 09:54:03 +000017306
17307cat >conftest.$ac_ext <<_ACEOF
17308#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017309/* confdefs.h. */
17310_ACEOF
17311cat confdefs.h >>conftest.$ac_ext
17312cat >>conftest.$ac_ext <<_ACEOF
17313/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017314#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017315int
17316main ()
17317{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017318
17319 FILE *f = fopen("/dev/null", "r");
17320 flockfile(f);
17321 getc_unlocked(f);
17322 funlockfile(f);
17323
Martin v. Löwis11437992002-04-12 09:54:03 +000017324 ;
17325 return 0;
17326}
17327_ACEOF
17328rm -f conftest.$ac_objext conftest$ac_exeext
17329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17330 (eval $ac_link) 2>&5
17331 ac_status=$?
17332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17333 (exit $ac_status); } &&
17334 { ac_try='test -s conftest$ac_exeext'
17335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17336 (eval $ac_try) 2>&5
17337 ac_status=$?
17338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17339 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017340 ac_cv_have_getc_unlocked=yes
17341else
Martin v. Löwis11437992002-04-12 09:54:03 +000017342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017343sed 's/^/| /' conftest.$ac_ext >&5
17344
Martin v. Löwis11437992002-04-12 09:54:03 +000017345ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017347rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017348fi
17349
Martin v. Löwis11437992002-04-12 09:54:03 +000017350echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17351echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017352if test "$ac_cv_have_getc_unlocked" = yes
17353then
Martin v. Löwis11437992002-04-12 09:54:03 +000017354
17355cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017356#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017357_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017358
17359fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017360
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017361# check for readline 2.2
17362cat >conftest.$ac_ext <<_ACEOF
17363#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017364/* confdefs.h. */
17365_ACEOF
17366cat confdefs.h >>conftest.$ac_ext
17367cat >>conftest.$ac_ext <<_ACEOF
17368/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017369#include <readline/readline.h>
17370_ACEOF
17371if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17372 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17373 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017374 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017375 rm -f conftest.er1
17376 cat conftest.err >&5
17377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17378 (exit $ac_status); } >/dev/null; then
17379 if test -s conftest.err; then
17380 ac_cpp_err=$ac_c_preproc_warn_flag
17381 else
17382 ac_cpp_err=
17383 fi
17384else
17385 ac_cpp_err=yes
17386fi
17387if test -z "$ac_cpp_err"; then
17388 have_readline=yes
17389else
17390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017391sed 's/^/| /' conftest.$ac_ext >&5
17392
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017393 have_readline=no
17394fi
17395rm -f conftest.err conftest.$ac_ext
17396if test $have_readline = yes
17397then
17398 cat >conftest.$ac_ext <<_ACEOF
17399#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017400/* confdefs.h. */
17401_ACEOF
17402cat confdefs.h >>conftest.$ac_ext
17403cat >>conftest.$ac_ext <<_ACEOF
17404/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017405#include <readline/readline.h>
17406
17407_ACEOF
17408if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017409 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017410
17411cat >>confdefs.h <<\_ACEOF
17412#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17413_ACEOF
17414
17415fi
17416rm -f conftest*
17417
17418fi
17419
Martin v. Löwis0daad592001-09-30 21:09:59 +000017420# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017421echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17422echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17423if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17424 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017425else
Martin v. Löwis11437992002-04-12 09:54:03 +000017426 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017427LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017428cat >conftest.$ac_ext <<_ACEOF
17429#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017430/* confdefs.h. */
17431_ACEOF
17432cat confdefs.h >>conftest.$ac_ext
17433cat >>conftest.$ac_ext <<_ACEOF
17434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017435
Guido van Rossum353ae582001-07-10 16:45:32 +000017436/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017437#ifdef __cplusplus
17438extern "C"
17439#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017440/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017441 builtin and then its argument prototype would still apply. */
17442char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017443int
17444main ()
17445{
17446rl_pre_input_hook ();
17447 ;
17448 return 0;
17449}
17450_ACEOF
17451rm -f conftest.$ac_objext conftest$ac_exeext
17452if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17453 (eval $ac_link) 2>&5
17454 ac_status=$?
17455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17456 (exit $ac_status); } &&
17457 { ac_try='test -s conftest$ac_exeext'
17458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17459 (eval $ac_try) 2>&5
17460 ac_status=$?
17461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17462 (exit $ac_status); }; }; then
17463 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017464else
Martin v. Löwis11437992002-04-12 09:54:03 +000017465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017466sed 's/^/| /' conftest.$ac_ext >&5
17467
Martin v. Löwis11437992002-04-12 09:54:03 +000017468ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017469fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017470rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17471LIBS=$ac_check_lib_save_LIBS
17472fi
17473echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17474echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17475if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017476
Martin v. Löwis11437992002-04-12 09:54:03 +000017477cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017478#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017479_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017480
Martin v. Löwis0daad592001-09-30 21:09:59 +000017481fi
17482
Michael W. Hudson54241132001-12-07 15:38:26 +000017483
Martin v. Löwis0daad592001-09-30 21:09:59 +000017484# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017485echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17486echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17487if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17488 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017489else
Martin v. Löwis11437992002-04-12 09:54:03 +000017490 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017491LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017492cat >conftest.$ac_ext <<_ACEOF
17493#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017494/* confdefs.h. */
17495_ACEOF
17496cat confdefs.h >>conftest.$ac_ext
17497cat >>conftest.$ac_ext <<_ACEOF
17498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017499
Martin v. Löwis0daad592001-09-30 21:09:59 +000017500/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017501#ifdef __cplusplus
17502extern "C"
17503#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017504/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017505 builtin and then its argument prototype would still apply. */
17506char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017507int
17508main ()
17509{
17510rl_completion_matches ();
17511 ;
17512 return 0;
17513}
17514_ACEOF
17515rm -f conftest.$ac_objext conftest$ac_exeext
17516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17517 (eval $ac_link) 2>&5
17518 ac_status=$?
17519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17520 (exit $ac_status); } &&
17521 { ac_try='test -s conftest$ac_exeext'
17522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17523 (eval $ac_try) 2>&5
17524 ac_status=$?
17525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17526 (exit $ac_status); }; }; then
17527 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017528else
Martin v. Löwis11437992002-04-12 09:54:03 +000017529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017530sed 's/^/| /' conftest.$ac_ext >&5
17531
Martin v. Löwis11437992002-04-12 09:54:03 +000017532ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017533fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017534rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17535LIBS=$ac_check_lib_save_LIBS
17536fi
17537echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17538echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17539if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017540
Martin v. Löwis11437992002-04-12 09:54:03 +000017541cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017542#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017543_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017544
Guido van Rossum353ae582001-07-10 16:45:32 +000017545fi
17546
Jack Jansendd19cf82001-12-06 22:36:17 +000017547
Martin v. Löwis11437992002-04-12 09:54:03 +000017548echo "$as_me:$LINENO: checking for broken nice()" >&5
17549echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17550if test "${ac_cv_broken_nice+set}" = set; then
17551 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017552else
Martin v. Löwis11437992002-04-12 09:54:03 +000017553
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017554if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017555 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017556else
Martin v. Löwis11437992002-04-12 09:54:03 +000017557 cat >conftest.$ac_ext <<_ACEOF
17558#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017559/* confdefs.h. */
17560_ACEOF
17561cat confdefs.h >>conftest.$ac_ext
17562cat >>conftest.$ac_ext <<_ACEOF
17563/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017564
17565int main()
17566{
17567 int val1 = nice(1);
17568 if (val1 != -1 && val1 == nice(2))
17569 exit(0);
17570 exit(1);
17571}
17572
Martin v. Löwis11437992002-04-12 09:54:03 +000017573_ACEOF
17574rm -f conftest$ac_exeext
17575if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17576 (eval $ac_link) 2>&5
17577 ac_status=$?
17578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17579 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17581 (eval $ac_try) 2>&5
17582 ac_status=$?
17583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17584 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017585 ac_cv_broken_nice=yes
17586else
Martin v. Löwis11437992002-04-12 09:54:03 +000017587 echo "$as_me: program exited with status $ac_status" >&5
17588echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017589sed 's/^/| /' conftest.$ac_ext >&5
17590
Martin v. Löwis11437992002-04-12 09:54:03 +000017591( exit $ac_status )
17592ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017593fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017594rm -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 +000017595fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017596fi
17597
Martin v. Löwis11437992002-04-12 09:54:03 +000017598echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17599echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017600if test "$ac_cv_broken_nice" = yes
17601then
Martin v. Löwis11437992002-04-12 09:54:03 +000017602
17603cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017604#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017605_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017606
17607fi
17608
Nicholas Bastine62c5c82004-03-21 23:45:42 +000017609echo "$as_me:$LINENO: checking for broken poll()" >&5
17610echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
17611if test "$cross_compiling" = yes; then
17612 ac_cv_broken_poll=no
17613else
17614 cat >conftest.$ac_ext <<_ACEOF
17615#line $LINENO "configure"
17616/* confdefs.h. */
17617_ACEOF
17618cat confdefs.h >>conftest.$ac_ext
17619cat >>conftest.$ac_ext <<_ACEOF
17620/* end confdefs.h. */
17621
17622#include <poll.h>
17623
17624int main (void)
17625 {
17626 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
17627
17628 close (42);
17629
17630 int poll_test = poll (&poll_struct, 1, 0);
17631
17632 if (poll_test < 0)
17633 {
17634 exit(0);
17635 }
17636 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
17637 {
17638 exit(0);
17639 }
17640 else
17641 {
17642 exit(1);
17643 }
17644 }
17645
17646_ACEOF
17647rm -f conftest$ac_exeext
17648if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17649 (eval $ac_link) 2>&5
17650 ac_status=$?
17651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17654 (eval $ac_try) 2>&5
17655 ac_status=$?
17656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17657 (exit $ac_status); }; }; then
17658 ac_cv_broken_poll=yes
17659else
17660 echo "$as_me: program exited with status $ac_status" >&5
17661echo "$as_me: failed program was:" >&5
17662sed 's/^/| /' conftest.$ac_ext >&5
17663
17664( exit $ac_status )
17665ac_cv_broken_poll=no
17666fi
17667rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17668fi
17669echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
17670echo "${ECHO_T}$ac_cv_broken_poll" >&6
17671if test "$ac_cv_broken_poll" = yes
17672then
17673
17674cat >>confdefs.h <<\_ACEOF
17675#define HAVE_BROKEN_POLL 1
17676_ACEOF
17677
17678fi
17679
17680
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017681# tzset(3) exists and works like we expect it to
17682echo "$as_me:$LINENO: checking for working tzset()" >&5
17683echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17684if test "${ac_cv_working_tzset+set}" = set; then
17685 echo $ECHO_N "(cached) $ECHO_C" >&6
17686else
17687
17688if test "$cross_compiling" = yes; then
17689 ac_cv_working_tzset=no
17690else
17691 cat >conftest.$ac_ext <<_ACEOF
17692#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017693/* confdefs.h. */
17694_ACEOF
17695cat confdefs.h >>conftest.$ac_ext
17696cat >>conftest.$ac_ext <<_ACEOF
17697/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017698
17699#include <stdlib.h>
17700#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017701#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017702int main()
17703{
Brett Cannon18367812003-09-19 00:59:16 +000017704 /* Note that we need to ensure that not only does tzset(3)
17705 do 'something' with localtime, but it works as documented
17706 in the library reference and as expected by the test suite.
17707
17708 Red Hat 6.2 doesn't understand the southern hemisphere
17709 after New Year's Day; it thinks swaps on that day.
17710 */
17711
17712 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17713 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17714
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017715 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017716 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017717 if (localtime(&groundhogday)->tm_hour != 0)
17718 exit(1);
17719
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017720 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017721 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017722 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017723 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017724
17725 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17726 tzset();
17727 if (localtime(&groundhogday)->tm_hour != 11)
17728 exit(1);
17729 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17730 exit(1);
17731 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17732 exit(1);
17733
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017734 exit(0);
17735}
17736
17737_ACEOF
17738rm -f conftest$ac_exeext
17739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17740 (eval $ac_link) 2>&5
17741 ac_status=$?
17742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17743 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17745 (eval $ac_try) 2>&5
17746 ac_status=$?
17747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17748 (exit $ac_status); }; }; then
17749 ac_cv_working_tzset=yes
17750else
17751 echo "$as_me: program exited with status $ac_status" >&5
17752echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017753sed 's/^/| /' conftest.$ac_ext >&5
17754
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017755( exit $ac_status )
17756ac_cv_working_tzset=no
17757fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017758rm -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 +000017759fi
17760fi
17761
17762echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17763echo "${ECHO_T}$ac_cv_working_tzset" >&6
17764if test "$ac_cv_working_tzset" = yes
17765then
17766
17767cat >>confdefs.h <<\_ACEOF
17768#define HAVE_WORKING_TZSET 1
17769_ACEOF
17770
17771fi
17772
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017773# Look for subsecond timestamps in struct stat
17774echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17775echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17776if test "${ac_cv_stat_tv_nsec+set}" = set; then
17777 echo $ECHO_N "(cached) $ECHO_C" >&6
17778else
17779 cat >conftest.$ac_ext <<_ACEOF
17780#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017781/* confdefs.h. */
17782_ACEOF
17783cat confdefs.h >>conftest.$ac_ext
17784cat >>conftest.$ac_ext <<_ACEOF
17785/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017786#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017787int
17788main ()
17789{
17790
17791struct stat st;
17792st.st_mtim.tv_nsec = 1;
17793
17794 ;
17795 return 0;
17796}
17797_ACEOF
17798rm -f conftest.$ac_objext
17799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17800 (eval $ac_compile) 2>&5
17801 ac_status=$?
17802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17803 (exit $ac_status); } &&
17804 { ac_try='test -s conftest.$ac_objext'
17805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17806 (eval $ac_try) 2>&5
17807 ac_status=$?
17808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17809 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017810 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017811else
17812 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017813sed 's/^/| /' conftest.$ac_ext >&5
17814
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017815ac_cv_stat_tv_nsec=no
17816fi
17817rm -f conftest.$ac_objext conftest.$ac_ext
17818fi
17819
17820echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17821echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17822if test "$ac_cv_stat_tv_nsec" = yes
17823then
17824
17825cat >>confdefs.h <<\_ACEOF
17826#define HAVE_STAT_TV_NSEC 1
17827_ACEOF
17828
17829fi
17830
Jack Jansen666b1e72001-10-31 12:11:48 +000017831# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017832echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17833echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17834if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17835 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017836else
Martin v. Löwis11437992002-04-12 09:54:03 +000017837 cat >conftest.$ac_ext <<_ACEOF
17838#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017839/* confdefs.h. */
17840_ACEOF
17841cat confdefs.h >>conftest.$ac_ext
17842cat >>conftest.$ac_ext <<_ACEOF
17843/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017844#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017845int
17846main ()
17847{
Jack Jansen666b1e72001-10-31 12:11:48 +000017848
17849 int rtn;
17850 rtn = mvwdelch(0,0,0);
17851
Martin v. Löwis11437992002-04-12 09:54:03 +000017852 ;
17853 return 0;
17854}
17855_ACEOF
17856rm -f conftest.$ac_objext
17857if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17858 (eval $ac_compile) 2>&5
17859 ac_status=$?
17860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17861 (exit $ac_status); } &&
17862 { ac_try='test -s conftest.$ac_objext'
17863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17864 (eval $ac_try) 2>&5
17865 ac_status=$?
17866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17867 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017868 ac_cv_mvwdelch_is_expression=yes
17869else
Martin v. Löwis11437992002-04-12 09:54:03 +000017870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017871sed 's/^/| /' conftest.$ac_ext >&5
17872
Martin v. Löwis11437992002-04-12 09:54:03 +000017873ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017874fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017875rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017876fi
17877
Martin v. Löwis11437992002-04-12 09:54:03 +000017878echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17879echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017880
17881if test "$ac_cv_mvwdelch_is_expression" = yes
17882then
Martin v. Löwis11437992002-04-12 09:54:03 +000017883
17884cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017885#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017886_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017887
17888fi
17889
Martin v. Löwis11437992002-04-12 09:54:03 +000017890echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17891echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17892if test "${ac_cv_window_has_flags+set}" = set; then
17893 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017894else
Martin v. Löwis11437992002-04-12 09:54:03 +000017895 cat >conftest.$ac_ext <<_ACEOF
17896#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017897/* confdefs.h. */
17898_ACEOF
17899cat confdefs.h >>conftest.$ac_ext
17900cat >>conftest.$ac_ext <<_ACEOF
17901/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017902#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017903int
17904main ()
17905{
Jack Jansen666b1e72001-10-31 12:11:48 +000017906
17907 WINDOW *w;
17908 w->_flags = 0;
17909
Martin v. Löwis11437992002-04-12 09:54:03 +000017910 ;
17911 return 0;
17912}
17913_ACEOF
17914rm -f conftest.$ac_objext
17915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17916 (eval $ac_compile) 2>&5
17917 ac_status=$?
17918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17919 (exit $ac_status); } &&
17920 { ac_try='test -s conftest.$ac_objext'
17921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17922 (eval $ac_try) 2>&5
17923 ac_status=$?
17924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17925 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017926 ac_cv_window_has_flags=yes
17927else
Martin v. Löwis11437992002-04-12 09:54:03 +000017928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017929sed 's/^/| /' conftest.$ac_ext >&5
17930
Martin v. Löwis11437992002-04-12 09:54:03 +000017931ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017932fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017933rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017934fi
17935
Martin v. Löwis11437992002-04-12 09:54:03 +000017936echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17937echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017938
Jack Jansen666b1e72001-10-31 12:11:48 +000017939
17940if test "$ac_cv_window_has_flags" = yes
17941then
Martin v. Löwis11437992002-04-12 09:54:03 +000017942
17943cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017944#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017945_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017946
17947fi
17948
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017949echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17950echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17951
17952if test -e /dev/ptmx
17953then
17954 echo "$as_me:$LINENO: result: yes" >&5
17955echo "${ECHO_T}yes" >&6
17956
17957cat >>confdefs.h <<\_ACEOF
17958#define HAVE_DEV_PTMX 1
17959_ACEOF
17960
17961else
17962 echo "$as_me:$LINENO: result: no" >&5
17963echo "${ECHO_T}no" >&6
17964fi
17965
Neal Norwitz865400f2003-03-21 01:42:58 +000017966echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17967echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17968
17969if test -e /dev/ptc
17970then
17971 echo "$as_me:$LINENO: result: yes" >&5
17972echo "${ECHO_T}yes" >&6
17973
17974cat >>confdefs.h <<\_ACEOF
17975#define HAVE_DEV_PTC 1
17976_ACEOF
17977
17978else
17979 echo "$as_me:$LINENO: result: no" >&5
17980echo "${ECHO_T}no" >&6
17981fi
17982
Martin v. Löwis11437992002-04-12 09:54:03 +000017983echo "$as_me:$LINENO: checking for socklen_t" >&5
17984echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17985if test "${ac_cv_type_socklen_t+set}" = set; then
17986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017987else
Martin v. Löwis11437992002-04-12 09:54:03 +000017988 cat >conftest.$ac_ext <<_ACEOF
17989#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017990/* confdefs.h. */
17991_ACEOF
17992cat confdefs.h >>conftest.$ac_ext
17993cat >>conftest.$ac_ext <<_ACEOF
17994/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000017995
17996#ifdef HAVE_SYS_TYPES_H
17997#include <sys/types.h>
17998#endif
17999#ifdef HAVE_SYS_SOCKET_H
18000#include <sys/socket.h>
18001#endif
18002
18003
Martin v. Löwis11437992002-04-12 09:54:03 +000018004int
18005main ()
18006{
18007if ((socklen_t *) 0)
18008 return 0;
18009if (sizeof (socklen_t))
18010 return 0;
18011 ;
18012 return 0;
18013}
18014_ACEOF
18015rm -f conftest.$ac_objext
18016if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18017 (eval $ac_compile) 2>&5
18018 ac_status=$?
18019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18020 (exit $ac_status); } &&
18021 { ac_try='test -s conftest.$ac_objext'
18022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18023 (eval $ac_try) 2>&5
18024 ac_status=$?
18025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18026 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018027 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018028else
Martin v. Löwis11437992002-04-12 09:54:03 +000018029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018030sed 's/^/| /' conftest.$ac_ext >&5
18031
Martin v. Löwis11437992002-04-12 09:54:03 +000018032ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018034rm -f conftest.$ac_objext conftest.$ac_ext
18035fi
18036echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18037echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18038if test $ac_cv_type_socklen_t = yes; then
18039 :
18040else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018041
Martin v. Löwis01c04012002-11-11 14:58:44 +000018042cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018043#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018044_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018045
18046fi
18047
Michael W. Hudson54241132001-12-07 15:38:26 +000018048
Michael W. Hudson54241132001-12-07 15:38:26 +000018049
18050
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018051for h in `(cd $srcdir;echo Python/thread_*.h)`
18052do
18053 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18054done
18055
Michael W. Hudson54241132001-12-07 15:38:26 +000018056
Jack Jansen0b06be72002-06-21 14:48:38 +000018057SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018058echo "$as_me:$LINENO: checking for build directories" >&5
18059echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018060for dir in $SRCDIRS; do
18061 if test ! -d $dir; then
18062 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018063 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018064done
Martin v. Löwis11437992002-04-12 09:54:03 +000018065echo "$as_me:$LINENO: result: done" >&5
18066echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018067
Guido van Rossum627b2d71993-12-24 10:39:16 +000018068# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018069 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018070
Martin v. Löwis11437992002-04-12 09:54:03 +000018071cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018072# This file is a shell script that caches the results of configure
18073# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018074# scripts and configure runs, see configure's option --config-cache.
18075# It is not useful on other systems. If it contains results you don't
18076# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018077#
Martin v. Löwis11437992002-04-12 09:54:03 +000018078# config.status only pays attention to the cache file if you give it
18079# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018080#
Skip Montanaro6dead952003-09-25 14:50:04 +000018081# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018082# loading this file, other *unset* `ac_cv_foo' will be assigned the
18083# following values.
18084
18085_ACEOF
18086
Guido van Rossumf78abae1997-01-21 22:02:36 +000018087# The following way of writing the cache mishandles newlines in values,
18088# but we know of no workaround that is simple, portable, and efficient.
18089# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018090# Ultrix sh set writes to stderr and can't be redirected directly,
18091# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018092{
18093 (set) 2>&1 |
18094 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18095 *ac_space=\ *)
18096 # `set' does not quote correctly, so add quotes (double-quote
18097 # substitution turns \\\\ into \\, and sed turns \\ into \).
18098 sed -n \
18099 "s/'/'\\\\''/g;
18100 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18101 ;;
18102 *)
18103 # `set' quotes correctly as required by POSIX, so do not add quotes.
18104 sed -n \
18105 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18106 ;;
18107 esac;
18108} |
18109 sed '
18110 t clear
18111 : clear
18112 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18113 t end
18114 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18115 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018116if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018117 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018118 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18119 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018120 else
18121 echo "not updating unwritable cache $cache_file"
18122 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018123fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018124rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018125
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018126test "x$prefix" = xNONE && prefix=$ac_default_prefix
18127# Let make expand exec_prefix.
18128test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018129
Martin v. Löwis11437992002-04-12 09:54:03 +000018130# VPATH may cause trouble with some makes, so we remove $(srcdir),
18131# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18132# trailing colons and then remove the whole line if VPATH becomes empty
18133# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018134if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018135 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18136s/:*\$(srcdir):*/:/;
18137s/:*\${srcdir}:*/:/;
18138s/:*@srcdir@:*/:/;
18139s/^\([^=]*=[ ]*\):*/\1/;
18140s/:*$//;
18141s/^[^=]*=[ ]*$//;
18142}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018143fi
18144
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018145DEFS=-DHAVE_CONFIG_H
18146
Skip Montanaro6dead952003-09-25 14:50:04 +000018147ac_libobjs=
18148ac_ltlibobjs=
18149for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18150 # 1. Remove the extension, and $U if already installed.
18151 ac_i=`echo "$ac_i" |
18152 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18153 # 2. Add them.
18154 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18155 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18156done
18157LIBOBJS=$ac_libobjs
18158
18159LTLIBOBJS=$ac_ltlibobjs
18160
18161
Martin v. Löwis11437992002-04-12 09:54:03 +000018162
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018163: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018164ac_clean_files_save=$ac_clean_files
18165ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18166{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18167echo "$as_me: creating $CONFIG_STATUS" >&6;}
18168cat >$CONFIG_STATUS <<_ACEOF
18169#! $SHELL
18170# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018171# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018172# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018173# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018174
Martin v. Löwis11437992002-04-12 09:54:03 +000018175debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018176ac_cs_recheck=false
18177ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018178SHELL=\${CONFIG_SHELL-$SHELL}
18179_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018180
Martin v. Löwis11437992002-04-12 09:54:03 +000018181cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018182## --------------------- ##
18183## M4sh Initialization. ##
18184## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018185
Martin v. Löwis11437992002-04-12 09:54:03 +000018186# Be Bourne compatible
18187if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18188 emulate sh
18189 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018190 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18191 # is contrary to our usage. Disable this feature.
18192 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018193elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18194 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018195fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018196
Martin v. Löwis11437992002-04-12 09:54:03 +000018197# Support unset when possible.
18198if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18199 as_unset=unset
18200else
18201 as_unset=false
18202fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018203
Skip Montanaro6dead952003-09-25 14:50:04 +000018204
18205# Work around bugs in pre-3.0 UWIN ksh.
18206$as_unset ENV MAIL MAILPATH
18207PS1='$ '
18208PS2='> '
18209PS4='+ '
18210
18211# NLS nuisances.
18212for as_var in \
18213 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18214 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18215 LC_TELEPHONE LC_TIME
18216do
18217 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18218 eval $as_var=C; export $as_var
18219 else
18220 $as_unset $as_var
18221 fi
18222done
18223
18224# Required to use basename.
18225if expr a : '\(a\)' >/dev/null 2>&1; then
18226 as_expr=expr
18227else
18228 as_expr=false
18229fi
18230
18231if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18232 as_basename=basename
18233else
18234 as_basename=false
18235fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018236
18237
18238# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018239as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018240$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18241 X"$0" : 'X\(//\)$' \| \
18242 X"$0" : 'X\(/\)$' \| \
18243 . : '\(.\)' 2>/dev/null ||
18244echo X/"$0" |
18245 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18246 /^X\/\(\/\/\)$/{ s//\1/; q; }
18247 /^X\/\(\/\).*/{ s//\1/; q; }
18248 s/.*/./; q'`
18249
Skip Montanaro6dead952003-09-25 14:50:04 +000018250
Martin v. Löwis11437992002-04-12 09:54:03 +000018251# PATH needs CR, and LINENO needs CR and PATH.
18252# Avoid depending upon Character Ranges.
18253as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18254as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18255as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18256as_cr_digits='0123456789'
18257as_cr_alnum=$as_cr_Letters$as_cr_digits
18258
18259# The user is always right.
18260if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018261 echo "#! /bin/sh" >conf$$.sh
18262 echo "exit 0" >>conf$$.sh
18263 chmod +x conf$$.sh
18264 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018265 PATH_SEPARATOR=';'
18266 else
18267 PATH_SEPARATOR=:
18268 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018269 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018270fi
18271
18272
18273 as_lineno_1=$LINENO
18274 as_lineno_2=$LINENO
18275 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18276 test "x$as_lineno_1" != "x$as_lineno_2" &&
18277 test "x$as_lineno_3" = "x$as_lineno_2" || {
18278 # Find who we are. Look in the path if we contain no path at all
18279 # relative or not.
18280 case $0 in
18281 *[\\/]* ) as_myself=$0 ;;
18282 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18283for as_dir in $PATH
18284do
18285 IFS=$as_save_IFS
18286 test -z "$as_dir" && as_dir=.
18287 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18288done
18289
18290 ;;
18291 esac
18292 # We did not find ourselves, most probably we were run as `sh COMMAND'
18293 # in which case we are not to be found in the path.
18294 if test "x$as_myself" = x; then
18295 as_myself=$0
18296 fi
18297 if test ! -f "$as_myself"; then
18298 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18299echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18300 { (exit 1); exit 1; }; }
18301 fi
18302 case $CONFIG_SHELL in
18303 '')
18304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18305for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18306do
18307 IFS=$as_save_IFS
18308 test -z "$as_dir" && as_dir=.
18309 for as_base in sh bash ksh sh5; do
18310 case $as_dir in
18311 /*)
18312 if ("$as_dir/$as_base" -c '
18313 as_lineno_1=$LINENO
18314 as_lineno_2=$LINENO
18315 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18316 test "x$as_lineno_1" != "x$as_lineno_2" &&
18317 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018318 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18319 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018320 CONFIG_SHELL=$as_dir/$as_base
18321 export CONFIG_SHELL
18322 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18323 fi;;
18324 esac
18325 done
18326done
18327;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018328 esac
18329
Martin v. Löwis11437992002-04-12 09:54:03 +000018330 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18331 # uniformly replaced by the line number. The first 'sed' inserts a
18332 # line-number line before each line; the second 'sed' does the real
18333 # work. The second script uses 'N' to pair each line-number line
18334 # with the numbered line, and appends trailing '-' during
18335 # substitution so that $LINENO is not a special case at line end.
18336 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18337 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18338 sed '=' <$as_myself |
18339 sed '
18340 N
18341 s,$,-,
18342 : loop
18343 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18344 t loop
18345 s,-$,,
18346 s,^['$as_cr_digits']*\n,,
18347 ' >$as_me.lineno &&
18348 chmod +x $as_me.lineno ||
18349 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18350echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18351 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018352
Martin v. Löwis11437992002-04-12 09:54:03 +000018353 # Don't try to exec as it changes $[0], causing all sort of problems
18354 # (the dirname of $[0] is not the place where we might find the
18355 # original and so on. Autoconf is especially sensible to this).
18356 . ./$as_me.lineno
18357 # Exit status is that of the last command.
18358 exit
18359}
18360
18361
18362case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18363 *c*,-n*) ECHO_N= ECHO_C='
18364' ECHO_T=' ' ;;
18365 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18366 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18367esac
18368
18369if expr a : '\(a\)' >/dev/null 2>&1; then
18370 as_expr=expr
18371else
18372 as_expr=false
18373fi
18374
18375rm -f conf$$ conf$$.exe conf$$.file
18376echo >conf$$.file
18377if ln -s conf$$.file conf$$ 2>/dev/null; then
18378 # We could just check for DJGPP; but this test a) works b) is more generic
18379 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18380 if test -f conf$$.exe; then
18381 # Don't use ln at all; we don't have any links
18382 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018383 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018384 as_ln_s='ln -s'
18385 fi
18386elif ln conf$$.file conf$$ 2>/dev/null; then
18387 as_ln_s=ln
18388else
18389 as_ln_s='cp -p'
18390fi
18391rm -f conf$$ conf$$.exe conf$$.file
18392
Skip Montanaro6dead952003-09-25 14:50:04 +000018393if mkdir -p . 2>/dev/null; then
18394 as_mkdir_p=:
18395else
18396 as_mkdir_p=false
18397fi
18398
Martin v. Löwis11437992002-04-12 09:54:03 +000018399as_executable_p="test -f"
18400
18401# Sed expression to map a string onto a valid CPP name.
18402as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18403
18404# Sed expression to map a string onto a valid variable name.
18405as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18406
18407
18408# IFS
18409# We need space, tab and new line, in precisely that order.
18410as_nl='
18411'
18412IFS=" $as_nl"
18413
18414# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018415$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018416
18417exec 6>&1
18418
18419# Open the log real soon, to keep \$[0] and so on meaningful, and to
18420# report actual input values of CONFIG_FILES etc. instead of their
18421# values after options handling. Logging --version etc. is OK.
18422exec 5>>config.log
18423{
18424 echo
18425 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18426## Running $as_me. ##
18427_ASBOX
18428} >&5
18429cat >&5 <<_CSEOF
18430
Fred Drake9bd44622003-07-30 17:39:48 +000018431This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000018432generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018433
18434 CONFIG_FILES = $CONFIG_FILES
18435 CONFIG_HEADERS = $CONFIG_HEADERS
18436 CONFIG_LINKS = $CONFIG_LINKS
18437 CONFIG_COMMANDS = $CONFIG_COMMANDS
18438 $ $0 $@
18439
18440_CSEOF
18441echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18442echo >&5
18443_ACEOF
18444
18445# Files that config.status was made for.
18446if test -n "$ac_config_files"; then
18447 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18448fi
18449
18450if test -n "$ac_config_headers"; then
18451 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18452fi
18453
18454if test -n "$ac_config_links"; then
18455 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18456fi
18457
18458if test -n "$ac_config_commands"; then
18459 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18460fi
18461
18462cat >>$CONFIG_STATUS <<\_ACEOF
18463
18464ac_cs_usage="\
18465\`$as_me' instantiates files from templates according to the
18466current configuration.
18467
18468Usage: $0 [OPTIONS] [FILE]...
18469
18470 -h, --help print this help, then exit
18471 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018472 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018473 -d, --debug don't remove temporary files
18474 --recheck update $as_me by reconfiguring in the same conditions
18475 --file=FILE[:TEMPLATE]
18476 instantiate the configuration file FILE
18477 --header=FILE[:TEMPLATE]
18478 instantiate the configuration header FILE
18479
18480Configuration files:
18481$config_files
18482
18483Configuration headers:
18484$config_headers
18485
18486Report bugs to <bug-autoconf@gnu.org>."
18487_ACEOF
18488
18489cat >>$CONFIG_STATUS <<_ACEOF
18490ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018491python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000018492configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018493 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18494
18495Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18496Free Software Foundation, Inc.
18497This config.status script is free software; the Free Software Foundation
18498gives unlimited permission to copy, distribute and modify it."
18499srcdir=$srcdir
18500INSTALL="$INSTALL"
18501_ACEOF
18502
18503cat >>$CONFIG_STATUS <<\_ACEOF
18504# If no file are specified by the user, then we need to provide default
18505# value. By we need to know if files were specified by the user.
18506ac_need_defaults=:
18507while test $# != 0
18508do
18509 case $1 in
18510 --*=*)
18511 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18512 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018513 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018514 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018515 -*)
18516 ac_option=$1
18517 ac_optarg=$2
18518 ac_shift=shift
18519 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018520 *) # This is not an option, so the user has probably given explicit
18521 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018522 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018523 ac_need_defaults=false;;
18524 esac
18525
Skip Montanaro6dead952003-09-25 14:50:04 +000018526 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018527 # Handling of the options.
18528_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018529cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018530 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18531 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018532 --version | --vers* | -V )
18533 echo "$ac_cs_version"; exit 0 ;;
18534 --he | --h)
18535 # Conflict between --help and --header
18536 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18537Try \`$0 --help' for more information." >&5
18538echo "$as_me: error: ambiguous option: $1
18539Try \`$0 --help' for more information." >&2;}
18540 { (exit 1); exit 1; }; };;
18541 --help | --hel | -h )
18542 echo "$ac_cs_usage"; exit 0 ;;
18543 --debug | --d* | -d )
18544 debug=: ;;
18545 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018546 $ac_shift
18547 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018548 ac_need_defaults=false;;
18549 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018550 $ac_shift
18551 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018552 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018553 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18554 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18555 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018556
18557 # This is an error.
18558 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18559Try \`$0 --help' for more information." >&5
18560echo "$as_me: error: unrecognized option: $1
18561Try \`$0 --help' for more information." >&2;}
18562 { (exit 1); exit 1; }; } ;;
18563
18564 *) ac_config_targets="$ac_config_targets $1" ;;
18565
18566 esac
18567 shift
18568done
18569
Skip Montanaro6dead952003-09-25 14:50:04 +000018570ac_configure_extra_args=
18571
18572if $ac_cs_silent; then
18573 exec 6>/dev/null
18574 ac_configure_extra_args="$ac_configure_extra_args --silent"
18575fi
18576
18577_ACEOF
18578cat >>$CONFIG_STATUS <<_ACEOF
18579if \$ac_cs_recheck; then
18580 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18581 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18582fi
18583
Martin v. Löwis11437992002-04-12 09:54:03 +000018584_ACEOF
18585
18586
18587
18588
18589
18590cat >>$CONFIG_STATUS <<\_ACEOF
18591for ac_config_target in $ac_config_targets
18592do
18593 case "$ac_config_target" in
18594 # Handling of arguments.
18595 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18596 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18597 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18598 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18599echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18600 { (exit 1); exit 1; }; };;
18601 esac
18602done
18603
18604# If the user did not use the arguments to specify the items to instantiate,
18605# then the envvar interface is used. Set only those that are not.
18606# We use the long form for the default assignment because of an extremely
18607# bizarre bug on SunOS 4.1.3.
18608if $ac_need_defaults; then
18609 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18610 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18611fi
18612
Skip Montanaro6dead952003-09-25 14:50:04 +000018613# Have a temporary directory for convenience. Make it in the build tree
18614# simply because there is no reason to put it here, and in addition,
18615# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018616# Create a temporary directory, and hook for its removal unless debugging.
18617$debug ||
18618{
18619 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18620 trap '{ (exit 1); exit 1; }' 1 2 13 15
18621}
18622
18623# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018624
Martin v. Löwis11437992002-04-12 09:54:03 +000018625{
Skip Montanaro6dead952003-09-25 14:50:04 +000018626 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018627 test -n "$tmp" && test -d "$tmp"
18628} ||
18629{
Skip Montanaro6dead952003-09-25 14:50:04 +000018630 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018631 (umask 077 && mkdir $tmp)
18632} ||
18633{
Skip Montanaro6dead952003-09-25 14:50:04 +000018634 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018635 { (exit 1); exit 1; }
18636}
18637
18638_ACEOF
18639
18640cat >>$CONFIG_STATUS <<_ACEOF
18641
18642#
18643# CONFIG_FILES section.
18644#
18645
18646# No need to generate the scripts if there are no CONFIG_FILES.
18647# This happens for instance when ./config.status config.h
18648if test -n "\$CONFIG_FILES"; then
18649 # Protect against being on the right side of a sed subst in config.status.
18650 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18651 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18652s,@SHELL@,$SHELL,;t t
18653s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18654s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18655s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18656s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18657s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18658s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18659s,@exec_prefix@,$exec_prefix,;t t
18660s,@prefix@,$prefix,;t t
18661s,@program_transform_name@,$program_transform_name,;t t
18662s,@bindir@,$bindir,;t t
18663s,@sbindir@,$sbindir,;t t
18664s,@libexecdir@,$libexecdir,;t t
18665s,@datadir@,$datadir,;t t
18666s,@sysconfdir@,$sysconfdir,;t t
18667s,@sharedstatedir@,$sharedstatedir,;t t
18668s,@localstatedir@,$localstatedir,;t t
18669s,@libdir@,$libdir,;t t
18670s,@includedir@,$includedir,;t t
18671s,@oldincludedir@,$oldincludedir,;t t
18672s,@infodir@,$infodir,;t t
18673s,@mandir@,$mandir,;t t
18674s,@build_alias@,$build_alias,;t t
18675s,@host_alias@,$host_alias,;t t
18676s,@target_alias@,$target_alias,;t t
18677s,@DEFS@,$DEFS,;t t
18678s,@ECHO_C@,$ECHO_C,;t t
18679s,@ECHO_N@,$ECHO_N,;t t
18680s,@ECHO_T@,$ECHO_T,;t t
18681s,@LIBS@,$LIBS,;t t
18682s,@VERSION@,$VERSION,;t t
18683s,@SOVERSION@,$SOVERSION,;t t
18684s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18685s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18686s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18687s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18688s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18689s,@MACHDEP@,$MACHDEP,;t t
18690s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018691s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018692s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000018693s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018694s,@CXX@,$CXX,;t t
18695s,@MAINOBJ@,$MAINOBJ,;t t
18696s,@EXEEXT@,$EXEEXT,;t t
18697s,@CC@,$CC,;t t
18698s,@CFLAGS@,$CFLAGS,;t t
18699s,@LDFLAGS@,$LDFLAGS,;t t
18700s,@CPPFLAGS@,$CPPFLAGS,;t t
18701s,@ac_ct_CC@,$ac_ct_CC,;t t
18702s,@OBJEXT@,$OBJEXT,;t t
18703s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018704s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018705s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18706s,@LIBRARY@,$LIBRARY,;t t
18707s,@LDLIBRARY@,$LDLIBRARY,;t t
18708s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18709s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18710s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18711s,@INSTSONAME@,$INSTSONAME,;t t
18712s,@RUNSHARED@,$RUNSHARED,;t t
18713s,@LINKCC@,$LINKCC,;t t
18714s,@RANLIB@,$RANLIB,;t t
18715s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18716s,@AR@,$AR,;t t
18717s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18718s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18719s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18720s,@LN@,$LN,;t t
18721s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018722s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018723s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18724s,@SO@,$SO,;t t
18725s,@LDSHARED@,$LDSHARED,;t t
18726s,@BLDSHARED@,$BLDSHARED,;t t
18727s,@CCSHARED@,$CCSHARED,;t t
18728s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18729s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018730s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018731s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18732s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18733s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18734s,@LDLAST@,$LDLAST,;t t
18735s,@THREADOBJ@,$THREADOBJ,;t t
18736s,@DLINCLDIR@,$DLINCLDIR,;t t
18737s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18738s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018739s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018740s,@LIBOBJS@,$LIBOBJS,;t t
18741s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18742s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18743s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18744s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18745s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18746s,@LIBM@,$LIBM,;t t
18747s,@LIBC@,$LIBC,;t t
18748s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18749s,@THREADHEADERS@,$THREADHEADERS,;t t
18750s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018751s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018752CEOF
18753
18754_ACEOF
18755
18756 cat >>$CONFIG_STATUS <<\_ACEOF
18757 # Split the substitutions into bite-sized pieces for seds with
18758 # small command number limits, like on Digital OSF/1 and HP-UX.
18759 ac_max_sed_lines=48
18760 ac_sed_frag=1 # Number of current file.
18761 ac_beg=1 # First line for current file.
18762 ac_end=$ac_max_sed_lines # Line after last line for current file.
18763 ac_more_lines=:
18764 ac_sed_cmds=
18765 while $ac_more_lines; do
18766 if test $ac_beg -gt 1; then
18767 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18768 else
18769 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18770 fi
18771 if test ! -s $tmp/subs.frag; then
18772 ac_more_lines=false
18773 else
18774 # The purpose of the label and of the branching condition is to
18775 # speed up the sed processing (if there are no `@' at all, there
18776 # is no need to browse any of the substitutions).
18777 # These are the two extra sed commands mentioned above.
18778 (echo ':t
18779 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18780 if test -z "$ac_sed_cmds"; then
18781 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18782 else
18783 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18784 fi
18785 ac_sed_frag=`expr $ac_sed_frag + 1`
18786 ac_beg=$ac_end
18787 ac_end=`expr $ac_end + $ac_max_sed_lines`
18788 fi
18789 done
18790 if test -z "$ac_sed_cmds"; then
18791 ac_sed_cmds=cat
18792 fi
18793fi # test -n "$CONFIG_FILES"
18794
18795_ACEOF
18796cat >>$CONFIG_STATUS <<\_ACEOF
18797for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18798 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18799 case $ac_file in
18800 - | *:- | *:-:* ) # input from stdin
18801 cat >$tmp/stdin
18802 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18803 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18804 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18805 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18806 * ) ac_file_in=$ac_file.in ;;
18807 esac
18808
18809 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18810 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18811$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18812 X"$ac_file" : 'X\(//\)[^/]' \| \
18813 X"$ac_file" : 'X\(//\)$' \| \
18814 X"$ac_file" : 'X\(/\)' \| \
18815 . : '\(.\)' 2>/dev/null ||
18816echo X"$ac_file" |
18817 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18818 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18819 /^X\(\/\/\)$/{ s//\1/; q; }
18820 /^X\(\/\).*/{ s//\1/; q; }
18821 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018822 { if $as_mkdir_p; then
18823 mkdir -p "$ac_dir"
18824 else
18825 as_dir="$ac_dir"
18826 as_dirs=
18827 while test ! -d "$as_dir"; do
18828 as_dirs="$as_dir $as_dirs"
18829 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18830$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18831 X"$as_dir" : 'X\(//\)[^/]' \| \
18832 X"$as_dir" : 'X\(//\)$' \| \
18833 X"$as_dir" : 'X\(/\)' \| \
18834 . : '\(.\)' 2>/dev/null ||
18835echo X"$as_dir" |
18836 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18837 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18838 /^X\(\/\/\)$/{ s//\1/; q; }
18839 /^X\(\/\).*/{ s//\1/; q; }
18840 s/.*/./; q'`
18841 done
18842 test ! -n "$as_dirs" || mkdir $as_dirs
18843 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18844echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18845 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018846
18847 ac_builddir=.
18848
18849if test "$ac_dir" != .; then
18850 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18851 # A "../" for each directory in $ac_dir_suffix.
18852 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18853else
18854 ac_dir_suffix= ac_top_builddir=
18855fi
18856
18857case $srcdir in
18858 .) # No --srcdir option. We are building in place.
18859 ac_srcdir=.
18860 if test -z "$ac_top_builddir"; then
18861 ac_top_srcdir=.
18862 else
18863 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18864 fi ;;
18865 [\\/]* | ?:[\\/]* ) # Absolute path.
18866 ac_srcdir=$srcdir$ac_dir_suffix;
18867 ac_top_srcdir=$srcdir ;;
18868 *) # Relative path.
18869 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18870 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18871esac
18872# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18873# absolute.
18874ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018875ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018876ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18877ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18878
18879
18880 case $INSTALL in
18881 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18882 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18883 esac
18884
18885 if test x"$ac_file" != x-; then
18886 { echo "$as_me:$LINENO: creating $ac_file" >&5
18887echo "$as_me: creating $ac_file" >&6;}
18888 rm -f "$ac_file"
18889 fi
18890 # Let's still pretend it is `configure' which instantiates (i.e., don't
18891 # use $as_me), people would be surprised to read:
18892 # /* config.h. Generated by config.status. */
18893 if test x"$ac_file" = x-; then
18894 configure_input=
18895 else
18896 configure_input="$ac_file. "
18897 fi
18898 configure_input=$configure_input"Generated from `echo $ac_file_in |
18899 sed 's,.*/,,'` by configure."
18900
18901 # First look for the input files in the build tree, otherwise in the
18902 # src tree.
18903 ac_file_inputs=`IFS=:
18904 for f in $ac_file_in; do
18905 case $f in
18906 -) echo $tmp/stdin ;;
18907 [\\/$]*)
18908 # Absolute (can't be DOS-style, as IFS=:)
18909 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18910echo "$as_me: error: cannot find input file: $f" >&2;}
18911 { (exit 1); exit 1; }; }
18912 echo $f;;
18913 *) # Relative
18914 if test -f "$f"; then
18915 # Build tree
18916 echo $f
18917 elif test -f "$srcdir/$f"; then
18918 # Source tree
18919 echo $srcdir/$f
18920 else
18921 # /dev/null tree
18922 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18923echo "$as_me: error: cannot find input file: $f" >&2;}
18924 { (exit 1); exit 1; }; }
18925 fi;;
18926 esac
18927 done` || { (exit 1); exit 1; }
18928_ACEOF
18929cat >>$CONFIG_STATUS <<_ACEOF
18930 sed "$ac_vpsub
18931$extrasub
18932_ACEOF
18933cat >>$CONFIG_STATUS <<\_ACEOF
18934:t
18935/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18936s,@configure_input@,$configure_input,;t t
18937s,@srcdir@,$ac_srcdir,;t t
18938s,@abs_srcdir@,$ac_abs_srcdir,;t t
18939s,@top_srcdir@,$ac_top_srcdir,;t t
18940s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18941s,@builddir@,$ac_builddir,;t t
18942s,@abs_builddir@,$ac_abs_builddir,;t t
18943s,@top_builddir@,$ac_top_builddir,;t t
18944s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18945s,@INSTALL@,$ac_INSTALL,;t t
18946" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18947 rm -f $tmp/stdin
18948 if test x"$ac_file" != x-; then
18949 mv $tmp/out $ac_file
18950 else
18951 cat $tmp/out
18952 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018953 fi
18954
Martin v. Löwis11437992002-04-12 09:54:03 +000018955done
18956_ACEOF
18957cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018958
Martin v. Löwis11437992002-04-12 09:54:03 +000018959#
18960# CONFIG_HEADER section.
18961#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018962
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018963# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18964# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018965#
18966# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018967ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18968ac_dB='[ ].*$,\1#\2'
18969ac_dC=' '
18970ac_dD=',;t'
18971# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18972ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18973ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018974ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018975ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018976
Martin v. Löwis11437992002-04-12 09:54:03 +000018977for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018978 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018979 case $ac_file in
18980 - | *:- | *:-:* ) # input from stdin
18981 cat >$tmp/stdin
18982 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18983 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18984 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18985 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18986 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018987 esac
18988
Martin v. Löwis11437992002-04-12 09:54:03 +000018989 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18990echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018991
Martin v. Löwis11437992002-04-12 09:54:03 +000018992 # First look for the input files in the build tree, otherwise in the
18993 # src tree.
18994 ac_file_inputs=`IFS=:
18995 for f in $ac_file_in; do
18996 case $f in
18997 -) echo $tmp/stdin ;;
18998 [\\/$]*)
18999 # Absolute (can't be DOS-style, as IFS=:)
19000 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19001echo "$as_me: error: cannot find input file: $f" >&2;}
19002 { (exit 1); exit 1; }; }
19003 echo $f;;
19004 *) # Relative
19005 if test -f "$f"; then
19006 # Build tree
19007 echo $f
19008 elif test -f "$srcdir/$f"; then
19009 # Source tree
19010 echo $srcdir/$f
19011 else
19012 # /dev/null tree
19013 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19014echo "$as_me: error: cannot find input file: $f" >&2;}
19015 { (exit 1); exit 1; }; }
19016 fi;;
19017 esac
19018 done` || { (exit 1); exit 1; }
19019 # Remove the trailing spaces.
19020 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019021
Martin v. Löwis11437992002-04-12 09:54:03 +000019022_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019023
Martin v. Löwis11437992002-04-12 09:54:03 +000019024# Transform confdefs.h into two sed scripts, `conftest.defines' and
19025# `conftest.undefs', that substitutes the proper values into
19026# config.h.in to produce config.h. The first handles `#define'
19027# templates, and the second `#undef' templates.
19028# And first: Protect against being on the right side of a sed subst in
19029# config.status. Protect against being in an unquoted here document
19030# in config.status.
19031rm -f conftest.defines conftest.undefs
19032# Using a here document instead of a string reduces the quoting nightmare.
19033# Putting comments in sed scripts is not portable.
19034#
19035# `end' is used to avoid that the second main sed command (meant for
19036# 0-ary CPP macros) applies to n-ary macro definitions.
19037# See the Autoconf documentation for `clear'.
19038cat >confdef2sed.sed <<\_ACEOF
19039s/[\\&,]/\\&/g
19040s,[\\$`],\\&,g
19041t clear
19042: clear
19043s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19044t end
19045s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19046: end
19047_ACEOF
19048# If some macros were called several times there might be several times
19049# the same #defines, which is useless. Nevertheless, we may not want to
19050# sort them, since we want the *last* AC-DEFINE to be honored.
19051uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19052sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19053rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019054
19055# This sed command replaces #undef with comments. This is necessary, for
19056# example, in the case of _POSIX_SOURCE, which is predefined and required
19057# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019058cat >>conftest.undefs <<\_ACEOF
19059s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19060_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019061
Martin v. Löwis11437992002-04-12 09:54:03 +000019062# Break up conftest.defines because some shells have a limit on the size
19063# of here documents, and old seds have small limits too (100 cmds).
19064echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019065echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019066echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19067echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019068rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019069while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019070do
Martin v. Löwis11437992002-04-12 09:54:03 +000019071 # Write a limited-size here document to $tmp/defines.sed.
19072 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19073 # Speed up: don't consider the non `#define' lines.
19074 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19075 # Work around the forget-to-reset-the-flag bug.
19076 echo 't clr' >>$CONFIG_STATUS
19077 echo ': clr' >>$CONFIG_STATUS
19078 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019079 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019080 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19081 rm -f $tmp/in
19082 mv $tmp/out $tmp/in
19083' >>$CONFIG_STATUS
19084 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19085 rm -f conftest.defines
19086 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019087done
Martin v. Löwis11437992002-04-12 09:54:03 +000019088rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019089echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019090echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019091
Martin v. Löwis11437992002-04-12 09:54:03 +000019092# Break up conftest.undefs because some shells have a limit on the size
19093# of here documents, and old seds have small limits too (100 cmds).
19094echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19095rm -f conftest.tail
19096while grep . conftest.undefs >/dev/null
19097do
19098 # Write a limited-size here document to $tmp/undefs.sed.
19099 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19100 # Speed up: don't consider the non `#undef'
19101 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19102 # Work around the forget-to-reset-the-flag bug.
19103 echo 't clr' >>$CONFIG_STATUS
19104 echo ': clr' >>$CONFIG_STATUS
19105 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19106 echo 'CEOF
19107 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19108 rm -f $tmp/in
19109 mv $tmp/out $tmp/in
19110' >>$CONFIG_STATUS
19111 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19112 rm -f conftest.undefs
19113 mv conftest.tail conftest.undefs
19114done
19115rm -f conftest.undefs
19116
19117cat >>$CONFIG_STATUS <<\_ACEOF
19118 # Let's still pretend it is `configure' which instantiates (i.e., don't
19119 # use $as_me), people would be surprised to read:
19120 # /* config.h. Generated by config.status. */
19121 if test x"$ac_file" = x-; then
19122 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019123 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019124 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019125 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019126 cat $tmp/in >>$tmp/config.h
19127 rm -f $tmp/in
19128 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019129 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019130 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19131echo "$as_me: $ac_file is unchanged" >&6;}
19132 else
19133 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19134$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19135 X"$ac_file" : 'X\(//\)[^/]' \| \
19136 X"$ac_file" : 'X\(//\)$' \| \
19137 X"$ac_file" : 'X\(/\)' \| \
19138 . : '\(.\)' 2>/dev/null ||
19139echo X"$ac_file" |
19140 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19141 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19142 /^X\(\/\/\)$/{ s//\1/; q; }
19143 /^X\(\/\).*/{ s//\1/; q; }
19144 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019145 { if $as_mkdir_p; then
19146 mkdir -p "$ac_dir"
19147 else
19148 as_dir="$ac_dir"
19149 as_dirs=
19150 while test ! -d "$as_dir"; do
19151 as_dirs="$as_dir $as_dirs"
19152 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19153$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19154 X"$as_dir" : 'X\(//\)[^/]' \| \
19155 X"$as_dir" : 'X\(//\)$' \| \
19156 X"$as_dir" : 'X\(/\)' \| \
19157 . : '\(.\)' 2>/dev/null ||
19158echo X"$as_dir" |
19159 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19160 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19161 /^X\(\/\/\)$/{ s//\1/; q; }
19162 /^X\(\/\).*/{ s//\1/; q; }
19163 s/.*/./; q'`
19164 done
19165 test ! -n "$as_dirs" || mkdir $as_dirs
19166 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19167echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19168 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019169
Martin v. Löwis11437992002-04-12 09:54:03 +000019170 rm -f $ac_file
19171 mv $tmp/config.h $ac_file
19172 fi
19173 else
19174 cat $tmp/config.h
19175 rm -f $tmp/config.h
19176 fi
19177done
19178_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019179
Martin v. Löwis11437992002-04-12 09:54:03 +000019180cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019181
Martin v. Löwis11437992002-04-12 09:54:03 +000019182{ (exit 0); exit 0; }
19183_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019184chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019185ac_clean_files=$ac_clean_files_save
19186
19187
19188# configure is writing to config.log, and then calls config.status.
19189# config.status does its own redirection, appending to config.log.
19190# Unfortunately, on DOS this fails, as config.log is still kept open
19191# by configure, so config.status won't be able to write to it; its
19192# output is simply discarded. So we exec the FD to /dev/null,
19193# effectively closing config.log, so it can be properly (re)opened and
19194# appended to by config.status. When coming back to configure, we
19195# need to make the FD available again.
19196if test "$no_create" != yes; then
19197 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019198 ac_config_status_args=
19199 test "$silent" = yes &&
19200 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019201 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019202 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019203 exec 5>>config.log
19204 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19205 # would make configure fail if this is the last instruction.
19206 $ac_cs_success || { (exit 1); exit 1; }
19207fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019208
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019209
19210echo "creating Setup"
19211if test ! -f Modules/Setup
19212then
19213 cp $srcdir/Modules/Setup.dist Modules/Setup
19214fi
19215
19216echo "creating Setup.local"
19217if test ! -f Modules/Setup.local
19218then
19219 echo "# Edit this file for local setup changes" >Modules/Setup.local
19220fi
19221
19222echo "creating Makefile"
19223$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19224 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019225 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019226mv config.c Modules