blob: 6bc1c4eac17f566b84e9e1478b026d1460cda788 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00002# From configure.in Revision: 1.475 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00004# Generated by GNU Autoconf 2.59 for python 2.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Skip Montanarof0d5f792004-08-15 14:08:23 +00006# Copyright (C) 2003 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +00009## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
12
13# Be Bourne compatible
14if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15 emulate sh
16 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000020elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21 set -o posix
22fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000023DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024
Martin v. Löwis11437992002-04-12 09:54:03 +000025# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027 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
Skip Montanarof0d5f792004-08-15 14:08:23 +000045 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000046 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
Skip Montanarof0d5f792004-08-15 14:08:23 +0000222 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000223 as_mkdir_p=false
224fi
225
Martin v. Löwis11437992002-04-12 09:54:03 +0000226as_executable_p="test -f"
227
228# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000229as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000230
231# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000232as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000233
234
235# IFS
236# We need space, tab and new line, in precisely that order.
237as_nl='
238'
239IFS=" $as_nl"
240
241# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000242$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000243
244
245# Name of the host.
246# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
247# so uname gets run too.
248ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
249
250exec 6>&1
251
252#
253# Initializations.
254#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000255ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000256ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000257cross_compiling=no
258subdirs=
259MFLAGS=
260MAKEFLAGS=
261SHELL=${CONFIG_SHELL-/bin/sh}
262
263# Maximum number of lines to put in a shell here document.
264# This variable seems obsolete. It should probably be removed, and
265# only ac_max_sed_lines should be used.
266: ${ac_max_here_lines=38}
267
268# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000269PACKAGE_NAME='python'
270PACKAGE_TARNAME='python'
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000271PACKAGE_VERSION='2.5'
272PACKAGE_STRING='python 2.5'
Martin v. Löwis88afe662002-10-26 13:47:44 +0000273PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000274
275ac_unique_file="Include/object.h"
276# Factoring default headers for most tests.
277ac_includes_default="\
278#include <stdio.h>
279#if HAVE_SYS_TYPES_H
280# include <sys/types.h>
281#endif
282#if HAVE_SYS_STAT_H
283# include <sys/stat.h>
284#endif
285#if STDC_HEADERS
286# include <stdlib.h>
287# include <stddef.h>
288#else
289# if HAVE_STDLIB_H
290# include <stdlib.h>
291# endif
292#endif
293#if HAVE_STRING_H
294# if !STDC_HEADERS && HAVE_MEMORY_H
295# include <memory.h>
296# endif
297# include <string.h>
298#endif
299#if HAVE_STRINGS_H
300# include <strings.h>
301#endif
302#if HAVE_INTTYPES_H
303# include <inttypes.h>
304#else
305# if HAVE_STDINT_H
306# include <stdint.h>
307# endif
308#endif
309#if HAVE_UNISTD_H
310# include <unistd.h>
311#endif"
312
Jack Jansen6b08a402004-06-03 12:41:45 +0000313ac_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 +0000314ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000315
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000317ac_init_help=
318ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000319# The variables have the same names as the options, with
320# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000321cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000322exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000323no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000324no_recursion=
325prefix=NONE
326program_prefix=NONE
327program_suffix=NONE
328program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000329silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000330site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000332verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000333x_includes=NONE
334x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000335
336# Installation directory options.
337# These are left unexpanded so users can "make install exec_prefix=/foo"
338# and all the variables that are supposed to be based on exec_prefix
339# by default will actually change.
340# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000341bindir='${exec_prefix}/bin'
342sbindir='${exec_prefix}/sbin'
343libexecdir='${exec_prefix}/libexec'
344datadir='${prefix}/share'
345sysconfdir='${prefix}/etc'
346sharedstatedir='${prefix}/com'
347localstatedir='${prefix}/var'
348libdir='${exec_prefix}/lib'
349includedir='${prefix}/include'
350oldincludedir='/usr/include'
351infodir='${prefix}/info'
352mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000353
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354ac_prev=
355for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000356do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000357 # If the previous option needs an argument, assign it.
358 if test -n "$ac_prev"; then
359 eval "$ac_prev=\$ac_option"
360 ac_prev=
361 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000362 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000363
Martin v. Löwis11437992002-04-12 09:54:03 +0000364 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000365
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000366 # Accept the important Cygnus configure options, so we can diagnose typos.
367
Martin v. Löwis11437992002-04-12 09:54:03 +0000368 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000369
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000370 -bindir | --bindir | --bindi | --bind | --bin | --bi)
371 ac_prev=bindir ;;
372 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000373 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000374
375 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000376 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000377 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000378 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000379
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000380 -cache-file | --cache-file | --cache-fil | --cache-fi \
381 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
382 ac_prev=cache_file ;;
383 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
384 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000385 cache_file=$ac_optarg ;;
386
387 --config-cache | -C)
388 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000389
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000390 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
391 ac_prev=datadir ;;
392 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
393 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000394 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000395
Guido van Rossum7f43da71994-08-01 12:15:30 +0000396 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000397 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000398 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000399 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
401 { (exit 1); exit 1; }; }
402 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
403 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000404
405 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000406 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000407 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000408 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
410 { (exit 1); exit 1; }; }
411 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
412 case $ac_option in
413 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000414 *) ac_optarg=yes ;;
415 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000417
Guido van Rossum7f43da71994-08-01 12:15:30 +0000418 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
419 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
420 | --exec | --exe | --ex)
421 ac_prev=exec_prefix ;;
422 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
423 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
424 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000425 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000426
427 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428 # Obsolete; use --with-gas.
429 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000430
Martin v. Löwis11437992002-04-12 09:54:03 +0000431 -help | --help | --hel | --he | -h)
432 ac_init_help=long ;;
433 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
434 ac_init_help=recursive ;;
435 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
436 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000437
438 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000440 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000443 -includedir | --includedir | --includedi | --included | --include \
444 | --includ | --inclu | --incl | --inc)
445 ac_prev=includedir ;;
446 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
447 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000448 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000449
450 -infodir | --infodir | --infodi | --infod | --info | --inf)
451 ac_prev=infodir ;;
452 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000454
455 -libdir | --libdir | --libdi | --libd)
456 ac_prev=libdir ;;
457 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000459
460 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
461 | --libexe | --libex | --libe)
462 ac_prev=libexecdir ;;
463 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
464 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000465 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000466
467 -localstatedir | --localstatedir | --localstatedi | --localstated \
468 | --localstate | --localstat | --localsta | --localst \
469 | --locals | --local | --loca | --loc | --lo)
470 ac_prev=localstatedir ;;
471 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
472 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
473 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000474 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000475
476 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
477 ac_prev=mandir ;;
478 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000479 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000480
Guido van Rossum7f43da71994-08-01 12:15:30 +0000481 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000482 # Obsolete; use --without-fp.
483 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000484
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 no_create=yes ;;
488
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000489 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
491 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000492
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000493 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
494 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
495 | --oldin | --oldi | --old | --ol | --o)
496 ac_prev=oldincludedir ;;
497 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
498 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
499 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000501
Guido van Rossum7f43da71994-08-01 12:15:30 +0000502 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
503 ac_prev=prefix ;;
504 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000505 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000506
507 -program-prefix | --program-prefix | --program-prefi | --program-pref \
508 | --program-pre | --program-pr | --program-p)
509 ac_prev=program_prefix ;;
510 -program-prefix=* | --program-prefix=* | --program-prefi=* \
511 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000512 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000513
514 -program-suffix | --program-suffix | --program-suffi | --program-suff \
515 | --program-suf | --program-su | --program-s)
516 ac_prev=program_suffix ;;
517 -program-suffix=* | --program-suffix=* | --program-suffi=* \
518 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000519 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000520
521 -program-transform-name | --program-transform-name \
522 | --program-transform-nam | --program-transform-na \
523 | --program-transform-n | --program-transform- \
524 | --program-transform | --program-transfor \
525 | --program-transfo | --program-transf \
526 | --program-trans | --program-tran \
527 | --progr-tra | --program-tr | --program-t)
528 ac_prev=program_transform_name ;;
529 -program-transform-name=* | --program-transform-name=* \
530 | --program-transform-nam=* | --program-transform-na=* \
531 | --program-transform-n=* | --program-transform-=* \
532 | --program-transform=* | --program-transfor=* \
533 | --program-transfo=* | --program-transf=* \
534 | --program-trans=* | --program-tran=* \
535 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000536 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000537
538 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
539 | -silent | --silent | --silen | --sile | --sil)
540 silent=yes ;;
541
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000542 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
543 ac_prev=sbindir ;;
544 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
545 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000546 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000547
548 -sharedstatedir | --sharedstatedir | --sharedstatedi \
549 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
550 | --sharedst | --shareds | --shared | --share | --shar \
551 | --sha | --sh)
552 ac_prev=sharedstatedir ;;
553 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
554 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
555 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
556 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000557 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000558
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000559 -site | --site | --sit)
560 ac_prev=site ;;
561 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000563
Guido van Rossum7f43da71994-08-01 12:15:30 +0000564 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
565 ac_prev=srcdir ;;
566 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000567 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000568
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000569 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
570 | --syscon | --sysco | --sysc | --sys | --sy)
571 ac_prev=sysconfdir ;;
572 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
573 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000574 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000575
Guido van Rossum7f43da71994-08-01 12:15:30 +0000576 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000577 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000580
581 -v | -verbose | --verbose | --verbos | --verbo | --verb)
582 verbose=yes ;;
583
Martin v. Löwis11437992002-04-12 09:54:03 +0000584 -version | --version | --versio | --versi | --vers | -V)
585 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000586
587 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000589 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000590 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
591 { echo "$as_me: error: invalid package name: $ac_package" >&2
592 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000594 case $ac_option in
595 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000596 *) ac_optarg=yes ;;
597 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000598 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000599
600 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000601 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000602 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
604 { echo "$as_me: error: invalid package name: $ac_package" >&2
605 { (exit 1); exit 1; }; }
606 ac_package=`echo $ac_package | sed 's/-/_/g'`
607 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000608
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000609 --x)
610 # Obsolete; use --with-x.
611 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000612
613 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
614 | --x-incl | --x-inc | --x-in | --x-i)
615 ac_prev=x_includes ;;
616 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
617 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000618 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000619
620 -x-libraries | --x-libraries | --x-librarie | --x-librari \
621 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
622 ac_prev=x_libraries ;;
623 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
624 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000625 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000626
Martin v. Löwis11437992002-04-12 09:54:03 +0000627 -*) { echo "$as_me: error: unrecognized option: $ac_option
628Try \`$0 --help' for more information." >&2
629 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000630 ;;
631
Martin v. Löwis11437992002-04-12 09:54:03 +0000632 *=*)
633 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
634 # Reject names that are not valid shell variable names.
635 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
636 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
637 { (exit 1); exit 1; }; }
638 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
639 eval "$ac_envvar='$ac_optarg'"
640 export $ac_envvar ;;
641
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000642 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000643 # FIXME: should be removed in autoconf 3.0.
644 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
645 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
646 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
647 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000648 ;;
649
650 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000651done
652
Guido van Rossum7f43da71994-08-01 12:15:30 +0000653if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000654 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
655 { echo "$as_me: error: missing argument to $ac_option" >&2
656 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000657fi
658
Martin v. Löwis11437992002-04-12 09:54:03 +0000659# Be sure to have absolute paths.
660for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000661do
Martin v. Löwis11437992002-04-12 09:54:03 +0000662 eval ac_val=$`echo $ac_var`
663 case $ac_val in
664 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
665 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
666 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000667 esac
668done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000669
Martin v. Löwis11437992002-04-12 09:54:03 +0000670# Be sure to have absolute paths.
671for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000672 localstatedir libdir includedir oldincludedir infodir mandir
Martin v. Löwis11437992002-04-12 09:54:03 +0000673do
674 eval ac_val=$`echo $ac_var`
675 case $ac_val in
676 [\\/$]* | ?:[\\/]* ) ;;
677 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
678 { (exit 1); exit 1; }; };;
679 esac
680done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000681
Martin v. Löwis11437992002-04-12 09:54:03 +0000682# There might be people who depend on the old broken behavior: `$host'
683# used to hold the argument of --host etc.
684# FIXME: To remove some day.
685build=$build_alias
686host=$host_alias
687target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000688
Martin v. Löwis11437992002-04-12 09:54:03 +0000689# FIXME: To remove some day.
690if test "x$host_alias" != x; then
691 if test "x$build_alias" = x; then
692 cross_compiling=maybe
693 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
694 If a cross compiler is detected then cross compile mode will be used." >&2
695 elif test "x$build_alias" != "x$host_alias"; then
696 cross_compiling=yes
697 fi
698fi
699
700ac_tool_prefix=
701test -n "$host_alias" && ac_tool_prefix=$host_alias-
702
703test "$silent" = yes && exec 6>/dev/null
704
Guido van Rossum627b2d71993-12-24 10:39:16 +0000705
706# Find the source files, if location was not specified.
707if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000708 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000709 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000710 ac_confdir=`(dirname "$0") 2>/dev/null ||
711$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000712 X"$0" : 'X\(//\)[^/]' \| \
713 X"$0" : 'X\(//\)$' \| \
714 X"$0" : 'X\(/\)' \| \
715 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000716echo X"$0" |
717 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
718 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
719 /^X\(\/\/\)$/{ s//\1/; q; }
720 /^X\(\/\).*/{ s//\1/; q; }
721 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000722 srcdir=$ac_confdir
723 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000724 srcdir=..
725 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000726else
727 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000728fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000729if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000730 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000731 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
732 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000733 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000734 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
735 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000736 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000737fi
Skip Montanaro6dead952003-09-25 14:50:04 +0000738(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
739 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
740 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000741srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
742ac_env_build_alias_set=${build_alias+set}
743ac_env_build_alias_value=$build_alias
744ac_cv_env_build_alias_set=${build_alias+set}
745ac_cv_env_build_alias_value=$build_alias
746ac_env_host_alias_set=${host_alias+set}
747ac_env_host_alias_value=$host_alias
748ac_cv_env_host_alias_set=${host_alias+set}
749ac_cv_env_host_alias_value=$host_alias
750ac_env_target_alias_set=${target_alias+set}
751ac_env_target_alias_value=$target_alias
752ac_cv_env_target_alias_set=${target_alias+set}
753ac_cv_env_target_alias_value=$target_alias
754ac_env_CC_set=${CC+set}
755ac_env_CC_value=$CC
756ac_cv_env_CC_set=${CC+set}
757ac_cv_env_CC_value=$CC
758ac_env_CFLAGS_set=${CFLAGS+set}
759ac_env_CFLAGS_value=$CFLAGS
760ac_cv_env_CFLAGS_set=${CFLAGS+set}
761ac_cv_env_CFLAGS_value=$CFLAGS
762ac_env_LDFLAGS_set=${LDFLAGS+set}
763ac_env_LDFLAGS_value=$LDFLAGS
764ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
765ac_cv_env_LDFLAGS_value=$LDFLAGS
766ac_env_CPPFLAGS_set=${CPPFLAGS+set}
767ac_env_CPPFLAGS_value=$CPPFLAGS
768ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_cv_env_CPPFLAGS_value=$CPPFLAGS
770ac_env_CPP_set=${CPP+set}
771ac_env_CPP_value=$CPP
772ac_cv_env_CPP_set=${CPP+set}
773ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000774
Martin v. Löwis11437992002-04-12 09:54:03 +0000775#
776# Report the --help message.
777#
778if test "$ac_init_help" = "long"; then
779 # Omit some internal or obsolete options to make the list less imposing.
780 # This message is too long to be a string in the A/UX 3.1 sh.
781 cat <<_ACEOF
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000782\`configure' configures python 2.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000783
784Usage: $0 [OPTION]... [VAR=VALUE]...
785
786To assign environment variables (e.g., CC, CFLAGS...), specify them as
787VAR=VALUE. See below for descriptions of some of the useful variables.
788
789Defaults for the options are specified in brackets.
790
791Configuration:
792 -h, --help display this help and exit
793 --help=short display options specific to this package
794 --help=recursive display the short help of all the included packages
795 -V, --version display version information and exit
796 -q, --quiet, --silent do not print \`checking...' messages
797 --cache-file=FILE cache test results in FILE [disabled]
798 -C, --config-cache alias for \`--cache-file=config.cache'
799 -n, --no-create do not create output files
800 --srcdir=DIR find the sources in DIR [configure dir or \`..']
801
802_ACEOF
803
804 cat <<_ACEOF
805Installation directories:
806 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000807 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +0000808 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000809 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +0000810
811By default, \`make install' will install all the files in
812\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
813an installation prefix other than \`$ac_default_prefix' using \`--prefix',
814for instance \`--prefix=\$HOME'.
815
816For better control, use the options below.
817
818Fine tuning of the installation directories:
819 --bindir=DIR user executables [EPREFIX/bin]
820 --sbindir=DIR system admin executables [EPREFIX/sbin]
821 --libexecdir=DIR program executables [EPREFIX/libexec]
822 --datadir=DIR read-only architecture-independent data [PREFIX/share]
823 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
824 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
825 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
826 --libdir=DIR object code libraries [EPREFIX/lib]
827 --includedir=DIR C header files [PREFIX/include]
828 --oldincludedir=DIR C header files for non-gcc [/usr/include]
829 --infodir=DIR info documentation [PREFIX/info]
830 --mandir=DIR man documentation [PREFIX/man]
831_ACEOF
832
833 cat <<\_ACEOF
834_ACEOF
835fi
836
837if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000838 case $ac_init_help in
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000839 short | recursive ) echo "Configuration of python 2.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000840 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 cat <<\_ACEOF
842
843Optional Features:
844 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
845 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000846 --enable-framework[=INSTALLDIR]
847 Build (MacOSX|Darwin) framework
848 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +0000849 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000850 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
851 --enable-ipv6 Enable ipv6 (with ipv4) support
852 --disable-ipv6 Disable ipv6 support
853 --enable-unicode[=ucs[24]]
854 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000855
856Optional Packages:
857 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
858 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000859 --without-gcc never use gcc
860 --with-cxx=<compiler> enable C++ support
861 --with-suffix=.exe set executable suffix
862 --with-pydebug build with Py_DEBUG defined
863 --with-libs='lib1 ...' link against additional libs
864 --with-signal-module disable/enable signal module
865 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
866 --with(out)-threads[=DIRECTORY]
867 disable/enable thread support
868 --with(out)-thread[=DIRECTORY]
869 deprecated; use --with(out)-threads
870 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000871 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000872 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000873 --with(out)-pymalloc disable/enable specialized mallocs
874 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000875 --with-fpectl enable SIGFPE catching
876 --with-libm=STRING math library
877 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000878
879Some influential environment variables:
880 CC C compiler command
881 CFLAGS C compiler flags
882 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
883 nonstandard directory <lib dir>
884 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
885 headers in a nonstandard directory <include dir>
886 CPP C preprocessor
887
888Use these variables to override the choices made by `configure' or to help
889it to find libraries and programs with nonstandard names/locations.
890
891_ACEOF
892fi
893
894if test "$ac_init_help" = "recursive"; then
895 # If there are subdirs, report their specific --help.
896 ac_popdir=`pwd`
897 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
898 test -d $ac_dir || continue
899 ac_builddir=.
900
901if test "$ac_dir" != .; then
902 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
903 # A "../" for each directory in $ac_dir_suffix.
904 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
905else
906 ac_dir_suffix= ac_top_builddir=
907fi
908
909case $srcdir in
910 .) # No --srcdir option. We are building in place.
911 ac_srcdir=.
912 if test -z "$ac_top_builddir"; then
913 ac_top_srcdir=.
914 else
915 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
916 fi ;;
917 [\\/]* | ?:[\\/]* ) # Absolute path.
918 ac_srcdir=$srcdir$ac_dir_suffix;
919 ac_top_srcdir=$srcdir ;;
920 *) # Relative path.
921 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
922 ac_top_srcdir=$ac_top_builddir$srcdir ;;
923esac
Skip Montanarof0d5f792004-08-15 14:08:23 +0000924
925# Do not use `cd foo && pwd` to compute absolute paths, because
926# the directories may not exist.
927case `pwd` in
928.) ac_abs_builddir="$ac_dir";;
929*)
930 case "$ac_dir" in
931 .) ac_abs_builddir=`pwd`;;
932 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
933 *) ac_abs_builddir=`pwd`/"$ac_dir";;
934 esac;;
935esac
936case $ac_abs_builddir in
937.) ac_abs_top_builddir=${ac_top_builddir}.;;
938*)
939 case ${ac_top_builddir}. in
940 .) ac_abs_top_builddir=$ac_abs_builddir;;
941 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
942 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
943 esac;;
944esac
945case $ac_abs_builddir in
946.) ac_abs_srcdir=$ac_srcdir;;
947*)
948 case $ac_srcdir in
949 .) ac_abs_srcdir=$ac_abs_builddir;;
950 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
951 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
952 esac;;
953esac
954case $ac_abs_builddir in
955.) ac_abs_top_srcdir=$ac_top_srcdir;;
956*)
957 case $ac_top_srcdir in
958 .) ac_abs_top_srcdir=$ac_abs_builddir;;
959 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
960 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
961 esac;;
962esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000963
964 cd $ac_dir
965 # Check for guested configure; otherwise get Cygnus style configure.
966 if test -f $ac_srcdir/configure.gnu; then
967 echo
968 $SHELL $ac_srcdir/configure.gnu --help=recursive
969 elif test -f $ac_srcdir/configure; then
970 echo
971 $SHELL $ac_srcdir/configure --help=recursive
972 elif test -f $ac_srcdir/configure.ac ||
Skip Montanarof0d5f792004-08-15 14:08:23 +0000973 test -f $ac_srcdir/configure.in; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 echo
975 $ac_configure --help
976 else
977 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
978 fi
Trent Mickc5625ba2004-08-25 23:59:39 +0000979 cd $ac_popdir
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 done
981fi
982
983test -n "$ac_init_help" && exit 0
984if $ac_init_version; then
985 cat <<\_ACEOF
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000986python configure 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +0000987generated by GNU Autoconf 2.59
Martin v. Löwis11437992002-04-12 09:54:03 +0000988
Skip Montanarof0d5f792004-08-15 14:08:23 +0000989Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +0000990This configure script is free software; the Free Software Foundation
991gives unlimited permission to copy, distribute and modify it.
992_ACEOF
993 exit 0
994fi
995exec 5>config.log
996cat >&5 <<_ACEOF
997This file contains any messages produced by compilers while
998running configure, to aid debugging if configure makes a mistake.
999
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00001000It was created by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +00001001generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001002
1003 $ $0 $@
1004
1005_ACEOF
1006{
1007cat <<_ASUNAME
1008## --------- ##
1009## Platform. ##
1010## --------- ##
1011
1012hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1013uname -m = `(uname -m) 2>/dev/null || echo unknown`
1014uname -r = `(uname -r) 2>/dev/null || echo unknown`
1015uname -s = `(uname -s) 2>/dev/null || echo unknown`
1016uname -v = `(uname -v) 2>/dev/null || echo unknown`
1017
1018/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1019/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1020
1021/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1022/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1023/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1024hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1025/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1026/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1027/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1028
1029_ASUNAME
1030
1031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1032for as_dir in $PATH
1033do
1034 IFS=$as_save_IFS
1035 test -z "$as_dir" && as_dir=.
1036 echo "PATH: $as_dir"
1037done
1038
1039} >&5
1040
1041cat >&5 <<_ACEOF
1042
1043
1044## ----------- ##
1045## Core tests. ##
1046## ----------- ##
1047
1048_ACEOF
1049
1050
1051# Keep a trace of the command line.
1052# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001053# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001054# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001055# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001056ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001057ac_configure_args0=
1058ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001059ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001060ac_must_keep_next=false
1061for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001062do
Skip Montanaro6dead952003-09-25 14:50:04 +00001063 for ac_arg
1064 do
1065 case $ac_arg in
1066 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1067 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1068 | -silent | --silent | --silen | --sile | --sil)
1069 continue ;;
1070 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1071 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1072 esac
1073 case $ac_pass in
1074 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1075 2)
1076 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1077 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001078 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001079 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001080 case $ac_arg in
1081 *=* | --config-cache | -C | -disable-* | --disable-* \
1082 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1083 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1084 | -with-* | --with-* | -without-* | --without-* | --x)
1085 case "$ac_configure_args0 " in
1086 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1087 esac
1088 ;;
1089 -* ) ac_must_keep_next=true ;;
1090 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001091 fi
1092 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1093 # Get rid of the leading space.
1094 ac_sep=" "
1095 ;;
1096 esac
1097 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001098done
Skip Montanaro6dead952003-09-25 14:50:04 +00001099$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1100$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 +00001101
1102# When interrupted or exit'd, cleanup temporary files, and complete
1103# config.log. We remove comments because anyway the quotes in there
1104# would cause problems or look ugly.
1105# WARNING: Be sure not to use single quotes in there, as some shells,
1106# such as our DU 5.0 friend, will then `close' the trap.
1107trap 'exit_status=$?
1108 # Save into config.log some information that might help in debugging.
1109 {
1110 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001111
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 cat <<\_ASBOX
1113## ---------------- ##
1114## Cache variables. ##
1115## ---------------- ##
1116_ASBOX
1117 echo
1118 # The following way of writing the cache mishandles newlines in values,
1119{
1120 (set) 2>&1 |
1121 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1122 *ac_space=\ *)
1123 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001124 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1125 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 ;;
1127 *)
1128 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001129 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ;;
1131 esac;
1132}
1133 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001134
1135 cat <<\_ASBOX
1136## ----------------- ##
1137## Output variables. ##
1138## ----------------- ##
1139_ASBOX
1140 echo
1141 for ac_var in $ac_subst_vars
1142 do
1143 eval ac_val=$`echo $ac_var`
1144 echo "$ac_var='"'"'$ac_val'"'"'"
1145 done | sort
1146 echo
1147
1148 if test -n "$ac_subst_files"; then
1149 cat <<\_ASBOX
1150## ------------- ##
1151## Output files. ##
1152## ------------- ##
1153_ASBOX
1154 echo
1155 for ac_var in $ac_subst_files
1156 do
1157 eval ac_val=$`echo $ac_var`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001158 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001159 done | sort
1160 echo
1161 fi
1162
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 if test -s confdefs.h; then
1164 cat <<\_ASBOX
1165## ----------- ##
1166## confdefs.h. ##
1167## ----------- ##
1168_ASBOX
1169 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001170 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 echo
1172 fi
1173 test "$ac_signal" != 0 &&
1174 echo "$as_me: caught signal $ac_signal"
1175 echo "$as_me: exit $exit_status"
1176 } >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00001177 rm -f core *.core &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1179 exit $exit_status
1180 ' 0
1181for ac_signal in 1 2 13 15; do
1182 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1183done
1184ac_signal=0
1185
1186# confdefs.h avoids OS command line length limits that DEFS can exceed.
1187rm -rf conftest* confdefs.h
1188# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1189echo >confdefs.h
1190
1191# Predefined preprocessor variables.
1192
1193cat >>confdefs.h <<_ACEOF
1194#define PACKAGE_NAME "$PACKAGE_NAME"
1195_ACEOF
1196
1197
1198cat >>confdefs.h <<_ACEOF
1199#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1200_ACEOF
1201
1202
1203cat >>confdefs.h <<_ACEOF
1204#define PACKAGE_VERSION "$PACKAGE_VERSION"
1205_ACEOF
1206
1207
1208cat >>confdefs.h <<_ACEOF
1209#define PACKAGE_STRING "$PACKAGE_STRING"
1210_ACEOF
1211
1212
1213cat >>confdefs.h <<_ACEOF
1214#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1215_ACEOF
1216
1217
1218# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219# Prefer explicitly selected file to automatically selected ones.
1220if test -z "$CONFIG_SITE"; then
1221 if test "x$prefix" != xNONE; then
1222 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1223 else
1224 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1225 fi
1226fi
1227for ac_site_file in $CONFIG_SITE; do
1228 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1230echo "$as_me: loading site script $ac_site_file" >&6;}
1231 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232 . "$ac_site_file"
1233 fi
1234done
1235
1236if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 # Some versions of bash will fail to source /dev/null (special
1238 # files actually), so we avoid doing that.
1239 if test -f "$cache_file"; then
1240 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1241echo "$as_me: loading cache $cache_file" >&6;}
1242 case $cache_file in
1243 [\\/]* | ?:[\\/]* ) . $cache_file;;
1244 *) . ./$cache_file;;
1245 esac
1246 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001247else
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1249echo "$as_me: creating cache $cache_file" >&6;}
1250 >$cache_file
1251fi
1252
1253# Check that the precious variables saved in the cache have kept the same
1254# value.
1255ac_cache_corrupted=false
1256for ac_var in `(set) 2>&1 |
Skip Montanarof0d5f792004-08-15 14:08:23 +00001257 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1259 eval ac_new_set=\$ac_env_${ac_var}_set
1260 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1261 eval ac_new_val="\$ac_env_${ac_var}_value"
1262 case $ac_old_set,$ac_new_set in
1263 set,)
1264 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1265echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1266 ac_cache_corrupted=: ;;
1267 ,set)
1268 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1269echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1270 ac_cache_corrupted=: ;;
1271 ,);;
1272 *)
1273 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001274 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001275echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001276 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001277echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001278 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001279echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001280 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001281 fi;;
1282 esac
1283 # Pass precious variables to config.status.
1284 if test "$ac_new_set" = set; then
1285 case $ac_new_val in
1286 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1287 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1288 *) ac_arg=$ac_var=$ac_new_val ;;
1289 esac
1290 case " $ac_configure_args " in
1291 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1292 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1293 esac
1294 fi
1295done
1296if $ac_cache_corrupted; then
1297 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1298echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1299 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1300echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1301 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302fi
1303
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001306ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1307ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1308ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001309
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Michael W. Hudson54241132001-12-07 15:38:26 +00001311
1312
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
Martin v. Löwis88afe662002-10-26 13:47:44 +00001327
1328
1329
1330
1331
1332
1333
1334
1335
Skip Montanaro6dead952003-09-25 14:50:04 +00001336
1337 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001338
1339
Martin v. Löwis11437992002-04-12 09:54:03 +00001340
1341
1342
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001343
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001344
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001345# We don't use PACKAGE_ variables, and they cause conflicts
1346# with other autoconf-based packages that include Python.h
1347grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1348rm confdefs.h
1349mv confdefs.h.new confdefs.h
1350
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001351
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00001352VERSION=2.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001353
Martin v. Löwis1142de32002-03-29 16:28:31 +00001354
1355SOVERSION=1.0
1356
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001357# The later defininition of _XOPEN_SOURCE disables certain features
1358# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1359
1360cat >>confdefs.h <<\_ACEOF
1361#define _GNU_SOURCE 1
1362_ACEOF
1363
1364
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001365# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1366# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1367# them.
1368
1369cat >>confdefs.h <<\_ACEOF
1370#define _NETBSD_SOURCE 1
1371_ACEOF
1372
1373
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001374# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1375# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1376# them.
1377
1378cat >>confdefs.h <<\_ACEOF
1379#define __BSD_VISIBLE 1
1380_ACEOF
1381
1382
Martin v. Löwisd6320502004-08-12 13:45:08 +00001383# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1384# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1385
1386cat >>confdefs.h <<\_ACEOF
1387#define _BSD_TYPES 1
1388_ACEOF
1389
1390
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001391define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001392
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001393# Arguments passed to configure.
1394
1395CONFIG_ARGS="$ac_configure_args"
1396
Jack Jansene578a632001-08-15 01:27:14 +00001397# Check whether --enable-framework or --disable-framework was given.
1398if test "${enable_framework+set}" = set; then
1399 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
Jack Jansene578a632001-08-15 01:27:14 +00001401 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001402 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001403 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001404 esac
1405 case $enableval in
1406 no)
1407 PYTHONFRAMEWORK=
1408 PYTHONFRAMEWORKDIR=no-framework
1409 PYTHONFRAMEWORKPREFIX=
1410 PYTHONFRAMEWORKINSTALLDIR=
1411 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001412 ;;
1413 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001414 PYTHONFRAMEWORK=Python
1415 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001416 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001417 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1418 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001419 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001420
Guido van Rossum563e7081996-09-10 18:20:48 +00001421else
Martin v. Löwis11437992002-04-12 09:54:03 +00001422
Jack Jansene578a632001-08-15 01:27:14 +00001423 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001424 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001425 PYTHONFRAMEWORKPREFIX=
1426 PYTHONFRAMEWORKINSTALLDIR=
1427 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001428
Martin v. Löwis11437992002-04-12 09:54:03 +00001429fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001430
1431
1432
1433
Jack Jansene578a632001-08-15 01:27:14 +00001434
1435##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436## AC_HELP_STRING(--with-dyld,
1437## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001438##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001439# Set name for machine-dependent library files
1440
Martin v. Löwis11437992002-04-12 09:54:03 +00001441echo "$as_me:$LINENO: checking MACHDEP" >&5
1442echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001443if test -z "$MACHDEP"
1444then
Guido van Rossum563e7081996-09-10 18:20:48 +00001445 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001446 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1447 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001448 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001449 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001450 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001451 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001452 ac_md_system=`echo $ac_sys_system |
1453 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1454 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001455 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001456 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001457
Guido van Rossum07397971997-04-29 21:49:50 +00001458 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001459 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001460 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001461 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001462 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001463 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001464 esac
1465fi
Guido van Rossum91922671997-10-09 20:24:13 +00001466
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001467# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1468# disable features if it is defined, without any means to access these
1469# features as extensions. For these systems, we skip the definition of
1470# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1471# some feature, make sure there is no alternative way to access this
1472# feature. Also, when using wildcards, make sure you have verified the
1473# need for not defining _XOPEN_SOURCE on all systems matching the
1474# wildcard, and that the wildcard does not include future systems
1475# (which may remove their limitations).
1476case $ac_sys_system/$ac_sys_release in
1477 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1478 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001479 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis99968282004-09-15 06:02:54 +00001480 OpenBSD/2.* | OpenBSD/3.[0123456])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001481 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001482 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1483 # of union __?sigval. Reported by Stuart Bishop.
1484 SunOS/5.6)
1485 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001486 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1487 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001488 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001489 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001490 define_xopen_source=no;;
1491 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001492 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001493 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001494 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001495 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1496 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1497 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1498 # This should hopefully be fixed in FreeBSD 4.9
1499 FreeBSD/4.8* | Darwin/6* )
1500 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001501 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
1502 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
1503 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001504 AIX/4)
1505 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001506 AIX/5)
1507 if test `uname -r` -eq 1; then
1508 define_xopen_source=no
1509 fi
1510 ;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001511esac
1512
1513if test $define_xopen_source = yes
1514then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001515 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
1516 # defined precisely as g++ defines it
1517 case $ac_sys_system/$ac_sys_release in
1518 SunOS/5.8|SunOS/5.9)
1519
1520cat >>confdefs.h <<\_ACEOF
1521#define _XOPEN_SOURCE 500
1522_ACEOF
1523
1524 ;;
1525 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001526
1527cat >>confdefs.h <<\_ACEOF
1528#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001529_ACEOF
1530
Skip Montanarof0d5f792004-08-15 14:08:23 +00001531 ;;
1532 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001533
1534 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1535 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1536 # several APIs are not declared. Since this is also needed in some
1537 # cases for HP-UX, we define it globally.
1538
1539
1540cat >>confdefs.h <<\_ACEOF
1541#define _XOPEN_SOURCE_EXTENDED 1
1542_ACEOF
1543
1544
1545cat >>confdefs.h <<\_ACEOF
1546#define _POSIX_C_SOURCE 200112L
1547_ACEOF
1548
1549
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001550fi
1551
Guido van Rossum91922671997-10-09 20:24:13 +00001552#
1553# SGI compilers allow the specification of the both the ABI and the
1554# ISA on the command line. Depending on the values of these switches,
1555# different and often incompatable code will be generated.
1556#
1557# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1558# thus supply support for various ABI/ISA combinations. The MACHDEP
1559# variable is also adjusted.
1560#
1561
1562if test ! -z "$SGI_ABI"
1563then
1564 CC="cc $SGI_ABI"
1565 LDFLAGS="$SGI_ABI $LDFLAGS"
1566 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1567fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001568echo "$as_me:$LINENO: result: $MACHDEP" >&5
1569echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001570
Jack Jansen83f898c2002-12-30 22:23:40 +00001571# And add extra plat-mac for darwin
1572
Jack Jansen7b59b422003-03-17 15:44:10 +00001573
Jack Jansen83f898c2002-12-30 22:23:40 +00001574echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1575echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1576if test -z "$EXTRAPLATDIR"
1577then
1578 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001579 darwin)
1580 EXTRAPLATDIR="\$(PLATMACDIRS)"
1581 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1582 ;;
1583 *)
1584 EXTRAPLATDIR=""
1585 EXTRAMACHDEPPATH=""
1586 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001587 esac
1588fi
1589echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1590echo "${ECHO_T}$EXTRAPLATDIR" >&6
1591
Jack Jansen6b08a402004-06-03 12:41:45 +00001592# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1593# it may influence the way we can build extensions, so distutils
1594# needs to check it
1595
1596CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1597
Guido van Rossum627b2d71993-12-24 10:39:16 +00001598# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001599
1600# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1601# for debug/optimization stuff. BASECFLAGS is for flags that are required
1602# just to get things to compile and link. Users are free to override OPT
1603# when running configure or make. The build should not break if they do.
1604# BASECFLAGS should generally not be messed with, however.
1605
1606# XXX shouldn't some/most/all of this code be merged with the stuff later
1607# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001608echo "$as_me:$LINENO: checking for --without-gcc" >&5
1609echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1610
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001611# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001612if test "${with_gcc+set}" = set; then
1613 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001614
Guido van Rossum7f43da71994-08-01 12:15:30 +00001615 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001616 no) CC=cc
1617 without_gcc=yes;;
1618 yes) CC=gcc
1619 without_gcc=no;;
1620 *) CC=$withval
1621 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001622 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001623else
Martin v. Löwis11437992002-04-12 09:54:03 +00001624
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001625 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001626 AIX*) CC=cc_r
1627 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001628 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001629 case $BE_HOST_CPU in
1630 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001631 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001632 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001633 BASECFLAGS="$BASECFLAGS -export pragma"
1634 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001635 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001636 ;;
1637 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001638 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001639 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001640 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001641 ;;
1642 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1644echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1645 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001646 ;;
1647 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001648 AR="\$(srcdir)/Modules/ar_beos"
1649 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001650 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001651 Monterey*)
1652 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001653 without_gcc=;;
1654 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001655 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001656fi;
1657echo "$as_me:$LINENO: result: $without_gcc" >&5
1658echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001659
1660
Guido van Rossum95012191999-12-16 17:50:52 +00001661
Fred Drakea1a84e72001-03-06 05:52:16 +00001662MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001663echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1664echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1665
Guido van Rossum95012191999-12-16 17:50:52 +00001666# Check whether --with-cxx or --without-cxx was given.
1667if test "${with_cxx+set}" = set; then
1668 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001669
Martin v. Löwis22352952000-12-13 17:37:02 +00001670 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001671 case $withval in
1672 no) CXX=
1673 with_cxx=no;;
1674 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001675 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001676 with_cxx=$withval;;
1677 esac
1678else
Martin v. Löwis11437992002-04-12 09:54:03 +00001679
Guido van Rossum95012191999-12-16 17:50:52 +00001680 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001681 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001682
Martin v. Löwis11437992002-04-12 09:54:03 +00001683fi;
1684echo "$as_me:$LINENO: result: $with_cxx" >&5
1685echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001686
1687if test "$with_cxx" = "yes"
1688then
Martin v. Löwis11437992002-04-12 09:54:03 +00001689 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1690echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1691 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001692fi
1693
1694
1695
1696
Martin v. Löwis11437992002-04-12 09:54:03 +00001697if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001698then
1699 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1700do
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 # 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 +00001702set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001703echo "$as_me:$LINENO: checking for $ac_word" >&5
1704echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1705if test "${ac_cv_prog_CXX+set}" = set; then
1706 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001707else
1708 if test -n "$CXX"; then
1709 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1710else
Martin v. Löwis11437992002-04-12 09:54:03 +00001711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1712for as_dir in $PATH
1713do
1714 IFS=$as_save_IFS
1715 test -z "$as_dir" && as_dir=.
1716 for ac_exec_ext in '' $ac_executable_extensions; do
1717 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1718 ac_cv_prog_CXX="$ac_prog"
1719 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1720 break 2
1721 fi
1722done
1723done
1724
Martin v. Löwis22352952000-12-13 17:37:02 +00001725fi
1726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001727CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001728if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001729 echo "$as_me:$LINENO: result: $CXX" >&5
1730echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001731else
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 echo "$as_me:$LINENO: result: no" >&5
1733echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001734fi
1735
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001737done
1738test -n "$CXX" || CXX="notfound"
1739
1740 if test "$CXX" = "notfound"
1741 then
1742 CXX=
1743 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001745ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001746ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1747ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1748ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00001750/* confdefs.h. */
1751_ACEOF
1752cat confdefs.h >>conftest.$ac_ext
1753cat >>conftest.$ac_ext <<_ACEOF
1754/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001755
Martin v. Löwis11437992002-04-12 09:54:03 +00001756int
1757main ()
1758{
Michael W. Hudson54241132001-12-07 15:38:26 +00001759
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 ;
1761 return 0;
1762}
1763_ACEOF
1764ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001765ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001766# Try to create an executable without -o first, disregard a.out.
1767# It will help us diagnose broken compilers, and finding out an intuition
1768# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00001769echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
1770echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001771ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1772if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1773 (eval $ac_link_default) 2>&5
1774 ac_status=$?
1775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1776 (exit $ac_status); }; then
1777 # Find the output, starting from the most likely. This scheme is
1778# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1779# resort.
1780
1781# Be careful to initialize this variable, since it used to be cached.
1782# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1783ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001784# b.out is created by i960 compilers.
1785for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1786do
1787 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001788 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001789 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001790 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001791 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001792 # This is the source file.
1793 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001794 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001795 # We found the default executable, but exeext='' is most
1796 # certainly right.
1797 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001798 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001799 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1800 # FIXME: I believe we export ac_cv_exeext for Libtool,
1801 # but it would be cool to find out if it's true. Does anybody
1802 # maintain Libtool? --akim.
1803 export ac_cv_exeext
1804 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001805 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001806 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001807 esac
1808done
1809else
1810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001811sed 's/^/| /' conftest.$ac_ext >&5
1812
1813{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1814See \`config.log' for more details." >&5
1815echo "$as_me: error: C++ compiler cannot create executables
1816See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001818fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001819
1820ac_exeext=$ac_cv_exeext
1821echo "$as_me:$LINENO: result: $ac_file" >&5
1822echo "${ECHO_T}$ac_file" >&6
1823
1824# Check the compiler produces executables we can run. If not, either
1825# the compiler is broken, or we cross compile.
1826echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1827echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1828# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1829# If not cross compiling, check that we can run a simple program.
1830if test "$cross_compiling" != yes; then
1831 if { ac_try='./$ac_file'
1832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1833 (eval $ac_try) 2>&5
1834 ac_status=$?
1835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1836 (exit $ac_status); }; }; then
1837 cross_compiling=no
1838 else
1839 if test "$cross_compiling" = maybe; then
1840 cross_compiling=yes
1841 else
1842 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001843If you meant to cross compile, use \`--host'.
1844See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001845echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001846If you meant to cross compile, use \`--host'.
1847See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001848 { (exit 1); exit 1; }; }
1849 fi
1850 fi
1851fi
1852echo "$as_me:$LINENO: result: yes" >&5
1853echo "${ECHO_T}yes" >&6
1854
Skip Montanaro6dead952003-09-25 14:50:04 +00001855rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001856ac_clean_files=$ac_clean_files_save
1857# Check the compiler produces executables we can run. If not, either
1858# the compiler is broken, or we cross compile.
1859echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1860echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1861echo "$as_me:$LINENO: result: $cross_compiling" >&5
1862echo "${ECHO_T}$cross_compiling" >&6
1863
1864echo "$as_me:$LINENO: checking for suffix of executables" >&5
1865echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1867 (eval $ac_link) 2>&5
1868 ac_status=$?
1869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1870 (exit $ac_status); }; then
1871 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1872# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1873# work properly (i.e., refer to `conftest.exe'), while it won't with
1874# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001875for ac_file in conftest.exe conftest conftest.*; do
1876 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001877 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001878 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001879 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001880 export ac_cv_exeext
1881 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001882 * ) break;;
1883 esac
1884done
1885else
Skip Montanaro6dead952003-09-25 14:50:04 +00001886 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1887See \`config.log' for more details." >&5
1888echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1889See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001890 { (exit 1); exit 1; }; }
1891fi
1892
1893rm -f conftest$ac_cv_exeext
1894echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1895echo "${ECHO_T}$ac_cv_exeext" >&6
1896
1897rm -f conftest.$ac_ext
1898EXEEXT=$ac_cv_exeext
1899ac_exeext=$EXEEXT
1900
1901 ac_ext=c
1902ac_cpp='$CPP $CPPFLAGS'
1903ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1904ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1905ac_compiler_gnu=$ac_cv_c_compiler_gnu
1906
1907
Martin v. Löwis22352952000-12-13 17:37:02 +00001908
1909 fi
1910fi
1911
Guido van Rossum8b131c51995-03-09 14:10:13 +00001912# If the user switches compilers, we can't believe the cache
1913if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1914then
Martin v. Löwis11437992002-04-12 09:54:03 +00001915 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1916(it is also a good idea to do 'make clean' before compiling)" >&5
1917echo "$as_me: error: cached CC is different -- throw away $cache_file
1918(it is also a good idea to do 'make clean' before compiling)" >&2;}
1919 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001920fi
1921
Martin v. Löwis11437992002-04-12 09:54:03 +00001922ac_ext=c
1923ac_cpp='$CPP $CPPFLAGS'
1924ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1925ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1926ac_compiler_gnu=$ac_cv_c_compiler_gnu
1927if test -n "$ac_tool_prefix"; then
1928 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1929set dummy ${ac_tool_prefix}gcc; ac_word=$2
1930echo "$as_me:$LINENO: checking for $ac_word" >&5
1931echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1932if test "${ac_cv_prog_CC+set}" = set; then
1933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001934else
1935 if test -n "$CC"; then
1936 ac_cv_prog_CC="$CC" # Let the user override the test.
1937else
Martin v. Löwis11437992002-04-12 09:54:03 +00001938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1939for as_dir in $PATH
1940do
1941 IFS=$as_save_IFS
1942 test -z "$as_dir" && as_dir=.
1943 for ac_exec_ext in '' $ac_executable_extensions; do
1944 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1945 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1946 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1947 break 2
1948 fi
1949done
1950done
1951
Jack Jansendd19cf82001-12-06 22:36:17 +00001952fi
1953fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001954CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001955if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001956 echo "$as_me:$LINENO: result: $CC" >&5
1957echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001958else
Martin v. Löwis11437992002-04-12 09:54:03 +00001959 echo "$as_me:$LINENO: result: no" >&5
1960echo "${ECHO_T}no" >&6
1961fi
1962
1963fi
1964if test -z "$ac_cv_prog_CC"; then
1965 ac_ct_CC=$CC
1966 # Extract the first word of "gcc", so it can be a program name with args.
1967set dummy gcc; ac_word=$2
1968echo "$as_me:$LINENO: checking for $ac_word" >&5
1969echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1970if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1971 echo $ECHO_N "(cached) $ECHO_C" >&6
1972else
1973 if test -n "$ac_ct_CC"; then
1974 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1975else
1976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1977for as_dir in $PATH
1978do
1979 IFS=$as_save_IFS
1980 test -z "$as_dir" && as_dir=.
1981 for ac_exec_ext in '' $ac_executable_extensions; do
1982 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1983 ac_cv_prog_ac_ct_CC="gcc"
1984 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1985 break 2
1986 fi
1987done
1988done
1989
1990fi
1991fi
1992ac_ct_CC=$ac_cv_prog_ac_ct_CC
1993if test -n "$ac_ct_CC"; then
1994 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1995echo "${ECHO_T}$ac_ct_CC" >&6
1996else
1997 echo "$as_me:$LINENO: result: no" >&5
1998echo "${ECHO_T}no" >&6
1999fi
2000
2001 CC=$ac_ct_CC
2002else
2003 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002004fi
2005
Jack Jansendd19cf82001-12-06 22:36:17 +00002006if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002007 if test -n "$ac_tool_prefix"; then
2008 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2009set dummy ${ac_tool_prefix}cc; ac_word=$2
2010echo "$as_me:$LINENO: checking for $ac_word" >&5
2011echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2012if test "${ac_cv_prog_CC+set}" = set; then
2013 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002014else
2015 if test -n "$CC"; then
2016 ac_cv_prog_CC="$CC" # Let the user override the test.
2017else
Martin v. Löwis11437992002-04-12 09:54:03 +00002018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2019for as_dir in $PATH
2020do
2021 IFS=$as_save_IFS
2022 test -z "$as_dir" && as_dir=.
2023 for ac_exec_ext in '' $ac_executable_extensions; do
2024 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2025 ac_cv_prog_CC="${ac_tool_prefix}cc"
2026 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2027 break 2
2028 fi
2029done
2030done
2031
2032fi
2033fi
2034CC=$ac_cv_prog_CC
2035if test -n "$CC"; then
2036 echo "$as_me:$LINENO: result: $CC" >&5
2037echo "${ECHO_T}$CC" >&6
2038else
2039 echo "$as_me:$LINENO: result: no" >&5
2040echo "${ECHO_T}no" >&6
2041fi
2042
2043fi
2044if test -z "$ac_cv_prog_CC"; then
2045 ac_ct_CC=$CC
2046 # Extract the first word of "cc", so it can be a program name with args.
2047set dummy cc; ac_word=$2
2048echo "$as_me:$LINENO: checking for $ac_word" >&5
2049echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2050if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2051 echo $ECHO_N "(cached) $ECHO_C" >&6
2052else
2053 if test -n "$ac_ct_CC"; then
2054 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2055else
2056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2057for as_dir in $PATH
2058do
2059 IFS=$as_save_IFS
2060 test -z "$as_dir" && as_dir=.
2061 for ac_exec_ext in '' $ac_executable_extensions; do
2062 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2063 ac_cv_prog_ac_ct_CC="cc"
2064 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2065 break 2
2066 fi
2067done
2068done
2069
2070fi
2071fi
2072ac_ct_CC=$ac_cv_prog_ac_ct_CC
2073if test -n "$ac_ct_CC"; then
2074 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2075echo "${ECHO_T}$ac_ct_CC" >&6
2076else
2077 echo "$as_me:$LINENO: result: no" >&5
2078echo "${ECHO_T}no" >&6
2079fi
2080
2081 CC=$ac_ct_CC
2082else
2083 CC="$ac_cv_prog_CC"
2084fi
2085
2086fi
2087if test -z "$CC"; then
2088 # Extract the first word of "cc", so it can be a program name with args.
2089set dummy cc; ac_word=$2
2090echo "$as_me:$LINENO: checking for $ac_word" >&5
2091echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2092if test "${ac_cv_prog_CC+set}" = set; then
2093 echo $ECHO_N "(cached) $ECHO_C" >&6
2094else
2095 if test -n "$CC"; then
2096 ac_cv_prog_CC="$CC" # Let the user override the test.
2097else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002098 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2100for as_dir in $PATH
2101do
2102 IFS=$as_save_IFS
2103 test -z "$as_dir" && as_dir=.
2104 for ac_exec_ext in '' $ac_executable_extensions; do
2105 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2106 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2107 ac_prog_rejected=yes
2108 continue
2109 fi
2110 ac_cv_prog_CC="cc"
2111 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2112 break 2
2113 fi
2114done
2115done
2116
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002117if test $ac_prog_rejected = yes; then
2118 # We found a bogon in the path, so make sure we never use it.
2119 set dummy $ac_cv_prog_CC
2120 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002121 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002122 # We chose a different compiler from the bogus one.
2123 # However, it has the same basename, so the bogon will be chosen
2124 # first if we set CC to just the basename; use the full file name.
2125 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002126 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002127 fi
2128fi
2129fi
2130fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002131CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002132if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002133 echo "$as_me:$LINENO: result: $CC" >&5
2134echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002135else
Martin v. Löwis11437992002-04-12 09:54:03 +00002136 echo "$as_me:$LINENO: result: no" >&5
2137echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002138fi
2139
Martin v. Löwis11437992002-04-12 09:54:03 +00002140fi
2141if test -z "$CC"; then
2142 if test -n "$ac_tool_prefix"; then
2143 for ac_prog in cl
2144 do
2145 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2146set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2147echo "$as_me:$LINENO: checking for $ac_word" >&5
2148echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2149if test "${ac_cv_prog_CC+set}" = set; then
2150 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002151else
2152 if test -n "$CC"; then
2153 ac_cv_prog_CC="$CC" # Let the user override the test.
2154else
Martin v. Löwis11437992002-04-12 09:54:03 +00002155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2156for as_dir in $PATH
2157do
2158 IFS=$as_save_IFS
2159 test -z "$as_dir" && as_dir=.
2160 for ac_exec_ext in '' $ac_executable_extensions; do
2161 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2162 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2163 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2164 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002165 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002166done
2167done
2168
2169fi
2170fi
2171CC=$ac_cv_prog_CC
2172if test -n "$CC"; then
2173 echo "$as_me:$LINENO: result: $CC" >&5
2174echo "${ECHO_T}$CC" >&6
2175else
2176 echo "$as_me:$LINENO: result: no" >&5
2177echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002178fi
2179
Martin v. Löwis11437992002-04-12 09:54:03 +00002180 test -n "$CC" && break
2181 done
2182fi
2183if test -z "$CC"; then
2184 ac_ct_CC=$CC
2185 for ac_prog in cl
2186do
2187 # Extract the first word of "$ac_prog", so it can be a program name with args.
2188set dummy $ac_prog; ac_word=$2
2189echo "$as_me:$LINENO: checking for $ac_word" >&5
2190echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2191if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2192 echo $ECHO_N "(cached) $ECHO_C" >&6
2193else
2194 if test -n "$ac_ct_CC"; then
2195 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2196else
2197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2198for as_dir in $PATH
2199do
2200 IFS=$as_save_IFS
2201 test -z "$as_dir" && as_dir=.
2202 for ac_exec_ext in '' $ac_executable_extensions; do
2203 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2204 ac_cv_prog_ac_ct_CC="$ac_prog"
2205 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2206 break 2
2207 fi
2208done
2209done
Jack Jansendd19cf82001-12-06 22:36:17 +00002210
Martin v. Löwis11437992002-04-12 09:54:03 +00002211fi
2212fi
2213ac_ct_CC=$ac_cv_prog_ac_ct_CC
2214if test -n "$ac_ct_CC"; then
2215 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2216echo "${ECHO_T}$ac_ct_CC" >&6
2217else
2218 echo "$as_me:$LINENO: result: no" >&5
2219echo "${ECHO_T}no" >&6
2220fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002221
Martin v. Löwis11437992002-04-12 09:54:03 +00002222 test -n "$ac_ct_CC" && break
2223done
Michael W. Hudson54241132001-12-07 15:38:26 +00002224
Martin v. Löwis11437992002-04-12 09:54:03 +00002225 CC=$ac_ct_CC
2226fi
2227
2228fi
2229
2230
Skip Montanaro6dead952003-09-25 14:50:04 +00002231test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2232See \`config.log' for more details." >&5
2233echo "$as_me: error: no acceptable C compiler found in \$PATH
2234See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002235 { (exit 1); exit 1; }; }
2236
2237# Provide some information about the compiler.
2238echo "$as_me:$LINENO:" \
2239 "checking for C compiler version" >&5
2240ac_compiler=`set X $ac_compile; echo $2`
2241{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2242 (eval $ac_compiler --version </dev/null >&5) 2>&5
2243 ac_status=$?
2244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2245 (exit $ac_status); }
2246{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2247 (eval $ac_compiler -v </dev/null >&5) 2>&5
2248 ac_status=$?
2249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2250 (exit $ac_status); }
2251{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2252 (eval $ac_compiler -V </dev/null >&5) 2>&5
2253 ac_status=$?
2254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2255 (exit $ac_status); }
2256
2257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002258/* confdefs.h. */
2259_ACEOF
2260cat confdefs.h >>conftest.$ac_ext
2261cat >>conftest.$ac_ext <<_ACEOF
2262/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002263
Martin v. Löwis11437992002-04-12 09:54:03 +00002264int
2265main ()
2266{
2267
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002273ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002274# Try to create an executable without -o first, disregard a.out.
2275# It will help us diagnose broken compilers, and finding out an intuition
2276# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002277echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2278echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002279ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2280if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2281 (eval $ac_link_default) 2>&5
2282 ac_status=$?
2283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2284 (exit $ac_status); }; then
2285 # Find the output, starting from the most likely. This scheme is
2286# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2287# resort.
2288
2289# Be careful to initialize this variable, since it used to be cached.
2290# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2291ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002292# b.out is created by i960 compilers.
2293for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2294do
2295 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002296 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002297 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002298 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002299 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002300 # This is the source file.
2301 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002302 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002303 # We found the default executable, but exeext='' is most
2304 # certainly right.
2305 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002306 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002307 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2308 # FIXME: I believe we export ac_cv_exeext for Libtool,
2309 # but it would be cool to find out if it's true. Does anybody
2310 # maintain Libtool? --akim.
2311 export ac_cv_exeext
2312 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002313 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002314 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002315 esac
2316done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002317else
Martin v. Löwis11437992002-04-12 09:54:03 +00002318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002319sed 's/^/| /' conftest.$ac_ext >&5
2320
2321{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2322See \`config.log' for more details." >&5
2323echo "$as_me: error: C compiler cannot create executables
2324See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002325 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002326fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002327
Martin v. Löwis11437992002-04-12 09:54:03 +00002328ac_exeext=$ac_cv_exeext
2329echo "$as_me:$LINENO: result: $ac_file" >&5
2330echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002331
Martin v. Löwis11437992002-04-12 09:54:03 +00002332# Check the compiler produces executables we can run. If not, either
2333# the compiler is broken, or we cross compile.
2334echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2335echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2336# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2337# If not cross compiling, check that we can run a simple program.
2338if test "$cross_compiling" != yes; then
2339 if { ac_try='./$ac_file'
2340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2341 (eval $ac_try) 2>&5
2342 ac_status=$?
2343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2344 (exit $ac_status); }; }; then
2345 cross_compiling=no
2346 else
2347 if test "$cross_compiling" = maybe; then
2348 cross_compiling=yes
2349 else
2350 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002351If you meant to cross compile, use \`--host'.
2352See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002353echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002354If you meant to cross compile, use \`--host'.
2355See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002356 { (exit 1); exit 1; }; }
2357 fi
2358 fi
2359fi
2360echo "$as_me:$LINENO: result: yes" >&5
2361echo "${ECHO_T}yes" >&6
2362
Skip Montanaro6dead952003-09-25 14:50:04 +00002363rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002364ac_clean_files=$ac_clean_files_save
2365# Check the compiler produces executables we can run. If not, either
2366# the compiler is broken, or we cross compile.
2367echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2368echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2369echo "$as_me:$LINENO: result: $cross_compiling" >&5
2370echo "${ECHO_T}$cross_compiling" >&6
2371
2372echo "$as_me:$LINENO: checking for suffix of executables" >&5
2373echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2374if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2375 (eval $ac_link) 2>&5
2376 ac_status=$?
2377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2378 (exit $ac_status); }; then
2379 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2380# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2381# work properly (i.e., refer to `conftest.exe'), while it won't with
2382# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002383for ac_file in conftest.exe conftest conftest.*; do
2384 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002385 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002386 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002387 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002388 export ac_cv_exeext
2389 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002390 * ) break;;
2391 esac
2392done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002393else
Skip Montanaro6dead952003-09-25 14:50:04 +00002394 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2395See \`config.log' for more details." >&5
2396echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2397See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002398 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002399fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002400
Martin v. Löwis11437992002-04-12 09:54:03 +00002401rm -f conftest$ac_cv_exeext
2402echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2403echo "${ECHO_T}$ac_cv_exeext" >&6
2404
2405rm -f conftest.$ac_ext
2406EXEEXT=$ac_cv_exeext
2407ac_exeext=$EXEEXT
2408echo "$as_me:$LINENO: checking for suffix of object files" >&5
2409echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2410if test "${ac_cv_objext+set}" = set; then
2411 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002412else
Martin v. Löwis11437992002-04-12 09:54:03 +00002413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002414/* confdefs.h. */
2415_ACEOF
2416cat confdefs.h >>conftest.$ac_ext
2417cat >>conftest.$ac_ext <<_ACEOF
2418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002419
Martin v. Löwis11437992002-04-12 09:54:03 +00002420int
2421main ()
2422{
2423
2424 ;
2425 return 0;
2426}
2427_ACEOF
2428rm -f conftest.o conftest.obj
2429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2430 (eval $ac_compile) 2>&5
2431 ac_status=$?
2432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2433 (exit $ac_status); }; then
2434 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2435 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2438 break;;
2439 esac
2440done
2441else
2442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002443sed 's/^/| /' conftest.$ac_ext >&5
2444
2445{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2446See \`config.log' for more details." >&5
2447echo "$as_me: error: cannot compute suffix of object files: cannot compile
2448See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 { (exit 1); exit 1; }; }
2450fi
2451
2452rm -f conftest.$ac_cv_objext conftest.$ac_ext
2453fi
2454echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2455echo "${ECHO_T}$ac_cv_objext" >&6
2456OBJEXT=$ac_cv_objext
2457ac_objext=$OBJEXT
2458echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2459echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2460if test "${ac_cv_c_compiler_gnu+set}" = set; then
2461 echo $ECHO_N "(cached) $ECHO_C" >&6
2462else
2463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002464/* confdefs.h. */
2465_ACEOF
2466cat confdefs.h >>conftest.$ac_ext
2467cat >>conftest.$ac_ext <<_ACEOF
2468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002469
Martin v. Löwis11437992002-04-12 09:54:03 +00002470int
2471main ()
2472{
2473#ifndef __GNUC__
2474 choke me
2475#endif
2476
2477 ;
2478 return 0;
2479}
2480_ACEOF
2481rm -f conftest.$ac_objext
2482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002483 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002485 grep -v '^ *+' conftest.er1 >conftest.err
2486 rm -f conftest.er1
2487 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00002490 { ac_try='test -z "$ac_c_werror_flag"
2491 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2493 (eval $ac_try) 2>&5
2494 ac_status=$?
2495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2496 (exit $ac_status); }; } &&
2497 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2499 (eval $ac_try) 2>&5
2500 ac_status=$?
2501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2502 (exit $ac_status); }; }; then
2503 ac_compiler_gnu=yes
2504else
2505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002506sed 's/^/| /' conftest.$ac_ext >&5
2507
Martin v. Löwis11437992002-04-12 09:54:03 +00002508ac_compiler_gnu=no
2509fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002510rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002511ac_cv_c_compiler_gnu=$ac_compiler_gnu
2512
2513fi
2514echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2515echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2516GCC=`test $ac_compiler_gnu = yes && echo yes`
2517ac_test_CFLAGS=${CFLAGS+set}
2518ac_save_CFLAGS=$CFLAGS
2519CFLAGS="-g"
2520echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2521echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2522if test "${ac_cv_prog_cc_g+set}" = set; then
2523 echo $ECHO_N "(cached) $ECHO_C" >&6
2524else
2525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002526/* confdefs.h. */
2527_ACEOF
2528cat confdefs.h >>conftest.$ac_ext
2529cat >>conftest.$ac_ext <<_ACEOF
2530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002531
Martin v. Löwis11437992002-04-12 09:54:03 +00002532int
2533main ()
2534{
2535
2536 ;
2537 return 0;
2538}
2539_ACEOF
2540rm -f conftest.$ac_objext
2541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002542 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002544 grep -v '^ *+' conftest.er1 >conftest.err
2545 rm -f conftest.er1
2546 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2548 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00002549 { ac_try='test -z "$ac_c_werror_flag"
2550 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2552 (eval $ac_try) 2>&5
2553 ac_status=$?
2554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2555 (exit $ac_status); }; } &&
2556 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2558 (eval $ac_try) 2>&5
2559 ac_status=$?
2560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2561 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002562 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002563else
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002565sed 's/^/| /' conftest.$ac_ext >&5
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002568fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002569rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002570fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002571echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2572echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002573if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002575elif test $ac_cv_prog_cc_g = yes; then
2576 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002577 CFLAGS="-g -O2"
2578 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002579 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580 fi
2581else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002582 if test "$GCC" = yes; then
2583 CFLAGS="-O2"
2584 else
2585 CFLAGS=
2586 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002587fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002588echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2589echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2590if test "${ac_cv_prog_cc_stdc+set}" = set; then
2591 echo $ECHO_N "(cached) $ECHO_C" >&6
2592else
2593 ac_cv_prog_cc_stdc=no
2594ac_save_CC=$CC
2595cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002596/* confdefs.h. */
2597_ACEOF
2598cat confdefs.h >>conftest.$ac_ext
2599cat >>conftest.$ac_ext <<_ACEOF
2600/* end confdefs.h. */
2601#include <stdarg.h>
2602#include <stdio.h>
2603#include <sys/types.h>
2604#include <sys/stat.h>
2605/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2606struct buf { int x; };
2607FILE * (*rcsopen) (struct buf *, struct stat *, int);
2608static char *e (p, i)
2609 char **p;
2610 int i;
2611{
2612 return p[i];
2613}
2614static char *f (char * (*g) (char **, int), char **p, ...)
2615{
2616 char *s;
2617 va_list v;
2618 va_start (v,p);
2619 s = g (p, va_arg (v,int));
2620 va_end (v);
2621 return s;
2622}
Skip Montanarof0d5f792004-08-15 14:08:23 +00002623
2624/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2625 function prototypes and stuff, but not '\xHH' hex character constants.
2626 These don't provoke an error unfortunately, instead are silently treated
2627 as 'x'. The following induces an error, until -std1 is added to get
2628 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2629 array size at least. It's necessary to write '\x00'==0 to get something
2630 that's true only with -std1. */
2631int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2632
Skip Montanaro6dead952003-09-25 14:50:04 +00002633int test (int i, double x);
2634struct s1 {int (*f) (int a);};
2635struct s2 {int (*f) (double a);};
2636int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2637int argc;
2638char **argv;
2639int
2640main ()
2641{
2642return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2643 ;
2644 return 0;
2645}
2646_ACEOF
2647# Don't try gcc -ansi; that turns off useful extensions and
2648# breaks some systems' header files.
2649# AIX -qlanglvl=ansi
2650# Ultrix and OSF/1 -std1
2651# HP-UX 10.20 and later -Ae
2652# HP-UX older versions -Aa -D_HPUX_SOURCE
2653# SVR4 -Xc -D__EXTENSIONS__
2654for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2655do
2656 CC="$ac_save_CC $ac_arg"
2657 rm -f conftest.$ac_objext
2658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002659 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00002660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002661 grep -v '^ *+' conftest.er1 >conftest.err
2662 rm -f conftest.er1
2663 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2665 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00002666 { ac_try='test -z "$ac_c_werror_flag"
2667 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2669 (eval $ac_try) 2>&5
2670 ac_status=$?
2671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2672 (exit $ac_status); }; } &&
2673 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00002674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2675 (eval $ac_try) 2>&5
2676 ac_status=$?
2677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2678 (exit $ac_status); }; }; then
2679 ac_cv_prog_cc_stdc=$ac_arg
2680break
2681else
2682 echo "$as_me: failed program was:" >&5
2683sed 's/^/| /' conftest.$ac_ext >&5
2684
2685fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002686rm -f conftest.err conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002687done
2688rm -f conftest.$ac_ext conftest.$ac_objext
2689CC=$ac_save_CC
2690
2691fi
2692
2693case "x$ac_cv_prog_cc_stdc" in
2694 x|xno)
2695 echo "$as_me:$LINENO: result: none needed" >&5
2696echo "${ECHO_T}none needed" >&6 ;;
2697 *)
2698 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2699echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2700 CC="$CC $ac_cv_prog_cc_stdc" ;;
2701esac
2702
Martin v. Löwis11437992002-04-12 09:54:03 +00002703# Some people use a C++ compiler to compile C. Since we use `exit',
2704# in C++ we need to declare it. In case someone uses the same compiler
2705# for both compiling C and C++ we need to have the C++ compiler decide
2706# the declaration of exit, since it's the most demanding environment.
2707cat >conftest.$ac_ext <<_ACEOF
2708#ifndef __cplusplus
2709 choke me
2710#endif
2711_ACEOF
2712rm -f conftest.$ac_objext
2713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002714 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002716 grep -v '^ *+' conftest.er1 >conftest.err
2717 rm -f conftest.er1
2718 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2720 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00002721 { ac_try='test -z "$ac_c_werror_flag"
2722 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2724 (eval $ac_try) 2>&5
2725 ac_status=$?
2726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2727 (exit $ac_status); }; } &&
2728 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2730 (eval $ac_try) 2>&5
2731 ac_status=$?
2732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2733 (exit $ac_status); }; }; then
2734 for ac_declaration in \
Skip Montanarof0d5f792004-08-15 14:08:23 +00002735 '' \
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 'extern "C" void std::exit (int) throw (); using std::exit;' \
2737 'extern "C" void std::exit (int); using std::exit;' \
2738 'extern "C" void exit (int) throw ();' \
2739 'extern "C" void exit (int);' \
2740 'void exit (int);'
2741do
2742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002743/* confdefs.h. */
2744_ACEOF
2745cat confdefs.h >>conftest.$ac_ext
2746cat >>conftest.$ac_ext <<_ACEOF
2747/* end confdefs.h. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002748$ac_declaration
Skip Montanarof0d5f792004-08-15 14:08:23 +00002749#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002750int
2751main ()
2752{
2753exit (42);
2754 ;
2755 return 0;
2756}
2757_ACEOF
2758rm -f conftest.$ac_objext
2759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002760 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002762 grep -v '^ *+' conftest.er1 >conftest.err
2763 rm -f conftest.er1
2764 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2766 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00002767 { ac_try='test -z "$ac_c_werror_flag"
2768 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2770 (eval $ac_try) 2>&5
2771 ac_status=$?
2772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2773 (exit $ac_status); }; } &&
2774 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2776 (eval $ac_try) 2>&5
2777 ac_status=$?
2778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2779 (exit $ac_status); }; }; then
2780 :
2781else
2782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002783sed 's/^/| /' conftest.$ac_ext >&5
2784
Martin v. Löwis11437992002-04-12 09:54:03 +00002785continue
2786fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002787rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002789/* confdefs.h. */
2790_ACEOF
2791cat confdefs.h >>conftest.$ac_ext
2792cat >>conftest.$ac_ext <<_ACEOF
2793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002794$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002795int
2796main ()
2797{
2798exit (42);
2799 ;
2800 return 0;
2801}
2802_ACEOF
2803rm -f conftest.$ac_objext
2804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002805 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002807 grep -v '^ *+' conftest.er1 >conftest.err
2808 rm -f conftest.er1
2809 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2811 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00002812 { ac_try='test -z "$ac_c_werror_flag"
2813 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2815 (eval $ac_try) 2>&5
2816 ac_status=$?
2817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2818 (exit $ac_status); }; } &&
2819 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2821 (eval $ac_try) 2>&5
2822 ac_status=$?
2823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2824 (exit $ac_status); }; }; then
2825 break
2826else
2827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002828sed 's/^/| /' conftest.$ac_ext >&5
2829
Martin v. Löwis11437992002-04-12 09:54:03 +00002830fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002831rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002832done
2833rm -f conftest*
2834if test -n "$ac_declaration"; then
2835 echo '#ifdef __cplusplus' >>confdefs.h
2836 echo $ac_declaration >>confdefs.h
2837 echo '#endif' >>confdefs.h
2838fi
2839
2840else
2841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002842sed 's/^/| /' conftest.$ac_ext >&5
2843
Martin v. Löwis11437992002-04-12 09:54:03 +00002844fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002846ac_ext=c
2847ac_cpp='$CPP $CPPFLAGS'
2848ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2849ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2850ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002851
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002852
2853# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002854
2855ac_ext=c
2856ac_cpp='$CPP $CPPFLAGS'
2857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2859ac_compiler_gnu=$ac_cv_c_compiler_gnu
2860echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2861echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002862# On Suns, sometimes $CPP names a directory.
2863if test -n "$CPP" && test -d "$CPP"; then
2864 CPP=
2865fi
2866if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 if test "${ac_cv_prog_CPP+set}" = set; then
2868 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002869else
Martin v. Löwis11437992002-04-12 09:54:03 +00002870 # Double quotes because CPP needs to be expanded
2871 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2872 do
2873 ac_preproc_ok=false
2874for ac_c_preproc_warn_flag in '' yes
2875do
2876 # Use a header file that comes with gcc, so configuring glibc
2877 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002878 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2879 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002880 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002881 # not just through cpp. "Syntax error" is here to catch this case.
2882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002883/* confdefs.h. */
2884_ACEOF
2885cat confdefs.h >>conftest.$ac_ext
2886cat >>conftest.$ac_ext <<_ACEOF
2887/* end confdefs.h. */
2888#ifdef __STDC__
2889# include <limits.h>
2890#else
2891# include <assert.h>
2892#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00002893 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002894_ACEOF
2895if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2896 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2897 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002898 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 rm -f conftest.er1
2900 cat conftest.err >&5
2901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2902 (exit $ac_status); } >/dev/null; then
2903 if test -s conftest.err; then
2904 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002905 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002906 else
2907 ac_cpp_err=
2908 fi
2909else
2910 ac_cpp_err=yes
2911fi
2912if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002913 :
2914else
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002916sed 's/^/| /' conftest.$ac_ext >&5
2917
Martin v. Löwis11437992002-04-12 09:54:03 +00002918 # Broken: fails on valid input.
2919continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002920fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002921rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002922
Martin v. Löwis11437992002-04-12 09:54:03 +00002923 # OK, works on sane cases. Now check whether non-existent headers
2924 # can be detected and how.
2925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002926/* confdefs.h. */
2927_ACEOF
2928cat confdefs.h >>conftest.$ac_ext
2929cat >>conftest.$ac_ext <<_ACEOF
2930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002931#include <ac_nonexistent.h>
2932_ACEOF
2933if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2934 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2935 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002936 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 rm -f conftest.er1
2938 cat conftest.err >&5
2939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2940 (exit $ac_status); } >/dev/null; then
2941 if test -s conftest.err; then
2942 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002943 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002944 else
2945 ac_cpp_err=
2946 fi
2947else
2948 ac_cpp_err=yes
2949fi
2950if test -z "$ac_cpp_err"; then
2951 # Broken: success on invalid input.
2952continue
2953else
2954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002955sed 's/^/| /' conftest.$ac_ext >&5
2956
Martin v. Löwis11437992002-04-12 09:54:03 +00002957 # Passes both tests.
2958ac_preproc_ok=:
2959break
2960fi
2961rm -f conftest.err conftest.$ac_ext
2962
2963done
2964# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2965rm -f conftest.err conftest.$ac_ext
2966if $ac_preproc_ok; then
2967 break
2968fi
2969
2970 done
2971 ac_cv_prog_CPP=$CPP
2972
2973fi
2974 CPP=$ac_cv_prog_CPP
2975else
2976 ac_cv_prog_CPP=$CPP
2977fi
2978echo "$as_me:$LINENO: result: $CPP" >&5
2979echo "${ECHO_T}$CPP" >&6
2980ac_preproc_ok=false
2981for ac_c_preproc_warn_flag in '' yes
2982do
2983 # Use a header file that comes with gcc, so configuring glibc
2984 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002985 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2986 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002987 # On the NeXT, cc -E runs the code through the compiler's parser,
2988 # not just through cpp. "Syntax error" is here to catch this case.
2989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002990/* confdefs.h. */
2991_ACEOF
2992cat confdefs.h >>conftest.$ac_ext
2993cat >>conftest.$ac_ext <<_ACEOF
2994/* end confdefs.h. */
2995#ifdef __STDC__
2996# include <limits.h>
2997#else
2998# include <assert.h>
2999#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003000 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003001_ACEOF
3002if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3003 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3004 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003005 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003006 rm -f conftest.er1
3007 cat conftest.err >&5
3008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3009 (exit $ac_status); } >/dev/null; then
3010 if test -s conftest.err; then
3011 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003012 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003013 else
3014 ac_cpp_err=
3015 fi
3016else
3017 ac_cpp_err=yes
3018fi
3019if test -z "$ac_cpp_err"; then
3020 :
3021else
3022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003023sed 's/^/| /' conftest.$ac_ext >&5
3024
Martin v. Löwis11437992002-04-12 09:54:03 +00003025 # Broken: fails on valid input.
3026continue
3027fi
3028rm -f conftest.err conftest.$ac_ext
3029
3030 # OK, works on sane cases. Now check whether non-existent headers
3031 # can be detected and how.
3032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003033/* confdefs.h. */
3034_ACEOF
3035cat confdefs.h >>conftest.$ac_ext
3036cat >>conftest.$ac_ext <<_ACEOF
3037/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003038#include <ac_nonexistent.h>
3039_ACEOF
3040if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3041 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3042 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003043 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003044 rm -f conftest.er1
3045 cat conftest.err >&5
3046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3047 (exit $ac_status); } >/dev/null; then
3048 if test -s conftest.err; then
3049 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003050 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003051 else
3052 ac_cpp_err=
3053 fi
3054else
3055 ac_cpp_err=yes
3056fi
3057if test -z "$ac_cpp_err"; then
3058 # Broken: success on invalid input.
3059continue
3060else
3061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003062sed 's/^/| /' conftest.$ac_ext >&5
3063
Martin v. Löwis11437992002-04-12 09:54:03 +00003064 # Passes both tests.
3065ac_preproc_ok=:
3066break
3067fi
3068rm -f conftest.err conftest.$ac_ext
3069
3070done
3071# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3072rm -f conftest.err conftest.$ac_ext
3073if $ac_preproc_ok; then
3074 :
3075else
Skip Montanaro6dead952003-09-25 14:50:04 +00003076 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3077See \`config.log' for more details." >&5
3078echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3079See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003080 { (exit 1); exit 1; }; }
3081fi
3082
3083ac_ext=c
3084ac_cpp='$CPP $CPPFLAGS'
3085ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3086ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3087ac_compiler_gnu=$ac_cv_c_compiler_gnu
3088
3089
Skip Montanaro6dead952003-09-25 14:50:04 +00003090echo "$as_me:$LINENO: checking for egrep" >&5
3091echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3092if test "${ac_cv_prog_egrep+set}" = set; then
3093 echo $ECHO_N "(cached) $ECHO_C" >&6
3094else
3095 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3096 then ac_cv_prog_egrep='grep -E'
3097 else ac_cv_prog_egrep='egrep'
3098 fi
3099fi
3100echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3101echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3102 EGREP=$ac_cv_prog_egrep
3103
3104
Martin v. Löwis11437992002-04-12 09:54:03 +00003105
3106echo "$as_me:$LINENO: checking for AIX" >&5
3107echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003109/* confdefs.h. */
3110_ACEOF
3111cat confdefs.h >>conftest.$ac_ext
3112cat >>conftest.$ac_ext <<_ACEOF
3113/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003114#ifdef _AIX
3115 yes
3116#endif
3117
Martin v. Löwis11437992002-04-12 09:54:03 +00003118_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003120 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003121 echo "$as_me:$LINENO: result: yes" >&5
3122echo "${ECHO_T}yes" >&6
3123cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003124#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003125_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003126
3127else
Martin v. Löwis11437992002-04-12 09:54:03 +00003128 echo "$as_me:$LINENO: result: no" >&5
3129echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003130fi
3131rm -f conftest*
3132
Michael W. Hudson54241132001-12-07 15:38:26 +00003133
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003134
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003135# Check for unsupported systems
3136case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003137Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003138 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3139 echo See README for details.
3140 exit 1;;
3141esac
3142
Michael W. Hudson54241132001-12-07 15:38:26 +00003143
Martin v. Löwis11437992002-04-12 09:54:03 +00003144echo "$as_me:$LINENO: checking for --with-suffix" >&5
3145echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003146
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003147# Check whether --with-suffix or --without-suffix was given.
3148if test "${with_suffix+set}" = set; then
3149 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003150
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003151 case $withval in
3152 no) EXEEXT=;;
3153 yes) EXEEXT=.exe;;
3154 *) EXEEXT=$withval;;
3155 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003156fi;
3157echo "$as_me:$LINENO: result: $EXEEXT" >&5
3158echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003159
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003160# Test whether we're running on a non-case-sensitive system, in which
3161# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003162
Martin v. Löwis11437992002-04-12 09:54:03 +00003163echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3164echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003165if test ! -d CaseSensitiveTestDir; then
3166mkdir CaseSensitiveTestDir
3167fi
3168
3169if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003170then
Martin v. Löwis11437992002-04-12 09:54:03 +00003171 echo "$as_me:$LINENO: result: yes" >&5
3172echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003173 BUILDEXEEXT=.exe
3174else
Martin v. Löwis11437992002-04-12 09:54:03 +00003175 echo "$as_me:$LINENO: result: no" >&5
3176echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003177 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003178fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003179rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003180
Guido van Rossumdd997f71998-10-07 19:58:26 +00003181case $MACHDEP in
3182bsdos*)
3183 case $CC in
3184 gcc) CC="$CC -D_HAVE_BSDI";;
3185 esac;;
3186esac
3187
Guido van Rossum24b1e751997-08-21 02:29:16 +00003188case $ac_sys_system in
3189hp*|HP*)
3190 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003191 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003192 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003193Monterey*)
3194 case $CC in
3195 cc) CC="$CC -Wl,-Bexport";;
3196 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003197SunOS*)
3198 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
3200cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003201#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003202_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003203
3204 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003205esac
3206
Michael W. Hudson54241132001-12-07 15:38:26 +00003207
3208
Martin v. Löwis11437992002-04-12 09:54:03 +00003209echo "$as_me:$LINENO: checking LIBRARY" >&5
3210echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003211if test -z "$LIBRARY"
3212then
3213 LIBRARY='libpython$(VERSION).a'
3214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003215echo "$as_me:$LINENO: result: $LIBRARY" >&5
3216echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003217
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003218# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003219# name of the library into which to insert object files). BLDLIBRARY is also
3220# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3221# is blank as the main program is not linked directly against LDLIBRARY.
3222# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3223# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3224# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3225# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003226#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003227# RUNSHARED is used to run shared python without installed libraries
3228#
3229# INSTSONAME is the name of the shared library that will be use to install
3230# on the system - some systems like version suffix, others don't
3231
3232
Michael W. Hudson54241132001-12-07 15:38:26 +00003233
3234
3235
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003236
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003237LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003238BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003239INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003240DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003241LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003242RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003243
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003244# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003245# If CXX is set, and if it is needed to link a main function that was
3246# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3247# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003248# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003249# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003250
Martin v. Löwis11437992002-04-12 09:54:03 +00003251echo "$as_me:$LINENO: checking LINKCC" >&5
3252echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003253if test -z "$LINKCC"
3254then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003255 if test -z "$CXX"; then
3256 LINKCC="\$(PURIFY) \$(CC)"
3257 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003258 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003259 $CXX -c conftest.$ac_ext 2>&5
3260 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3261 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3262 then
3263 LINKCC="\$(PURIFY) \$(CC)"
3264 else
3265 LINKCC="\$(PURIFY) \$(CXX)"
3266 fi
3267 rm -fr conftest*
3268 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003269 case $ac_sys_system in
3270 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003271 exp_extra="\"\""
3272 if test $ac_sys_release -ge 5 -o \
3273 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3274 exp_extra="."
3275 fi
3276 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003277 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003278 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003279 esac
3280fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003281echo "$as_me:$LINENO: result: $LINKCC" >&5
3282echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003283
Martin v. Löwis11437992002-04-12 09:54:03 +00003284echo "$as_me:$LINENO: checking for --enable-shared" >&5
3285echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003286# Check whether --enable-shared or --disable-shared was given.
3287if test "${enable_shared+set}" = set; then
3288 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003289
Martin v. Löwis11437992002-04-12 09:54:03 +00003290fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003291
3292if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003293then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003294 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003295 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003296 enable_shared="yes";;
3297 *)
3298 enable_shared="no";;
3299 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003300fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003301echo "$as_me:$LINENO: result: $enable_shared" >&5
3302echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003303
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003304echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3305echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3306# Check whether --enable-profiling or --disable-profiling was given.
3307if test "${enable_profiling+set}" = set; then
3308 enableval="$enable_profiling"
3309 ac_save_cc="$CC"
3310 CC="$CC -pg"
3311 if test "$cross_compiling" = yes; then
3312 ac_enable_profiling="no"
3313else
3314 cat >conftest.$ac_ext <<_ACEOF
3315/* confdefs.h. */
3316_ACEOF
3317cat confdefs.h >>conftest.$ac_ext
3318cat >>conftest.$ac_ext <<_ACEOF
3319/* end confdefs.h. */
3320int main() { return 0; }
3321_ACEOF
3322rm -f conftest$ac_exeext
3323if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3324 (eval $ac_link) 2>&5
3325 ac_status=$?
3326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3327 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3329 (eval $ac_try) 2>&5
3330 ac_status=$?
3331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3332 (exit $ac_status); }; }; then
3333 ac_enable_profiling="yes"
3334else
3335 echo "$as_me: program exited with status $ac_status" >&5
3336echo "$as_me: failed program was:" >&5
3337sed 's/^/| /' conftest.$ac_ext >&5
3338
3339( exit $ac_status )
3340ac_enable_profiling="no"
3341fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003342rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003343fi
3344 CC="$ac_save_cc"
3345fi;
3346echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3347echo "${ECHO_T}$ac_enable_profiling" >&6
3348
3349case "$ac_enable_profiling" in
3350 "yes")
3351 BASECFLAGS="-pg $BASECFLAGS"
3352 LDFLAGS="-pg $LDFLAGS"
3353 ;;
3354esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003355
Martin v. Löwis11437992002-04-12 09:54:03 +00003356echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3357echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003358
Guido van Rossumb8552162001-09-05 14:58:11 +00003359# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3360# library that we build, but we do not want to link against it (we
3361# will find it with a -framework option). For this reason there is an
3362# extra variable BLDLIBRARY against which Python and the extension
3363# modules are linked, BLDLIBRARY. This is normally the same as
3364# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003365if test "$enable_framework"
3366then
3367 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003368 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003369 BLDLIBRARY=''
3370else
3371 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003372fi
Jack Jansene578a632001-08-15 01:27:14 +00003373
Martin v. Löwis1142de32002-03-29 16:28:31 +00003374# Other platforms follow
3375if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003376
3377cat >>confdefs.h <<\_ACEOF
3378#define Py_ENABLE_SHARED 1
3379_ACEOF
3380
Martin v. Löwis1142de32002-03-29 16:28:31 +00003381 case $ac_sys_system in
3382 BeOS*)
3383 LDLIBRARY='libpython$(VERSION).so'
3384 ;;
3385 CYGWIN*)
3386 LDLIBRARY='libpython$(VERSION).dll.a'
3387 DLLLIBRARY='libpython$(VERSION).dll'
3388 ;;
3389 SunOS*)
3390 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003391 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003392 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003393 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003394 ;;
Hye-Shik Chang33761492004-10-26 09:53:46 +00003395 Linux*|GNU*|NetBSD*|FreeBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003396 LDLIBRARY='libpython$(VERSION).so'
3397 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003398 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00003399 case $ac_sys_system in
3400 FreeBSD*)
3401 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
3402 ;;
3403 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003404 INSTSONAME="$LDLIBRARY".$SOVERSION
3405 ;;
3406 hp*|HP*)
3407 LDLIBRARY='libpython$(VERSION).sl'
3408 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003409 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003410 ;;
3411 OSF*)
3412 LDLIBRARY='libpython$(VERSION).so'
3413 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003414 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003415 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003416 atheos*)
3417 LDLIBRARY='libpython$(VERSION).so'
3418 BLDLIBRARY='-L. -lpython$(VERSION)'
3419 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3420 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003421 esac
Jason Tishler30765592003-09-04 11:04:06 +00003422else # shared is disabled
3423 case $ac_sys_system in
3424 CYGWIN*)
3425 BLDLIBRARY='$(LIBRARY)'
3426 LDLIBRARY='libpython$(VERSION).dll.a'
3427 ;;
3428 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003429fi
3430
Martin v. Löwis11437992002-04-12 09:54:03 +00003431echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3432echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003433
Martin v. Löwis11437992002-04-12 09:54:03 +00003434if test -n "$ac_tool_prefix"; then
3435 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3436set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3437echo "$as_me:$LINENO: checking for $ac_word" >&5
3438echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3439if test "${ac_cv_prog_RANLIB+set}" = set; then
3440 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003441else
3442 if test -n "$RANLIB"; then
3443 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3444else
Martin v. Löwis11437992002-04-12 09:54:03 +00003445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3446for as_dir in $PATH
3447do
3448 IFS=$as_save_IFS
3449 test -z "$as_dir" && as_dir=.
3450 for ac_exec_ext in '' $ac_executable_extensions; do
3451 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3452 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3453 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3454 break 2
3455 fi
3456done
3457done
3458
Guido van Rossum627b2d71993-12-24 10:39:16 +00003459fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003461RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003462if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003463 echo "$as_me:$LINENO: result: $RANLIB" >&5
3464echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003465else
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 echo "$as_me:$LINENO: result: no" >&5
3467echo "${ECHO_T}no" >&6
3468fi
3469
3470fi
3471if test -z "$ac_cv_prog_RANLIB"; then
3472 ac_ct_RANLIB=$RANLIB
3473 # Extract the first word of "ranlib", so it can be a program name with args.
3474set dummy ranlib; ac_word=$2
3475echo "$as_me:$LINENO: checking for $ac_word" >&5
3476echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3477if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3478 echo $ECHO_N "(cached) $ECHO_C" >&6
3479else
3480 if test -n "$ac_ct_RANLIB"; then
3481 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3482else
3483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3484for as_dir in $PATH
3485do
3486 IFS=$as_save_IFS
3487 test -z "$as_dir" && as_dir=.
3488 for ac_exec_ext in '' $ac_executable_extensions; do
3489 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3490 ac_cv_prog_ac_ct_RANLIB="ranlib"
3491 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3492 break 2
3493 fi
3494done
3495done
3496
3497 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3498fi
3499fi
3500ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3501if test -n "$ac_ct_RANLIB"; then
3502 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3503echo "${ECHO_T}$ac_ct_RANLIB" >&6
3504else
3505 echo "$as_me:$LINENO: result: no" >&5
3506echo "${ECHO_T}no" >&6
3507fi
3508
3509 RANLIB=$ac_ct_RANLIB
3510else
3511 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003512fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003513
3514
Guido van Rossum7f43da71994-08-01 12:15:30 +00003515for ac_prog in ar aal
3516do
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003518set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003519echo "$as_me:$LINENO: checking for $ac_word" >&5
3520echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3521if test "${ac_cv_prog_AR+set}" = set; then
3522 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003523else
3524 if test -n "$AR"; then
3525 ac_cv_prog_AR="$AR" # Let the user override the test.
3526else
Martin v. Löwis11437992002-04-12 09:54:03 +00003527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3528for as_dir in $PATH
3529do
3530 IFS=$as_save_IFS
3531 test -z "$as_dir" && as_dir=.
3532 for ac_exec_ext in '' $ac_executable_extensions; do
3533 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3534 ac_cv_prog_AR="$ac_prog"
3535 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3536 break 2
3537 fi
3538done
3539done
3540
Guido van Rossum7f43da71994-08-01 12:15:30 +00003541fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003542fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003543AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003544if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 echo "$as_me:$LINENO: result: $AR" >&5
3546echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003547else
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 echo "$as_me:$LINENO: result: no" >&5
3549echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003550fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003551
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003553done
3554test -n "$AR" || AR="ar"
3555
Michael W. Hudson54241132001-12-07 15:38:26 +00003556
Neil Schemenauera42c8272001-03-31 00:01:55 +00003557case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003558bsdos*|hp*|HP*)
3559 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003560 if test -z "$INSTALL"
3561 then
3562 INSTALL="${srcdir}/install-sh -c"
3563 fi
3564esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003565ac_aux_dir=
3566for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3567 if test -f $ac_dir/install-sh; then
3568 ac_aux_dir=$ac_dir
3569 ac_install_sh="$ac_aux_dir/install-sh -c"
3570 break
3571 elif test -f $ac_dir/install.sh; then
3572 ac_aux_dir=$ac_dir
3573 ac_install_sh="$ac_aux_dir/install.sh -c"
3574 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 elif test -f $ac_dir/shtool; then
3576 ac_aux_dir=$ac_dir
3577 ac_install_sh="$ac_aux_dir/shtool install -c"
3578 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003579 fi
3580done
3581if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3583echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3584 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003585fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003586ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3587ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3588ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003589
3590# Find a good install program. We prefer a C program (faster),
3591# so one script is as good as another. But avoid the broken or
3592# incompatible versions:
3593# SysV /etc/install, /usr/sbin/install
3594# SunOS /usr/etc/install
3595# IRIX /sbin/install
3596# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003597# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003598# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3599# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3600# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00003601# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003602# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003603echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3604echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003605if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003606if test "${ac_cv_path_install+set}" = set; then
3607 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003608else
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3610for as_dir in $PATH
3611do
3612 IFS=$as_save_IFS
3613 test -z "$as_dir" && as_dir=.
3614 # Account for people who put trailing slashes in PATH elements.
3615case $as_dir/ in
3616 ./ | .// | /cC/* | \
3617 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003618 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 /usr/ucb/* ) ;;
3620 *)
3621 # OSF1 and SCO ODT 3.0 have their own names for install.
3622 # Don't use installbsd from OSF since it installs stuff as root
3623 # by default.
3624 for ac_prog in ginstall scoinst install; do
3625 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanarof0d5f792004-08-15 14:08:23 +00003626 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3627 if test $ac_prog = install &&
3628 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3629 # AIX install. It has an incompatible calling convention.
3630 :
3631 elif test $ac_prog = install &&
3632 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3633 # program-specific install script used by HP pwplus--don't use.
3634 :
3635 else
3636 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3637 break 3
3638 fi
3639 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003640 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 done
3642 ;;
3643esac
3644done
3645
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003646
3647fi
3648 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003650 else
3651 # As a last resort, use the slow shell script. We don't cache a
3652 # path for INSTALL within a source directory, because that will
3653 # break other packages using the cache if that directory is
3654 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003655 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003656 fi
3657fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003658echo "$as_me:$LINENO: result: $INSTALL" >&5
3659echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003660
3661# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3662# It thinks the first close brace ends the variable substitution.
3663test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3664
Martin v. Löwis11437992002-04-12 09:54:03 +00003665test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003666
3667test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3668
Michael W. Hudson54241132001-12-07 15:38:26 +00003669
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003670# Not every filesystem supports hard links
3671
3672if test -z "$LN" ; then
3673 case $ac_sys_system in
3674 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003675 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003676 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003677 *) LN=ln;;
3678 esac
3679fi
3680
Fred Drake109d9862001-07-11 06:27:56 +00003681# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003682echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3683echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3684
Fred Drake109d9862001-07-11 06:27:56 +00003685# Check whether --with-pydebug or --without-pydebug was given.
3686if test "${with_pydebug+set}" = set; then
3687 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003688
Fred Drake109d9862001-07-11 06:27:56 +00003689if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003690then
3691
3692cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003693#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003694_ACEOF
3695
3696 echo "$as_me:$LINENO: result: yes" >&5
3697echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003698 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003699else echo "$as_me:$LINENO: result: no" >&5
3700echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003701fi
3702else
Martin v. Löwis11437992002-04-12 09:54:03 +00003703 echo "$as_me:$LINENO: result: no" >&5
3704echo "${ECHO_T}no" >&6
3705fi;
Fred Drake109d9862001-07-11 06:27:56 +00003706
Skip Montanarodecc6a42003-01-01 20:07:49 +00003707# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3708# merged with this chunk of code?
3709
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003710# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003711# ------------------------
3712# (The following bit of code is complicated enough - please keep things
3713# indented properly. Just pretend you're editing Python code. ;-)
3714
3715# There are two parallel sets of case statements below, one that checks to
3716# see if OPT was set and one that does BASECFLAGS setting based upon
3717# compiler and platform. BASECFLAGS tweaks need to be made even if the
3718# user set OPT.
3719
3720# tweak OPT based on compiler and platform, only if the user didn't set
3721# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003722
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003723if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003724then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003725 case $GCC in
3726 yes)
3727 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003728 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003729 if test "$Py_DEBUG" = 'true' ; then
3730 # Optimization messes up debuggers, so turn it off for
3731 # debug builds.
3732 OPT="-g -Wall -Wstrict-prototypes"
3733 else
3734 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003735 fi
3736 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003737 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003738 OPT="-O3 -Wall -Wstrict-prototypes"
3739 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003740 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003741 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003742 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3743 ;;
3744 esac
Fred Drake109d9862001-07-11 06:27:56 +00003745 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003746
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003747 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003748 OPT="-O"
3749 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003750 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003751
3752 # The current (beta) Monterey compiler dies with optimizations
3753 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003754 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003755 Monterey*)
3756 OPT=""
3757 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003758 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003759
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003760fi
3761
Skip Montanarodecc6a42003-01-01 20:07:49 +00003762
3763# tweak BASECFLAGS based on compiler and platform
3764case $GCC in
3765yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003766 # Python violates C99 rules, by casting between incompatible
3767 # pointer types. GCC may generate bad code as a result of that,
3768 # so use -fno-strict-aliasing if supported.
3769 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3770echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3771 ac_save_cc="$CC"
3772 CC="$CC -fno-strict-aliasing"
3773 if test "$cross_compiling" = yes; then
3774 ac_cv_no_strict_aliasing_ok=no
3775else
3776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003777/* confdefs.h. */
3778_ACEOF
3779cat confdefs.h >>conftest.$ac_ext
3780cat >>conftest.$ac_ext <<_ACEOF
3781/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003782int main() { return 0; }
3783_ACEOF
3784rm -f conftest$ac_exeext
3785if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3786 (eval $ac_link) 2>&5
3787 ac_status=$?
3788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3791 (eval $ac_try) 2>&5
3792 ac_status=$?
3793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3794 (exit $ac_status); }; }; then
3795 ac_cv_no_strict_aliasing_ok=yes
3796else
3797 echo "$as_me: program exited with status $ac_status" >&5
3798echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003799sed 's/^/| /' conftest.$ac_ext >&5
3800
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003801( exit $ac_status )
3802ac_cv_no_strict_aliasing_ok=no
3803fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003804rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003805fi
3806 CC="$ac_save_cc"
3807 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3808echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3809 if test $ac_cv_no_strict_aliasing_ok = yes
3810 then
3811 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3812 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003813 case $ac_sys_system in
3814 SCO_SV*)
3815 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3816 ;;
3817 # is there any other compiler on Darwin besides gcc?
3818 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003819 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003820 ;;
3821 esac
3822 ;;
3823
3824*)
3825 case $ac_sys_system in
3826 OpenUNIX*|UnixWare*)
3827 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3828 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003829 OSF*)
3830 BASECFLAGS="$BASECFLAGS -ieee -std"
3831 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003832 SCO_SV*)
3833 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3834 ;;
3835 esac
3836 ;;
3837esac
3838
Fred Drakee1ceaa02001-12-04 20:55:47 +00003839if test "$Py_DEBUG" = 'true'; then
3840 :
3841else
3842 OPT="-DNDEBUG $OPT"
3843fi
3844
Guido van Rossum563e7081996-09-10 18:20:48 +00003845if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003846then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003847 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003848fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003849
Martin v. Löwis11437992002-04-12 09:54:03 +00003850echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3851echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3852if test "${ac_cv_opt_olimit_ok+set}" = set; then
3853 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003854else
3855 ac_save_cc="$CC"
3856CC="$CC -OPT:Olimit=0"
3857if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003858 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003859else
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003861/* confdefs.h. */
3862_ACEOF
3863cat confdefs.h >>conftest.$ac_ext
3864cat >>conftest.$ac_ext <<_ACEOF
3865/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003866int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003867_ACEOF
3868rm -f conftest$ac_exeext
3869if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3870 (eval $ac_link) 2>&5
3871 ac_status=$?
3872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3873 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3875 (eval $ac_try) 2>&5
3876 ac_status=$?
3877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3878 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003879 ac_cv_opt_olimit_ok=yes
3880else
Martin v. Löwis11437992002-04-12 09:54:03 +00003881 echo "$as_me: program exited with status $ac_status" >&5
3882echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003883sed 's/^/| /' conftest.$ac_ext >&5
3884
Martin v. Löwis11437992002-04-12 09:54:03 +00003885( exit $ac_status )
3886ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003887fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003888rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003889fi
Guido van Rossum91922671997-10-09 20:24:13 +00003890CC="$ac_save_cc"
3891fi
3892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3894echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003895if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003896 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003897 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3898 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3899 # environment?
3900 Darwin*)
3901 ;;
3902 *)
3903 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3904 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003905 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003906else
Martin v. Löwis11437992002-04-12 09:54:03 +00003907 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3908echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3909 if test "${ac_cv_olimit_ok+set}" = set; then
3910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003911else
3912 ac_save_cc="$CC"
3913 CC="$CC -Olimit 1500"
3914 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003915 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003916else
Martin v. Löwis11437992002-04-12 09:54:03 +00003917 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003918/* confdefs.h. */
3919_ACEOF
3920cat confdefs.h >>conftest.$ac_ext
3921cat >>conftest.$ac_ext <<_ACEOF
3922/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003923int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003924_ACEOF
3925rm -f conftest$ac_exeext
3926if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3927 (eval $ac_link) 2>&5
3928 ac_status=$?
3929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3930 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3932 (eval $ac_try) 2>&5
3933 ac_status=$?
3934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3935 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003936 ac_cv_olimit_ok=yes
3937else
Martin v. Löwis11437992002-04-12 09:54:03 +00003938 echo "$as_me: program exited with status $ac_status" >&5
3939echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003940sed 's/^/| /' conftest.$ac_ext >&5
3941
Martin v. Löwis11437992002-04-12 09:54:03 +00003942( exit $ac_status )
3943ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003944fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003945rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003946fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003947 CC="$ac_save_cc"
3948fi
3949
Martin v. Löwis11437992002-04-12 09:54:03 +00003950 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3951echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003952 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003953 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003954 fi
3955fi
3956
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003957# On some compilers, pthreads are available without further options
3958# (e.g. MacOS X). On some of these systems, the compiler will not
3959# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3960# So we have to see first whether pthreads are available without
3961# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003962echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3963echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3964if test "${ac_cv_pthread_is_default+set}" = set; then
3965 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003966else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003967 if test "$cross_compiling" = yes; then
3968 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003969else
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003971/* confdefs.h. */
3972_ACEOF
3973cat confdefs.h >>conftest.$ac_ext
3974cat >>conftest.$ac_ext <<_ACEOF
3975/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003976
Martin v. Löwis130fb172001-07-19 11:00:41 +00003977#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003978
3979void* routine(void* p){return NULL;}
3980
3981int main(){
3982 pthread_t p;
3983 if(pthread_create(&p,NULL,routine,NULL)!=0)
3984 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003985 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003986 return 0;
3987}
3988
Martin v. Löwis11437992002-04-12 09:54:03 +00003989_ACEOF
3990rm -f conftest$ac_exeext
3991if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3992 (eval $ac_link) 2>&5
3993 ac_status=$?
3994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3997 (eval $ac_try) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004001
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004002 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004003 ac_cv_kthread=no
4004 ac_cv_pthread=no
4005
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004006else
Martin v. Löwis11437992002-04-12 09:54:03 +00004007 echo "$as_me: program exited with status $ac_status" >&5
4008echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004009sed 's/^/| /' conftest.$ac_ext >&5
4010
Martin v. Löwis11437992002-04-12 09:54:03 +00004011( exit $ac_status )
4012ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004013fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004014rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004015fi
4016
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004017fi
4018
Martin v. Löwis11437992002-04-12 09:54:03 +00004019echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4020echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004021
Michael W. Hudson54241132001-12-07 15:38:26 +00004022
Martin v. Löwis11437992002-04-12 09:54:03 +00004023if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004024then
4025 ac_cv_kpthread=no
4026else
4027# -Kpthread, if available, provides the right #defines
4028# and linker options to make pthread_create available
4029# Some compilers won't report that they do not support -Kpthread,
4030# so we need to run a program to see whether it really made the
4031# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004032echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4033echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4034if test "${ac_cv_kpthread+set}" = set; then
4035 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004036else
4037 ac_save_cc="$CC"
4038CC="$CC -Kpthread"
4039if test "$cross_compiling" = yes; then
4040 ac_cv_kpthread=no
4041else
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004043/* confdefs.h. */
4044_ACEOF
4045cat confdefs.h >>conftest.$ac_ext
4046cat >>conftest.$ac_ext <<_ACEOF
4047/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004048
4049#include <pthread.h>
4050
4051void* routine(void* p){return NULL;}
4052
4053int main(){
4054 pthread_t p;
4055 if(pthread_create(&p,NULL,routine,NULL)!=0)
4056 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004057 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004058 return 0;
4059}
4060
Martin v. Löwis11437992002-04-12 09:54:03 +00004061_ACEOF
4062rm -f conftest$ac_exeext
4063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4064 (eval $ac_link) 2>&5
4065 ac_status=$?
4066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4067 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4069 (eval $ac_try) 2>&5
4070 ac_status=$?
4071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4072 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004073 ac_cv_kpthread=yes
4074else
Martin v. Löwis11437992002-04-12 09:54:03 +00004075 echo "$as_me: program exited with status $ac_status" >&5
4076echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004077sed 's/^/| /' conftest.$ac_ext >&5
4078
Martin v. Löwis11437992002-04-12 09:54:03 +00004079( exit $ac_status )
4080ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004081fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004082rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004083fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004084CC="$ac_save_cc"
4085fi
4086
Martin v. Löwis11437992002-04-12 09:54:03 +00004087echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4088echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004089fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004090
Skip Montanarod8d39a02003-07-10 20:44:10 +00004091if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004092then
4093# -Kthread, if available, provides the right #defines
4094# and linker options to make pthread_create available
4095# Some compilers won't report that they do not support -Kthread,
4096# so we need to run a program to see whether it really made the
4097# function available.
4098echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4099echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4100if test "${ac_cv_kthread+set}" = set; then
4101 echo $ECHO_N "(cached) $ECHO_C" >&6
4102else
4103 ac_save_cc="$CC"
4104CC="$CC -Kthread"
4105if test "$cross_compiling" = yes; then
4106 ac_cv_kthread=no
4107else
4108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004109/* confdefs.h. */
4110_ACEOF
4111cat confdefs.h >>conftest.$ac_ext
4112cat >>conftest.$ac_ext <<_ACEOF
4113/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004114
4115#include <pthread.h>
4116
4117void* routine(void* p){return NULL;}
4118
4119int main(){
4120 pthread_t p;
4121 if(pthread_create(&p,NULL,routine,NULL)!=0)
4122 return 1;
4123 (void)pthread_detach(p);
4124 return 0;
4125}
4126
4127_ACEOF
4128rm -f conftest$ac_exeext
4129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4130 (eval $ac_link) 2>&5
4131 ac_status=$?
4132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4133 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4135 (eval $ac_try) 2>&5
4136 ac_status=$?
4137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4138 (exit $ac_status); }; }; then
4139 ac_cv_kthread=yes
4140else
4141 echo "$as_me: program exited with status $ac_status" >&5
4142echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004143sed 's/^/| /' conftest.$ac_ext >&5
4144
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004145( exit $ac_status )
4146ac_cv_kthread=no
4147fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004148rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004149fi
4150CC="$ac_save_cc"
4151fi
4152
4153echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4154echo "${ECHO_T}$ac_cv_kthread" >&6
4155fi
4156
Skip Montanarod8d39a02003-07-10 20:44:10 +00004157if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004158then
4159# -pthread, if available, provides the right #defines
4160# and linker options to make pthread_create available
4161# Some compilers won't report that they do not support -pthread,
4162# so we need to run a program to see whether it really made the
4163# function available.
4164echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4165echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4166if test "${ac_cv_thread+set}" = set; then
4167 echo $ECHO_N "(cached) $ECHO_C" >&6
4168else
4169 ac_save_cc="$CC"
4170CC="$CC -pthread"
4171if test "$cross_compiling" = yes; then
4172 ac_cv_pthread=no
4173else
4174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004175/* confdefs.h. */
4176_ACEOF
4177cat confdefs.h >>conftest.$ac_ext
4178cat >>conftest.$ac_ext <<_ACEOF
4179/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004180
4181#include <pthread.h>
4182
4183void* routine(void* p){return NULL;}
4184
4185int main(){
4186 pthread_t p;
4187 if(pthread_create(&p,NULL,routine,NULL)!=0)
4188 return 1;
4189 (void)pthread_detach(p);
4190 return 0;
4191}
4192
4193_ACEOF
4194rm -f conftest$ac_exeext
4195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4196 (eval $ac_link) 2>&5
4197 ac_status=$?
4198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4199 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4201 (eval $ac_try) 2>&5
4202 ac_status=$?
4203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4204 (exit $ac_status); }; }; then
4205 ac_cv_pthread=yes
4206else
4207 echo "$as_me: program exited with status $ac_status" >&5
4208echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004209sed 's/^/| /' conftest.$ac_ext >&5
4210
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004211( exit $ac_status )
4212ac_cv_pthread=no
4213fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004214rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004215fi
4216CC="$ac_save_cc"
4217fi
4218
4219echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4220echo "${ECHO_T}$ac_cv_pthread" >&6
4221fi
4222
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004223# If we have set a CC compiler flag for thread support then
4224# check if it works for CXX, too.
4225ac_cv_cxx_thread=no
4226if test ! -z "$CXX"
4227then
4228echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4229echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4230ac_save_cxx="$CXX"
4231
4232if test "$ac_cv_kpthread" = "yes"
4233then
4234 CXX="$CXX -Kpthread"
4235 ac_cv_cxx_thread=yes
4236elif test "$ac_cv_kthread" = "yes"
4237then
4238 CXX="$CXX -Kthread"
4239 ac_cv_cxx_thread=yes
4240elif test "$ac_cv_pthread" = "yes"
4241then
4242 CXX="$CXX -pthread"
4243 ac_cv_cxx_thread=yes
4244fi
4245
4246if test $ac_cv_cxx_thread = yes
4247then
4248 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4249 $CXX -c conftest.$ac_ext 2>&5
4250 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4251 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4252 then
4253 ac_cv_cxx_thread=yes
4254 else
4255 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004256 fi
4257 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004258fi
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004259echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4260echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004261fi
4262CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004263
Michael W. Hudson54241132001-12-07 15:38:26 +00004264
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004265# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004266echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4267echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4268if test "${ac_cv_header_stdc+set}" = set; then
4269 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270else
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004272/* confdefs.h. */
4273_ACEOF
4274cat confdefs.h >>conftest.$ac_ext
4275cat >>conftest.$ac_ext <<_ACEOF
4276/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004277#include <stdlib.h>
4278#include <stdarg.h>
4279#include <string.h>
4280#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004281
Skip Montanaro6dead952003-09-25 14:50:04 +00004282int
4283main ()
4284{
4285
4286 ;
4287 return 0;
4288}
Martin v. Löwis11437992002-04-12 09:54:03 +00004289_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004290rm -f conftest.$ac_objext
4291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004292 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004294 grep -v '^ *+' conftest.er1 >conftest.err
4295 rm -f conftest.er1
4296 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004298 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004299 { ac_try='test -z "$ac_c_werror_flag"
4300 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4302 (eval $ac_try) 2>&5
4303 ac_status=$?
4304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4305 (exit $ac_status); }; } &&
4306 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4308 (eval $ac_try) 2>&5
4309 ac_status=$?
4310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4311 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004312 ac_cv_header_stdc=yes
4313else
Martin v. Löwis11437992002-04-12 09:54:03 +00004314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004315sed 's/^/| /' conftest.$ac_ext >&5
4316
4317ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004318fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004319rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004320
4321if test $ac_cv_header_stdc = yes; then
4322 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004323 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004324/* confdefs.h. */
4325_ACEOF
4326cat confdefs.h >>conftest.$ac_ext
4327cat >>conftest.$ac_ext <<_ACEOF
4328/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004329#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004330
4331_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004333 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004334 :
4335else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004336 ac_cv_header_stdc=no
4337fi
4338rm -f conftest*
4339
4340fi
4341
4342if test $ac_cv_header_stdc = yes; then
4343 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004345/* confdefs.h. */
4346_ACEOF
4347cat confdefs.h >>conftest.$ac_ext
4348cat >>conftest.$ac_ext <<_ACEOF
4349/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004350#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004351
4352_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004353if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004354 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004355 :
4356else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357 ac_cv_header_stdc=no
4358fi
4359rm -f conftest*
4360
4361fi
4362
4363if test $ac_cv_header_stdc = yes; then
4364 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004366 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367else
Martin v. Löwis11437992002-04-12 09:54:03 +00004368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004369/* confdefs.h. */
4370_ACEOF
4371cat confdefs.h >>conftest.$ac_ext
4372cat >>conftest.$ac_ext <<_ACEOF
4373/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004374#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004375#if ((' ' & 0x0FF) == 0x020)
4376# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4377# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4378#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004379# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004380 (('a' <= (c) && (c) <= 'i') \
4381 || ('j' <= (c) && (c) <= 'r') \
4382 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004383# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4384#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4387int
4388main ()
4389{
4390 int i;
4391 for (i = 0; i < 256; i++)
4392 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004393 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004394 exit(2);
4395 exit (0);
4396}
4397_ACEOF
4398rm -f conftest$ac_exeext
4399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4400 (eval $ac_link) 2>&5
4401 ac_status=$?
4402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4405 (eval $ac_try) 2>&5
4406 ac_status=$?
4407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4408 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409 :
4410else
Martin v. Löwis11437992002-04-12 09:54:03 +00004411 echo "$as_me: program exited with status $ac_status" >&5
4412echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004413sed 's/^/| /' conftest.$ac_ext >&5
4414
Martin v. Löwis11437992002-04-12 09:54:03 +00004415( exit $ac_status )
4416ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004417fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004418rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004419fi
4420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004421fi
4422echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4423echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004424if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004425
4426cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004427#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004428_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004429
4430fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004431
Skip Montanarob9820a32004-01-17 00:16:12 +00004432# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004443 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004444do
4445as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4446echo "$as_me:$LINENO: checking for $ac_header" >&5
4447echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4448if eval "test \"\${$as_ac_Header+set}\" = set"; then
4449 echo $ECHO_N "(cached) $ECHO_C" >&6
4450else
4451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004452/* confdefs.h. */
4453_ACEOF
4454cat confdefs.h >>conftest.$ac_ext
4455cat >>conftest.$ac_ext <<_ACEOF
4456/* end confdefs.h. */
4457$ac_includes_default
4458
4459#include <$ac_header>
4460_ACEOF
4461rm -f conftest.$ac_objext
4462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004463 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004465 grep -v '^ *+' conftest.er1 >conftest.err
4466 rm -f conftest.er1
4467 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4469 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004470 { ac_try='test -z "$ac_c_werror_flag"
4471 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4473 (eval $ac_try) 2>&5
4474 ac_status=$?
4475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4476 (exit $ac_status); }; } &&
4477 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4479 (eval $ac_try) 2>&5
4480 ac_status=$?
4481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4482 (exit $ac_status); }; }; then
4483 eval "$as_ac_Header=yes"
4484else
4485 echo "$as_me: failed program was:" >&5
4486sed 's/^/| /' conftest.$ac_ext >&5
4487
4488eval "$as_ac_Header=no"
4489fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004490rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004491fi
4492echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4493echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4494if test `eval echo '${'$as_ac_Header'}'` = yes; then
4495 cat >>confdefs.h <<_ACEOF
4496#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4497_ACEOF
4498
4499fi
4500
4501done
4502
4503
Martin v. Löwis11437992002-04-12 09:54:03 +00004504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
Anthony Baxter8a560de2004-10-13 15:30:56 +00004540
Martin v. Löwisae2830c2004-09-18 09:54:52 +00004541for ac_header in curses.h dlfcn.h fcntl.h grp.h langinfo.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00004542libintl.h ncurses.h poll.h pthread.h \
4543stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004544unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004545sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4546sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004547sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisae2830c2004-09-18 09:54:52 +00004548sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004549sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4550bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004551do
Martin v. Löwis11437992002-04-12 09:54:03 +00004552as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4553if eval "test \"\${$as_ac_Header+set}\" = set"; then
4554 echo "$as_me:$LINENO: checking for $ac_header" >&5
4555echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4556if eval "test \"\${$as_ac_Header+set}\" = set"; then
4557 echo $ECHO_N "(cached) $ECHO_C" >&6
4558fi
4559echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4560echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004561else
Martin v. Löwis11437992002-04-12 09:54:03 +00004562 # Is the header compilable?
4563echo "$as_me:$LINENO: checking $ac_header usability" >&5
4564echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4565cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004566/* confdefs.h. */
4567_ACEOF
4568cat confdefs.h >>conftest.$ac_ext
4569cat >>conftest.$ac_ext <<_ACEOF
4570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004571$ac_includes_default
4572#include <$ac_header>
4573_ACEOF
4574rm -f conftest.$ac_objext
4575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004576 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004578 grep -v '^ *+' conftest.er1 >conftest.err
4579 rm -f conftest.er1
4580 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4582 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004583 { ac_try='test -z "$ac_c_werror_flag"
4584 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4586 (eval $ac_try) 2>&5
4587 ac_status=$?
4588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4589 (exit $ac_status); }; } &&
4590 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4592 (eval $ac_try) 2>&5
4593 ac_status=$?
4594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4595 (exit $ac_status); }; }; then
4596 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004597else
Martin v. Löwis11437992002-04-12 09:54:03 +00004598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004599sed 's/^/| /' conftest.$ac_ext >&5
4600
Martin v. Löwis11437992002-04-12 09:54:03 +00004601ac_header_compiler=no
4602fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004603rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004604echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4605echo "${ECHO_T}$ac_header_compiler" >&6
4606
4607# Is the header present?
4608echo "$as_me:$LINENO: checking $ac_header presence" >&5
4609echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004611/* confdefs.h. */
4612_ACEOF
4613cat confdefs.h >>conftest.$ac_ext
4614cat >>conftest.$ac_ext <<_ACEOF
4615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004616#include <$ac_header>
4617_ACEOF
4618if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4619 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4620 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004621 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004622 rm -f conftest.er1
4623 cat conftest.err >&5
4624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4625 (exit $ac_status); } >/dev/null; then
4626 if test -s conftest.err; then
4627 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004628 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004629 else
4630 ac_cpp_err=
4631 fi
4632else
4633 ac_cpp_err=yes
4634fi
4635if test -z "$ac_cpp_err"; then
4636 ac_header_preproc=yes
4637else
4638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004639sed 's/^/| /' conftest.$ac_ext >&5
4640
Martin v. Löwis11437992002-04-12 09:54:03 +00004641 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004642fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004643rm -f conftest.err conftest.$ac_ext
4644echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4645echo "${ECHO_T}$ac_header_preproc" >&6
4646
4647# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004648case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4649 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004650 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4651echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004652 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4653echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4654 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004655 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004656 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004657 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4658echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004659 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4660echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4661 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4662echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4663 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4664echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004665 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4666echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004667 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4668echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004669 (
4670 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +00004671## --------------------------------- ##
4672## Report this to the python lists. ##
4673## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004674_ASBOX
4675 ) |
4676 sed "s/^/$as_me: WARNING: /" >&2
4677 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004678esac
4679echo "$as_me:$LINENO: checking for $ac_header" >&5
4680echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4681if eval "test \"\${$as_ac_Header+set}\" = set"; then
4682 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004683else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004684 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004685fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004686echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4687echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4688
4689fi
4690if test `eval echo '${'$as_ac_Header'}'` = yes; then
4691 cat >>confdefs.h <<_ACEOF
4692#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4693_ACEOF
4694
4695fi
4696
Guido van Rossum627b2d71993-12-24 10:39:16 +00004697done
4698
Martin v. Löwis11437992002-04-12 09:54:03 +00004699
4700
4701
4702
4703
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004704ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004705for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4706 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4707echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4708echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4709if eval "test \"\${$as_ac_Header+set}\" = set"; then
4710 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004711else
Martin v. Löwis11437992002-04-12 09:54:03 +00004712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004713/* confdefs.h. */
4714_ACEOF
4715cat confdefs.h >>conftest.$ac_ext
4716cat >>conftest.$ac_ext <<_ACEOF
4717/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004718#include <sys/types.h>
4719#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004720
Martin v. Löwis11437992002-04-12 09:54:03 +00004721int
4722main ()
4723{
4724if ((DIR *) 0)
4725return 0;
4726 ;
4727 return 0;
4728}
4729_ACEOF
4730rm -f conftest.$ac_objext
4731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004732 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004734 grep -v '^ *+' conftest.er1 >conftest.err
4735 rm -f conftest.er1
4736 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4738 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004739 { ac_try='test -z "$ac_c_werror_flag"
4740 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4742 (eval $ac_try) 2>&5
4743 ac_status=$?
4744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4745 (exit $ac_status); }; } &&
4746 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4748 (eval $ac_try) 2>&5
4749 ac_status=$?
4750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4751 (exit $ac_status); }; }; then
4752 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004753else
Martin v. Löwis11437992002-04-12 09:54:03 +00004754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004755sed 's/^/| /' conftest.$ac_ext >&5
4756
Martin v. Löwis11437992002-04-12 09:54:03 +00004757eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004758fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004760fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004761echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4762echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4763if test `eval echo '${'$as_ac_Header'}'` = yes; then
4764 cat >>confdefs.h <<_ACEOF
4765#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4766_ACEOF
4767
4768ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004769fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004770
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004771done
4772# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4773if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004774 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4775echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4776if test "${ac_cv_search_opendir+set}" = set; then
4777 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004778else
Martin v. Löwis11437992002-04-12 09:54:03 +00004779 ac_func_search_save_LIBS=$LIBS
4780ac_cv_search_opendir=no
4781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004782/* confdefs.h. */
4783_ACEOF
4784cat confdefs.h >>conftest.$ac_ext
4785cat >>conftest.$ac_ext <<_ACEOF
4786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004787
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004788/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004789#ifdef __cplusplus
4790extern "C"
4791#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004792/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004793 builtin and then its argument prototype would still apply. */
4794char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004795int
4796main ()
4797{
4798opendir ();
4799 ;
4800 return 0;
4801}
4802_ACEOF
4803rm -f conftest.$ac_objext conftest$ac_exeext
4804if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004805 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004807 grep -v '^ *+' conftest.er1 >conftest.err
4808 rm -f conftest.er1
4809 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4811 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004812 { ac_try='test -z "$ac_c_werror_flag"
4813 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4815 (eval $ac_try) 2>&5
4816 ac_status=$?
4817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4818 (exit $ac_status); }; } &&
4819 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4821 (eval $ac_try) 2>&5
4822 ac_status=$?
4823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4824 (exit $ac_status); }; }; then
4825 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004826else
Martin v. Löwis11437992002-04-12 09:54:03 +00004827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004828sed 's/^/| /' conftest.$ac_ext >&5
4829
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004830fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004831rm -f conftest.err conftest.$ac_objext \
4832 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004833if test "$ac_cv_search_opendir" = no; then
4834 for ac_lib in dir; do
4835 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004837/* confdefs.h. */
4838_ACEOF
4839cat confdefs.h >>conftest.$ac_ext
4840cat >>conftest.$ac_ext <<_ACEOF
4841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004842
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004843/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004844#ifdef __cplusplus
4845extern "C"
4846#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004847/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004848 builtin and then its argument prototype would still apply. */
4849char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004850int
4851main ()
4852{
4853opendir ();
4854 ;
4855 return 0;
4856}
4857_ACEOF
4858rm -f conftest.$ac_objext conftest$ac_exeext
4859if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004860 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004862 grep -v '^ *+' conftest.er1 >conftest.err
4863 rm -f conftest.er1
4864 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4866 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004867 { ac_try='test -z "$ac_c_werror_flag"
4868 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4870 (eval $ac_try) 2>&5
4871 ac_status=$?
4872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4873 (exit $ac_status); }; } &&
4874 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4876 (eval $ac_try) 2>&5
4877 ac_status=$?
4878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4879 (exit $ac_status); }; }; then
4880 ac_cv_search_opendir="-l$ac_lib"
4881break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004882else
Martin v. Löwis11437992002-04-12 09:54:03 +00004883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004884sed 's/^/| /' conftest.$ac_ext >&5
4885
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004886fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004887rm -f conftest.err conftest.$ac_objext \
4888 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004889 done
4890fi
4891LIBS=$ac_func_search_save_LIBS
4892fi
4893echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4894echo "${ECHO_T}$ac_cv_search_opendir" >&6
4895if test "$ac_cv_search_opendir" != no; then
4896 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004897
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004898fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004899
Michael W. Hudson54241132001-12-07 15:38:26 +00004900else
Martin v. Löwis11437992002-04-12 09:54:03 +00004901 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4902echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4903if test "${ac_cv_search_opendir+set}" = set; then
4904 echo $ECHO_N "(cached) $ECHO_C" >&6
4905else
4906 ac_func_search_save_LIBS=$LIBS
4907ac_cv_search_opendir=no
4908cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004909/* confdefs.h. */
4910_ACEOF
4911cat confdefs.h >>conftest.$ac_ext
4912cat >>conftest.$ac_ext <<_ACEOF
4913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004914
4915/* Override any gcc2 internal prototype to avoid an error. */
4916#ifdef __cplusplus
4917extern "C"
4918#endif
4919/* We use char because int might match the return type of a gcc2
4920 builtin and then its argument prototype would still apply. */
4921char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004922int
4923main ()
4924{
4925opendir ();
4926 ;
4927 return 0;
4928}
4929_ACEOF
4930rm -f conftest.$ac_objext conftest$ac_exeext
4931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004932 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004934 grep -v '^ *+' conftest.er1 >conftest.err
4935 rm -f conftest.er1
4936 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004939 { ac_try='test -z "$ac_c_werror_flag"
4940 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4942 (eval $ac_try) 2>&5
4943 ac_status=$?
4944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945 (exit $ac_status); }; } &&
4946 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4948 (eval $ac_try) 2>&5
4949 ac_status=$?
4950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4951 (exit $ac_status); }; }; then
4952 ac_cv_search_opendir="none required"
4953else
4954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004955sed 's/^/| /' conftest.$ac_ext >&5
4956
Martin v. Löwis11437992002-04-12 09:54:03 +00004957fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004958rm -f conftest.err conftest.$ac_objext \
4959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004960if test "$ac_cv_search_opendir" = no; then
4961 for ac_lib in x; do
4962 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4963 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004964/* confdefs.h. */
4965_ACEOF
4966cat confdefs.h >>conftest.$ac_ext
4967cat >>conftest.$ac_ext <<_ACEOF
4968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004969
4970/* Override any gcc2 internal prototype to avoid an error. */
4971#ifdef __cplusplus
4972extern "C"
4973#endif
4974/* We use char because int might match the return type of a gcc2
4975 builtin and then its argument prototype would still apply. */
4976char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004977int
4978main ()
4979{
4980opendir ();
4981 ;
4982 return 0;
4983}
4984_ACEOF
4985rm -f conftest.$ac_objext conftest$ac_exeext
4986if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004987 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004989 grep -v '^ *+' conftest.er1 >conftest.err
4990 rm -f conftest.er1
4991 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4993 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004994 { ac_try='test -z "$ac_c_werror_flag"
4995 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4997 (eval $ac_try) 2>&5
4998 ac_status=$?
4999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5000 (exit $ac_status); }; } &&
5001 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5003 (eval $ac_try) 2>&5
5004 ac_status=$?
5005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5006 (exit $ac_status); }; }; then
5007 ac_cv_search_opendir="-l$ac_lib"
5008break
5009else
5010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005011sed 's/^/| /' conftest.$ac_ext >&5
5012
Martin v. Löwis11437992002-04-12 09:54:03 +00005013fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005014rm -f conftest.err conftest.$ac_objext \
5015 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005016 done
5017fi
5018LIBS=$ac_func_search_save_LIBS
5019fi
5020echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5021echo "${ECHO_T}$ac_cv_search_opendir" >&6
5022if test "$ac_cv_search_opendir" != no; then
5023 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5024
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025fi
5026
5027fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005028
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005029echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5030echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5031if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5032 echo $ECHO_N "(cached) $ECHO_C" >&6
5033else
5034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005035/* confdefs.h. */
5036_ACEOF
5037cat confdefs.h >>conftest.$ac_ext
5038cat >>conftest.$ac_ext <<_ACEOF
5039/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005040#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005041int
5042main ()
5043{
5044return makedev(0, 0);
5045 ;
5046 return 0;
5047}
5048_ACEOF
5049rm -f conftest.$ac_objext conftest$ac_exeext
5050if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005051 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005053 grep -v '^ *+' conftest.er1 >conftest.err
5054 rm -f conftest.er1
5055 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5057 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005058 { ac_try='test -z "$ac_c_werror_flag"
5059 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5061 (eval $ac_try) 2>&5
5062 ac_status=$?
5063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064 (exit $ac_status); }; } &&
5065 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5067 (eval $ac_try) 2>&5
5068 ac_status=$?
5069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5070 (exit $ac_status); }; }; then
5071 ac_cv_header_sys_types_h_makedev=yes
5072else
5073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005074sed 's/^/| /' conftest.$ac_ext >&5
5075
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005076ac_cv_header_sys_types_h_makedev=no
5077fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005078rm -f conftest.err conftest.$ac_objext \
5079 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005080
5081fi
5082echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5083echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5084
5085if test $ac_cv_header_sys_types_h_makedev = no; then
5086if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5087 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5088echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5089if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5090 echo $ECHO_N "(cached) $ECHO_C" >&6
5091fi
5092echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5093echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5094else
5095 # Is the header compilable?
5096echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5097echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005099/* confdefs.h. */
5100_ACEOF
5101cat confdefs.h >>conftest.$ac_ext
5102cat >>conftest.$ac_ext <<_ACEOF
5103/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005104$ac_includes_default
5105#include <sys/mkdev.h>
5106_ACEOF
5107rm -f conftest.$ac_objext
5108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005109 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005111 grep -v '^ *+' conftest.er1 >conftest.err
5112 rm -f conftest.er1
5113 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5115 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005116 { ac_try='test -z "$ac_c_werror_flag"
5117 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5119 (eval $ac_try) 2>&5
5120 ac_status=$?
5121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5122 (exit $ac_status); }; } &&
5123 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5125 (eval $ac_try) 2>&5
5126 ac_status=$?
5127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5128 (exit $ac_status); }; }; then
5129 ac_header_compiler=yes
5130else
5131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005132sed 's/^/| /' conftest.$ac_ext >&5
5133
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005134ac_header_compiler=no
5135fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005136rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005137echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5138echo "${ECHO_T}$ac_header_compiler" >&6
5139
5140# Is the header present?
5141echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5142echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005144/* confdefs.h. */
5145_ACEOF
5146cat confdefs.h >>conftest.$ac_ext
5147cat >>conftest.$ac_ext <<_ACEOF
5148/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005149#include <sys/mkdev.h>
5150_ACEOF
5151if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5152 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5153 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005154 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005155 rm -f conftest.er1
5156 cat conftest.err >&5
5157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5158 (exit $ac_status); } >/dev/null; then
5159 if test -s conftest.err; then
5160 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005161 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005162 else
5163 ac_cpp_err=
5164 fi
5165else
5166 ac_cpp_err=yes
5167fi
5168if test -z "$ac_cpp_err"; then
5169 ac_header_preproc=yes
5170else
5171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005172sed 's/^/| /' conftest.$ac_ext >&5
5173
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005174 ac_header_preproc=no
5175fi
5176rm -f conftest.err conftest.$ac_ext
5177echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5178echo "${ECHO_T}$ac_header_preproc" >&6
5179
5180# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005181case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5182 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005183 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5184echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005185 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5186echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5187 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005188 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005189 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005190 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5191echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005192 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5193echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5194 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5195echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5196 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5197echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005198 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5199echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005200 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5201echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005202 (
5203 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +00005204## --------------------------------- ##
5205## Report this to the python lists. ##
5206## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005207_ASBOX
5208 ) |
5209 sed "s/^/$as_me: WARNING: /" >&2
5210 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005211esac
5212echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5213echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5214if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5215 echo $ECHO_N "(cached) $ECHO_C" >&6
5216else
5217 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5218fi
5219echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5220echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5221
5222fi
5223if test $ac_cv_header_sys_mkdev_h = yes; then
5224
5225cat >>confdefs.h <<\_ACEOF
5226#define MAJOR_IN_MKDEV 1
5227_ACEOF
5228
5229fi
5230
5231
5232
5233 if test $ac_cv_header_sys_mkdev_h = no; then
5234 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5235 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5236echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5237if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5238 echo $ECHO_N "(cached) $ECHO_C" >&6
5239fi
5240echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5241echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5242else
5243 # Is the header compilable?
5244echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5245echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005247/* confdefs.h. */
5248_ACEOF
5249cat confdefs.h >>conftest.$ac_ext
5250cat >>conftest.$ac_ext <<_ACEOF
5251/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005252$ac_includes_default
5253#include <sys/sysmacros.h>
5254_ACEOF
5255rm -f conftest.$ac_objext
5256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005257 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005259 grep -v '^ *+' conftest.er1 >conftest.err
5260 rm -f conftest.er1
5261 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5263 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005264 { ac_try='test -z "$ac_c_werror_flag"
5265 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5267 (eval $ac_try) 2>&5
5268 ac_status=$?
5269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5270 (exit $ac_status); }; } &&
5271 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5273 (eval $ac_try) 2>&5
5274 ac_status=$?
5275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276 (exit $ac_status); }; }; then
5277 ac_header_compiler=yes
5278else
5279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005280sed 's/^/| /' conftest.$ac_ext >&5
5281
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005282ac_header_compiler=no
5283fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005284rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005285echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5286echo "${ECHO_T}$ac_header_compiler" >&6
5287
5288# Is the header present?
5289echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5290echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5291cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005292/* confdefs.h. */
5293_ACEOF
5294cat confdefs.h >>conftest.$ac_ext
5295cat >>conftest.$ac_ext <<_ACEOF
5296/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005297#include <sys/sysmacros.h>
5298_ACEOF
5299if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5300 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5301 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005302 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005303 rm -f conftest.er1
5304 cat conftest.err >&5
5305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5306 (exit $ac_status); } >/dev/null; then
5307 if test -s conftest.err; then
5308 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005309 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005310 else
5311 ac_cpp_err=
5312 fi
5313else
5314 ac_cpp_err=yes
5315fi
5316if test -z "$ac_cpp_err"; then
5317 ac_header_preproc=yes
5318else
5319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005320sed 's/^/| /' conftest.$ac_ext >&5
5321
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005322 ac_header_preproc=no
5323fi
5324rm -f conftest.err conftest.$ac_ext
5325echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5326echo "${ECHO_T}$ac_header_preproc" >&6
5327
5328# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005329case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5330 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005331 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5332echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005333 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5334echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5335 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005336 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005337 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5339echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005340 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5341echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5342 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5343echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5344 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5345echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005346 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5347echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005348 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5349echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005350 (
5351 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +00005352## --------------------------------- ##
5353## Report this to the python lists. ##
5354## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005355_ASBOX
5356 ) |
5357 sed "s/^/$as_me: WARNING: /" >&2
5358 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005359esac
5360echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5361echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5362if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5363 echo $ECHO_N "(cached) $ECHO_C" >&6
5364else
5365 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5366fi
5367echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5368echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5369
5370fi
5371if test $ac_cv_header_sys_sysmacros_h = yes; then
5372
5373cat >>confdefs.h <<\_ACEOF
5374#define MAJOR_IN_SYSMACROS 1
5375_ACEOF
5376
5377fi
5378
5379
5380 fi
5381fi
5382
Michael W. Hudson54241132001-12-07 15:38:26 +00005383
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005384# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005385
5386for ac_header in term.h
5387do
5388as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5389echo "$as_me:$LINENO: checking for $ac_header" >&5
5390echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5391if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005392 echo $ECHO_N "(cached) $ECHO_C" >&6
5393else
5394 cat >conftest.$ac_ext <<_ACEOF
5395/* confdefs.h. */
5396_ACEOF
5397cat confdefs.h >>conftest.$ac_ext
5398cat >>conftest.$ac_ext <<_ACEOF
5399/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005400
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005401#ifdef HAVE_CURSES_H
5402#include <curses.h>
5403#endif
5404
5405
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005406#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005407_ACEOF
5408rm -f conftest.$ac_objext
5409if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5410 (eval $ac_compile) 2>conftest.er1
5411 ac_status=$?
5412 grep -v '^ *+' conftest.er1 >conftest.err
5413 rm -f conftest.er1
5414 cat conftest.err >&5
5415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5416 (exit $ac_status); } &&
5417 { ac_try='test -z "$ac_c_werror_flag"
5418 || test ! -s conftest.err'
5419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5420 (eval $ac_try) 2>&5
5421 ac_status=$?
5422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5423 (exit $ac_status); }; } &&
5424 { ac_try='test -s conftest.$ac_objext'
5425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5426 (eval $ac_try) 2>&5
5427 ac_status=$?
5428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5429 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005430 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005431else
5432 echo "$as_me: failed program was:" >&5
5433sed 's/^/| /' conftest.$ac_ext >&5
5434
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005435eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005436fi
5437rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5438fi
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005439echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5440echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5441if test `eval echo '${'$as_ac_Header'}'` = yes; then
5442 cat >>confdefs.h <<_ACEOF
5443#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5444_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005445
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005446fi
5447
5448done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005449
5450
Guido van Rossum627b2d71993-12-24 10:39:16 +00005451# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005452was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005453echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5454echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5455cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005456/* confdefs.h. */
5457_ACEOF
5458cat confdefs.h >>conftest.$ac_ext
5459cat >>conftest.$ac_ext <<_ACEOF
5460/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005461#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005462
5463_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005464if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005465 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005466 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005467else
Martin v. Löwis11437992002-04-12 09:54:03 +00005468
5469
5470cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005471#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005472_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005473
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005474
Guido van Rossum627b2d71993-12-24 10:39:16 +00005475fi
5476rm -f conftest*
5477
Martin v. Löwis11437992002-04-12 09:54:03 +00005478echo "$as_me:$LINENO: result: $was_it_defined" >&5
5479echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005480
Neal Norwitz11690112002-07-30 01:08:28 +00005481# Check whether using makedev requires defining _OSF_SOURCE
5482echo "$as_me:$LINENO: checking for makedev" >&5
5483echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5484cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005485/* confdefs.h. */
5486_ACEOF
5487cat confdefs.h >>conftest.$ac_ext
5488cat >>conftest.$ac_ext <<_ACEOF
5489/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005490#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005491int
5492main ()
5493{
5494 makedev(0, 0)
5495 ;
5496 return 0;
5497}
5498_ACEOF
5499rm -f conftest.$ac_objext conftest$ac_exeext
5500if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005501 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005503 grep -v '^ *+' conftest.er1 >conftest.err
5504 rm -f conftest.er1
5505 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5507 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005508 { ac_try='test -z "$ac_c_werror_flag"
5509 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5511 (eval $ac_try) 2>&5
5512 ac_status=$?
5513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5514 (exit $ac_status); }; } &&
5515 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5517 (eval $ac_try) 2>&5
5518 ac_status=$?
5519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5520 (exit $ac_status); }; }; then
5521 ac_cv_has_makedev=yes
5522else
5523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005524sed 's/^/| /' conftest.$ac_ext >&5
5525
Neal Norwitz11690112002-07-30 01:08:28 +00005526ac_cv_has_makedev=no
5527fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005528rm -f conftest.err conftest.$ac_objext \
5529 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005530if test "$ac_cv_has_makedev" = "no"; then
5531 # we didn't link, try if _OSF_SOURCE will allow us to link
5532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005533/* confdefs.h. */
5534_ACEOF
5535cat confdefs.h >>conftest.$ac_ext
5536cat >>conftest.$ac_ext <<_ACEOF
5537/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005538
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005539#define _OSF_SOURCE 1
5540#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005541
Neal Norwitz11690112002-07-30 01:08:28 +00005542int
5543main ()
5544{
5545 makedev(0, 0)
5546 ;
5547 return 0;
5548}
5549_ACEOF
5550rm -f conftest.$ac_objext conftest$ac_exeext
5551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005552 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005554 grep -v '^ *+' conftest.er1 >conftest.err
5555 rm -f conftest.er1
5556 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5558 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005559 { ac_try='test -z "$ac_c_werror_flag"
5560 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5562 (eval $ac_try) 2>&5
5563 ac_status=$?
5564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5565 (exit $ac_status); }; } &&
5566 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5568 (eval $ac_try) 2>&5
5569 ac_status=$?
5570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5571 (exit $ac_status); }; }; then
5572 ac_cv_has_makedev=yes
5573else
5574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005575sed 's/^/| /' conftest.$ac_ext >&5
5576
Neal Norwitz11690112002-07-30 01:08:28 +00005577ac_cv_has_makedev=no
5578fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005579rm -f conftest.err conftest.$ac_objext \
5580 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005581 if test "$ac_cv_has_makedev" = "yes"; then
5582
5583cat >>confdefs.h <<\_ACEOF
5584#define _OSF_SOURCE 1
5585_ACEOF
5586
5587 fi
5588fi
5589echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5590echo "${ECHO_T}$ac_cv_has_makedev" >&6
5591if test "$ac_cv_has_makedev" = "yes"; then
5592
5593cat >>confdefs.h <<\_ACEOF
5594#define HAVE_MAKEDEV 1
5595_ACEOF
5596
5597fi
5598
Martin v. Löwis399a6892002-10-04 10:22:02 +00005599# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5600# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5601# defined, but the compiler does not support pragma redefine_extname,
5602# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5603# structures (such as rlimit64) without declaring them. As a
5604# work-around, disable LFS on such configurations
5605
5606use_lfs=yes
5607echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5608echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005610/* confdefs.h. */
5611_ACEOF
5612cat confdefs.h >>conftest.$ac_ext
5613cat >>conftest.$ac_ext <<_ACEOF
5614/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005615
5616#define _LARGEFILE_SOURCE 1
5617#define _FILE_OFFSET_BITS 64
5618#include <sys/resource.h>
5619
Martin v. Löwis399a6892002-10-04 10:22:02 +00005620int
5621main ()
5622{
5623struct rlimit foo;
5624 ;
5625 return 0;
5626}
5627_ACEOF
5628rm -f conftest.$ac_objext
5629if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005630 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005632 grep -v '^ *+' conftest.er1 >conftest.err
5633 rm -f conftest.er1
5634 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5636 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005637 { ac_try='test -z "$ac_c_werror_flag"
5638 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5640 (eval $ac_try) 2>&5
5641 ac_status=$?
5642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5643 (exit $ac_status); }; } &&
5644 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5646 (eval $ac_try) 2>&5
5647 ac_status=$?
5648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5649 (exit $ac_status); }; }; then
5650 sol_lfs_bug=no
5651else
5652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005653sed 's/^/| /' conftest.$ac_ext >&5
5654
Martin v. Löwis399a6892002-10-04 10:22:02 +00005655sol_lfs_bug=yes
5656fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005657rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005658echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5659echo "${ECHO_T}$sol_lfs_bug" >&6
5660if test "$sol_lfs_bug" = "yes"; then
5661 use_lfs=no
5662fi
5663
5664if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005665# Two defines needed to enable largefile support on various platforms
5666# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005667
Martin v. Löwis11437992002-04-12 09:54:03 +00005668cat >>confdefs.h <<\_ACEOF
5669#define _LARGEFILE_SOURCE 1
5670_ACEOF
5671
5672
5673cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005674#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005675_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005676
Martin v. Löwis399a6892002-10-04 10:22:02 +00005677fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005678
Guido van Rossum84e7b241996-08-19 21:59:00 +00005679# Add some code to confdefs.h so that the test for off_t works on SCO
5680cat >> confdefs.h <<\EOF
5681#if defined(SCO_DS)
5682#undef _OFF_T
5683#endif
5684EOF
5685
Guido van Rossumef2255b2000-03-10 22:30:29 +00005686# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005687echo "$as_me:$LINENO: checking for mode_t" >&5
5688echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5689if test "${ac_cv_type_mode_t+set}" = set; then
5690 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005691else
Martin v. Löwis11437992002-04-12 09:54:03 +00005692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005693/* confdefs.h. */
5694_ACEOF
5695cat confdefs.h >>conftest.$ac_ext
5696cat >>conftest.$ac_ext <<_ACEOF
5697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005698$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005699int
5700main ()
5701{
5702if ((mode_t *) 0)
5703 return 0;
5704if (sizeof (mode_t))
5705 return 0;
5706 ;
5707 return 0;
5708}
5709_ACEOF
5710rm -f conftest.$ac_objext
5711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005712 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005714 grep -v '^ *+' conftest.er1 >conftest.err
5715 rm -f conftest.er1
5716 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5718 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005719 { ac_try='test -z "$ac_c_werror_flag"
5720 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5722 (eval $ac_try) 2>&5
5723 ac_status=$?
5724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5725 (exit $ac_status); }; } &&
5726 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5728 (eval $ac_try) 2>&5
5729 ac_status=$?
5730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5731 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005732 ac_cv_type_mode_t=yes
5733else
Martin v. Löwis11437992002-04-12 09:54:03 +00005734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005735sed 's/^/| /' conftest.$ac_ext >&5
5736
Martin v. Löwis11437992002-04-12 09:54:03 +00005737ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005738fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005739rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005740fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005741echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5742echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5743if test $ac_cv_type_mode_t = yes; then
5744 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005745else
Martin v. Löwis11437992002-04-12 09:54:03 +00005746
5747cat >>confdefs.h <<_ACEOF
5748#define mode_t int
5749_ACEOF
5750
5751fi
5752
5753echo "$as_me:$LINENO: checking for off_t" >&5
5754echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5755if test "${ac_cv_type_off_t+set}" = set; then
5756 echo $ECHO_N "(cached) $ECHO_C" >&6
5757else
5758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005759/* confdefs.h. */
5760_ACEOF
5761cat confdefs.h >>conftest.$ac_ext
5762cat >>conftest.$ac_ext <<_ACEOF
5763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005764$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005765int
5766main ()
5767{
5768if ((off_t *) 0)
5769 return 0;
5770if (sizeof (off_t))
5771 return 0;
5772 ;
5773 return 0;
5774}
5775_ACEOF
5776rm -f conftest.$ac_objext
5777if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005778 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005780 grep -v '^ *+' conftest.er1 >conftest.err
5781 rm -f conftest.er1
5782 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5784 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005785 { ac_try='test -z "$ac_c_werror_flag"
5786 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5788 (eval $ac_try) 2>&5
5789 ac_status=$?
5790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5791 (exit $ac_status); }; } &&
5792 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5794 (eval $ac_try) 2>&5
5795 ac_status=$?
5796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5797 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005798 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005799else
Martin v. Löwis11437992002-04-12 09:54:03 +00005800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005801sed 's/^/| /' conftest.$ac_ext >&5
5802
Martin v. Löwis11437992002-04-12 09:54:03 +00005803ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005804fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005805rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005806fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005807echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5808echo "${ECHO_T}$ac_cv_type_off_t" >&6
5809if test $ac_cv_type_off_t = yes; then
5810 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005811else
Martin v. Löwis11437992002-04-12 09:54:03 +00005812
5813cat >>confdefs.h <<_ACEOF
5814#define off_t long
5815_ACEOF
5816
5817fi
5818
5819echo "$as_me:$LINENO: checking for pid_t" >&5
5820echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5821if test "${ac_cv_type_pid_t+set}" = set; then
5822 echo $ECHO_N "(cached) $ECHO_C" >&6
5823else
5824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005825/* confdefs.h. */
5826_ACEOF
5827cat confdefs.h >>conftest.$ac_ext
5828cat >>conftest.$ac_ext <<_ACEOF
5829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005830$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005831int
5832main ()
5833{
5834if ((pid_t *) 0)
5835 return 0;
5836if (sizeof (pid_t))
5837 return 0;
5838 ;
5839 return 0;
5840}
5841_ACEOF
5842rm -f conftest.$ac_objext
5843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005844 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005846 grep -v '^ *+' conftest.er1 >conftest.err
5847 rm -f conftest.er1
5848 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5850 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005851 { ac_try='test -z "$ac_c_werror_flag"
5852 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5854 (eval $ac_try) 2>&5
5855 ac_status=$?
5856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5857 (exit $ac_status); }; } &&
5858 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5860 (eval $ac_try) 2>&5
5861 ac_status=$?
5862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5863 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005864 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005865else
Martin v. Löwis11437992002-04-12 09:54:03 +00005866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005867sed 's/^/| /' conftest.$ac_ext >&5
5868
Martin v. Löwis11437992002-04-12 09:54:03 +00005869ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005870fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005871rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005872fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005873echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5874echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5875if test $ac_cv_type_pid_t = yes; then
5876 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005877else
Martin v. Löwis11437992002-04-12 09:54:03 +00005878
5879cat >>confdefs.h <<_ACEOF
5880#define pid_t int
5881_ACEOF
5882
5883fi
5884
5885echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5886echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5887if test "${ac_cv_type_signal+set}" = set; then
5888 echo $ECHO_N "(cached) $ECHO_C" >&6
5889else
5890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005891/* confdefs.h. */
5892_ACEOF
5893cat confdefs.h >>conftest.$ac_ext
5894cat >>conftest.$ac_ext <<_ACEOF
5895/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005896#include <sys/types.h>
5897#include <signal.h>
5898#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005899# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005900#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005901#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005902extern "C" void (*signal (int, void (*)(int)))(int);
5903#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005904void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005905#endif
5906
Martin v. Löwis11437992002-04-12 09:54:03 +00005907int
5908main ()
5909{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005910int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005911 ;
5912 return 0;
5913}
5914_ACEOF
5915rm -f conftest.$ac_objext
5916if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005917 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005919 grep -v '^ *+' conftest.er1 >conftest.err
5920 rm -f conftest.er1
5921 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5923 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005924 { ac_try='test -z "$ac_c_werror_flag"
5925 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5927 (eval $ac_try) 2>&5
5928 ac_status=$?
5929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5930 (exit $ac_status); }; } &&
5931 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5933 (eval $ac_try) 2>&5
5934 ac_status=$?
5935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5936 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005937 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005938else
Martin v. Löwis11437992002-04-12 09:54:03 +00005939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005940sed 's/^/| /' conftest.$ac_ext >&5
5941
Martin v. Löwis11437992002-04-12 09:54:03 +00005942ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005943fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005944rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005945fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005946echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5947echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005948
Martin v. Löwis11437992002-04-12 09:54:03 +00005949cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005950#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005951_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005952
Michael W. Hudson54241132001-12-07 15:38:26 +00005953
Martin v. Löwis11437992002-04-12 09:54:03 +00005954echo "$as_me:$LINENO: checking for size_t" >&5
5955echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5956if test "${ac_cv_type_size_t+set}" = set; then
5957 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005958else
Martin v. Löwis11437992002-04-12 09:54:03 +00005959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005960/* confdefs.h. */
5961_ACEOF
5962cat confdefs.h >>conftest.$ac_ext
5963cat >>conftest.$ac_ext <<_ACEOF
5964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005965$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005966int
5967main ()
5968{
5969if ((size_t *) 0)
5970 return 0;
5971if (sizeof (size_t))
5972 return 0;
5973 ;
5974 return 0;
5975}
5976_ACEOF
5977rm -f conftest.$ac_objext
5978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005979 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005981 grep -v '^ *+' conftest.er1 >conftest.err
5982 rm -f conftest.er1
5983 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5985 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005986 { ac_try='test -z "$ac_c_werror_flag"
5987 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5989 (eval $ac_try) 2>&5
5990 ac_status=$?
5991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5992 (exit $ac_status); }; } &&
5993 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5995 (eval $ac_try) 2>&5
5996 ac_status=$?
5997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5998 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005999 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006000else
Martin v. Löwis11437992002-04-12 09:54:03 +00006001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006002sed 's/^/| /' conftest.$ac_ext >&5
6003
Martin v. Löwis11437992002-04-12 09:54:03 +00006004ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006005fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006006rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006007fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006008echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6009echo "${ECHO_T}$ac_cv_type_size_t" >&6
6010if test $ac_cv_type_size_t = yes; then
6011 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006012else
Martin v. Löwis11437992002-04-12 09:54:03 +00006013
6014cat >>confdefs.h <<_ACEOF
6015#define size_t unsigned
6016_ACEOF
6017
6018fi
6019
6020echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6021echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6022if test "${ac_cv_type_uid_t+set}" = set; then
6023 echo $ECHO_N "(cached) $ECHO_C" >&6
6024else
6025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006026/* confdefs.h. */
6027_ACEOF
6028cat confdefs.h >>conftest.$ac_ext
6029cat >>conftest.$ac_ext <<_ACEOF
6030/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006031#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006032
6033_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006035 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006036 ac_cv_type_uid_t=yes
6037else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006038 ac_cv_type_uid_t=no
6039fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006040rm -f conftest*
6041
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006042fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006043echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6044echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006045if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006046
Martin v. Löwis11437992002-04-12 09:54:03 +00006047cat >>confdefs.h <<\_ACEOF
6048#define uid_t int
6049_ACEOF
6050
6051
6052cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006053#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006054_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006055
6056fi
6057
Jack Jansendd19cf82001-12-06 22:36:17 +00006058
Michael W. Hudson54241132001-12-07 15:38:26 +00006059# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006060# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00006061echo "$as_me:$LINENO: checking for int" >&5
6062echo $ECHO_N "checking for int... $ECHO_C" >&6
6063if test "${ac_cv_type_int+set}" = set; then
6064 echo $ECHO_N "(cached) $ECHO_C" >&6
6065else
6066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006067/* confdefs.h. */
6068_ACEOF
6069cat confdefs.h >>conftest.$ac_ext
6070cat >>conftest.$ac_ext <<_ACEOF
6071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006072$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006073int
6074main ()
6075{
6076if ((int *) 0)
6077 return 0;
6078if (sizeof (int))
6079 return 0;
6080 ;
6081 return 0;
6082}
6083_ACEOF
6084rm -f conftest.$ac_objext
6085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006086 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006088 grep -v '^ *+' conftest.er1 >conftest.err
6089 rm -f conftest.er1
6090 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6092 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006093 { ac_try='test -z "$ac_c_werror_flag"
6094 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6096 (eval $ac_try) 2>&5
6097 ac_status=$?
6098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099 (exit $ac_status); }; } &&
6100 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6102 (eval $ac_try) 2>&5
6103 ac_status=$?
6104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6105 (exit $ac_status); }; }; then
6106 ac_cv_type_int=yes
6107else
6108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006109sed 's/^/| /' conftest.$ac_ext >&5
6110
Martin v. Löwis11437992002-04-12 09:54:03 +00006111ac_cv_type_int=no
6112fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006113rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006114fi
6115echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6116echo "${ECHO_T}$ac_cv_type_int" >&6
6117
6118echo "$as_me:$LINENO: checking size of int" >&5
6119echo $ECHO_N "checking size of int... $ECHO_C" >&6
6120if test "${ac_cv_sizeof_int+set}" = set; then
6121 echo $ECHO_N "(cached) $ECHO_C" >&6
6122else
6123 if test "$ac_cv_type_int" = yes; then
6124 # The cast to unsigned long works around a bug in the HP C Compiler
6125 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6126 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6127 # This bug is HP SR number 8606223364.
6128 if test "$cross_compiling" = yes; then
6129 # Depending upon the size, compute the lo and hi bounds.
6130cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006131/* confdefs.h. */
6132_ACEOF
6133cat confdefs.h >>conftest.$ac_ext
6134cat >>conftest.$ac_ext <<_ACEOF
6135/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006136$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006137int
6138main ()
6139{
6140static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6141test_array [0] = 0
6142
6143 ;
6144 return 0;
6145}
6146_ACEOF
6147rm -f conftest.$ac_objext
6148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006149 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006151 grep -v '^ *+' conftest.er1 >conftest.err
6152 rm -f conftest.er1
6153 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6155 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006156 { ac_try='test -z "$ac_c_werror_flag"
6157 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6159 (eval $ac_try) 2>&5
6160 ac_status=$?
6161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6162 (exit $ac_status); }; } &&
6163 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6165 (eval $ac_try) 2>&5
6166 ac_status=$?
6167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6168 (exit $ac_status); }; }; then
6169 ac_lo=0 ac_mid=0
6170 while :; do
6171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006172/* confdefs.h. */
6173_ACEOF
6174cat confdefs.h >>conftest.$ac_ext
6175cat >>conftest.$ac_ext <<_ACEOF
6176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006177$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006178int
6179main ()
6180{
6181static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6182test_array [0] = 0
6183
6184 ;
6185 return 0;
6186}
6187_ACEOF
6188rm -f conftest.$ac_objext
6189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006190 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006192 grep -v '^ *+' conftest.er1 >conftest.err
6193 rm -f conftest.er1
6194 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6196 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006197 { ac_try='test -z "$ac_c_werror_flag"
6198 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6200 (eval $ac_try) 2>&5
6201 ac_status=$?
6202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6203 (exit $ac_status); }; } &&
6204 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6206 (eval $ac_try) 2>&5
6207 ac_status=$?
6208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6209 (exit $ac_status); }; }; then
6210 ac_hi=$ac_mid; break
6211else
6212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006213sed 's/^/| /' conftest.$ac_ext >&5
6214
Martin v. Löwis11437992002-04-12 09:54:03 +00006215ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006216 if test $ac_lo -le $ac_mid; then
6217 ac_lo= ac_hi=
6218 break
6219 fi
6220 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006221fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006222rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006223 done
6224else
6225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006226sed 's/^/| /' conftest.$ac_ext >&5
6227
Martin v. Löwis11437992002-04-12 09:54:03 +00006228cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006229/* confdefs.h. */
6230_ACEOF
6231cat confdefs.h >>conftest.$ac_ext
6232cat >>conftest.$ac_ext <<_ACEOF
6233/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006234$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006235int
6236main ()
6237{
6238static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6239test_array [0] = 0
6240
6241 ;
6242 return 0;
6243}
6244_ACEOF
6245rm -f conftest.$ac_objext
6246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006247 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006249 grep -v '^ *+' conftest.er1 >conftest.err
6250 rm -f conftest.er1
6251 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6253 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006254 { ac_try='test -z "$ac_c_werror_flag"
6255 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6257 (eval $ac_try) 2>&5
6258 ac_status=$?
6259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6260 (exit $ac_status); }; } &&
6261 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6263 (eval $ac_try) 2>&5
6264 ac_status=$?
6265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6266 (exit $ac_status); }; }; then
6267 ac_hi=-1 ac_mid=-1
6268 while :; do
6269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006270/* confdefs.h. */
6271_ACEOF
6272cat confdefs.h >>conftest.$ac_ext
6273cat >>conftest.$ac_ext <<_ACEOF
6274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006275$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006276int
6277main ()
6278{
6279static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6280test_array [0] = 0
6281
6282 ;
6283 return 0;
6284}
6285_ACEOF
6286rm -f conftest.$ac_objext
6287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006288 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006290 grep -v '^ *+' conftest.er1 >conftest.err
6291 rm -f conftest.er1
6292 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6294 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006295 { ac_try='test -z "$ac_c_werror_flag"
6296 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6298 (eval $ac_try) 2>&5
6299 ac_status=$?
6300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6301 (exit $ac_status); }; } &&
6302 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6304 (eval $ac_try) 2>&5
6305 ac_status=$?
6306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6307 (exit $ac_status); }; }; then
6308 ac_lo=$ac_mid; break
6309else
6310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006311sed 's/^/| /' conftest.$ac_ext >&5
6312
Martin v. Löwis11437992002-04-12 09:54:03 +00006313ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006314 if test $ac_mid -le $ac_hi; then
6315 ac_lo= ac_hi=
6316 break
6317 fi
6318 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006319fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006320rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006321 done
6322else
6323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006324sed 's/^/| /' conftest.$ac_ext >&5
6325
Martin v. Löwis11437992002-04-12 09:54:03 +00006326ac_lo= ac_hi=
6327fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006328rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006329fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006330rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006331# Binary search between lo and hi bounds.
6332while test "x$ac_lo" != "x$ac_hi"; do
6333 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006335/* confdefs.h. */
6336_ACEOF
6337cat confdefs.h >>conftest.$ac_ext
6338cat >>conftest.$ac_ext <<_ACEOF
6339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006340$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006341int
6342main ()
6343{
6344static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6345test_array [0] = 0
6346
6347 ;
6348 return 0;
6349}
6350_ACEOF
6351rm -f conftest.$ac_objext
6352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006353 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006355 grep -v '^ *+' conftest.er1 >conftest.err
6356 rm -f conftest.er1
6357 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6359 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006360 { ac_try='test -z "$ac_c_werror_flag"
6361 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6363 (eval $ac_try) 2>&5
6364 ac_status=$?
6365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6366 (exit $ac_status); }; } &&
6367 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6369 (eval $ac_try) 2>&5
6370 ac_status=$?
6371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6372 (exit $ac_status); }; }; then
6373 ac_hi=$ac_mid
6374else
6375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006376sed 's/^/| /' conftest.$ac_ext >&5
6377
Martin v. Löwis11437992002-04-12 09:54:03 +00006378ac_lo=`expr '(' $ac_mid ')' + 1`
6379fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006380rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006381done
6382case $ac_lo in
6383?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006384'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6385See \`config.log' for more details." >&5
6386echo "$as_me: error: cannot compute sizeof (int), 77
6387See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006388 { (exit 1); exit 1; }; } ;;
6389esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006390else
6391 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00006392 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6393See \`config.log' for more details." >&5
6394echo "$as_me: error: cannot run test program while cross compiling
6395See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006396 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006397else
Martin v. Löwis11437992002-04-12 09:54:03 +00006398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006399/* confdefs.h. */
6400_ACEOF
6401cat confdefs.h >>conftest.$ac_ext
6402cat >>conftest.$ac_ext <<_ACEOF
6403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006404$ac_includes_default
6405long longval () { return (long) (sizeof (int)); }
6406unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006407#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006408#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006409int
6410main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006411{
Martin v. Löwis11437992002-04-12 09:54:03 +00006412
6413 FILE *f = fopen ("conftest.val", "w");
6414 if (! f)
6415 exit (1);
6416 if (((long) (sizeof (int))) < 0)
6417 {
6418 long i = longval ();
6419 if (i != ((long) (sizeof (int))))
6420 exit (1);
6421 fprintf (f, "%ld\n", i);
6422 }
6423 else
6424 {
6425 unsigned long i = ulongval ();
6426 if (i != ((long) (sizeof (int))))
6427 exit (1);
6428 fprintf (f, "%lu\n", i);
6429 }
6430 exit (ferror (f) || fclose (f) != 0);
6431
6432 ;
6433 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006434}
Martin v. Löwis11437992002-04-12 09:54:03 +00006435_ACEOF
6436rm -f conftest$ac_exeext
6437if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6438 (eval $ac_link) 2>&5
6439 ac_status=$?
6440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6441 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6443 (eval $ac_try) 2>&5
6444 ac_status=$?
6445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6446 (exit $ac_status); }; }; then
6447 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006448else
Martin v. Löwis11437992002-04-12 09:54:03 +00006449 echo "$as_me: program exited with status $ac_status" >&5
6450echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006451sed 's/^/| /' conftest.$ac_ext >&5
6452
Martin v. Löwis11437992002-04-12 09:54:03 +00006453( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006454{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6455See \`config.log' for more details." >&5
6456echo "$as_me: error: cannot compute sizeof (int), 77
6457See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006458 { (exit 1); exit 1; }; }
6459fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006460rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006461fi
6462fi
6463rm -f conftest.val
6464else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006465 ac_cv_sizeof_int=0
6466fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006467fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006468echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6469echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6470cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006471#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006472_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006473
6474
Martin v. Löwis11437992002-04-12 09:54:03 +00006475echo "$as_me:$LINENO: checking for long" >&5
6476echo $ECHO_N "checking for long... $ECHO_C" >&6
6477if test "${ac_cv_type_long+set}" = set; then
6478 echo $ECHO_N "(cached) $ECHO_C" >&6
6479else
6480 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006481/* confdefs.h. */
6482_ACEOF
6483cat confdefs.h >>conftest.$ac_ext
6484cat >>conftest.$ac_ext <<_ACEOF
6485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006486$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006487int
6488main ()
6489{
6490if ((long *) 0)
6491 return 0;
6492if (sizeof (long))
6493 return 0;
6494 ;
6495 return 0;
6496}
6497_ACEOF
6498rm -f conftest.$ac_objext
6499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006500 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006502 grep -v '^ *+' conftest.er1 >conftest.err
6503 rm -f conftest.er1
6504 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6506 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006507 { ac_try='test -z "$ac_c_werror_flag"
6508 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6510 (eval $ac_try) 2>&5
6511 ac_status=$?
6512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6513 (exit $ac_status); }; } &&
6514 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6516 (eval $ac_try) 2>&5
6517 ac_status=$?
6518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6519 (exit $ac_status); }; }; then
6520 ac_cv_type_long=yes
6521else
6522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006523sed 's/^/| /' conftest.$ac_ext >&5
6524
Martin v. Löwis11437992002-04-12 09:54:03 +00006525ac_cv_type_long=no
6526fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006527rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006528fi
6529echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6530echo "${ECHO_T}$ac_cv_type_long" >&6
6531
6532echo "$as_me:$LINENO: checking size of long" >&5
6533echo $ECHO_N "checking size of long... $ECHO_C" >&6
6534if test "${ac_cv_sizeof_long+set}" = set; then
6535 echo $ECHO_N "(cached) $ECHO_C" >&6
6536else
6537 if test "$ac_cv_type_long" = yes; then
6538 # The cast to unsigned long works around a bug in the HP C Compiler
6539 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6540 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6541 # This bug is HP SR number 8606223364.
6542 if test "$cross_compiling" = yes; then
6543 # Depending upon the size, compute the lo and hi bounds.
6544cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006545/* confdefs.h. */
6546_ACEOF
6547cat confdefs.h >>conftest.$ac_ext
6548cat >>conftest.$ac_ext <<_ACEOF
6549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006550$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006551int
6552main ()
6553{
6554static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6555test_array [0] = 0
6556
6557 ;
6558 return 0;
6559}
6560_ACEOF
6561rm -f conftest.$ac_objext
6562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006563 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006565 grep -v '^ *+' conftest.er1 >conftest.err
6566 rm -f conftest.er1
6567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6569 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006570 { ac_try='test -z "$ac_c_werror_flag"
6571 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6573 (eval $ac_try) 2>&5
6574 ac_status=$?
6575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6576 (exit $ac_status); }; } &&
6577 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6579 (eval $ac_try) 2>&5
6580 ac_status=$?
6581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6582 (exit $ac_status); }; }; then
6583 ac_lo=0 ac_mid=0
6584 while :; do
6585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006586/* confdefs.h. */
6587_ACEOF
6588cat confdefs.h >>conftest.$ac_ext
6589cat >>conftest.$ac_ext <<_ACEOF
6590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006591$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006592int
6593main ()
6594{
6595static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6596test_array [0] = 0
6597
6598 ;
6599 return 0;
6600}
6601_ACEOF
6602rm -f conftest.$ac_objext
6603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006604 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006606 grep -v '^ *+' conftest.er1 >conftest.err
6607 rm -f conftest.er1
6608 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6610 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006611 { ac_try='test -z "$ac_c_werror_flag"
6612 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6614 (eval $ac_try) 2>&5
6615 ac_status=$?
6616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6617 (exit $ac_status); }; } &&
6618 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6620 (eval $ac_try) 2>&5
6621 ac_status=$?
6622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6623 (exit $ac_status); }; }; then
6624 ac_hi=$ac_mid; break
6625else
6626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006627sed 's/^/| /' conftest.$ac_ext >&5
6628
Martin v. Löwis11437992002-04-12 09:54:03 +00006629ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006630 if test $ac_lo -le $ac_mid; then
6631 ac_lo= ac_hi=
6632 break
6633 fi
6634 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006635fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006636rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006637 done
6638else
6639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006640sed 's/^/| /' conftest.$ac_ext >&5
6641
Martin v. Löwis11437992002-04-12 09:54:03 +00006642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006643/* confdefs.h. */
6644_ACEOF
6645cat confdefs.h >>conftest.$ac_ext
6646cat >>conftest.$ac_ext <<_ACEOF
6647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006648$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006649int
6650main ()
6651{
6652static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6653test_array [0] = 0
6654
6655 ;
6656 return 0;
6657}
6658_ACEOF
6659rm -f conftest.$ac_objext
6660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006661 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006663 grep -v '^ *+' conftest.er1 >conftest.err
6664 rm -f conftest.er1
6665 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6667 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006668 { ac_try='test -z "$ac_c_werror_flag"
6669 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6671 (eval $ac_try) 2>&5
6672 ac_status=$?
6673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6674 (exit $ac_status); }; } &&
6675 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6677 (eval $ac_try) 2>&5
6678 ac_status=$?
6679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6680 (exit $ac_status); }; }; then
6681 ac_hi=-1 ac_mid=-1
6682 while :; do
6683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006684/* confdefs.h. */
6685_ACEOF
6686cat confdefs.h >>conftest.$ac_ext
6687cat >>conftest.$ac_ext <<_ACEOF
6688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006689$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006690int
6691main ()
6692{
6693static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6694test_array [0] = 0
6695
6696 ;
6697 return 0;
6698}
6699_ACEOF
6700rm -f conftest.$ac_objext
6701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006702 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006704 grep -v '^ *+' conftest.er1 >conftest.err
6705 rm -f conftest.er1
6706 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6708 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006709 { ac_try='test -z "$ac_c_werror_flag"
6710 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6712 (eval $ac_try) 2>&5
6713 ac_status=$?
6714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); }; } &&
6716 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6718 (eval $ac_try) 2>&5
6719 ac_status=$?
6720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6721 (exit $ac_status); }; }; then
6722 ac_lo=$ac_mid; break
6723else
6724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006725sed 's/^/| /' conftest.$ac_ext >&5
6726
Martin v. Löwis11437992002-04-12 09:54:03 +00006727ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006728 if test $ac_mid -le $ac_hi; then
6729 ac_lo= ac_hi=
6730 break
6731 fi
6732 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006733fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006734rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006735 done
6736else
6737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006738sed 's/^/| /' conftest.$ac_ext >&5
6739
Martin v. Löwis11437992002-04-12 09:54:03 +00006740ac_lo= ac_hi=
6741fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006742rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006743fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006744rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006745# Binary search between lo and hi bounds.
6746while test "x$ac_lo" != "x$ac_hi"; do
6747 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006749/* confdefs.h. */
6750_ACEOF
6751cat confdefs.h >>conftest.$ac_ext
6752cat >>conftest.$ac_ext <<_ACEOF
6753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006754$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006755int
6756main ()
6757{
6758static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6759test_array [0] = 0
6760
6761 ;
6762 return 0;
6763}
6764_ACEOF
6765rm -f conftest.$ac_objext
6766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006767 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006769 grep -v '^ *+' conftest.er1 >conftest.err
6770 rm -f conftest.er1
6771 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6773 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006774 { ac_try='test -z "$ac_c_werror_flag"
6775 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6777 (eval $ac_try) 2>&5
6778 ac_status=$?
6779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6780 (exit $ac_status); }; } &&
6781 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6783 (eval $ac_try) 2>&5
6784 ac_status=$?
6785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6786 (exit $ac_status); }; }; then
6787 ac_hi=$ac_mid
6788else
6789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006790sed 's/^/| /' conftest.$ac_ext >&5
6791
Martin v. Löwis11437992002-04-12 09:54:03 +00006792ac_lo=`expr '(' $ac_mid ')' + 1`
6793fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006794rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006795done
6796case $ac_lo in
6797?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006798'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6799See \`config.log' for more details." >&5
6800echo "$as_me: error: cannot compute sizeof (long), 77
6801See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006802 { (exit 1); exit 1; }; } ;;
6803esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006804else
6805 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00006806 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6807See \`config.log' for more details." >&5
6808echo "$as_me: error: cannot run test program while cross compiling
6809See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006810 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006811else
Martin v. Löwis11437992002-04-12 09:54:03 +00006812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006813/* confdefs.h. */
6814_ACEOF
6815cat confdefs.h >>conftest.$ac_ext
6816cat >>conftest.$ac_ext <<_ACEOF
6817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006818$ac_includes_default
6819long longval () { return (long) (sizeof (long)); }
6820unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006821#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006822#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006823int
6824main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006825{
Martin v. Löwis11437992002-04-12 09:54:03 +00006826
6827 FILE *f = fopen ("conftest.val", "w");
6828 if (! f)
6829 exit (1);
6830 if (((long) (sizeof (long))) < 0)
6831 {
6832 long i = longval ();
6833 if (i != ((long) (sizeof (long))))
6834 exit (1);
6835 fprintf (f, "%ld\n", i);
6836 }
6837 else
6838 {
6839 unsigned long i = ulongval ();
6840 if (i != ((long) (sizeof (long))))
6841 exit (1);
6842 fprintf (f, "%lu\n", i);
6843 }
6844 exit (ferror (f) || fclose (f) != 0);
6845
6846 ;
6847 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006848}
Martin v. Löwis11437992002-04-12 09:54:03 +00006849_ACEOF
6850rm -f conftest$ac_exeext
6851if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6852 (eval $ac_link) 2>&5
6853 ac_status=$?
6854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6855 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6857 (eval $ac_try) 2>&5
6858 ac_status=$?
6859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6860 (exit $ac_status); }; }; then
6861 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006862else
Martin v. Löwis11437992002-04-12 09:54:03 +00006863 echo "$as_me: program exited with status $ac_status" >&5
6864echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006865sed 's/^/| /' conftest.$ac_ext >&5
6866
Martin v. Löwis11437992002-04-12 09:54:03 +00006867( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006868{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6869See \`config.log' for more details." >&5
6870echo "$as_me: error: cannot compute sizeof (long), 77
6871See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006872 { (exit 1); exit 1; }; }
6873fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006874rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006875fi
6876fi
6877rm -f conftest.val
6878else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006879 ac_cv_sizeof_long=0
6880fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006882echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6883echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6884cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006885#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006886_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006887
6888
Martin v. Löwis11437992002-04-12 09:54:03 +00006889echo "$as_me:$LINENO: checking for void *" >&5
6890echo $ECHO_N "checking for void *... $ECHO_C" >&6
6891if test "${ac_cv_type_void_p+set}" = set; then
6892 echo $ECHO_N "(cached) $ECHO_C" >&6
6893else
6894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006895/* confdefs.h. */
6896_ACEOF
6897cat confdefs.h >>conftest.$ac_ext
6898cat >>conftest.$ac_ext <<_ACEOF
6899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006900$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006901int
6902main ()
6903{
6904if ((void * *) 0)
6905 return 0;
6906if (sizeof (void *))
6907 return 0;
6908 ;
6909 return 0;
6910}
6911_ACEOF
6912rm -f conftest.$ac_objext
6913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006914 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006916 grep -v '^ *+' conftest.er1 >conftest.err
6917 rm -f conftest.er1
6918 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6920 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006921 { ac_try='test -z "$ac_c_werror_flag"
6922 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6924 (eval $ac_try) 2>&5
6925 ac_status=$?
6926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6927 (exit $ac_status); }; } &&
6928 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6930 (eval $ac_try) 2>&5
6931 ac_status=$?
6932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6933 (exit $ac_status); }; }; then
6934 ac_cv_type_void_p=yes
6935else
6936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006937sed 's/^/| /' conftest.$ac_ext >&5
6938
Martin v. Löwis11437992002-04-12 09:54:03 +00006939ac_cv_type_void_p=no
6940fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006941rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006942fi
6943echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6944echo "${ECHO_T}$ac_cv_type_void_p" >&6
6945
6946echo "$as_me:$LINENO: checking size of void *" >&5
6947echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6948if test "${ac_cv_sizeof_void_p+set}" = set; then
6949 echo $ECHO_N "(cached) $ECHO_C" >&6
6950else
6951 if test "$ac_cv_type_void_p" = yes; then
6952 # The cast to unsigned long works around a bug in the HP C Compiler
6953 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6954 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6955 # This bug is HP SR number 8606223364.
6956 if test "$cross_compiling" = yes; then
6957 # Depending upon the size, compute the lo and hi bounds.
6958cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006959/* confdefs.h. */
6960_ACEOF
6961cat confdefs.h >>conftest.$ac_ext
6962cat >>conftest.$ac_ext <<_ACEOF
6963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006964$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006965int
6966main ()
6967{
6968static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6969test_array [0] = 0
6970
6971 ;
6972 return 0;
6973}
6974_ACEOF
6975rm -f conftest.$ac_objext
6976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006977 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006979 grep -v '^ *+' conftest.er1 >conftest.err
6980 rm -f conftest.er1
6981 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6983 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006984 { ac_try='test -z "$ac_c_werror_flag"
6985 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006986 { (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); }; } &&
6991 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6993 (eval $ac_try) 2>&5
6994 ac_status=$?
6995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6996 (exit $ac_status); }; }; then
6997 ac_lo=0 ac_mid=0
6998 while :; do
6999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007000/* confdefs.h. */
7001_ACEOF
7002cat confdefs.h >>conftest.$ac_ext
7003cat >>conftest.$ac_ext <<_ACEOF
7004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007005$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007006int
7007main ()
7008{
7009static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7010test_array [0] = 0
7011
7012 ;
7013 return 0;
7014}
7015_ACEOF
7016rm -f conftest.$ac_objext
7017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007018 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007020 grep -v '^ *+' conftest.er1 >conftest.err
7021 rm -f conftest.er1
7022 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7024 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007025 { ac_try='test -z "$ac_c_werror_flag"
7026 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7028 (eval $ac_try) 2>&5
7029 ac_status=$?
7030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7031 (exit $ac_status); }; } &&
7032 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7034 (eval $ac_try) 2>&5
7035 ac_status=$?
7036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7037 (exit $ac_status); }; }; then
7038 ac_hi=$ac_mid; break
7039else
7040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007041sed 's/^/| /' conftest.$ac_ext >&5
7042
Martin v. Löwis11437992002-04-12 09:54:03 +00007043ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007044 if test $ac_lo -le $ac_mid; then
7045 ac_lo= ac_hi=
7046 break
7047 fi
7048 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007049fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007050rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007051 done
7052else
7053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007054sed 's/^/| /' conftest.$ac_ext >&5
7055
Martin v. Löwis11437992002-04-12 09:54:03 +00007056cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007057/* confdefs.h. */
7058_ACEOF
7059cat confdefs.h >>conftest.$ac_ext
7060cat >>conftest.$ac_ext <<_ACEOF
7061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007062$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007063int
7064main ()
7065{
7066static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
7067test_array [0] = 0
7068
7069 ;
7070 return 0;
7071}
7072_ACEOF
7073rm -f conftest.$ac_objext
7074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007075 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007077 grep -v '^ *+' conftest.er1 >conftest.err
7078 rm -f conftest.er1
7079 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7081 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007082 { ac_try='test -z "$ac_c_werror_flag"
7083 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7085 (eval $ac_try) 2>&5
7086 ac_status=$?
7087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7088 (exit $ac_status); }; } &&
7089 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7091 (eval $ac_try) 2>&5
7092 ac_status=$?
7093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7094 (exit $ac_status); }; }; then
7095 ac_hi=-1 ac_mid=-1
7096 while :; do
7097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007098/* confdefs.h. */
7099_ACEOF
7100cat confdefs.h >>conftest.$ac_ext
7101cat >>conftest.$ac_ext <<_ACEOF
7102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007103$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007104int
7105main ()
7106{
7107static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7108test_array [0] = 0
7109
7110 ;
7111 return 0;
7112}
7113_ACEOF
7114rm -f conftest.$ac_objext
7115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007116 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007118 grep -v '^ *+' conftest.er1 >conftest.err
7119 rm -f conftest.er1
7120 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7122 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007123 { ac_try='test -z "$ac_c_werror_flag"
7124 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007125 { (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); }; } &&
7130 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7132 (eval $ac_try) 2>&5
7133 ac_status=$?
7134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7135 (exit $ac_status); }; }; then
7136 ac_lo=$ac_mid; break
7137else
7138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007139sed 's/^/| /' conftest.$ac_ext >&5
7140
Martin v. Löwis11437992002-04-12 09:54:03 +00007141ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007142 if test $ac_mid -le $ac_hi; then
7143 ac_lo= ac_hi=
7144 break
7145 fi
7146 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007147fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007148rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007149 done
7150else
7151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007152sed 's/^/| /' conftest.$ac_ext >&5
7153
Martin v. Löwis11437992002-04-12 09:54:03 +00007154ac_lo= ac_hi=
7155fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007156rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007157fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007158rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007159# Binary search between lo and hi bounds.
7160while test "x$ac_lo" != "x$ac_hi"; do
7161 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007163/* confdefs.h. */
7164_ACEOF
7165cat confdefs.h >>conftest.$ac_ext
7166cat >>conftest.$ac_ext <<_ACEOF
7167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007168$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007169int
7170main ()
7171{
7172static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7173test_array [0] = 0
7174
7175 ;
7176 return 0;
7177}
7178_ACEOF
7179rm -f conftest.$ac_objext
7180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007181 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007183 grep -v '^ *+' conftest.er1 >conftest.err
7184 rm -f conftest.er1
7185 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7187 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007188 { ac_try='test -z "$ac_c_werror_flag"
7189 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7191 (eval $ac_try) 2>&5
7192 ac_status=$?
7193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7194 (exit $ac_status); }; } &&
7195 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7197 (eval $ac_try) 2>&5
7198 ac_status=$?
7199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200 (exit $ac_status); }; }; then
7201 ac_hi=$ac_mid
7202else
7203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007204sed 's/^/| /' conftest.$ac_ext >&5
7205
Martin v. Löwis11437992002-04-12 09:54:03 +00007206ac_lo=`expr '(' $ac_mid ')' + 1`
7207fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007208rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007209done
7210case $ac_lo in
7211?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007212'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7213See \`config.log' for more details." >&5
7214echo "$as_me: error: cannot compute sizeof (void *), 77
7215See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007216 { (exit 1); exit 1; }; } ;;
7217esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007218else
7219 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00007220 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7221See \`config.log' for more details." >&5
7222echo "$as_me: error: cannot run test program while cross compiling
7223See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007224 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007225else
Martin v. Löwis11437992002-04-12 09:54:03 +00007226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007227/* confdefs.h. */
7228_ACEOF
7229cat confdefs.h >>conftest.$ac_ext
7230cat >>conftest.$ac_ext <<_ACEOF
7231/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007232$ac_includes_default
7233long longval () { return (long) (sizeof (void *)); }
7234unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007235#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007236#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007237int
7238main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007239{
Martin v. Löwis11437992002-04-12 09:54:03 +00007240
7241 FILE *f = fopen ("conftest.val", "w");
7242 if (! f)
7243 exit (1);
7244 if (((long) (sizeof (void *))) < 0)
7245 {
7246 long i = longval ();
7247 if (i != ((long) (sizeof (void *))))
7248 exit (1);
7249 fprintf (f, "%ld\n", i);
7250 }
7251 else
7252 {
7253 unsigned long i = ulongval ();
7254 if (i != ((long) (sizeof (void *))))
7255 exit (1);
7256 fprintf (f, "%lu\n", i);
7257 }
7258 exit (ferror (f) || fclose (f) != 0);
7259
7260 ;
7261 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007262}
Martin v. Löwis11437992002-04-12 09:54:03 +00007263_ACEOF
7264rm -f conftest$ac_exeext
7265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7266 (eval $ac_link) 2>&5
7267 ac_status=$?
7268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7269 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7271 (eval $ac_try) 2>&5
7272 ac_status=$?
7273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274 (exit $ac_status); }; }; then
7275 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007276else
Martin v. Löwis11437992002-04-12 09:54:03 +00007277 echo "$as_me: program exited with status $ac_status" >&5
7278echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007279sed 's/^/| /' conftest.$ac_ext >&5
7280
Martin v. Löwis11437992002-04-12 09:54:03 +00007281( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007282{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7283See \`config.log' for more details." >&5
7284echo "$as_me: error: cannot compute sizeof (void *), 77
7285See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007286 { (exit 1); exit 1; }; }
7287fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007288rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007289fi
7290fi
7291rm -f conftest.val
7292else
Guido van Rossumad678af1998-10-02 14:42:15 +00007293 ac_cv_sizeof_void_p=0
7294fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007295fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007296echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7297echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7298cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007299#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007300_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007301
7302
Martin v. Löwis11437992002-04-12 09:54:03 +00007303echo "$as_me:$LINENO: checking for short" >&5
7304echo $ECHO_N "checking for short... $ECHO_C" >&6
7305if test "${ac_cv_type_short+set}" = set; then
7306 echo $ECHO_N "(cached) $ECHO_C" >&6
7307else
7308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007309/* confdefs.h. */
7310_ACEOF
7311cat confdefs.h >>conftest.$ac_ext
7312cat >>conftest.$ac_ext <<_ACEOF
7313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007314$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007315int
7316main ()
7317{
7318if ((short *) 0)
7319 return 0;
7320if (sizeof (short))
7321 return 0;
7322 ;
7323 return 0;
7324}
7325_ACEOF
7326rm -f conftest.$ac_objext
7327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007328 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007330 grep -v '^ *+' conftest.er1 >conftest.err
7331 rm -f conftest.er1
7332 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7334 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007335 { ac_try='test -z "$ac_c_werror_flag"
7336 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7338 (eval $ac_try) 2>&5
7339 ac_status=$?
7340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7341 (exit $ac_status); }; } &&
7342 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7344 (eval $ac_try) 2>&5
7345 ac_status=$?
7346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7347 (exit $ac_status); }; }; then
7348 ac_cv_type_short=yes
7349else
7350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007351sed 's/^/| /' conftest.$ac_ext >&5
7352
Martin v. Löwis11437992002-04-12 09:54:03 +00007353ac_cv_type_short=no
7354fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007355rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007356fi
7357echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7358echo "${ECHO_T}$ac_cv_type_short" >&6
7359
7360echo "$as_me:$LINENO: checking size of short" >&5
7361echo $ECHO_N "checking size of short... $ECHO_C" >&6
7362if test "${ac_cv_sizeof_short+set}" = set; then
7363 echo $ECHO_N "(cached) $ECHO_C" >&6
7364else
7365 if test "$ac_cv_type_short" = yes; then
7366 # The cast to unsigned long works around a bug in the HP C Compiler
7367 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7368 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7369 # This bug is HP SR number 8606223364.
7370 if test "$cross_compiling" = yes; then
7371 # Depending upon the size, compute the lo and hi bounds.
7372cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007373/* confdefs.h. */
7374_ACEOF
7375cat confdefs.h >>conftest.$ac_ext
7376cat >>conftest.$ac_ext <<_ACEOF
7377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007378$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007379int
7380main ()
7381{
7382static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7383test_array [0] = 0
7384
7385 ;
7386 return 0;
7387}
7388_ACEOF
7389rm -f conftest.$ac_objext
7390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007391 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007392 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007393 grep -v '^ *+' conftest.er1 >conftest.err
7394 rm -f conftest.er1
7395 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7397 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007398 { ac_try='test -z "$ac_c_werror_flag"
7399 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7401 (eval $ac_try) 2>&5
7402 ac_status=$?
7403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7404 (exit $ac_status); }; } &&
7405 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7407 (eval $ac_try) 2>&5
7408 ac_status=$?
7409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7410 (exit $ac_status); }; }; then
7411 ac_lo=0 ac_mid=0
7412 while :; do
7413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007414/* confdefs.h. */
7415_ACEOF
7416cat confdefs.h >>conftest.$ac_ext
7417cat >>conftest.$ac_ext <<_ACEOF
7418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007419$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007420int
7421main ()
7422{
7423static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7424test_array [0] = 0
7425
7426 ;
7427 return 0;
7428}
7429_ACEOF
7430rm -f conftest.$ac_objext
7431if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007432 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007434 grep -v '^ *+' conftest.er1 >conftest.err
7435 rm -f conftest.er1
7436 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7438 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007439 { ac_try='test -z "$ac_c_werror_flag"
7440 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7442 (eval $ac_try) 2>&5
7443 ac_status=$?
7444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445 (exit $ac_status); }; } &&
7446 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7448 (eval $ac_try) 2>&5
7449 ac_status=$?
7450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7451 (exit $ac_status); }; }; then
7452 ac_hi=$ac_mid; break
7453else
7454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007455sed 's/^/| /' conftest.$ac_ext >&5
7456
Martin v. Löwis11437992002-04-12 09:54:03 +00007457ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007458 if test $ac_lo -le $ac_mid; then
7459 ac_lo= ac_hi=
7460 break
7461 fi
7462 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007463fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007464rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007465 done
7466else
7467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007468sed 's/^/| /' conftest.$ac_ext >&5
7469
Martin v. Löwis11437992002-04-12 09:54:03 +00007470cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007471/* confdefs.h. */
7472_ACEOF
7473cat confdefs.h >>conftest.$ac_ext
7474cat >>conftest.$ac_ext <<_ACEOF
7475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007476$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007477int
7478main ()
7479{
7480static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7481test_array [0] = 0
7482
7483 ;
7484 return 0;
7485}
7486_ACEOF
7487rm -f conftest.$ac_objext
7488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007489 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007491 grep -v '^ *+' conftest.er1 >conftest.err
7492 rm -f conftest.er1
7493 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7495 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007496 { ac_try='test -z "$ac_c_werror_flag"
7497 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7499 (eval $ac_try) 2>&5
7500 ac_status=$?
7501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7502 (exit $ac_status); }; } &&
7503 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7505 (eval $ac_try) 2>&5
7506 ac_status=$?
7507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7508 (exit $ac_status); }; }; then
7509 ac_hi=-1 ac_mid=-1
7510 while :; do
7511 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007512/* confdefs.h. */
7513_ACEOF
7514cat confdefs.h >>conftest.$ac_ext
7515cat >>conftest.$ac_ext <<_ACEOF
7516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007517$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007518int
7519main ()
7520{
7521static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7522test_array [0] = 0
7523
7524 ;
7525 return 0;
7526}
7527_ACEOF
7528rm -f conftest.$ac_objext
7529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007530 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007532 grep -v '^ *+' conftest.er1 >conftest.err
7533 rm -f conftest.er1
7534 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7536 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007537 { ac_try='test -z "$ac_c_werror_flag"
7538 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7540 (eval $ac_try) 2>&5
7541 ac_status=$?
7542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543 (exit $ac_status); }; } &&
7544 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7546 (eval $ac_try) 2>&5
7547 ac_status=$?
7548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7549 (exit $ac_status); }; }; then
7550 ac_lo=$ac_mid; break
7551else
7552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007553sed 's/^/| /' conftest.$ac_ext >&5
7554
Martin v. Löwis11437992002-04-12 09:54:03 +00007555ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007556 if test $ac_mid -le $ac_hi; then
7557 ac_lo= ac_hi=
7558 break
7559 fi
7560 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007561fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007562rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007563 done
7564else
7565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007566sed 's/^/| /' conftest.$ac_ext >&5
7567
Martin v. Löwis11437992002-04-12 09:54:03 +00007568ac_lo= ac_hi=
7569fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007570rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007571fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007572rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007573# Binary search between lo and hi bounds.
7574while test "x$ac_lo" != "x$ac_hi"; do
7575 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007577/* confdefs.h. */
7578_ACEOF
7579cat confdefs.h >>conftest.$ac_ext
7580cat >>conftest.$ac_ext <<_ACEOF
7581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007582$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007583int
7584main ()
7585{
7586static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7587test_array [0] = 0
7588
7589 ;
7590 return 0;
7591}
7592_ACEOF
7593rm -f conftest.$ac_objext
7594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007595 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007597 grep -v '^ *+' conftest.er1 >conftest.err
7598 rm -f conftest.er1
7599 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7601 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007602 { ac_try='test -z "$ac_c_werror_flag"
7603 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7605 (eval $ac_try) 2>&5
7606 ac_status=$?
7607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7608 (exit $ac_status); }; } &&
7609 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7611 (eval $ac_try) 2>&5
7612 ac_status=$?
7613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7614 (exit $ac_status); }; }; then
7615 ac_hi=$ac_mid
7616else
7617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007618sed 's/^/| /' conftest.$ac_ext >&5
7619
Martin v. Löwis11437992002-04-12 09:54:03 +00007620ac_lo=`expr '(' $ac_mid ')' + 1`
7621fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007622rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007623done
7624case $ac_lo in
7625?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007626'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7627See \`config.log' for more details." >&5
7628echo "$as_me: error: cannot compute sizeof (short), 77
7629See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007630 { (exit 1); exit 1; }; } ;;
7631esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007632else
7633 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00007634 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7635See \`config.log' for more details." >&5
7636echo "$as_me: error: cannot run test program while cross compiling
7637See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007638 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007639else
Martin v. Löwis11437992002-04-12 09:54:03 +00007640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007641/* confdefs.h. */
7642_ACEOF
7643cat confdefs.h >>conftest.$ac_ext
7644cat >>conftest.$ac_ext <<_ACEOF
7645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007646$ac_includes_default
7647long longval () { return (long) (sizeof (short)); }
7648unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007649#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007650#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007651int
7652main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007653{
Martin v. Löwis11437992002-04-12 09:54:03 +00007654
7655 FILE *f = fopen ("conftest.val", "w");
7656 if (! f)
7657 exit (1);
7658 if (((long) (sizeof (short))) < 0)
7659 {
7660 long i = longval ();
7661 if (i != ((long) (sizeof (short))))
7662 exit (1);
7663 fprintf (f, "%ld\n", i);
7664 }
7665 else
7666 {
7667 unsigned long i = ulongval ();
7668 if (i != ((long) (sizeof (short))))
7669 exit (1);
7670 fprintf (f, "%lu\n", i);
7671 }
7672 exit (ferror (f) || fclose (f) != 0);
7673
7674 ;
7675 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007676}
Martin v. Löwis11437992002-04-12 09:54:03 +00007677_ACEOF
7678rm -f conftest$ac_exeext
7679if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7680 (eval $ac_link) 2>&5
7681 ac_status=$?
7682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7683 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7685 (eval $ac_try) 2>&5
7686 ac_status=$?
7687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7688 (exit $ac_status); }; }; then
7689 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007690else
Martin v. Löwis11437992002-04-12 09:54:03 +00007691 echo "$as_me: program exited with status $ac_status" >&5
7692echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007693sed 's/^/| /' conftest.$ac_ext >&5
7694
Martin v. Löwis11437992002-04-12 09:54:03 +00007695( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007696{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7697See \`config.log' for more details." >&5
7698echo "$as_me: error: cannot compute sizeof (short), 77
7699See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007700 { (exit 1); exit 1; }; }
7701fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007702rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
7704fi
7705rm -f conftest.val
7706else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007707 ac_cv_sizeof_short=0
7708fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007709fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007710echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7711echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7712cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007713#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007714_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007715
7716
Martin v. Löwis11437992002-04-12 09:54:03 +00007717echo "$as_me:$LINENO: checking for float" >&5
7718echo $ECHO_N "checking for float... $ECHO_C" >&6
7719if test "${ac_cv_type_float+set}" = set; then
7720 echo $ECHO_N "(cached) $ECHO_C" >&6
7721else
7722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007723/* confdefs.h. */
7724_ACEOF
7725cat confdefs.h >>conftest.$ac_ext
7726cat >>conftest.$ac_ext <<_ACEOF
7727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007728$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007729int
7730main ()
7731{
7732if ((float *) 0)
7733 return 0;
7734if (sizeof (float))
7735 return 0;
7736 ;
7737 return 0;
7738}
7739_ACEOF
7740rm -f conftest.$ac_objext
7741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007742 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007744 grep -v '^ *+' conftest.er1 >conftest.err
7745 rm -f conftest.er1
7746 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7748 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007749 { ac_try='test -z "$ac_c_werror_flag"
7750 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7752 (eval $ac_try) 2>&5
7753 ac_status=$?
7754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7755 (exit $ac_status); }; } &&
7756 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7758 (eval $ac_try) 2>&5
7759 ac_status=$?
7760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7761 (exit $ac_status); }; }; then
7762 ac_cv_type_float=yes
7763else
7764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007765sed 's/^/| /' conftest.$ac_ext >&5
7766
Martin v. Löwis11437992002-04-12 09:54:03 +00007767ac_cv_type_float=no
7768fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007769rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007770fi
7771echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7772echo "${ECHO_T}$ac_cv_type_float" >&6
7773
7774echo "$as_me:$LINENO: checking size of float" >&5
7775echo $ECHO_N "checking size of float... $ECHO_C" >&6
7776if test "${ac_cv_sizeof_float+set}" = set; then
7777 echo $ECHO_N "(cached) $ECHO_C" >&6
7778else
7779 if test "$ac_cv_type_float" = yes; then
7780 # The cast to unsigned long works around a bug in the HP C Compiler
7781 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7782 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7783 # This bug is HP SR number 8606223364.
7784 if test "$cross_compiling" = yes; then
7785 # Depending upon the size, compute the lo and hi bounds.
7786cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007787/* confdefs.h. */
7788_ACEOF
7789cat confdefs.h >>conftest.$ac_ext
7790cat >>conftest.$ac_ext <<_ACEOF
7791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007792$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007793int
7794main ()
7795{
7796static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7797test_array [0] = 0
7798
7799 ;
7800 return 0;
7801}
7802_ACEOF
7803rm -f conftest.$ac_objext
7804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007805 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007807 grep -v '^ *+' conftest.er1 >conftest.err
7808 rm -f conftest.er1
7809 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7811 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007812 { ac_try='test -z "$ac_c_werror_flag"
7813 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7815 (eval $ac_try) 2>&5
7816 ac_status=$?
7817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7818 (exit $ac_status); }; } &&
7819 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7821 (eval $ac_try) 2>&5
7822 ac_status=$?
7823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824 (exit $ac_status); }; }; then
7825 ac_lo=0 ac_mid=0
7826 while :; do
7827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007828/* confdefs.h. */
7829_ACEOF
7830cat confdefs.h >>conftest.$ac_ext
7831cat >>conftest.$ac_ext <<_ACEOF
7832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007833$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007834int
7835main ()
7836{
7837static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7838test_array [0] = 0
7839
7840 ;
7841 return 0;
7842}
7843_ACEOF
7844rm -f conftest.$ac_objext
7845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007846 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007848 grep -v '^ *+' conftest.er1 >conftest.err
7849 rm -f conftest.er1
7850 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7852 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007853 { ac_try='test -z "$ac_c_werror_flag"
7854 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7856 (eval $ac_try) 2>&5
7857 ac_status=$?
7858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7859 (exit $ac_status); }; } &&
7860 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7862 (eval $ac_try) 2>&5
7863 ac_status=$?
7864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7865 (exit $ac_status); }; }; then
7866 ac_hi=$ac_mid; break
7867else
7868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007869sed 's/^/| /' conftest.$ac_ext >&5
7870
Martin v. Löwis11437992002-04-12 09:54:03 +00007871ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007872 if test $ac_lo -le $ac_mid; then
7873 ac_lo= ac_hi=
7874 break
7875 fi
7876 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007877fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007878rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007879 done
7880else
7881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007882sed 's/^/| /' conftest.$ac_ext >&5
7883
Martin v. Löwis11437992002-04-12 09:54:03 +00007884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007885/* confdefs.h. */
7886_ACEOF
7887cat confdefs.h >>conftest.$ac_ext
7888cat >>conftest.$ac_ext <<_ACEOF
7889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007891int
7892main ()
7893{
7894static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7895test_array [0] = 0
7896
7897 ;
7898 return 0;
7899}
7900_ACEOF
7901rm -f conftest.$ac_objext
7902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007903 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007905 grep -v '^ *+' conftest.er1 >conftest.err
7906 rm -f conftest.er1
7907 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7909 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007910 { ac_try='test -z "$ac_c_werror_flag"
7911 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7913 (eval $ac_try) 2>&5
7914 ac_status=$?
7915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7916 (exit $ac_status); }; } &&
7917 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7919 (eval $ac_try) 2>&5
7920 ac_status=$?
7921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7922 (exit $ac_status); }; }; then
7923 ac_hi=-1 ac_mid=-1
7924 while :; do
7925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007926/* confdefs.h. */
7927_ACEOF
7928cat confdefs.h >>conftest.$ac_ext
7929cat >>conftest.$ac_ext <<_ACEOF
7930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007931$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007932int
7933main ()
7934{
7935static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7936test_array [0] = 0
7937
7938 ;
7939 return 0;
7940}
7941_ACEOF
7942rm -f conftest.$ac_objext
7943if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007944 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007946 grep -v '^ *+' conftest.er1 >conftest.err
7947 rm -f conftest.er1
7948 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7950 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007951 { ac_try='test -z "$ac_c_werror_flag"
7952 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7954 (eval $ac_try) 2>&5
7955 ac_status=$?
7956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7957 (exit $ac_status); }; } &&
7958 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7960 (eval $ac_try) 2>&5
7961 ac_status=$?
7962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7963 (exit $ac_status); }; }; then
7964 ac_lo=$ac_mid; break
7965else
7966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007967sed 's/^/| /' conftest.$ac_ext >&5
7968
Martin v. Löwis11437992002-04-12 09:54:03 +00007969ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007970 if test $ac_mid -le $ac_hi; then
7971 ac_lo= ac_hi=
7972 break
7973 fi
7974 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007975fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007976rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007977 done
7978else
7979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007980sed 's/^/| /' conftest.$ac_ext >&5
7981
Martin v. Löwis11437992002-04-12 09:54:03 +00007982ac_lo= ac_hi=
7983fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007984rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007985fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007986rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007987# Binary search between lo and hi bounds.
7988while test "x$ac_lo" != "x$ac_hi"; do
7989 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* confdefs.h. */
7992_ACEOF
7993cat confdefs.h >>conftest.$ac_ext
7994cat >>conftest.$ac_ext <<_ACEOF
7995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007997int
7998main ()
7999{
8000static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8001test_array [0] = 0
8002
8003 ;
8004 return 0;
8005}
8006_ACEOF
8007rm -f conftest.$ac_objext
8008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008009 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008011 grep -v '^ *+' conftest.er1 >conftest.err
8012 rm -f conftest.er1
8013 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8015 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008016 { ac_try='test -z "$ac_c_werror_flag"
8017 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8019 (eval $ac_try) 2>&5
8020 ac_status=$?
8021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8022 (exit $ac_status); }; } &&
8023 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8025 (eval $ac_try) 2>&5
8026 ac_status=$?
8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); }; }; then
8029 ac_hi=$ac_mid
8030else
8031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008032sed 's/^/| /' conftest.$ac_ext >&5
8033
Martin v. Löwis11437992002-04-12 09:54:03 +00008034ac_lo=`expr '(' $ac_mid ')' + 1`
8035fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008036rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008037done
8038case $ac_lo in
8039?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008040'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8041See \`config.log' for more details." >&5
8042echo "$as_me: error: cannot compute sizeof (float), 77
8043See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008044 { (exit 1); exit 1; }; } ;;
8045esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008046else
8047 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00008048 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8049See \`config.log' for more details." >&5
8050echo "$as_me: error: cannot run test program while cross compiling
8051See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008052 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008053else
Martin v. Löwis11437992002-04-12 09:54:03 +00008054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008055/* confdefs.h. */
8056_ACEOF
8057cat confdefs.h >>conftest.$ac_ext
8058cat >>conftest.$ac_ext <<_ACEOF
8059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008060$ac_includes_default
8061long longval () { return (long) (sizeof (float)); }
8062unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008063#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008064#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008065int
8066main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008067{
Martin v. Löwis11437992002-04-12 09:54:03 +00008068
8069 FILE *f = fopen ("conftest.val", "w");
8070 if (! f)
8071 exit (1);
8072 if (((long) (sizeof (float))) < 0)
8073 {
8074 long i = longval ();
8075 if (i != ((long) (sizeof (float))))
8076 exit (1);
8077 fprintf (f, "%ld\n", i);
8078 }
8079 else
8080 {
8081 unsigned long i = ulongval ();
8082 if (i != ((long) (sizeof (float))))
8083 exit (1);
8084 fprintf (f, "%lu\n", i);
8085 }
8086 exit (ferror (f) || fclose (f) != 0);
8087
8088 ;
8089 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008090}
Martin v. Löwis11437992002-04-12 09:54:03 +00008091_ACEOF
8092rm -f conftest$ac_exeext
8093if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8094 (eval $ac_link) 2>&5
8095 ac_status=$?
8096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8097 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8099 (eval $ac_try) 2>&5
8100 ac_status=$?
8101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8102 (exit $ac_status); }; }; then
8103 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008104else
Martin v. Löwis11437992002-04-12 09:54:03 +00008105 echo "$as_me: program exited with status $ac_status" >&5
8106echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008107sed 's/^/| /' conftest.$ac_ext >&5
8108
Martin v. Löwis11437992002-04-12 09:54:03 +00008109( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008110{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8111See \`config.log' for more details." >&5
8112echo "$as_me: error: cannot compute sizeof (float), 77
8113See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 { (exit 1); exit 1; }; }
8115fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008116rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008117fi
8118fi
8119rm -f conftest.val
8120else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008121 ac_cv_sizeof_float=0
8122fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008124echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8125echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8126cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008127#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008128_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008129
8130
Martin v. Löwis11437992002-04-12 09:54:03 +00008131echo "$as_me:$LINENO: checking for double" >&5
8132echo $ECHO_N "checking for double... $ECHO_C" >&6
8133if test "${ac_cv_type_double+set}" = set; then
8134 echo $ECHO_N "(cached) $ECHO_C" >&6
8135else
8136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008137/* confdefs.h. */
8138_ACEOF
8139cat confdefs.h >>conftest.$ac_ext
8140cat >>conftest.$ac_ext <<_ACEOF
8141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008142$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008143int
8144main ()
8145{
8146if ((double *) 0)
8147 return 0;
8148if (sizeof (double))
8149 return 0;
8150 ;
8151 return 0;
8152}
8153_ACEOF
8154rm -f conftest.$ac_objext
8155if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008156 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008158 grep -v '^ *+' conftest.er1 >conftest.err
8159 rm -f conftest.er1
8160 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8162 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008163 { ac_try='test -z "$ac_c_werror_flag"
8164 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8166 (eval $ac_try) 2>&5
8167 ac_status=$?
8168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8169 (exit $ac_status); }; } &&
8170 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8172 (eval $ac_try) 2>&5
8173 ac_status=$?
8174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8175 (exit $ac_status); }; }; then
8176 ac_cv_type_double=yes
8177else
8178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008179sed 's/^/| /' conftest.$ac_ext >&5
8180
Martin v. Löwis11437992002-04-12 09:54:03 +00008181ac_cv_type_double=no
8182fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008183rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008184fi
8185echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8186echo "${ECHO_T}$ac_cv_type_double" >&6
8187
8188echo "$as_me:$LINENO: checking size of double" >&5
8189echo $ECHO_N "checking size of double... $ECHO_C" >&6
8190if test "${ac_cv_sizeof_double+set}" = set; then
8191 echo $ECHO_N "(cached) $ECHO_C" >&6
8192else
8193 if test "$ac_cv_type_double" = yes; then
8194 # The cast to unsigned long works around a bug in the HP C Compiler
8195 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8196 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8197 # This bug is HP SR number 8606223364.
8198 if test "$cross_compiling" = yes; then
8199 # Depending upon the size, compute the lo and hi bounds.
8200cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008201/* confdefs.h. */
8202_ACEOF
8203cat confdefs.h >>conftest.$ac_ext
8204cat >>conftest.$ac_ext <<_ACEOF
8205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008206$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008207int
8208main ()
8209{
8210static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8211test_array [0] = 0
8212
8213 ;
8214 return 0;
8215}
8216_ACEOF
8217rm -f conftest.$ac_objext
8218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008219 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008221 grep -v '^ *+' conftest.er1 >conftest.err
8222 rm -f conftest.er1
8223 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8225 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008226 { ac_try='test -z "$ac_c_werror_flag"
8227 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8229 (eval $ac_try) 2>&5
8230 ac_status=$?
8231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8232 (exit $ac_status); }; } &&
8233 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8235 (eval $ac_try) 2>&5
8236 ac_status=$?
8237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238 (exit $ac_status); }; }; then
8239 ac_lo=0 ac_mid=0
8240 while :; do
8241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008242/* confdefs.h. */
8243_ACEOF
8244cat confdefs.h >>conftest.$ac_ext
8245cat >>conftest.$ac_ext <<_ACEOF
8246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008247$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008248int
8249main ()
8250{
8251static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8252test_array [0] = 0
8253
8254 ;
8255 return 0;
8256}
8257_ACEOF
8258rm -f conftest.$ac_objext
8259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008260 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008261 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008262 grep -v '^ *+' conftest.er1 >conftest.err
8263 rm -f conftest.er1
8264 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8266 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008267 { ac_try='test -z "$ac_c_werror_flag"
8268 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8270 (eval $ac_try) 2>&5
8271 ac_status=$?
8272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8273 (exit $ac_status); }; } &&
8274 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8276 (eval $ac_try) 2>&5
8277 ac_status=$?
8278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8279 (exit $ac_status); }; }; then
8280 ac_hi=$ac_mid; break
8281else
8282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008283sed 's/^/| /' conftest.$ac_ext >&5
8284
Martin v. Löwis11437992002-04-12 09:54:03 +00008285ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008286 if test $ac_lo -le $ac_mid; then
8287 ac_lo= ac_hi=
8288 break
8289 fi
8290 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008291fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008292rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008293 done
8294else
8295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008296sed 's/^/| /' conftest.$ac_ext >&5
8297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008299/* confdefs.h. */
8300_ACEOF
8301cat confdefs.h >>conftest.$ac_ext
8302cat >>conftest.$ac_ext <<_ACEOF
8303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008304$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008305int
8306main ()
8307{
8308static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8309test_array [0] = 0
8310
8311 ;
8312 return 0;
8313}
8314_ACEOF
8315rm -f conftest.$ac_objext
8316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008317 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008319 grep -v '^ *+' conftest.er1 >conftest.err
8320 rm -f conftest.er1
8321 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8323 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008324 { ac_try='test -z "$ac_c_werror_flag"
8325 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8327 (eval $ac_try) 2>&5
8328 ac_status=$?
8329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8330 (exit $ac_status); }; } &&
8331 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8333 (eval $ac_try) 2>&5
8334 ac_status=$?
8335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8336 (exit $ac_status); }; }; then
8337 ac_hi=-1 ac_mid=-1
8338 while :; do
8339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008340/* confdefs.h. */
8341_ACEOF
8342cat confdefs.h >>conftest.$ac_ext
8343cat >>conftest.$ac_ext <<_ACEOF
8344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008345$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008346int
8347main ()
8348{
8349static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8350test_array [0] = 0
8351
8352 ;
8353 return 0;
8354}
8355_ACEOF
8356rm -f conftest.$ac_objext
8357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008358 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008360 grep -v '^ *+' conftest.er1 >conftest.err
8361 rm -f conftest.er1
8362 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8364 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008365 { ac_try='test -z "$ac_c_werror_flag"
8366 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8368 (eval $ac_try) 2>&5
8369 ac_status=$?
8370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8371 (exit $ac_status); }; } &&
8372 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8374 (eval $ac_try) 2>&5
8375 ac_status=$?
8376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8377 (exit $ac_status); }; }; then
8378 ac_lo=$ac_mid; break
8379else
8380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008381sed 's/^/| /' conftest.$ac_ext >&5
8382
Martin v. Löwis11437992002-04-12 09:54:03 +00008383ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008384 if test $ac_mid -le $ac_hi; then
8385 ac_lo= ac_hi=
8386 break
8387 fi
8388 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008389fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008390rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 done
8392else
8393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008394sed 's/^/| /' conftest.$ac_ext >&5
8395
Martin v. Löwis11437992002-04-12 09:54:03 +00008396ac_lo= ac_hi=
8397fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008398rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008399fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008400rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008401# Binary search between lo and hi bounds.
8402while test "x$ac_lo" != "x$ac_hi"; do
8403 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008405/* confdefs.h. */
8406_ACEOF
8407cat confdefs.h >>conftest.$ac_ext
8408cat >>conftest.$ac_ext <<_ACEOF
8409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008410$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008411int
8412main ()
8413{
8414static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8415test_array [0] = 0
8416
8417 ;
8418 return 0;
8419}
8420_ACEOF
8421rm -f conftest.$ac_objext
8422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008423 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008425 grep -v '^ *+' conftest.er1 >conftest.err
8426 rm -f conftest.er1
8427 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8429 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008430 { ac_try='test -z "$ac_c_werror_flag"
8431 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8433 (eval $ac_try) 2>&5
8434 ac_status=$?
8435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8436 (exit $ac_status); }; } &&
8437 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8439 (eval $ac_try) 2>&5
8440 ac_status=$?
8441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8442 (exit $ac_status); }; }; then
8443 ac_hi=$ac_mid
8444else
8445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008446sed 's/^/| /' conftest.$ac_ext >&5
8447
Martin v. Löwis11437992002-04-12 09:54:03 +00008448ac_lo=`expr '(' $ac_mid ')' + 1`
8449fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008450rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008451done
8452case $ac_lo in
8453?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008454'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8455See \`config.log' for more details." >&5
8456echo "$as_me: error: cannot compute sizeof (double), 77
8457See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008458 { (exit 1); exit 1; }; } ;;
8459esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008460else
8461 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00008462 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8463See \`config.log' for more details." >&5
8464echo "$as_me: error: cannot run test program while cross compiling
8465See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008467else
Martin v. Löwis11437992002-04-12 09:54:03 +00008468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008469/* confdefs.h. */
8470_ACEOF
8471cat confdefs.h >>conftest.$ac_ext
8472cat >>conftest.$ac_ext <<_ACEOF
8473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008474$ac_includes_default
8475long longval () { return (long) (sizeof (double)); }
8476unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008477#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008478#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008479int
8480main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008481{
Martin v. Löwis11437992002-04-12 09:54:03 +00008482
8483 FILE *f = fopen ("conftest.val", "w");
8484 if (! f)
8485 exit (1);
8486 if (((long) (sizeof (double))) < 0)
8487 {
8488 long i = longval ();
8489 if (i != ((long) (sizeof (double))))
8490 exit (1);
8491 fprintf (f, "%ld\n", i);
8492 }
8493 else
8494 {
8495 unsigned long i = ulongval ();
8496 if (i != ((long) (sizeof (double))))
8497 exit (1);
8498 fprintf (f, "%lu\n", i);
8499 }
8500 exit (ferror (f) || fclose (f) != 0);
8501
8502 ;
8503 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008504}
Martin v. Löwis11437992002-04-12 09:54:03 +00008505_ACEOF
8506rm -f conftest$ac_exeext
8507if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8508 (eval $ac_link) 2>&5
8509 ac_status=$?
8510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8511 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8513 (eval $ac_try) 2>&5
8514 ac_status=$?
8515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8516 (exit $ac_status); }; }; then
8517 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008518else
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 echo "$as_me: program exited with status $ac_status" >&5
8520echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008521sed 's/^/| /' conftest.$ac_ext >&5
8522
Martin v. Löwis11437992002-04-12 09:54:03 +00008523( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008524{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8525See \`config.log' for more details." >&5
8526echo "$as_me: error: cannot compute sizeof (double), 77
8527See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 { (exit 1); exit 1; }; }
8529fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008530rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
8532fi
8533rm -f conftest.val
8534else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008535 ac_cv_sizeof_double=0
8536fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008537fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008538echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8539echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8540cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008541#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008542_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008543
8544
Martin v. Löwis11437992002-04-12 09:54:03 +00008545echo "$as_me:$LINENO: checking for fpos_t" >&5
8546echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8547if test "${ac_cv_type_fpos_t+set}" = set; then
8548 echo $ECHO_N "(cached) $ECHO_C" >&6
8549else
8550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008551/* confdefs.h. */
8552_ACEOF
8553cat confdefs.h >>conftest.$ac_ext
8554cat >>conftest.$ac_ext <<_ACEOF
8555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008556$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008557int
8558main ()
8559{
8560if ((fpos_t *) 0)
8561 return 0;
8562if (sizeof (fpos_t))
8563 return 0;
8564 ;
8565 return 0;
8566}
8567_ACEOF
8568rm -f conftest.$ac_objext
8569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008570 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008572 grep -v '^ *+' conftest.er1 >conftest.err
8573 rm -f conftest.er1
8574 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8576 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008577 { ac_try='test -z "$ac_c_werror_flag"
8578 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8580 (eval $ac_try) 2>&5
8581 ac_status=$?
8582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8583 (exit $ac_status); }; } &&
8584 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8586 (eval $ac_try) 2>&5
8587 ac_status=$?
8588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8589 (exit $ac_status); }; }; then
8590 ac_cv_type_fpos_t=yes
8591else
8592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008593sed 's/^/| /' conftest.$ac_ext >&5
8594
Martin v. Löwis11437992002-04-12 09:54:03 +00008595ac_cv_type_fpos_t=no
8596fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008597rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008598fi
8599echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8600echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8601
8602echo "$as_me:$LINENO: checking size of fpos_t" >&5
8603echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8604if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8605 echo $ECHO_N "(cached) $ECHO_C" >&6
8606else
8607 if test "$ac_cv_type_fpos_t" = yes; then
8608 # The cast to unsigned long works around a bug in the HP C Compiler
8609 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8610 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8611 # This bug is HP SR number 8606223364.
8612 if test "$cross_compiling" = yes; then
8613 # Depending upon the size, compute the lo and hi bounds.
8614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008615/* confdefs.h. */
8616_ACEOF
8617cat confdefs.h >>conftest.$ac_ext
8618cat >>conftest.$ac_ext <<_ACEOF
8619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008620$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008621int
8622main ()
8623{
8624static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8625test_array [0] = 0
8626
8627 ;
8628 return 0;
8629}
8630_ACEOF
8631rm -f conftest.$ac_objext
8632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008633 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008635 grep -v '^ *+' conftest.er1 >conftest.err
8636 rm -f conftest.er1
8637 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8639 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008640 { ac_try='test -z "$ac_c_werror_flag"
8641 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8643 (eval $ac_try) 2>&5
8644 ac_status=$?
8645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8646 (exit $ac_status); }; } &&
8647 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8649 (eval $ac_try) 2>&5
8650 ac_status=$?
8651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8652 (exit $ac_status); }; }; then
8653 ac_lo=0 ac_mid=0
8654 while :; do
8655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008656/* confdefs.h. */
8657_ACEOF
8658cat confdefs.h >>conftest.$ac_ext
8659cat >>conftest.$ac_ext <<_ACEOF
8660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008661$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008662int
8663main ()
8664{
8665static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8666test_array [0] = 0
8667
8668 ;
8669 return 0;
8670}
8671_ACEOF
8672rm -f conftest.$ac_objext
8673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008674 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008676 grep -v '^ *+' conftest.er1 >conftest.err
8677 rm -f conftest.er1
8678 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8680 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008681 { ac_try='test -z "$ac_c_werror_flag"
8682 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8684 (eval $ac_try) 2>&5
8685 ac_status=$?
8686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8687 (exit $ac_status); }; } &&
8688 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8690 (eval $ac_try) 2>&5
8691 ac_status=$?
8692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8693 (exit $ac_status); }; }; then
8694 ac_hi=$ac_mid; break
8695else
8696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008697sed 's/^/| /' conftest.$ac_ext >&5
8698
Martin v. Löwis11437992002-04-12 09:54:03 +00008699ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008700 if test $ac_lo -le $ac_mid; then
8701 ac_lo= ac_hi=
8702 break
8703 fi
8704 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008705fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008706rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 done
8708else
8709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008710sed 's/^/| /' conftest.$ac_ext >&5
8711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008713/* confdefs.h. */
8714_ACEOF
8715cat confdefs.h >>conftest.$ac_ext
8716cat >>conftest.$ac_ext <<_ACEOF
8717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008718$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008719int
8720main ()
8721{
8722static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8723test_array [0] = 0
8724
8725 ;
8726 return 0;
8727}
8728_ACEOF
8729rm -f conftest.$ac_objext
8730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008731 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008733 grep -v '^ *+' conftest.er1 >conftest.err
8734 rm -f conftest.er1
8735 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8737 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008738 { ac_try='test -z "$ac_c_werror_flag"
8739 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8741 (eval $ac_try) 2>&5
8742 ac_status=$?
8743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8744 (exit $ac_status); }; } &&
8745 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8747 (eval $ac_try) 2>&5
8748 ac_status=$?
8749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8750 (exit $ac_status); }; }; then
8751 ac_hi=-1 ac_mid=-1
8752 while :; do
8753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008754/* confdefs.h. */
8755_ACEOF
8756cat confdefs.h >>conftest.$ac_ext
8757cat >>conftest.$ac_ext <<_ACEOF
8758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008759$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008760int
8761main ()
8762{
8763static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8764test_array [0] = 0
8765
8766 ;
8767 return 0;
8768}
8769_ACEOF
8770rm -f conftest.$ac_objext
8771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008772 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008774 grep -v '^ *+' conftest.er1 >conftest.err
8775 rm -f conftest.er1
8776 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8778 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008779 { ac_try='test -z "$ac_c_werror_flag"
8780 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8782 (eval $ac_try) 2>&5
8783 ac_status=$?
8784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8785 (exit $ac_status); }; } &&
8786 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8788 (eval $ac_try) 2>&5
8789 ac_status=$?
8790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8791 (exit $ac_status); }; }; then
8792 ac_lo=$ac_mid; break
8793else
8794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008795sed 's/^/| /' conftest.$ac_ext >&5
8796
Martin v. Löwis11437992002-04-12 09:54:03 +00008797ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008798 if test $ac_mid -le $ac_hi; then
8799 ac_lo= ac_hi=
8800 break
8801 fi
8802 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008803fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008804rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 done
8806else
8807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008808sed 's/^/| /' conftest.$ac_ext >&5
8809
Martin v. Löwis11437992002-04-12 09:54:03 +00008810ac_lo= ac_hi=
8811fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008812rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008813fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008815# Binary search between lo and hi bounds.
8816while test "x$ac_lo" != "x$ac_hi"; do
8817 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008819/* confdefs.h. */
8820_ACEOF
8821cat confdefs.h >>conftest.$ac_ext
8822cat >>conftest.$ac_ext <<_ACEOF
8823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008824$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008825int
8826main ()
8827{
8828static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8829test_array [0] = 0
8830
8831 ;
8832 return 0;
8833}
8834_ACEOF
8835rm -f conftest.$ac_objext
8836if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008837 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008839 grep -v '^ *+' conftest.er1 >conftest.err
8840 rm -f conftest.er1
8841 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8843 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008844 { ac_try='test -z "$ac_c_werror_flag"
8845 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8847 (eval $ac_try) 2>&5
8848 ac_status=$?
8849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8850 (exit $ac_status); }; } &&
8851 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8853 (eval $ac_try) 2>&5
8854 ac_status=$?
8855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8856 (exit $ac_status); }; }; then
8857 ac_hi=$ac_mid
8858else
8859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008860sed 's/^/| /' conftest.$ac_ext >&5
8861
Martin v. Löwis11437992002-04-12 09:54:03 +00008862ac_lo=`expr '(' $ac_mid ')' + 1`
8863fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008864rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008865done
8866case $ac_lo in
8867?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008868'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8869See \`config.log' for more details." >&5
8870echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8871See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008872 { (exit 1); exit 1; }; } ;;
8873esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008874else
8875 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00008876 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8877See \`config.log' for more details." >&5
8878echo "$as_me: error: cannot run test program while cross compiling
8879See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008881else
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008883/* confdefs.h. */
8884_ACEOF
8885cat confdefs.h >>conftest.$ac_ext
8886cat >>conftest.$ac_ext <<_ACEOF
8887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008888$ac_includes_default
8889long longval () { return (long) (sizeof (fpos_t)); }
8890unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008891#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008892#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008893int
8894main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008895{
Martin v. Löwis11437992002-04-12 09:54:03 +00008896
8897 FILE *f = fopen ("conftest.val", "w");
8898 if (! f)
8899 exit (1);
8900 if (((long) (sizeof (fpos_t))) < 0)
8901 {
8902 long i = longval ();
8903 if (i != ((long) (sizeof (fpos_t))))
8904 exit (1);
8905 fprintf (f, "%ld\n", i);
8906 }
8907 else
8908 {
8909 unsigned long i = ulongval ();
8910 if (i != ((long) (sizeof (fpos_t))))
8911 exit (1);
8912 fprintf (f, "%lu\n", i);
8913 }
8914 exit (ferror (f) || fclose (f) != 0);
8915
8916 ;
8917 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008918}
Martin v. Löwis11437992002-04-12 09:54:03 +00008919_ACEOF
8920rm -f conftest$ac_exeext
8921if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8922 (eval $ac_link) 2>&5
8923 ac_status=$?
8924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8927 (eval $ac_try) 2>&5
8928 ac_status=$?
8929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8930 (exit $ac_status); }; }; then
8931 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008932else
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 echo "$as_me: program exited with status $ac_status" >&5
8934echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008935sed 's/^/| /' conftest.$ac_ext >&5
8936
Martin v. Löwis11437992002-04-12 09:54:03 +00008937( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008938{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8939See \`config.log' for more details." >&5
8940echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8941See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 { (exit 1); exit 1; }; }
8943fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008944rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008945fi
8946fi
8947rm -f conftest.val
8948else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008949 ac_cv_sizeof_fpos_t=0
8950fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008951fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008952echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8953echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8954cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008955#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008956_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008957
Michael W. Hudson54241132001-12-07 15:38:26 +00008958
8959
Martin v. Löwis11437992002-04-12 09:54:03 +00008960echo "$as_me:$LINENO: checking for long long support" >&5
8961echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008962have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008963cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008964/* confdefs.h. */
8965_ACEOF
8966cat confdefs.h >>conftest.$ac_ext
8967cat >>conftest.$ac_ext <<_ACEOF
8968/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008969
Martin v. Löwis11437992002-04-12 09:54:03 +00008970int
8971main ()
8972{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008973long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 ;
8975 return 0;
8976}
8977_ACEOF
8978rm -f conftest.$ac_objext
8979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008980 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008982 grep -v '^ *+' conftest.er1 >conftest.err
8983 rm -f conftest.er1
8984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8986 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008987 { ac_try='test -z "$ac_c_werror_flag"
8988 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8990 (eval $ac_try) 2>&5
8991 ac_status=$?
8992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8993 (exit $ac_status); }; } &&
8994 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8996 (eval $ac_try) 2>&5
8997 ac_status=$?
8998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8999 (exit $ac_status); }; }; then
9000
9001
9002cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009003#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009004_ACEOF
9005
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009006 have_long_long=yes
9007
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009008else
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009010sed 's/^/| /' conftest.$ac_ext >&5
9011
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009012fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009013rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009014echo "$as_me:$LINENO: result: $have_long_long" >&5
9015echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009016if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009017echo "$as_me:$LINENO: checking for long long" >&5
9018echo $ECHO_N "checking for long long... $ECHO_C" >&6
9019if test "${ac_cv_type_long_long+set}" = set; then
9020 echo $ECHO_N "(cached) $ECHO_C" >&6
9021else
9022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009023/* confdefs.h. */
9024_ACEOF
9025cat confdefs.h >>conftest.$ac_ext
9026cat >>conftest.$ac_ext <<_ACEOF
9027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009028$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009029int
9030main ()
9031{
9032if ((long long *) 0)
9033 return 0;
9034if (sizeof (long long))
9035 return 0;
9036 ;
9037 return 0;
9038}
9039_ACEOF
9040rm -f conftest.$ac_objext
9041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009042 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009044 grep -v '^ *+' conftest.er1 >conftest.err
9045 rm -f conftest.er1
9046 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9048 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009049 { ac_try='test -z "$ac_c_werror_flag"
9050 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9052 (eval $ac_try) 2>&5
9053 ac_status=$?
9054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9055 (exit $ac_status); }; } &&
9056 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9058 (eval $ac_try) 2>&5
9059 ac_status=$?
9060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9061 (exit $ac_status); }; }; then
9062 ac_cv_type_long_long=yes
9063else
9064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009065sed 's/^/| /' conftest.$ac_ext >&5
9066
Martin v. Löwis11437992002-04-12 09:54:03 +00009067ac_cv_type_long_long=no
9068fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009069rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009070fi
9071echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9072echo "${ECHO_T}$ac_cv_type_long_long" >&6
9073
9074echo "$as_me:$LINENO: checking size of long long" >&5
9075echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9076if test "${ac_cv_sizeof_long_long+set}" = set; then
9077 echo $ECHO_N "(cached) $ECHO_C" >&6
9078else
9079 if test "$ac_cv_type_long_long" = yes; then
9080 # The cast to unsigned long works around a bug in the HP C Compiler
9081 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9082 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9083 # This bug is HP SR number 8606223364.
9084 if test "$cross_compiling" = yes; then
9085 # Depending upon the size, compute the lo and hi bounds.
9086cat >conftest.$ac_ext <<_ACEOF
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. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009092$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009093int
9094main ()
9095{
9096static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9097test_array [0] = 0
9098
9099 ;
9100 return 0;
9101}
9102_ACEOF
9103rm -f conftest.$ac_objext
9104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009105 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009107 grep -v '^ *+' conftest.er1 >conftest.err
9108 rm -f conftest.er1
9109 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9111 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009112 { ac_try='test -z "$ac_c_werror_flag"
9113 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9115 (eval $ac_try) 2>&5
9116 ac_status=$?
9117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9118 (exit $ac_status); }; } &&
9119 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9121 (eval $ac_try) 2>&5
9122 ac_status=$?
9123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9124 (exit $ac_status); }; }; then
9125 ac_lo=0 ac_mid=0
9126 while :; do
9127 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009128/* confdefs.h. */
9129_ACEOF
9130cat confdefs.h >>conftest.$ac_ext
9131cat >>conftest.$ac_ext <<_ACEOF
9132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009133$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009134int
9135main ()
9136{
9137static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9138test_array [0] = 0
9139
9140 ;
9141 return 0;
9142}
9143_ACEOF
9144rm -f conftest.$ac_objext
9145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009146 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009148 grep -v '^ *+' conftest.er1 >conftest.err
9149 rm -f conftest.er1
9150 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9152 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009153 { ac_try='test -z "$ac_c_werror_flag"
9154 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9156 (eval $ac_try) 2>&5
9157 ac_status=$?
9158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9159 (exit $ac_status); }; } &&
9160 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9162 (eval $ac_try) 2>&5
9163 ac_status=$?
9164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9165 (exit $ac_status); }; }; then
9166 ac_hi=$ac_mid; break
9167else
9168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009169sed 's/^/| /' conftest.$ac_ext >&5
9170
Martin v. Löwis11437992002-04-12 09:54:03 +00009171ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009172 if test $ac_lo -le $ac_mid; then
9173 ac_lo= ac_hi=
9174 break
9175 fi
9176 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009177fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009178rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 done
9180else
9181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009182sed 's/^/| /' conftest.$ac_ext >&5
9183
Martin v. Löwis11437992002-04-12 09:54:03 +00009184cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009185/* confdefs.h. */
9186_ACEOF
9187cat confdefs.h >>conftest.$ac_ext
9188cat >>conftest.$ac_ext <<_ACEOF
9189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009190$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009191int
9192main ()
9193{
9194static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9195test_array [0] = 0
9196
9197 ;
9198 return 0;
9199}
9200_ACEOF
9201rm -f conftest.$ac_objext
9202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009203 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009205 grep -v '^ *+' conftest.er1 >conftest.err
9206 rm -f conftest.er1
9207 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9209 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009210 { ac_try='test -z "$ac_c_werror_flag"
9211 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9213 (eval $ac_try) 2>&5
9214 ac_status=$?
9215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9216 (exit $ac_status); }; } &&
9217 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009218 { (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
9223 ac_hi=-1 ac_mid=-1
9224 while :; do
9225 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009226/* confdefs.h. */
9227_ACEOF
9228cat confdefs.h >>conftest.$ac_ext
9229cat >>conftest.$ac_ext <<_ACEOF
9230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009231$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009232int
9233main ()
9234{
9235static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9236test_array [0] = 0
9237
9238 ;
9239 return 0;
9240}
9241_ACEOF
9242rm -f conftest.$ac_objext
9243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009244 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009246 grep -v '^ *+' conftest.er1 >conftest.err
9247 rm -f conftest.er1
9248 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9250 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009251 { ac_try='test -z "$ac_c_werror_flag"
9252 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9254 (eval $ac_try) 2>&5
9255 ac_status=$?
9256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9257 (exit $ac_status); }; } &&
9258 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9260 (eval $ac_try) 2>&5
9261 ac_status=$?
9262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9263 (exit $ac_status); }; }; then
9264 ac_lo=$ac_mid; break
9265else
9266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009267sed 's/^/| /' conftest.$ac_ext >&5
9268
Martin v. Löwis11437992002-04-12 09:54:03 +00009269ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009270 if test $ac_mid -le $ac_hi; then
9271 ac_lo= ac_hi=
9272 break
9273 fi
9274 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009275fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009276rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 done
9278else
9279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009280sed 's/^/| /' conftest.$ac_ext >&5
9281
Martin v. Löwis11437992002-04-12 09:54:03 +00009282ac_lo= ac_hi=
9283fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009284rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009285fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009287# Binary search between lo and hi bounds.
9288while test "x$ac_lo" != "x$ac_hi"; do
9289 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9290 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009291/* confdefs.h. */
9292_ACEOF
9293cat confdefs.h >>conftest.$ac_ext
9294cat >>conftest.$ac_ext <<_ACEOF
9295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009296$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009297int
9298main ()
9299{
9300static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9301test_array [0] = 0
9302
9303 ;
9304 return 0;
9305}
9306_ACEOF
9307rm -f conftest.$ac_objext
9308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009309 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009311 grep -v '^ *+' conftest.er1 >conftest.err
9312 rm -f conftest.er1
9313 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9315 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009316 { ac_try='test -z "$ac_c_werror_flag"
9317 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9319 (eval $ac_try) 2>&5
9320 ac_status=$?
9321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9322 (exit $ac_status); }; } &&
9323 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9325 (eval $ac_try) 2>&5
9326 ac_status=$?
9327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328 (exit $ac_status); }; }; then
9329 ac_hi=$ac_mid
9330else
9331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009332sed 's/^/| /' conftest.$ac_ext >&5
9333
Martin v. Löwis11437992002-04-12 09:54:03 +00009334ac_lo=`expr '(' $ac_mid ')' + 1`
9335fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009336rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009337done
9338case $ac_lo in
9339?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009340'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9341See \`config.log' for more details." >&5
9342echo "$as_me: error: cannot compute sizeof (long long), 77
9343See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 { (exit 1); exit 1; }; } ;;
9345esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009346else
9347 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00009348 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9349See \`config.log' for more details." >&5
9350echo "$as_me: error: cannot run test program while cross compiling
9351See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009352 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009353else
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009355/* confdefs.h. */
9356_ACEOF
9357cat confdefs.h >>conftest.$ac_ext
9358cat >>conftest.$ac_ext <<_ACEOF
9359/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009360$ac_includes_default
9361long longval () { return (long) (sizeof (long long)); }
9362unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009363#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009364#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009365int
9366main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009367{
Martin v. Löwis11437992002-04-12 09:54:03 +00009368
9369 FILE *f = fopen ("conftest.val", "w");
9370 if (! f)
9371 exit (1);
9372 if (((long) (sizeof (long long))) < 0)
9373 {
9374 long i = longval ();
9375 if (i != ((long) (sizeof (long long))))
9376 exit (1);
9377 fprintf (f, "%ld\n", i);
9378 }
9379 else
9380 {
9381 unsigned long i = ulongval ();
9382 if (i != ((long) (sizeof (long long))))
9383 exit (1);
9384 fprintf (f, "%lu\n", i);
9385 }
9386 exit (ferror (f) || fclose (f) != 0);
9387
9388 ;
9389 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009390}
Martin v. Löwis11437992002-04-12 09:54:03 +00009391_ACEOF
9392rm -f conftest$ac_exeext
9393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9394 (eval $ac_link) 2>&5
9395 ac_status=$?
9396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9397 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9399 (eval $ac_try) 2>&5
9400 ac_status=$?
9401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9402 (exit $ac_status); }; }; then
9403 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009404else
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 echo "$as_me: program exited with status $ac_status" >&5
9406echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009407sed 's/^/| /' conftest.$ac_ext >&5
9408
Martin v. Löwis11437992002-04-12 09:54:03 +00009409( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009410{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9411See \`config.log' for more details." >&5
9412echo "$as_me: error: cannot compute sizeof (long long), 77
9413See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 { (exit 1); exit 1; }; }
9415fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009416rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009417fi
9418fi
9419rm -f conftest.val
9420else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009421 ac_cv_sizeof_long_long=0
9422fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009423fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009424echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9425echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9426cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009427#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009428_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009429
Michael W. Hudson54241132001-12-07 15:38:26 +00009430
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009431fi
9432
Martin v. Löwis11437992002-04-12 09:54:03 +00009433echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9434echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009435have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009436cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009437/* confdefs.h. */
9438_ACEOF
9439cat confdefs.h >>conftest.$ac_ext
9440cat >>conftest.$ac_ext <<_ACEOF
9441/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009442
Martin v. Löwis11437992002-04-12 09:54:03 +00009443int
9444main ()
9445{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009446uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 ;
9448 return 0;
9449}
9450_ACEOF
9451rm -f conftest.$ac_objext
9452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009453 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009455 grep -v '^ *+' conftest.er1 >conftest.err
9456 rm -f conftest.er1
9457 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9459 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009460 { ac_try='test -z "$ac_c_werror_flag"
9461 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9463 (eval $ac_try) 2>&5
9464 ac_status=$?
9465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9466 (exit $ac_status); }; } &&
9467 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9469 (eval $ac_try) 2>&5
9470 ac_status=$?
9471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9472 (exit $ac_status); }; }; then
9473
9474
9475cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009476#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009477_ACEOF
9478
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009479 have_uintptr_t=yes
9480
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009481else
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009483sed 's/^/| /' conftest.$ac_ext >&5
9484
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009485fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009486rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009487echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9488echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009489if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009490echo "$as_me:$LINENO: checking for uintptr_t" >&5
9491echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9492if test "${ac_cv_type_uintptr_t+set}" = set; then
9493 echo $ECHO_N "(cached) $ECHO_C" >&6
9494else
9495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009496/* confdefs.h. */
9497_ACEOF
9498cat confdefs.h >>conftest.$ac_ext
9499cat >>conftest.$ac_ext <<_ACEOF
9500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009501$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009502int
9503main ()
9504{
9505if ((uintptr_t *) 0)
9506 return 0;
9507if (sizeof (uintptr_t))
9508 return 0;
9509 ;
9510 return 0;
9511}
9512_ACEOF
9513rm -f conftest.$ac_objext
9514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009515 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009517 grep -v '^ *+' conftest.er1 >conftest.err
9518 rm -f conftest.er1
9519 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9521 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009522 { ac_try='test -z "$ac_c_werror_flag"
9523 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9525 (eval $ac_try) 2>&5
9526 ac_status=$?
9527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9528 (exit $ac_status); }; } &&
9529 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9531 (eval $ac_try) 2>&5
9532 ac_status=$?
9533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9534 (exit $ac_status); }; }; then
9535 ac_cv_type_uintptr_t=yes
9536else
9537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009538sed 's/^/| /' conftest.$ac_ext >&5
9539
Martin v. Löwis11437992002-04-12 09:54:03 +00009540ac_cv_type_uintptr_t=no
9541fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009542rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009543fi
9544echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9545echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9546
9547echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9548echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9549if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9550 echo $ECHO_N "(cached) $ECHO_C" >&6
9551else
9552 if test "$ac_cv_type_uintptr_t" = yes; then
9553 # The cast to unsigned long works around a bug in the HP C Compiler
9554 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9555 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9556 # This bug is HP SR number 8606223364.
9557 if test "$cross_compiling" = yes; then
9558 # Depending upon the size, compute the lo and hi bounds.
9559cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009560/* confdefs.h. */
9561_ACEOF
9562cat confdefs.h >>conftest.$ac_ext
9563cat >>conftest.$ac_ext <<_ACEOF
9564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009565$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009566int
9567main ()
9568{
9569static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9570test_array [0] = 0
9571
9572 ;
9573 return 0;
9574}
9575_ACEOF
9576rm -f conftest.$ac_objext
9577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009578 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009580 grep -v '^ *+' conftest.er1 >conftest.err
9581 rm -f conftest.er1
9582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9584 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009585 { ac_try='test -z "$ac_c_werror_flag"
9586 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9588 (eval $ac_try) 2>&5
9589 ac_status=$?
9590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9591 (exit $ac_status); }; } &&
9592 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9594 (eval $ac_try) 2>&5
9595 ac_status=$?
9596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9597 (exit $ac_status); }; }; then
9598 ac_lo=0 ac_mid=0
9599 while :; do
9600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009601/* confdefs.h. */
9602_ACEOF
9603cat confdefs.h >>conftest.$ac_ext
9604cat >>conftest.$ac_ext <<_ACEOF
9605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009606$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009607int
9608main ()
9609{
9610static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9611test_array [0] = 0
9612
9613 ;
9614 return 0;
9615}
9616_ACEOF
9617rm -f conftest.$ac_objext
9618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009619 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009621 grep -v '^ *+' conftest.er1 >conftest.err
9622 rm -f conftest.er1
9623 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9625 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009626 { ac_try='test -z "$ac_c_werror_flag"
9627 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9629 (eval $ac_try) 2>&5
9630 ac_status=$?
9631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9632 (exit $ac_status); }; } &&
9633 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9635 (eval $ac_try) 2>&5
9636 ac_status=$?
9637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9638 (exit $ac_status); }; }; then
9639 ac_hi=$ac_mid; break
9640else
9641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009642sed 's/^/| /' conftest.$ac_ext >&5
9643
Martin v. Löwis11437992002-04-12 09:54:03 +00009644ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009645 if test $ac_lo -le $ac_mid; then
9646 ac_lo= ac_hi=
9647 break
9648 fi
9649 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009650fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009651rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 done
9653else
9654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009655sed 's/^/| /' conftest.$ac_ext >&5
9656
Martin v. Löwis11437992002-04-12 09:54:03 +00009657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009658/* confdefs.h. */
9659_ACEOF
9660cat confdefs.h >>conftest.$ac_ext
9661cat >>conftest.$ac_ext <<_ACEOF
9662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009663$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009664int
9665main ()
9666{
9667static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9668test_array [0] = 0
9669
9670 ;
9671 return 0;
9672}
9673_ACEOF
9674rm -f conftest.$ac_objext
9675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009676 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009678 grep -v '^ *+' conftest.er1 >conftest.err
9679 rm -f conftest.er1
9680 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9682 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009683 { ac_try='test -z "$ac_c_werror_flag"
9684 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9686 (eval $ac_try) 2>&5
9687 ac_status=$?
9688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9689 (exit $ac_status); }; } &&
9690 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 { (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_hi=-1 ac_mid=-1
9697 while :; do
9698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009699/* confdefs.h. */
9700_ACEOF
9701cat confdefs.h >>conftest.$ac_ext
9702cat >>conftest.$ac_ext <<_ACEOF
9703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009704$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009705int
9706main ()
9707{
9708static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9709test_array [0] = 0
9710
9711 ;
9712 return 0;
9713}
9714_ACEOF
9715rm -f conftest.$ac_objext
9716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009717 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009719 grep -v '^ *+' conftest.er1 >conftest.err
9720 rm -f conftest.er1
9721 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9723 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009724 { ac_try='test -z "$ac_c_werror_flag"
9725 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9727 (eval $ac_try) 2>&5
9728 ac_status=$?
9729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9730 (exit $ac_status); }; } &&
9731 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9733 (eval $ac_try) 2>&5
9734 ac_status=$?
9735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9736 (exit $ac_status); }; }; then
9737 ac_lo=$ac_mid; break
9738else
9739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009740sed 's/^/| /' conftest.$ac_ext >&5
9741
Martin v. Löwis11437992002-04-12 09:54:03 +00009742ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009743 if test $ac_mid -le $ac_hi; then
9744 ac_lo= ac_hi=
9745 break
9746 fi
9747 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009748fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009749rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 done
9751else
9752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009753sed 's/^/| /' conftest.$ac_ext >&5
9754
Martin v. Löwis11437992002-04-12 09:54:03 +00009755ac_lo= ac_hi=
9756fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009757rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009758fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009760# Binary search between lo and hi bounds.
9761while test "x$ac_lo" != "x$ac_hi"; do
9762 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009764/* confdefs.h. */
9765_ACEOF
9766cat confdefs.h >>conftest.$ac_ext
9767cat >>conftest.$ac_ext <<_ACEOF
9768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009769$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009770int
9771main ()
9772{
9773static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9774test_array [0] = 0
9775
9776 ;
9777 return 0;
9778}
9779_ACEOF
9780rm -f conftest.$ac_objext
9781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009782 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009784 grep -v '^ *+' conftest.er1 >conftest.err
9785 rm -f conftest.er1
9786 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9788 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009789 { ac_try='test -z "$ac_c_werror_flag"
9790 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9792 (eval $ac_try) 2>&5
9793 ac_status=$?
9794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9795 (exit $ac_status); }; } &&
9796 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9798 (eval $ac_try) 2>&5
9799 ac_status=$?
9800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9801 (exit $ac_status); }; }; then
9802 ac_hi=$ac_mid
9803else
9804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009805sed 's/^/| /' conftest.$ac_ext >&5
9806
Martin v. Löwis11437992002-04-12 09:54:03 +00009807ac_lo=`expr '(' $ac_mid ')' + 1`
9808fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009809rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009810done
9811case $ac_lo in
9812?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009813'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9814See \`config.log' for more details." >&5
9815echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9816See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009817 { (exit 1); exit 1; }; } ;;
9818esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009819else
9820 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00009821 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9822See \`config.log' for more details." >&5
9823echo "$as_me: error: cannot run test program while cross compiling
9824See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009826else
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009828/* confdefs.h. */
9829_ACEOF
9830cat confdefs.h >>conftest.$ac_ext
9831cat >>conftest.$ac_ext <<_ACEOF
9832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009833$ac_includes_default
9834long longval () { return (long) (sizeof (uintptr_t)); }
9835unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009836#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009837#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009838int
9839main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009840{
Martin v. Löwis11437992002-04-12 09:54:03 +00009841
9842 FILE *f = fopen ("conftest.val", "w");
9843 if (! f)
9844 exit (1);
9845 if (((long) (sizeof (uintptr_t))) < 0)
9846 {
9847 long i = longval ();
9848 if (i != ((long) (sizeof (uintptr_t))))
9849 exit (1);
9850 fprintf (f, "%ld\n", i);
9851 }
9852 else
9853 {
9854 unsigned long i = ulongval ();
9855 if (i != ((long) (sizeof (uintptr_t))))
9856 exit (1);
9857 fprintf (f, "%lu\n", i);
9858 }
9859 exit (ferror (f) || fclose (f) != 0);
9860
9861 ;
9862 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009863}
Martin v. Löwis11437992002-04-12 09:54:03 +00009864_ACEOF
9865rm -f conftest$ac_exeext
9866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9867 (eval $ac_link) 2>&5
9868 ac_status=$?
9869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9870 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9872 (eval $ac_try) 2>&5
9873 ac_status=$?
9874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9875 (exit $ac_status); }; }; then
9876 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009877else
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 echo "$as_me: program exited with status $ac_status" >&5
9879echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009880sed 's/^/| /' conftest.$ac_ext >&5
9881
Martin v. Löwis11437992002-04-12 09:54:03 +00009882( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009883{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9884See \`config.log' for more details." >&5
9885echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9886See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 { (exit 1); exit 1; }; }
9888fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009889rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009890fi
9891fi
9892rm -f conftest.val
9893else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009894 ac_cv_sizeof_uintptr_t=0
9895fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009896fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009897echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9898echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9899cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009900#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009901_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009902
Michael W. Hudson54241132001-12-07 15:38:26 +00009903
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009904fi
9905
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009906# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009907echo "$as_me:$LINENO: checking size of off_t" >&5
9908echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9909if test "${ac_cv_sizeof_off_t+set}" = set; then
9910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009911else
9912 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009913 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009914else
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009916/* confdefs.h. */
9917_ACEOF
9918cat confdefs.h >>conftest.$ac_ext
9919cat >>conftest.$ac_ext <<_ACEOF
9920/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009921#include <stdio.h>
9922#include <sys/types.h>
9923main()
9924{
9925 FILE *f=fopen("conftestval", "w");
9926 if (!f) exit(1);
9927 fprintf(f, "%d\n", sizeof(off_t));
9928 exit(0);
9929}
Martin v. Löwis11437992002-04-12 09:54:03 +00009930_ACEOF
9931rm -f conftest$ac_exeext
9932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9933 (eval $ac_link) 2>&5
9934 ac_status=$?
9935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9936 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9938 (eval $ac_try) 2>&5
9939 ac_status=$?
9940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9941 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009942 ac_cv_sizeof_off_t=`cat conftestval`
9943else
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 echo "$as_me: program exited with status $ac_status" >&5
9945echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009946sed 's/^/| /' conftest.$ac_ext >&5
9947
Martin v. Löwis11437992002-04-12 09:54:03 +00009948( exit $ac_status )
9949ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009950fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009951rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009952fi
9953
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009954fi
9955
Martin v. Löwis11437992002-04-12 09:54:03 +00009956echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9957echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9958
9959cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009960#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009961_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009962
Michael W. Hudson54241132001-12-07 15:38:26 +00009963
Martin v. Löwis11437992002-04-12 09:54:03 +00009964echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9965echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009966if test "$have_long_long" = yes -a \
9967 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9968 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009969
Martin v. Löwis11437992002-04-12 09:54:03 +00009970cat >>confdefs.h <<\_ACEOF
9971#define HAVE_LARGEFILE_SUPPORT 1
9972_ACEOF
9973
9974 echo "$as_me:$LINENO: result: yes" >&5
9975echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009976else
Martin v. Löwis11437992002-04-12 09:54:03 +00009977 echo "$as_me:$LINENO: result: no" >&5
9978echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009979fi
9980
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009981# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009982echo "$as_me:$LINENO: checking size of time_t" >&5
9983echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9984if test "${ac_cv_sizeof_time_t+set}" = set; then
9985 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009986else
9987 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009988 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009989else
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009991/* confdefs.h. */
9992_ACEOF
9993cat confdefs.h >>conftest.$ac_ext
9994cat >>conftest.$ac_ext <<_ACEOF
9995/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009996#include <stdio.h>
9997#include <time.h>
9998main()
9999{
10000 FILE *f=fopen("conftestval", "w");
10001 if (!f) exit(1);
10002 fprintf(f, "%d\n", sizeof(time_t));
10003 exit(0);
10004}
Martin v. Löwis11437992002-04-12 09:54:03 +000010005_ACEOF
10006rm -f conftest$ac_exeext
10007if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10008 (eval $ac_link) 2>&5
10009 ac_status=$?
10010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10013 (eval $ac_try) 2>&5
10014 ac_status=$?
10015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10016 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010017 ac_cv_sizeof_time_t=`cat conftestval`
10018else
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 echo "$as_me: program exited with status $ac_status" >&5
10020echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010021sed 's/^/| /' conftest.$ac_ext >&5
10022
Martin v. Löwis11437992002-04-12 09:54:03 +000010023( exit $ac_status )
10024ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010025fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010026rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010027fi
10028
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010029fi
10030
Martin v. Löwis11437992002-04-12 09:54:03 +000010031echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
10032echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
10033
10034cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010035#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010036_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010037
Michael W. Hudson54241132001-12-07 15:38:26 +000010038
10039
Trent Mick635f6fb2000-08-23 21:33:05 +000010040# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010041ac_save_cc="$CC"
10042if test "$ac_cv_kpthread" = "yes"
10043then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010044elif test "$ac_cv_kthread" = "yes"
10045then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010046elif test "$ac_cv_pthread" = "yes"
10047then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010048fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010049echo "$as_me:$LINENO: checking for pthread_t" >&5
10050echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010051have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010052cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010053/* confdefs.h. */
10054_ACEOF
10055cat confdefs.h >>conftest.$ac_ext
10056cat >>conftest.$ac_ext <<_ACEOF
10057/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010058#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010059int
10060main ()
10061{
Guido van Rossum12580492000-09-24 16:47:19 +000010062pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 ;
10064 return 0;
10065}
10066_ACEOF
10067rm -f conftest.$ac_objext
10068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010069 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010071 grep -v '^ *+' conftest.er1 >conftest.err
10072 rm -f conftest.er1
10073 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10075 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010076 { ac_try='test -z "$ac_c_werror_flag"
10077 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10079 (eval $ac_try) 2>&5
10080 ac_status=$?
10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); }; } &&
10083 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10085 (eval $ac_try) 2>&5
10086 ac_status=$?
10087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010089 have_pthread_t=yes
10090else
Martin v. Löwis11437992002-04-12 09:54:03 +000010091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010092sed 's/^/| /' conftest.$ac_ext >&5
10093
Trent Mick635f6fb2000-08-23 21:33:05 +000010094fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010095rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010096echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10097echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010098if test "$have_pthread_t" = yes ; then
10099 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010100 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10101echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10102 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10103 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010104else
10105 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010106 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010107else
Martin v. Löwis11437992002-04-12 09:54:03 +000010108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010109/* confdefs.h. */
10110_ACEOF
10111cat confdefs.h >>conftest.$ac_ext
10112cat >>conftest.$ac_ext <<_ACEOF
10113/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010114#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010115#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010116 main()
10117 {
10118 FILE *f=fopen("conftestval", "w");
10119 if (!f) exit(1);
10120 fprintf(f, "%d\n", sizeof(pthread_t));
10121 exit(0);
10122 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010123_ACEOF
10124rm -f conftest$ac_exeext
10125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10126 (eval $ac_link) 2>&5
10127 ac_status=$?
10128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10129 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10131 (eval $ac_try) 2>&5
10132 ac_status=$?
10133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10134 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010135 ac_cv_sizeof_pthread_t=`cat conftestval`
10136else
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 echo "$as_me: program exited with status $ac_status" >&5
10138echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010139sed 's/^/| /' conftest.$ac_ext >&5
10140
Martin v. Löwis11437992002-04-12 09:54:03 +000010141( exit $ac_status )
10142ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010143fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010144rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010145fi
10146
Trent Mick635f6fb2000-08-23 21:33:05 +000010147fi
10148
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10150echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10151
10152cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010153#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010154_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010155
10156fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010157CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010158
Martin v. Löwis11437992002-04-12 09:54:03 +000010159echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10160echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010161# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10162if test "${enable_toolbox_glue+set}" = set; then
10163 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010164
Martin v. Löwis11437992002-04-12 09:54:03 +000010165fi;
Jack Jansene578a632001-08-15 01:27:14 +000010166
10167if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010168then
Jack Jansene578a632001-08-15 01:27:14 +000010169 case $ac_sys_system/$ac_sys_release in
10170 Darwin/*)
10171 enable_toolbox_glue="yes";;
10172 *)
10173 enable_toolbox_glue="no";;
10174 esac
10175fi
10176case "$enable_toolbox_glue" in
10177yes)
Jack Jansene578a632001-08-15 01:27:14 +000010178 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010179 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010180
10181cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010182#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010183_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010184
10185 ;;
10186*)
Jack Jansene578a632001-08-15 01:27:14 +000010187 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010188 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010189 ;;
10190esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010191echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10192echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010193
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010194
10195case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +000010196 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +000010197 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansenb36687a2004-07-16 08:43:47 +000010198 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010199 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010200 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +000010201 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010202 LIBTOOL_CRUFT="$LIBTOOL_CRUFT"
Jack Jansenb36687a2004-07-16 08:43:47 +000010203 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010204 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010205esac
10206
Martin v. Löwis11437992002-04-12 09:54:03 +000010207echo "$as_me:$LINENO: checking for --enable-framework" >&5
10208echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010209if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010210then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010211 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010213 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010214
Martin v. Löwis11437992002-04-12 09:54:03 +000010215cat >>confdefs.h <<\_ACEOF
10216#define WITH_NEXT_FRAMEWORK 1
10217_ACEOF
10218
10219 echo "$as_me:$LINENO: result: yes" >&5
10220echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010221else
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 echo "$as_me:$LINENO: result: no" >&5
10223echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010224fi
10225
Martin v. Löwis11437992002-04-12 09:54:03 +000010226echo "$as_me:$LINENO: checking for dyld" >&5
10227echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010228case $ac_sys_system/$ac_sys_release in
10229 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010230
Martin v. Löwis11437992002-04-12 09:54:03 +000010231cat >>confdefs.h <<\_ACEOF
10232#define WITH_DYLD 1
10233_ACEOF
10234
10235 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10236echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010237 ;;
10238 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 echo "$as_me:$LINENO: result: no" >&5
10240echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010241 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010242esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010243
Guido van Rossum0a516c91994-09-12 10:58:40 +000010244# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010245
Michael W. Hudson54241132001-12-07 15:38:26 +000010246
10247
10248
10249
Guido van Rossum0a516c91994-09-12 10:58:40 +000010250# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010251# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010252echo "$as_me:$LINENO: checking SO" >&5
10253echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010254if test -z "$SO"
10255then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010256 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010257 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010258 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010259 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010260 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010261else
10262 # this might also be a termcap variable, see #610332
10263 echo
10264 echo '====================================================================='
10265 echo '+ +'
10266 echo '+ WARNING: You have set SO in your environment. +'
10267 echo '+ Do you really mean to change the extension for shared libraries? +'
10268 echo '+ Continuing in 10 seconds to let you to ponder. +'
10269 echo '+ +'
10270 echo '====================================================================='
10271 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010273echo "$as_me:$LINENO: result: $SO" >&5
10274echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010275# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010276# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010277# (Shared libraries in this instance are shared modules to be loaded into
10278# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010279echo "$as_me:$LINENO: checking LDSHARED" >&5
10280echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010281if test -z "$LDSHARED"
10282then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010283 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010284 AIX*)
10285 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010286 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010287 ;;
10288 BeOS*)
10289 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010290 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010291 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010292 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010293 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010294 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000010295 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010296 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010297 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000010298 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010299 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010300 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010301 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010302 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10303 if test "$enable_framework" ; then
10304 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +000010305 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
10306 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010307 else
10308 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010309 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010310 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010311 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010312 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10313 if test "$enable_framework" ; then
10314 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +000010315 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
10316 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010317 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010318 # No framework, use the Python app as bundle-loader
10319 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010320 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010321 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010322 Darwin/*)
10323 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10324 # This allows an extension to be used in any Python
10325 if test ${MACOSX_DEPLOYMENT_TARGET-10.1} '>' 10.2
10326 then
10327 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10328 BLDSHARED="$LDSHARED"
10329 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
10330 else
10331 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10332 if test "$enable_framework" ; then
10333 # Link against the framework. All externals should be defined.
10334 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
10335 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
10336 else
10337 # No framework, use the Python app as bundle-loader
10338 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10339 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10340 fi
10341 fi
10342 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010343 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010344 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010345 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010346 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010347 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000010348 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010349 else
10350 LDSHARED="ld -Bshareable ${LDFLAGS}"
10351 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010352 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010353 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010354 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010355 then LDSHARED='$(CC) -shared'
10356 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010357 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010358 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010359 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010360 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010361 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010362 *) LDSHARED="ld";;
10363 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010365echo "$as_me:$LINENO: result: $LDSHARED" >&5
10366echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010367BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010368# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010369# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010370echo "$as_me:$LINENO: checking CCSHARED" >&5
10371echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010372if test -z "$CCSHARED"
10373then
Guido van Rossum07397971997-04-29 21:49:50 +000010374 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010375 SunOS*) if test "$GCC" = yes;
10376 then CCSHARED="-fPIC";
10377 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010378 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010379 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010380 else CCSHARED="+z";
10381 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010382 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010383 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010384 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010385 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010386 if test "$GCC" = "yes"
10387 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010388 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010389 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010390 SCO_SV*)
10391 if test "$GCC" = "yes"
10392 then CCSHARED="-fPIC"
10393 else CCSHARED="-Kpic -belf"
10394 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010395 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010396 IRIX*/6*) case $CC in
10397 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010398 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010399 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010400 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010401 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010402fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010403echo "$as_me:$LINENO: result: $CCSHARED" >&5
10404echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010405# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010406# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010407echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10408echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010409if test -z "$LINKFORSHARED"
10410then
Guido van Rossum07397971997-04-29 21:49:50 +000010411 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010412 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010413 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010414 LINKFORSHARED="-Wl,-E -Wl,+s";;
10415# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010416 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010417 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010418 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010420 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
10421 # which is
Jack Jansene578a632001-08-15 01:27:14 +000010422 # not used by the core itself but which needs to be in the core so
10423 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010424 # -prebind is no longer used, because it actually seems to give a
10425 # slowdown in stead of a speedup, maybe due to the large number of
10426 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010427
10428 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000010429 if test "$enable_framework"
10430 then
Jack Jansenb36687a2004-07-16 08:43:47 +000010431 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework "'$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010432 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010433 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010434 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010435 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010436 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010438 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10439 then
10440 LINKFORSHARED="-Wl,--export-dynamic"
10441 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010442 SunOS/5*) case $CC in
10443 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010444 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010445 then
10446 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010447 fi;;
10448 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010449 CYGWIN*)
10450 if test $enable_shared = "no"
10451 then
10452 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10453 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010454 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010455fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010456echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10457echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010458
Michael W. Hudson54241132001-12-07 15:38:26 +000010459
Martin v. Löwis11437992002-04-12 09:54:03 +000010460echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10461echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010462if test ! "$LIBRARY" = "$LDLIBRARY"
10463then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010464 case $ac_sys_system in
10465 CYGWIN*)
10466 # Cygwin needs CCSHARED when building extension DLLs
10467 # but not when building the interpreter DLL.
10468 CFLAGSFORSHARED='';;
10469 *)
10470 CFLAGSFORSHARED='$(CCSHARED)'
10471 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010472fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010473echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10474echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010475
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010476# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10477# library (with --enable-shared).
10478# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010479# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10480# if it is not required, since it creates a dependency of the shared library
10481# to LIBS. This, in turn, means that applications linking the shared libpython
10482# don't need to link LIBS explicitly. The default should be only changed
10483# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010484
10485echo "$as_me:$LINENO: checking SHLIBS" >&5
10486echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10487case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010488 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010489 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010490esac
10491echo "$as_me:$LINENO: result: $SHLIBS" >&5
10492echo "${ECHO_T}$SHLIBS" >&6
10493
10494
Guido van Rossum627b2d71993-12-24 10:39:16 +000010495# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010496
10497echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10498echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10499if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10500 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010501else
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010503LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010504cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010505/* confdefs.h. */
10506_ACEOF
10507cat confdefs.h >>conftest.$ac_ext
10508cat >>conftest.$ac_ext <<_ACEOF
10509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010510
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010511/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010512#ifdef __cplusplus
10513extern "C"
10514#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010515/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010516 builtin and then its argument prototype would still apply. */
10517char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010518int
10519main ()
10520{
10521dlopen ();
10522 ;
10523 return 0;
10524}
10525_ACEOF
10526rm -f conftest.$ac_objext conftest$ac_exeext
10527if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010528 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010530 grep -v '^ *+' conftest.er1 >conftest.err
10531 rm -f conftest.er1
10532 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10534 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010535 { ac_try='test -z "$ac_c_werror_flag"
10536 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10538 (eval $ac_try) 2>&5
10539 ac_status=$?
10540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10541 (exit $ac_status); }; } &&
10542 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10544 (eval $ac_try) 2>&5
10545 ac_status=$?
10546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10547 (exit $ac_status); }; }; then
10548 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010549else
Martin v. Löwis11437992002-04-12 09:54:03 +000010550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010551sed 's/^/| /' conftest.$ac_ext >&5
10552
Martin v. Löwis11437992002-04-12 09:54:03 +000010553ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010554fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010555rm -f conftest.err conftest.$ac_objext \
10556 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010557LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010558fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010559echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10560echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10561if test $ac_cv_lib_dl_dlopen = yes; then
10562 cat >>confdefs.h <<_ACEOF
10563#define HAVE_LIBDL 1
10564_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010565
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010566 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010567
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010568fi
10569 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010570
10571echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10572echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10573if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10574 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010575else
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010577LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010578cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010579/* confdefs.h. */
10580_ACEOF
10581cat confdefs.h >>conftest.$ac_ext
10582cat >>conftest.$ac_ext <<_ACEOF
10583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010584
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010585/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010586#ifdef __cplusplus
10587extern "C"
10588#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010589/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010590 builtin and then its argument prototype would still apply. */
10591char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010592int
10593main ()
10594{
10595shl_load ();
10596 ;
10597 return 0;
10598}
10599_ACEOF
10600rm -f conftest.$ac_objext conftest$ac_exeext
10601if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010602 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010604 grep -v '^ *+' conftest.er1 >conftest.err
10605 rm -f conftest.er1
10606 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10608 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010609 { ac_try='test -z "$ac_c_werror_flag"
10610 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10612 (eval $ac_try) 2>&5
10613 ac_status=$?
10614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10615 (exit $ac_status); }; } &&
10616 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10618 (eval $ac_try) 2>&5
10619 ac_status=$?
10620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10621 (exit $ac_status); }; }; then
10622 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010623else
Martin v. Löwis11437992002-04-12 09:54:03 +000010624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010625sed 's/^/| /' conftest.$ac_ext >&5
10626
Martin v. Löwis11437992002-04-12 09:54:03 +000010627ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010628fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010629rm -f conftest.err conftest.$ac_objext \
10630 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010631LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010633echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10634echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10635if test $ac_cv_lib_dld_shl_load = yes; then
10636 cat >>confdefs.h <<_ACEOF
10637#define HAVE_LIBDLD 1
10638_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010639
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010640 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010641
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010642fi
10643 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010644
10645# only check for sem_ini if thread support is requested
10646if test "$with_threads" = "yes" -o -z "$with_threads"; then
10647 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010648echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10649if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010650 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010651else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010652 ac_func_search_save_LIBS=$LIBS
10653ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010654cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010655/* confdefs.h. */
10656_ACEOF
10657cat confdefs.h >>conftest.$ac_ext
10658cat >>conftest.$ac_ext <<_ACEOF
10659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010660
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010661/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010662#ifdef __cplusplus
10663extern "C"
10664#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010665/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 builtin and then its argument prototype would still apply. */
10667char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010668int
10669main ()
10670{
10671sem_init ();
10672 ;
10673 return 0;
10674}
10675_ACEOF
10676rm -f conftest.$ac_objext conftest$ac_exeext
10677if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010678 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010680 grep -v '^ *+' conftest.er1 >conftest.err
10681 rm -f conftest.er1
10682 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10684 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010685 { ac_try='test -z "$ac_c_werror_flag"
10686 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10688 (eval $ac_try) 2>&5
10689 ac_status=$?
10690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10691 (exit $ac_status); }; } &&
10692 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10694 (eval $ac_try) 2>&5
10695 ac_status=$?
10696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10697 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010698 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010699else
Martin v. Löwis11437992002-04-12 09:54:03 +000010700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010701sed 's/^/| /' conftest.$ac_ext >&5
10702
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010703fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010704rm -f conftest.err conftest.$ac_objext \
10705 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010706if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010707 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010708 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010710/* confdefs.h. */
10711_ACEOF
10712cat confdefs.h >>conftest.$ac_ext
10713cat >>conftest.$ac_ext <<_ACEOF
10714/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010715
10716/* Override any gcc2 internal prototype to avoid an error. */
10717#ifdef __cplusplus
10718extern "C"
10719#endif
10720/* We use char because int might match the return type of a gcc2
10721 builtin and then its argument prototype would still apply. */
10722char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010723int
10724main ()
10725{
10726sem_init ();
10727 ;
10728 return 0;
10729}
Martin v. Löwis11437992002-04-12 09:54:03 +000010730_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010731rm -f conftest.$ac_objext conftest$ac_exeext
10732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010733 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010735 grep -v '^ *+' conftest.er1 >conftest.err
10736 rm -f conftest.er1
10737 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10739 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010740 { ac_try='test -z "$ac_c_werror_flag"
10741 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10743 (eval $ac_try) 2>&5
10744 ac_status=$?
10745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10746 (exit $ac_status); }; } &&
10747 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10749 (eval $ac_try) 2>&5
10750 ac_status=$?
10751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10752 (exit $ac_status); }; }; then
10753 ac_cv_search_sem_init="-l$ac_lib"
10754break
10755else
10756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010757sed 's/^/| /' conftest.$ac_ext >&5
10758
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010759fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010760rm -f conftest.err conftest.$ac_objext \
10761 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010762 done
10763fi
10764LIBS=$ac_func_search_save_LIBS
10765fi
10766echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10767echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10768if test "$ac_cv_search_sem_init" != no; then
10769 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010770
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010771fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010772 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010773 # posix4 on Solaris 2.6
10774 # pthread (first!) on Linux
10775fi
10776
Martin v. Löwis19d17342003-06-14 21:03:05 +000010777# check if we need libintl for locale functions
10778echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10779echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10780if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10781 echo $ECHO_N "(cached) $ECHO_C" >&6
10782else
10783 ac_check_lib_save_LIBS=$LIBS
10784LIBS="-lintl $LIBS"
10785cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010786/* confdefs.h. */
10787_ACEOF
10788cat confdefs.h >>conftest.$ac_ext
10789cat >>conftest.$ac_ext <<_ACEOF
10790/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010791
10792/* Override any gcc2 internal prototype to avoid an error. */
10793#ifdef __cplusplus
10794extern "C"
10795#endif
10796/* We use char because int might match the return type of a gcc2
10797 builtin and then its argument prototype would still apply. */
10798char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010799int
10800main ()
10801{
10802textdomain ();
10803 ;
10804 return 0;
10805}
10806_ACEOF
10807rm -f conftest.$ac_objext conftest$ac_exeext
10808if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010809 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000010810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010811 grep -v '^ *+' conftest.er1 >conftest.err
10812 rm -f conftest.er1
10813 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000010814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10815 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010816 { ac_try='test -z "$ac_c_werror_flag"
10817 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10819 (eval $ac_try) 2>&5
10820 ac_status=$?
10821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10822 (exit $ac_status); }; } &&
10823 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +000010824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10825 (eval $ac_try) 2>&5
10826 ac_status=$?
10827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10828 (exit $ac_status); }; }; then
10829 ac_cv_lib_intl_textdomain=yes
10830else
10831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010832sed 's/^/| /' conftest.$ac_ext >&5
10833
Martin v. Löwis19d17342003-06-14 21:03:05 +000010834ac_cv_lib_intl_textdomain=no
10835fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010836rm -f conftest.err conftest.$ac_objext \
10837 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010838LIBS=$ac_check_lib_save_LIBS
10839fi
10840echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10841echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10842if test $ac_cv_lib_intl_textdomain = yes; then
10843
10844cat >>confdefs.h <<\_ACEOF
10845#define WITH_LIBINTL 1
10846_ACEOF
10847
10848fi
10849
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010850
10851# checks for system dependent C++ extensions support
10852case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010853 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10854echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010856/* confdefs.h. */
10857_ACEOF
10858cat confdefs.h >>conftest.$ac_ext
10859cat >>conftest.$ac_ext <<_ACEOF
10860/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010861#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010862int
10863main ()
10864{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010865loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010866 ;
10867 return 0;
10868}
10869_ACEOF
10870rm -f conftest.$ac_objext conftest$ac_exeext
10871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010872 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010874 grep -v '^ *+' conftest.er1 >conftest.err
10875 rm -f conftest.er1
10876 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10878 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010879 { ac_try='test -z "$ac_c_werror_flag"
10880 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10882 (eval $ac_try) 2>&5
10883 ac_status=$?
10884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10885 (exit $ac_status); }; } &&
10886 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10888 (eval $ac_try) 2>&5
10889 ac_status=$?
10890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10891 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010892
Martin v. Löwis11437992002-04-12 09:54:03 +000010893cat >>confdefs.h <<\_ACEOF
10894#define AIX_GENUINE_CPLUSPLUS 1
10895_ACEOF
10896
10897 echo "$as_me:$LINENO: result: yes" >&5
10898echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010899else
Martin v. Löwis11437992002-04-12 09:54:03 +000010900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010901sed 's/^/| /' conftest.$ac_ext >&5
10902
Martin v. Löwis11437992002-04-12 09:54:03 +000010903echo "$as_me:$LINENO: result: no" >&5
10904echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010905fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010906rm -f conftest.err conftest.$ac_objext \
10907 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010908 *) ;;
10909esac
10910
Guido van Rossum70c7f481998-03-26 18:44:10 +000010911# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010912# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000010913echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10914echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10915if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10916 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010917else
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010919LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010920cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010921/* confdefs.h. */
10922_ACEOF
10923cat confdefs.h >>conftest.$ac_ext
10924cat >>conftest.$ac_ext <<_ACEOF
10925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010926
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010927/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010928#ifdef __cplusplus
10929extern "C"
10930#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010931/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010932 builtin and then its argument prototype would still apply. */
10933char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010934int
10935main ()
10936{
10937t_open ();
10938 ;
10939 return 0;
10940}
10941_ACEOF
10942rm -f conftest.$ac_objext conftest$ac_exeext
10943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010944 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010946 grep -v '^ *+' conftest.er1 >conftest.err
10947 rm -f conftest.er1
10948 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10950 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010951 { ac_try='test -z "$ac_c_werror_flag"
10952 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10954 (eval $ac_try) 2>&5
10955 ac_status=$?
10956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10957 (exit $ac_status); }; } &&
10958 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10960 (eval $ac_try) 2>&5
10961 ac_status=$?
10962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10963 (exit $ac_status); }; }; then
10964 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010965else
Martin v. Löwis11437992002-04-12 09:54:03 +000010966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010967sed 's/^/| /' conftest.$ac_ext >&5
10968
Martin v. Löwis11437992002-04-12 09:54:03 +000010969ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010970fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010971rm -f conftest.err conftest.$ac_objext \
10972 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010973LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010974fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010975echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10976echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10977if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010978 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010979fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010980 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010981echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10982echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10983if test "${ac_cv_lib_socket_socket+set}" = set; then
10984 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010985else
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010987LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010988cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010989/* confdefs.h. */
10990_ACEOF
10991cat confdefs.h >>conftest.$ac_ext
10992cat >>conftest.$ac_ext <<_ACEOF
10993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010994
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010995/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010996#ifdef __cplusplus
10997extern "C"
10998#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010999/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011000 builtin and then its argument prototype would still apply. */
11001char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011002int
11003main ()
11004{
11005socket ();
11006 ;
11007 return 0;
11008}
11009_ACEOF
11010rm -f conftest.$ac_objext conftest$ac_exeext
11011if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011012 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011014 grep -v '^ *+' conftest.er1 >conftest.err
11015 rm -f conftest.er1
11016 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11018 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011019 { ac_try='test -z "$ac_c_werror_flag"
11020 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11022 (eval $ac_try) 2>&5
11023 ac_status=$?
11024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11025 (exit $ac_status); }; } &&
11026 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11028 (eval $ac_try) 2>&5
11029 ac_status=$?
11030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11031 (exit $ac_status); }; }; then
11032 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011033else
Martin v. Löwis11437992002-04-12 09:54:03 +000011034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011035sed 's/^/| /' conftest.$ac_ext >&5
11036
Martin v. Löwis11437992002-04-12 09:54:03 +000011037ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011038fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011039rm -f conftest.err conftest.$ac_objext \
11040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011041LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011043echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
11044echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
11045if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000011046 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011047fi
11048 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011049
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000011050case "$ac_sys_system" in
11051BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000011052echo "$as_me:$LINENO: checking for socket in -lnet" >&5
11053echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
11054if test "${ac_cv_lib_net_socket+set}" = set; then
11055 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011056else
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011058LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011059cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011060/* confdefs.h. */
11061_ACEOF
11062cat confdefs.h >>conftest.$ac_ext
11063cat >>conftest.$ac_ext <<_ACEOF
11064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011065
Guido van Rossumad678af1998-10-02 14:42:15 +000011066/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011067#ifdef __cplusplus
11068extern "C"
11069#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011070/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011071 builtin and then its argument prototype would still apply. */
11072char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011073int
11074main ()
11075{
11076socket ();
11077 ;
11078 return 0;
11079}
11080_ACEOF
11081rm -f conftest.$ac_objext conftest$ac_exeext
11082if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011083 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011085 grep -v '^ *+' conftest.er1 >conftest.err
11086 rm -f conftest.er1
11087 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11089 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011090 { ac_try='test -z "$ac_c_werror_flag"
11091 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11093 (eval $ac_try) 2>&5
11094 ac_status=$?
11095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11096 (exit $ac_status); }; } &&
11097 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11099 (eval $ac_try) 2>&5
11100 ac_status=$?
11101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11102 (exit $ac_status); }; }; then
11103 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011104else
Martin v. Löwis11437992002-04-12 09:54:03 +000011105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011106sed 's/^/| /' conftest.$ac_ext >&5
11107
Martin v. Löwis11437992002-04-12 09:54:03 +000011108ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011109fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011110rm -f conftest.err conftest.$ac_objext \
11111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011112LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011114echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11115echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11116if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011117 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011118fi
11119 # BeOS
11120;;
11121esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011122
Martin v. Löwis11437992002-04-12 09:54:03 +000011123echo "$as_me:$LINENO: checking for --with-libs" >&5
11124echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11125
Guido van Rossuma68acba1996-07-31 17:36:39 +000011126# Check whether --with-libs or --without-libs was given.
11127if test "${with_libs+set}" = set; then
11128 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011129
11130echo "$as_me:$LINENO: result: $withval" >&5
11131echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011132LIBS="$withval $LIBS"
11133
11134else
Martin v. Löwis11437992002-04-12 09:54:03 +000011135 echo "$as_me:$LINENO: result: no" >&5
11136echo "${ECHO_T}no" >&6
11137fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011138
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011139# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011140
11141
Martin v. Löwis11437992002-04-12 09:54:03 +000011142echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11143echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11144
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011145# Check whether --with-signal-module or --without-signal-module was given.
11146if test "${with_signal_module+set}" = set; then
11147 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011148
Martin v. Löwis11437992002-04-12 09:54:03 +000011149fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011150
11151if test -z "$with_signal_module"
11152then with_signal_module="yes"
11153fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011154echo "$as_me:$LINENO: result: $with_signal_module" >&5
11155echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011156
11157if test "${with_signal_module}" = "yes"; then
11158 USE_SIGNAL_MODULE=""
11159 SIGNAL_OBJS=""
11160else
11161 USE_SIGNAL_MODULE="#"
11162 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11163fi
11164
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011165# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011166
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011167USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011168
Martin v. Löwis11437992002-04-12 09:54:03 +000011169echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11170echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11171
Guido van Rossumec2f0731997-01-22 20:54:01 +000011172
11173# Check whether --with-dec-threads or --without-dec-threads was given.
11174if test "${with_dec_threads+set}" = set; then
11175 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011176
11177echo "$as_me:$LINENO: result: $withval" >&5
11178echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011179LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011180if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011181 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011182fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011183else
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 echo "$as_me:$LINENO: result: no" >&5
11185echo "${ECHO_T}no" >&6
11186fi;
11187
11188# Templates for things AC_DEFINEd more than once.
11189# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011190
11191
Martin v. Löwis11437992002-04-12 09:54:03 +000011192
11193
11194
11195
11196
11197echo "$as_me:$LINENO: checking for --with-threads" >&5
11198echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11199
Guido van Rossumec2f0731997-01-22 20:54:01 +000011200# Check whether --with-threads or --without-threads was given.
11201if test "${with_threads+set}" = set; then
11202 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011203
Martin v. Löwis11437992002-04-12 09:54:03 +000011204fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011205
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011206# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011207
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011208# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011209if test "${with_thread+set}" = set; then
11210 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011211 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011212fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011213
11214if test -z "$with_threads"
11215then with_threads="yes"
11216fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011217echo "$as_me:$LINENO: result: $with_threads" >&5
11218echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011219
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011220
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011221if test "$with_threads" = "no"
11222then
11223 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011224elif test "$ac_cv_pthread_is_default" = yes
11225then
Martin v. Löwis11437992002-04-12 09:54:03 +000011226 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011227#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011228_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011229
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011230 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011231 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011232#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011233_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011234
11235 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011237elif test "$ac_cv_kpthread" = "yes"
11238then
11239 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011240 if test "$ac_cv_cxx_thread" = "yes"; then
11241 CXX="$CXX -Kpthread"
11242 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011244#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011245_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011246
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011247 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011248 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011249elif test "$ac_cv_kthread" = "yes"
11250then
11251 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011252 if test "$ac_cv_cxx_thread" = "yes"; then
11253 CXX="$CXX -Kthread"
11254 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011255 cat >>confdefs.h <<\_ACEOF
11256#define WITH_THREAD 1
11257_ACEOF
11258
11259 posix_threads=yes
11260 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011261elif test "$ac_cv_pthread" = "yes"
11262then
11263 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011264 if test "$ac_cv_cxx_thread" = "yes"; then
11265 CXX="$CXX -pthread"
11266 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011267 cat >>confdefs.h <<\_ACEOF
11268#define WITH_THREAD 1
11269_ACEOF
11270
11271 posix_threads=yes
11272 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011273else
11274 if test ! -z "$with_threads" -a -d "$with_threads"
11275 then LDFLAGS="$LDFLAGS -L$with_threads"
11276 fi
11277 if test ! -z "$withval" -a -d "$withval"
11278 then LDFLAGS="$LDFLAGS -L$withval"
11279 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011280
11281 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011282 # define _POSIX_THREADS in unistd.h. Some apparently don't
11283 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011284 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11285echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11286 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011287/* confdefs.h. */
11288_ACEOF
11289cat confdefs.h >>conftest.$ac_ext
11290cat >>conftest.$ac_ext <<_ACEOF
11291/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011292
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011293#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011294#ifdef _POSIX_THREADS
11295yes
11296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011297
11298_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011300 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011301 unistd_defines_pthreads=yes
11302else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011303 unistd_defines_pthreads=no
11304fi
11305rm -f conftest*
11306
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11308echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011309
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011311#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011312_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011313
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 if test "${ac_cv_header_cthreads_h+set}" = set; then
11315 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11316echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11317if test "${ac_cv_header_cthreads_h+set}" = set; then
11318 echo $ECHO_N "(cached) $ECHO_C" >&6
11319fi
11320echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11321echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011322else
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 # Is the header compilable?
11324echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11325echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011327/* confdefs.h. */
11328_ACEOF
11329cat confdefs.h >>conftest.$ac_ext
11330cat >>conftest.$ac_ext <<_ACEOF
11331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011332$ac_includes_default
11333#include <cthreads.h>
11334_ACEOF
11335rm -f conftest.$ac_objext
11336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011337 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011339 grep -v '^ *+' conftest.er1 >conftest.err
11340 rm -f conftest.er1
11341 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11343 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011344 { ac_try='test -z "$ac_c_werror_flag"
11345 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11347 (eval $ac_try) 2>&5
11348 ac_status=$?
11349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11350 (exit $ac_status); }; } &&
11351 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11353 (eval $ac_try) 2>&5
11354 ac_status=$?
11355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11356 (exit $ac_status); }; }; then
11357 ac_header_compiler=yes
11358else
11359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011360sed 's/^/| /' conftest.$ac_ext >&5
11361
Martin v. Löwis11437992002-04-12 09:54:03 +000011362ac_header_compiler=no
11363fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011364rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011365echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11366echo "${ECHO_T}$ac_header_compiler" >&6
11367
11368# Is the header present?
11369echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11370echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11371cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011372/* confdefs.h. */
11373_ACEOF
11374cat confdefs.h >>conftest.$ac_ext
11375cat >>conftest.$ac_ext <<_ACEOF
11376/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011377#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011378_ACEOF
11379if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11380 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11381 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011382 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 rm -f conftest.er1
11384 cat conftest.err >&5
11385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11386 (exit $ac_status); } >/dev/null; then
11387 if test -s conftest.err; then
11388 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011389 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 else
11391 ac_cpp_err=
11392 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011393else
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 ac_cpp_err=yes
11395fi
11396if test -z "$ac_cpp_err"; then
11397 ac_header_preproc=yes
11398else
11399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011400sed 's/^/| /' conftest.$ac_ext >&5
11401
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011403fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011404rm -f conftest.err conftest.$ac_ext
11405echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11406echo "${ECHO_T}$ac_header_preproc" >&6
11407
11408# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011409case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11410 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11412echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011413 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
11414echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
11415 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011416 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011417 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011418 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11419echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011420 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11421echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11422 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
11423echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
11424 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11425echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011426 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
11427echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011428 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
11429echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011430 (
11431 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000011432## --------------------------------- ##
11433## Report this to the python lists. ##
11434## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011435_ASBOX
11436 ) |
11437 sed "s/^/$as_me: WARNING: /" >&2
11438 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011439esac
11440echo "$as_me:$LINENO: checking for cthreads.h" >&5
11441echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11442if test "${ac_cv_header_cthreads_h+set}" = set; then
11443 echo $ECHO_N "(cached) $ECHO_C" >&6
11444else
11445 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011446fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011447echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11448echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11449
11450fi
11451if test $ac_cv_header_cthreads_h = yes; then
11452 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011453#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011454_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011455
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011457#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011458_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011459
Martin v. Löwis11437992002-04-12 09:54:03 +000011460
11461cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011462#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011463_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011464
11465 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011466 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011467else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011468
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11470 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11471echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11472if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11473 echo $ECHO_N "(cached) $ECHO_C" >&6
11474fi
11475echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11476echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011477else
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 # Is the header compilable?
11479echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11480echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11481cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011482/* confdefs.h. */
11483_ACEOF
11484cat confdefs.h >>conftest.$ac_ext
11485cat >>conftest.$ac_ext <<_ACEOF
11486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011487$ac_includes_default
11488#include <mach/cthreads.h>
11489_ACEOF
11490rm -f conftest.$ac_objext
11491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011492 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011494 grep -v '^ *+' conftest.er1 >conftest.err
11495 rm -f conftest.er1
11496 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11498 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011499 { ac_try='test -z "$ac_c_werror_flag"
11500 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11502 (eval $ac_try) 2>&5
11503 ac_status=$?
11504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11505 (exit $ac_status); }; } &&
11506 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11508 (eval $ac_try) 2>&5
11509 ac_status=$?
11510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11511 (exit $ac_status); }; }; then
11512 ac_header_compiler=yes
11513else
11514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011515sed 's/^/| /' conftest.$ac_ext >&5
11516
Martin v. Löwis11437992002-04-12 09:54:03 +000011517ac_header_compiler=no
11518fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011519rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011520echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11521echo "${ECHO_T}$ac_header_compiler" >&6
11522
11523# Is the header present?
11524echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11525echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11526cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011527/* confdefs.h. */
11528_ACEOF
11529cat confdefs.h >>conftest.$ac_ext
11530cat >>conftest.$ac_ext <<_ACEOF
11531/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011532#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011533_ACEOF
11534if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11535 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11536 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011537 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011538 rm -f conftest.er1
11539 cat conftest.err >&5
11540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11541 (exit $ac_status); } >/dev/null; then
11542 if test -s conftest.err; then
11543 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011544 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 else
11546 ac_cpp_err=
11547 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011548else
Martin v. Löwis11437992002-04-12 09:54:03 +000011549 ac_cpp_err=yes
11550fi
11551if test -z "$ac_cpp_err"; then
11552 ac_header_preproc=yes
11553else
11554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011555sed 's/^/| /' conftest.$ac_ext >&5
11556
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011558fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011559rm -f conftest.err conftest.$ac_ext
11560echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11561echo "${ECHO_T}$ac_header_preproc" >&6
11562
11563# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011564case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11565 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011566 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11567echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011568 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
11569echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
11570 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011571 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011572 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011573 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11574echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011575 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11576echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11577 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
11578echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
11579 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11580echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011581 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
11582echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011583 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
11584echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011585 (
11586 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000011587## --------------------------------- ##
11588## Report this to the python lists. ##
11589## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011590_ASBOX
11591 ) |
11592 sed "s/^/$as_me: WARNING: /" >&2
11593 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011594esac
11595echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11596echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11597if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11598 echo $ECHO_N "(cached) $ECHO_C" >&6
11599else
11600 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011601fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011602echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11603echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11604
11605fi
11606if test $ac_cv_header_mach_cthreads_h = yes; then
11607 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011608#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011609_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011610
Martin v. Löwis11437992002-04-12 09:54:03 +000011611 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011612#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011613_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011614
Martin v. Löwis11437992002-04-12 09:54:03 +000011615
11616cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011617#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011618_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011619
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011620 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011621else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011622
Martin v. Löwis11437992002-04-12 09:54:03 +000011623 echo "$as_me:$LINENO: checking for --with-pth" >&5
11624echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11625
11626# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011627if test "${with_pth+set}" = set; then
11628 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011629 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011630echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011631 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011632#define WITH_THREAD 1
11633_ACEOF
11634
11635
11636cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011637#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011638_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011639
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011640 LIBS="-lpth $LIBS"
11641 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011642else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011643 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011644echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011645
11646 # Just looking for pthread_create in libpthread is not enough:
11647 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11648 # So we really have to include pthread.h, and then link.
11649 _libs=$LIBS
11650 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11652echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011654/* confdefs.h. */
11655_ACEOF
11656cat confdefs.h >>conftest.$ac_ext
11657cat >>conftest.$ac_ext <<_ACEOF
11658/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011659#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011660
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011661void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011662int
11663main ()
11664{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011665
11666pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 ;
11668 return 0;
11669}
11670_ACEOF
11671rm -f conftest.$ac_objext conftest$ac_exeext
11672if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011673 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011675 grep -v '^ *+' conftest.er1 >conftest.err
11676 rm -f conftest.er1
11677 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11679 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011680 { ac_try='test -z "$ac_c_werror_flag"
11681 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11683 (eval $ac_try) 2>&5
11684 ac_status=$?
11685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11686 (exit $ac_status); }; } &&
11687 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11689 (eval $ac_try) 2>&5
11690 ac_status=$?
11691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11692 (exit $ac_status); }; }; then
11693
11694 echo "$as_me:$LINENO: result: yes" >&5
11695echo "${ECHO_T}yes" >&6
11696 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011697#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011698_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011699
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011700 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011701 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011702else
Martin v. Löwis11437992002-04-12 09:54:03 +000011703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011704sed 's/^/| /' conftest.$ac_ext >&5
11705
Martin v. Löwis11437992002-04-12 09:54:03 +000011706
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011707 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011708 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11709echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11710if test "${ac_cv_func_pthread_detach+set}" = set; then
11711 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011712else
Martin v. Löwis11437992002-04-12 09:54:03 +000011713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011714/* confdefs.h. */
11715_ACEOF
11716cat confdefs.h >>conftest.$ac_ext
11717cat >>conftest.$ac_ext <<_ACEOF
11718/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011719/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011720 which can conflict with char pthread_detach (); below.
11721 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011722 <limits.h> exists even on freestanding compilers. Under hpux,
11723 including <limits.h> includes <sys/time.h> and causes problems
11724 checking for functions defined therein. */
11725#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011726# include <limits.h>
11727#else
11728# include <assert.h>
11729#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011730/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011731#ifdef __cplusplus
11732extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011733{
Martin v. Löwis11437992002-04-12 09:54:03 +000011734#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011735/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011736 builtin and then its argument prototype would still apply. */
11737char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011738/* The GNU C library defines this for functions which it implements
11739 to always fail with ENOSYS. Some functions are actually named
11740 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011741#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011742choke me
11743#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011744char (*f) () = pthread_detach;
11745#endif
11746#ifdef __cplusplus
11747}
Guido van Rossumad678af1998-10-02 14:42:15 +000011748#endif
11749
Skip Montanaro6dead952003-09-25 14:50:04 +000011750int
11751main ()
11752{
11753return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011754 ;
11755 return 0;
11756}
11757_ACEOF
11758rm -f conftest.$ac_objext conftest$ac_exeext
11759if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011760 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011762 grep -v '^ *+' conftest.er1 >conftest.err
11763 rm -f conftest.er1
11764 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11766 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011767 { ac_try='test -z "$ac_c_werror_flag"
11768 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11770 (eval $ac_try) 2>&5
11771 ac_status=$?
11772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11773 (exit $ac_status); }; } &&
11774 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11776 (eval $ac_try) 2>&5
11777 ac_status=$?
11778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11779 (exit $ac_status); }; }; then
11780 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011781else
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011783sed 's/^/| /' conftest.$ac_ext >&5
11784
Martin v. Löwis11437992002-04-12 09:54:03 +000011785ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011786fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011787rm -f conftest.err conftest.$ac_objext \
11788 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011789fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011790echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11791echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11792if test $ac_cv_func_pthread_detach = yes; then
11793 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011794#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011795_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011796
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011797 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011798 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011799else
Guido van Rossumad678af1998-10-02 14:42:15 +000011800
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011801 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11802 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11803echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11804if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11805 echo $ECHO_N "(cached) $ECHO_C" >&6
11806fi
11807echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11808echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11809else
11810 # Is the header compilable?
11811echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11812echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11813cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011814/* confdefs.h. */
11815_ACEOF
11816cat confdefs.h >>conftest.$ac_ext
11817cat >>conftest.$ac_ext <<_ACEOF
11818/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011819$ac_includes_default
11820#include <atheos/threads.h>
11821_ACEOF
11822rm -f conftest.$ac_objext
11823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011824 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011826 grep -v '^ *+' conftest.er1 >conftest.err
11827 rm -f conftest.er1
11828 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11830 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011831 { ac_try='test -z "$ac_c_werror_flag"
11832 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11834 (eval $ac_try) 2>&5
11835 ac_status=$?
11836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11837 (exit $ac_status); }; } &&
11838 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11840 (eval $ac_try) 2>&5
11841 ac_status=$?
11842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11843 (exit $ac_status); }; }; then
11844 ac_header_compiler=yes
11845else
11846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011847sed 's/^/| /' conftest.$ac_ext >&5
11848
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011849ac_header_compiler=no
11850fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011851rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011852echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11853echo "${ECHO_T}$ac_header_compiler" >&6
11854
11855# Is the header present?
11856echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11857echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11858cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011859/* confdefs.h. */
11860_ACEOF
11861cat confdefs.h >>conftest.$ac_ext
11862cat >>conftest.$ac_ext <<_ACEOF
11863/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011864#include <atheos/threads.h>
11865_ACEOF
11866if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11867 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11868 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011869 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011870 rm -f conftest.er1
11871 cat conftest.err >&5
11872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11873 (exit $ac_status); } >/dev/null; then
11874 if test -s conftest.err; then
11875 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011876 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011877 else
11878 ac_cpp_err=
11879 fi
11880else
11881 ac_cpp_err=yes
11882fi
11883if test -z "$ac_cpp_err"; then
11884 ac_header_preproc=yes
11885else
11886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011887sed 's/^/| /' conftest.$ac_ext >&5
11888
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011889 ac_header_preproc=no
11890fi
11891rm -f conftest.err conftest.$ac_ext
11892echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11893echo "${ECHO_T}$ac_header_preproc" >&6
11894
11895# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011896case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11897 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011898 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11899echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011900 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
11901echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
11902 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011903 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011904 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011905 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11906echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011907 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11908echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11909 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
11910echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
11911 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
11912echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011913 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
11914echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011915 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
11916echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011917 (
11918 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000011919## --------------------------------- ##
11920## Report this to the python lists. ##
11921## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011922_ASBOX
11923 ) |
11924 sed "s/^/$as_me: WARNING: /" >&2
11925 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011926esac
11927echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11928echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11929if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11930 echo $ECHO_N "(cached) $ECHO_C" >&6
11931else
11932 ac_cv_header_atheos_threads_h=$ac_header_preproc
11933fi
11934echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11935echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11936
11937fi
11938if test $ac_cv_header_atheos_threads_h = yes; then
11939 cat >>confdefs.h <<\_ACEOF
11940#define WITH_THREAD 1
11941_ACEOF
11942
11943
11944cat >>confdefs.h <<\_ACEOF
11945#define ATHEOS_THREADS 1
11946_ACEOF
11947
11948 THREADOBJ="Python/thread.o"
11949else
11950
Martin v. Löwis11437992002-04-12 09:54:03 +000011951 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11952 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11953echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11954if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11955 echo $ECHO_N "(cached) $ECHO_C" >&6
11956fi
11957echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11958echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011959else
Martin v. Löwis11437992002-04-12 09:54:03 +000011960 # Is the header compilable?
11961echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
11962echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
11963cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011964/* confdefs.h. */
11965_ACEOF
11966cat confdefs.h >>conftest.$ac_ext
11967cat >>conftest.$ac_ext <<_ACEOF
11968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011969$ac_includes_default
11970#include <kernel/OS.h>
11971_ACEOF
11972rm -f conftest.$ac_objext
11973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011974 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011976 grep -v '^ *+' conftest.er1 >conftest.err
11977 rm -f conftest.er1
11978 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11980 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011981 { ac_try='test -z "$ac_c_werror_flag"
11982 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11984 (eval $ac_try) 2>&5
11985 ac_status=$?
11986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11987 (exit $ac_status); }; } &&
11988 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11990 (eval $ac_try) 2>&5
11991 ac_status=$?
11992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11993 (exit $ac_status); }; }; then
11994 ac_header_compiler=yes
11995else
11996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011997sed 's/^/| /' conftest.$ac_ext >&5
11998
Martin v. Löwis11437992002-04-12 09:54:03 +000011999ac_header_compiler=no
12000fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012001rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012002echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12003echo "${ECHO_T}$ac_header_compiler" >&6
12004
12005# Is the header present?
12006echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
12007echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
12008cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012009/* confdefs.h. */
12010_ACEOF
12011cat confdefs.h >>conftest.$ac_ext
12012cat >>conftest.$ac_ext <<_ACEOF
12013/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012014#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012015_ACEOF
12016if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12017 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12018 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012019 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012020 rm -f conftest.er1
12021 cat conftest.err >&5
12022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12023 (exit $ac_status); } >/dev/null; then
12024 if test -s conftest.err; then
12025 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012026 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012027 else
12028 ac_cpp_err=
12029 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012030else
Martin v. Löwis11437992002-04-12 09:54:03 +000012031 ac_cpp_err=yes
12032fi
12033if test -z "$ac_cpp_err"; then
12034 ac_header_preproc=yes
12035else
12036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012037sed 's/^/| /' conftest.$ac_ext >&5
12038
Martin v. Löwis11437992002-04-12 09:54:03 +000012039 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012041rm -f conftest.err conftest.$ac_ext
12042echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12043echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012044
Martin v. Löwis11437992002-04-12 09:54:03 +000012045# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012046case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12047 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012048 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
12049echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012050 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
12051echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
12052 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012053 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012054 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012055 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
12056echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012057 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
12058echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
12059 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
12060echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
12061 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
12062echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012063 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
12064echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012065 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
12066echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012067 (
12068 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000012069## --------------------------------- ##
12070## Report this to the python lists. ##
12071## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012072_ASBOX
12073 ) |
12074 sed "s/^/$as_me: WARNING: /" >&2
12075 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012076esac
12077echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12078echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12079if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12080 echo $ECHO_N "(cached) $ECHO_C" >&6
12081else
12082 ac_cv_header_kernel_OS_h=$ac_header_preproc
12083fi
12084echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12085echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12086
12087fi
12088if test $ac_cv_header_kernel_OS_h = yes; then
12089 cat >>confdefs.h <<\_ACEOF
12090#define WITH_THREAD 1
12091_ACEOF
12092
12093
12094cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012095#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012096_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012097
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012098 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012099else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012100
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12102echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12103if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12104 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012105else
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012107LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012109/* confdefs.h. */
12110_ACEOF
12111cat confdefs.h >>conftest.$ac_ext
12112cat >>conftest.$ac_ext <<_ACEOF
12113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012114
Greg Steinadf63d62000-07-05 10:38:09 +000012115/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012116#ifdef __cplusplus
12117extern "C"
12118#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012119/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 builtin and then its argument prototype would still apply. */
12121char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012122int
12123main ()
12124{
12125pthread_create ();
12126 ;
12127 return 0;
12128}
12129_ACEOF
12130rm -f conftest.$ac_objext conftest$ac_exeext
12131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012132 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012134 grep -v '^ *+' conftest.er1 >conftest.err
12135 rm -f conftest.er1
12136 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12138 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012139 { ac_try='test -z "$ac_c_werror_flag"
12140 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12142 (eval $ac_try) 2>&5
12143 ac_status=$?
12144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12145 (exit $ac_status); }; } &&
12146 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12148 (eval $ac_try) 2>&5
12149 ac_status=$?
12150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12151 (exit $ac_status); }; }; then
12152 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012153else
Martin v. Löwis11437992002-04-12 09:54:03 +000012154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012155sed 's/^/| /' conftest.$ac_ext >&5
12156
Martin v. Löwis11437992002-04-12 09:54:03 +000012157ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012158fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012159rm -f conftest.err conftest.$ac_objext \
12160 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012161LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012163echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12164echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12165if test $ac_cv_lib_pthreads_pthread_create = yes; then
12166 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012167#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012168_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012169
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012170 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012171 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012172 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012173else
Greg Steinadf63d62000-07-05 10:38:09 +000012174
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12176echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12177if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12178 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012179else
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012181LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012182cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012183/* confdefs.h. */
12184_ACEOF
12185cat confdefs.h >>conftest.$ac_ext
12186cat >>conftest.$ac_ext <<_ACEOF
12187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012188
Guido van Rossum49545951997-12-02 19:28:29 +000012189/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012190#ifdef __cplusplus
12191extern "C"
12192#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012193/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012194 builtin and then its argument prototype would still apply. */
12195char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012196int
12197main ()
12198{
12199pthread_create ();
12200 ;
12201 return 0;
12202}
12203_ACEOF
12204rm -f conftest.$ac_objext conftest$ac_exeext
12205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012206 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012208 grep -v '^ *+' conftest.er1 >conftest.err
12209 rm -f conftest.er1
12210 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12212 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012213 { ac_try='test -z "$ac_c_werror_flag"
12214 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12216 (eval $ac_try) 2>&5
12217 ac_status=$?
12218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12219 (exit $ac_status); }; } &&
12220 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12222 (eval $ac_try) 2>&5
12223 ac_status=$?
12224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12225 (exit $ac_status); }; }; then
12226 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012227else
Martin v. Löwis11437992002-04-12 09:54:03 +000012228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012229sed 's/^/| /' conftest.$ac_ext >&5
12230
Martin v. Löwis11437992002-04-12 09:54:03 +000012231ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012232fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012233rm -f conftest.err conftest.$ac_objext \
12234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012235LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012236fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012237echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12238echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12239if test $ac_cv_lib_c_r_pthread_create = yes; then
12240 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012241#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012242_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012243
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012244 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012245 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012246 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012247else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012248
Martin v. Löwis11437992002-04-12 09:54:03 +000012249 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12250echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12251if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12252 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012253else
Martin v. Löwis11437992002-04-12 09:54:03 +000012254 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012255LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012256cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012257/* confdefs.h. */
12258_ACEOF
12259cat confdefs.h >>conftest.$ac_ext
12260cat >>conftest.$ac_ext <<_ACEOF
12261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012262
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012263/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012264#ifdef __cplusplus
12265extern "C"
12266#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012267/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012268 builtin and then its argument prototype would still apply. */
12269char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012270int
12271main ()
12272{
12273__pthread_create_system ();
12274 ;
12275 return 0;
12276}
12277_ACEOF
12278rm -f conftest.$ac_objext conftest$ac_exeext
12279if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012280 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012282 grep -v '^ *+' conftest.er1 >conftest.err
12283 rm -f conftest.er1
12284 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12286 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012287 { ac_try='test -z "$ac_c_werror_flag"
12288 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12290 (eval $ac_try) 2>&5
12291 ac_status=$?
12292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12293 (exit $ac_status); }; } &&
12294 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12296 (eval $ac_try) 2>&5
12297 ac_status=$?
12298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12299 (exit $ac_status); }; }; then
12300 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012301else
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012303sed 's/^/| /' conftest.$ac_ext >&5
12304
Martin v. Löwis11437992002-04-12 09:54:03 +000012305ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012306fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012307rm -f conftest.err conftest.$ac_objext \
12308 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012309LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012310fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012311echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12312echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12313if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12314 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012315#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012316_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012317
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012318 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012319 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012320 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012321else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012322
Martin v. Löwis11437992002-04-12 09:54:03 +000012323 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12324echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12325if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12326 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012327else
Martin v. Löwis11437992002-04-12 09:54:03 +000012328 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012329LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012330cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012331/* confdefs.h. */
12332_ACEOF
12333cat confdefs.h >>conftest.$ac_ext
12334cat >>conftest.$ac_ext <<_ACEOF
12335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012336
Guido van Rossumb93a8621998-05-07 13:27:32 +000012337/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012338#ifdef __cplusplus
12339extern "C"
12340#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012341/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012342 builtin and then its argument prototype would still apply. */
12343char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012344int
12345main ()
12346{
12347pthread_create ();
12348 ;
12349 return 0;
12350}
12351_ACEOF
12352rm -f conftest.$ac_objext conftest$ac_exeext
12353if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012354 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012356 grep -v '^ *+' conftest.er1 >conftest.err
12357 rm -f conftest.er1
12358 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12360 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012361 { ac_try='test -z "$ac_c_werror_flag"
12362 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12364 (eval $ac_try) 2>&5
12365 ac_status=$?
12366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12367 (exit $ac_status); }; } &&
12368 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12370 (eval $ac_try) 2>&5
12371 ac_status=$?
12372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12373 (exit $ac_status); }; }; then
12374 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012375else
Martin v. Löwis11437992002-04-12 09:54:03 +000012376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012377sed 's/^/| /' conftest.$ac_ext >&5
12378
Martin v. Löwis11437992002-04-12 09:54:03 +000012379ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012380fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012381rm -f conftest.err conftest.$ac_objext \
12382 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012383LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012385echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12386echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12387if test $ac_cv_lib_cma_pthread_create = yes; then
12388 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012389#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012390_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012391
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012392 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012393 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012394 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012395else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012396
Martin v. Löwis130fb172001-07-19 11:00:41 +000012397 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012398fi
12399
Guido van Rossum627b2d71993-12-24 10:39:16 +000012400
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012401fi
12402
Guido van Rossum0be3e491997-05-22 20:33:33 +000012403fi
12404
Guido van Rossum49545951997-12-02 19:28:29 +000012405fi
12406
Guido van Rossumb93a8621998-05-07 13:27:32 +000012407fi
12408
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012409
Michael W. Hudson54241132001-12-07 15:38:26 +000012410fi
12411
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012412
12413fi
12414
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012415fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012416rm -f conftest.err conftest.$ac_objext \
12417 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012418fi;
12419fi
12420
12421
12422fi
12423
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012424
Michael W. Hudson54241132001-12-07 15:38:26 +000012425
Martin v. Löwis11437992002-04-12 09:54:03 +000012426 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12427echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12428if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12429 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012430else
Martin v. Löwis11437992002-04-12 09:54:03 +000012431 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012432LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012433cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012434/* confdefs.h. */
12435_ACEOF
12436cat confdefs.h >>conftest.$ac_ext
12437cat >>conftest.$ac_ext <<_ACEOF
12438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012439
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012440/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012441#ifdef __cplusplus
12442extern "C"
12443#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012444/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012445 builtin and then its argument prototype would still apply. */
12446char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012447int
12448main ()
12449{
12450usconfig ();
12451 ;
12452 return 0;
12453}
12454_ACEOF
12455rm -f conftest.$ac_objext conftest$ac_exeext
12456if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012457 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012459 grep -v '^ *+' conftest.er1 >conftest.err
12460 rm -f conftest.er1
12461 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12463 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012464 { ac_try='test -z "$ac_c_werror_flag"
12465 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12467 (eval $ac_try) 2>&5
12468 ac_status=$?
12469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12470 (exit $ac_status); }; } &&
12471 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12473 (eval $ac_try) 2>&5
12474 ac_status=$?
12475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12476 (exit $ac_status); }; }; then
12477 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012478else
Martin v. Löwis11437992002-04-12 09:54:03 +000012479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012480sed 's/^/| /' conftest.$ac_ext >&5
12481
Martin v. Löwis11437992002-04-12 09:54:03 +000012482ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012483fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012484rm -f conftest.err conftest.$ac_objext \
12485 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012486LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012488echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12489echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12490if test $ac_cv_lib_mpc_usconfig = yes; then
12491 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012492#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012493_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012494
Martin v. Löwis130fb172001-07-19 11:00:41 +000012495 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012496 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012497 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012498fi
12499
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012500
Neal Norwitza978ab02002-11-02 16:58:05 +000012501 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12503echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12504if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12505 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012506else
Martin v. Löwis11437992002-04-12 09:54:03 +000012507 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012508LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012510/* confdefs.h. */
12511_ACEOF
12512cat confdefs.h >>conftest.$ac_ext
12513cat >>conftest.$ac_ext <<_ACEOF
12514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012515
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012516/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012517#ifdef __cplusplus
12518extern "C"
12519#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012520/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012521 builtin and then its argument prototype would still apply. */
12522char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012523int
12524main ()
12525{
12526thr_create ();
12527 ;
12528 return 0;
12529}
12530_ACEOF
12531rm -f conftest.$ac_objext conftest$ac_exeext
12532if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012533 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012535 grep -v '^ *+' conftest.er1 >conftest.err
12536 rm -f conftest.er1
12537 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12539 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012540 { ac_try='test -z "$ac_c_werror_flag"
12541 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12543 (eval $ac_try) 2>&5
12544 ac_status=$?
12545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12546 (exit $ac_status); }; } &&
12547 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12549 (eval $ac_try) 2>&5
12550 ac_status=$?
12551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552 (exit $ac_status); }; }; then
12553 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012554else
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012556sed 's/^/| /' conftest.$ac_ext >&5
12557
Martin v. Löwis11437992002-04-12 09:54:03 +000012558ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012559fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012560rm -f conftest.err conftest.$ac_objext \
12561 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012562LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012564echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12565echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12566if test $ac_cv_lib_thread_thr_create = yes; then
12567 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012568#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012569_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012570
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012571 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012572 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012573 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012574fi
12575
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012576 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012577
Martin v. Löwis130fb172001-07-19 11:00:41 +000012578 if test "$USE_THREAD_MODULE" != "#"
12579 then
12580 # If the above checks didn't disable threads, (at least) OSF1
12581 # needs this '-threads' argument during linking.
12582 case $ac_sys_system in
12583 OSF1) LDLAST=-threads;;
12584 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012585 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012586fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012587
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012588if test "$posix_threads" = "yes"; then
12589 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012590
12591cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012592#define _POSIX_THREADS 1
12593_ACEOF
12594
12595 fi
12596
12597 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12598 case $ac_sys_system/$ac_sys_release in
12599 SunOS/5.6)
12600cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012601#define HAVE_PTHREAD_DESTRUCTOR 1
12602_ACEOF
12603
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012604 ;;
12605 SunOS/5.8)
12606cat >>confdefs.h <<\_ACEOF
12607#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12608_ACEOF
12609
12610 ;;
12611 esac
12612
12613 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12614echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12615 if test "${ac_cv_pthread_system_supported+set}" = set; then
12616 echo $ECHO_N "(cached) $ECHO_C" >&6
12617else
12618 if test "$cross_compiling" = yes; then
12619 ac_cv_pthread_system_supported=no
12620else
12621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012622/* confdefs.h. */
12623_ACEOF
12624cat confdefs.h >>conftest.$ac_ext
12625cat >>conftest.$ac_ext <<_ACEOF
12626/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012627#include <pthread.h>
12628 void *foo(void *parm) {
12629 return NULL;
12630 }
12631 main() {
12632 pthread_attr_t attr;
12633 pthread_t id;
12634 if (pthread_attr_init(&attr)) exit(-1);
12635 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12636 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12637 exit(0);
12638 }
12639_ACEOF
12640rm -f conftest$ac_exeext
12641if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12642 (eval $ac_link) 2>&5
12643 ac_status=$?
12644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12645 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12647 (eval $ac_try) 2>&5
12648 ac_status=$?
12649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12650 (exit $ac_status); }; }; then
12651 ac_cv_pthread_system_supported=yes
12652else
12653 echo "$as_me: program exited with status $ac_status" >&5
12654echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012655sed 's/^/| /' conftest.$ac_ext >&5
12656
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012657( exit $ac_status )
12658ac_cv_pthread_system_supported=no
12659fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012660rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012661fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012662
Guido van Rossum627b2d71993-12-24 10:39:16 +000012663fi
12664
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012665 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12666echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12667 if test "$ac_cv_pthread_system_supported" = "yes"; then
12668
12669cat >>confdefs.h <<\_ACEOF
12670#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12671_ACEOF
12672
12673 fi
12674
12675for ac_func in pthread_sigmask
12676do
12677as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12678echo "$as_me:$LINENO: checking for $ac_func" >&5
12679echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12680if eval "test \"\${$as_ac_var+set}\" = set"; then
12681 echo $ECHO_N "(cached) $ECHO_C" >&6
12682else
12683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012684/* confdefs.h. */
12685_ACEOF
12686cat confdefs.h >>conftest.$ac_ext
12687cat >>conftest.$ac_ext <<_ACEOF
12688/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012689/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012690 which can conflict with char $ac_func (); below.
12691 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012692 <limits.h> exists even on freestanding compilers. Under hpux,
12693 including <limits.h> includes <sys/time.h> and causes problems
12694 checking for functions defined therein. */
12695#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012696# include <limits.h>
12697#else
12698# include <assert.h>
12699#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012700/* Override any gcc2 internal prototype to avoid an error. */
12701#ifdef __cplusplus
12702extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012703{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012704#endif
12705/* We use char because int might match the return type of a gcc2
12706 builtin and then its argument prototype would still apply. */
12707char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012708/* The GNU C library defines this for functions which it implements
12709 to always fail with ENOSYS. Some functions are actually named
12710 something starting with __ and the normal name is an alias. */
12711#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12712choke me
12713#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012714char (*f) () = $ac_func;
12715#endif
12716#ifdef __cplusplus
12717}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012718#endif
12719
Skip Montanaro6dead952003-09-25 14:50:04 +000012720int
12721main ()
12722{
12723return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012724 ;
12725 return 0;
12726}
12727_ACEOF
12728rm -f conftest.$ac_objext conftest$ac_exeext
12729if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012730 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012732 grep -v '^ *+' conftest.er1 >conftest.err
12733 rm -f conftest.er1
12734 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12736 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012737 { ac_try='test -z "$ac_c_werror_flag"
12738 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12740 (eval $ac_try) 2>&5
12741 ac_status=$?
12742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12743 (exit $ac_status); }; } &&
12744 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12746 (eval $ac_try) 2>&5
12747 ac_status=$?
12748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12749 (exit $ac_status); }; }; then
12750 eval "$as_ac_var=yes"
12751else
12752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012753sed 's/^/| /' conftest.$ac_ext >&5
12754
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012755eval "$as_ac_var=no"
12756fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012757rm -f conftest.err conftest.$ac_objext \
12758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012759fi
12760echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12761echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12762if test `eval echo '${'$as_ac_var'}'` = yes; then
12763 cat >>confdefs.h <<_ACEOF
12764#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12765_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012766 case $ac_sys_system in
12767 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012768
Jason Tishlerfac083d2003-07-22 15:20:49 +000012769cat >>confdefs.h <<\_ACEOF
12770#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12771_ACEOF
12772
12773 ;;
12774 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012775fi
12776done
12777
12778fi
12779
12780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012781# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012782
12783
12784echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12785echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012786# Check whether --enable-ipv6 or --disable-ipv6 was given.
12787if test "${enable_ipv6+set}" = set; then
12788 enableval="$enable_ipv6"
12789 case "$enableval" in
12790 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 echo "$as_me:$LINENO: result: no" >&5
12792echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012793 ipv6=no
12794 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 *) echo "$as_me:$LINENO: result: yes" >&5
12796echo "${ECHO_T}yes" >&6
12797 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012798#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012799_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012800
12801 ipv6=yes
12802 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012804else
Martin v. Löwis11437992002-04-12 09:54:03 +000012805
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012806 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 echo "$as_me:$LINENO: result: no" >&5
12808echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012809 ipv6=no
12810
12811else
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012813/* confdefs.h. */
12814_ACEOF
12815cat confdefs.h >>conftest.$ac_ext
12816cat >>conftest.$ac_ext <<_ACEOF
12817/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012818 /* AF_INET6 available check */
12819#include <sys/types.h>
12820#include <sys/socket.h>
12821main()
12822{
12823 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12824 exit(1);
12825 else
12826 exit(0);
12827}
12828
Martin v. Löwis11437992002-04-12 09:54:03 +000012829_ACEOF
12830rm -f conftest$ac_exeext
12831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12832 (eval $ac_link) 2>&5
12833 ac_status=$?
12834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12837 (eval $ac_try) 2>&5
12838 ac_status=$?
12839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12840 (exit $ac_status); }; }; then
12841 echo "$as_me:$LINENO: result: yes" >&5
12842echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012843 ipv6=yes
12844else
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 echo "$as_me: program exited with status $ac_status" >&5
12846echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012847sed 's/^/| /' conftest.$ac_ext >&5
12848
Martin v. Löwis11437992002-04-12 09:54:03 +000012849( exit $ac_status )
12850echo "$as_me:$LINENO: result: no" >&5
12851echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012852 ipv6=no
12853fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012854rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012855fi
12856
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012857if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12859echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012861/* confdefs.h. */
12862_ACEOF
12863cat confdefs.h >>conftest.$ac_ext
12864cat >>conftest.$ac_ext <<_ACEOF
12865/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012866#include <sys/types.h>
12867#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012868int
12869main ()
12870{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012871struct sockaddr_in6 x;
12872x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 ;
12874 return 0;
12875}
12876_ACEOF
12877rm -f conftest.$ac_objext
12878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012879 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012881 grep -v '^ *+' conftest.er1 >conftest.err
12882 rm -f conftest.er1
12883 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12885 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012886 { ac_try='test -z "$ac_c_werror_flag"
12887 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12889 (eval $ac_try) 2>&5
12890 ac_status=$?
12891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12892 (exit $ac_status); }; } &&
12893 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12895 (eval $ac_try) 2>&5
12896 ac_status=$?
12897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12898 (exit $ac_status); }; }; then
12899 echo "$as_me:$LINENO: result: yes" >&5
12900echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012901 ipv6=yes
12902else
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012904sed 's/^/| /' conftest.$ac_ext >&5
12905
Martin v. Löwis11437992002-04-12 09:54:03 +000012906echo "$as_me:$LINENO: result: no" >&5
12907echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012908 ipv6=no
12909fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012910rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012911fi
12912
12913if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012915#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012916_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012917
12918fi
12919
Martin v. Löwis11437992002-04-12 09:54:03 +000012920fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012921
12922ipv6type=unknown
12923ipv6lib=none
12924ipv6trylibc=no
12925
12926if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
12928echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000012929 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12930 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012931 case $i in
12932 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012934/* confdefs.h. */
12935_ACEOF
12936cat confdefs.h >>conftest.$ac_ext
12937cat >>conftest.$ac_ext <<_ACEOF
12938/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012939
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012940#include <netinet/in.h>
12941#ifdef IPV6_INRIA_VERSION
12942yes
12943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012944_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012946 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012947 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012948fi
12949rm -f conftest*
12950
12951 ;;
12952 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012954/* confdefs.h. */
12955_ACEOF
12956cat confdefs.h >>conftest.$ac_ext
12957cat >>conftest.$ac_ext <<_ACEOF
12958/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012959
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012960#include <netinet/in.h>
12961#ifdef __KAME__
12962yes
12963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012964_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012966 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012967 ipv6type=$i;
12968 ipv6lib=inet6
12969 ipv6libdir=/usr/local/v6/lib
12970 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012971fi
12972rm -f conftest*
12973
12974 ;;
12975 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000012976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012977/* confdefs.h. */
12978_ACEOF
12979cat confdefs.h >>conftest.$ac_ext
12980cat >>conftest.$ac_ext <<_ACEOF
12981/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012982
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012983#include <features.h>
12984#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12985yes
12986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012987_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012989 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012990 ipv6type=$i;
12991 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012992fi
12993rm -f conftest*
12994
12995 ;;
12996 linux-inet6)
12997 if test -d /usr/inet6; then
12998 ipv6type=$i
12999 ipv6lib=inet6
13000 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000013001 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013002 fi
13003 ;;
13004 solaris)
13005 if test -f /etc/netconfig; then
13006 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
13007 ipv6type=$i
13008 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013009 fi
13010 fi
13011 ;;
13012 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000013013 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013014/* confdefs.h. */
13015_ACEOF
13016cat confdefs.h >>conftest.$ac_ext
13017cat >>conftest.$ac_ext <<_ACEOF
13018/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013019
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013020#include <sys/param.h>
13021#ifdef _TOSHIBA_INET6
13022yes
13023#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013024_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013025if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013026 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013027 ipv6type=$i;
13028 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013029 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013030fi
13031rm -f conftest*
13032
13033 ;;
13034 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000013035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013036/* confdefs.h. */
13037_ACEOF
13038cat confdefs.h >>conftest.$ac_ext
13039cat >>conftest.$ac_ext <<_ACEOF
13040/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013041
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013042#include </usr/local/v6/include/sys/v6config.h>
13043#ifdef __V6D__
13044yes
13045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013046_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013048 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013049 ipv6type=$i;
13050 ipv6lib=v6;
13051 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000013052 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013053fi
13054rm -f conftest*
13055
13056 ;;
13057 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013059/* confdefs.h. */
13060_ACEOF
13061cat confdefs.h >>conftest.$ac_ext
13062cat >>conftest.$ac_ext <<_ACEOF
13063/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013064
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013065#include <sys/param.h>
13066#ifdef _ZETA_MINAMI_INET6
13067yes
13068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013069_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013070if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013071 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013072 ipv6type=$i;
13073 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013074 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013075fi
13076rm -f conftest*
13077
13078 ;;
13079 esac
13080 if test "$ipv6type" != "unknown"; then
13081 break
13082 fi
13083 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013084 echo "$as_me:$LINENO: result: $ipv6type" >&5
13085echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013086fi
13087
13088if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13089 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13090 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13091 echo "using lib$ipv6lib"
13092 else
13093 if test $ipv6trylibc = "yes"; then
13094 echo "using libc"
13095 else
13096 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13097 echo "You need to fetch lib$ipv6lib.a from appropriate"
13098 echo 'ipv6 kit and compile beforehand.'
13099 exit 1
13100 fi
13101 fi
13102fi
13103
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013104# Check for --with-doc-strings
13105echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13106echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13107
13108# Check whether --with-doc-strings or --without-doc-strings was given.
13109if test "${with_doc_strings+set}" = set; then
13110 withval="$with_doc_strings"
13111
13112fi;
13113
13114if test -z "$with_doc_strings"
13115then with_doc_strings="yes"
13116fi
13117if test "$with_doc_strings" != "no"
13118then
13119
13120cat >>confdefs.h <<\_ACEOF
13121#define WITH_DOC_STRINGS 1
13122_ACEOF
13123
13124fi
13125echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13126echo "${ECHO_T}$with_doc_strings" >&6
13127
Neil Schemenauera35c6882001-02-27 04:45:05 +000013128# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013129echo "$as_me:$LINENO: checking for --with-tsc" >&5
13130echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13131
13132# Check whether --with-tsc or --without-tsc was given.
13133if test "${with_tsc+set}" = set; then
13134 withval="$with_tsc"
13135
13136if test "$withval" != no
13137then
13138
13139cat >>confdefs.h <<\_ACEOF
13140#define WITH_TSC 1
13141_ACEOF
13142
13143 echo "$as_me:$LINENO: result: yes" >&5
13144echo "${ECHO_T}yes" >&6
13145else echo "$as_me:$LINENO: result: no" >&5
13146echo "${ECHO_T}no" >&6
13147fi
13148else
13149 echo "$as_me:$LINENO: result: no" >&5
13150echo "${ECHO_T}no" >&6
13151fi;
13152
13153# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013154echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13155echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13156
Neil Schemenauera35c6882001-02-27 04:45:05 +000013157# Check whether --with-pymalloc or --without-pymalloc was given.
13158if test "${with_pymalloc+set}" = set; then
13159 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013160
Martin v. Löwis11437992002-04-12 09:54:03 +000013161fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013162
Neil Schemenauer16c22972002-03-22 15:34:49 +000013163if test -z "$with_pymalloc"
13164then with_pymalloc="yes"
13165fi
13166if test "$with_pymalloc" != "no"
13167then
Martin v. Löwis11437992002-04-12 09:54:03 +000013168
13169cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013170#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013171_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013172
13173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013174echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13175echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013176
Barry Warsawef82cd72000-06-30 16:21:01 +000013177# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013178echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13179echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13180
Barry Warsawef82cd72000-06-30 16:21:01 +000013181# Check whether --with-wctype-functions or --without-wctype-functions was given.
13182if test "${with_wctype_functions+set}" = set; then
13183 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013184
Barry Warsawef82cd72000-06-30 16:21:01 +000013185if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013186then
13187
13188cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013189#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013190_ACEOF
13191
13192 echo "$as_me:$LINENO: result: yes" >&5
13193echo "${ECHO_T}yes" >&6
13194else echo "$as_me:$LINENO: result: no" >&5
13195echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013196fi
13197else
Martin v. Löwis11437992002-04-12 09:54:03 +000013198 echo "$as_me:$LINENO: result: no" >&5
13199echo "${ECHO_T}no" >&6
13200fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013201
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013202# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013203
Guido van Rossum98935bf2001-09-05 19:13:16 +000013204DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013205
Guido van Rossume97ee181999-12-20 21:27:22 +000013206# the dlopen() function means we might want to use dynload_shlib.o. some
13207# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013208
Thomas Wouters3a584202000-08-05 23:28:51 +000013209for ac_func in dlopen
13210do
Martin v. Löwis11437992002-04-12 09:54:03 +000013211as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13212echo "$as_me:$LINENO: checking for $ac_func" >&5
13213echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13214if eval "test \"\${$as_ac_var+set}\" = set"; then
13215 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013216else
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013218/* confdefs.h. */
13219_ACEOF
13220cat confdefs.h >>conftest.$ac_ext
13221cat >>conftest.$ac_ext <<_ACEOF
13222/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000013223/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013224 which can conflict with char $ac_func (); below.
13225 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013226 <limits.h> exists even on freestanding compilers. Under hpux,
13227 including <limits.h> includes <sys/time.h> and causes problems
13228 checking for functions defined therein. */
13229#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013230# include <limits.h>
13231#else
13232# include <assert.h>
13233#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013234/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013235#ifdef __cplusplus
13236extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013237{
Martin v. Löwis11437992002-04-12 09:54:03 +000013238#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013239/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 builtin and then its argument prototype would still apply. */
13241char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013242/* The GNU C library defines this for functions which it implements
13243 to always fail with ENOSYS. Some functions are actually named
13244 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013245#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013246choke me
13247#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013248char (*f) () = $ac_func;
13249#endif
13250#ifdef __cplusplus
13251}
Guido van Rossume97ee181999-12-20 21:27:22 +000013252#endif
13253
Skip Montanaro6dead952003-09-25 14:50:04 +000013254int
13255main ()
13256{
13257return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013258 ;
13259 return 0;
13260}
13261_ACEOF
13262rm -f conftest.$ac_objext conftest$ac_exeext
13263if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013264 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013266 grep -v '^ *+' conftest.er1 >conftest.err
13267 rm -f conftest.er1
13268 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13270 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013271 { ac_try='test -z "$ac_c_werror_flag"
13272 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13274 (eval $ac_try) 2>&5
13275 ac_status=$?
13276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13277 (exit $ac_status); }; } &&
13278 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13280 (eval $ac_try) 2>&5
13281 ac_status=$?
13282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13283 (exit $ac_status); }; }; then
13284 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013285else
Martin v. Löwis11437992002-04-12 09:54:03 +000013286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013287sed 's/^/| /' conftest.$ac_ext >&5
13288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013290fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013291rm -f conftest.err conftest.$ac_objext \
13292 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013294echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13295echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13296if test `eval echo '${'$as_ac_var'}'` = yes; then
13297 cat >>confdefs.h <<_ACEOF
13298#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13299_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013300
Guido van Rossume97ee181999-12-20 21:27:22 +000013301fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013302done
Guido van Rossume97ee181999-12-20 21:27:22 +000013303
Michael W. Hudson54241132001-12-07 15:38:26 +000013304
Guido van Rossume97ee181999-12-20 21:27:22 +000013305# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13306# loading of modules.
13307
Martin v. Löwis11437992002-04-12 09:54:03 +000013308echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13309echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013310if test -z "$DYNLOADFILE"
13311then
13312 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013313 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13314 if test "$ac_cv_func_dlopen" = yes
13315 then DYNLOADFILE="dynload_shlib.o"
13316 else DYNLOADFILE="dynload_aix.o"
13317 fi
13318 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000013319 BeOS*) DYNLOADFILE="dynload_beos.o";;
13320 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000013321 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013322 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013323 *)
13324 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13325 # out any dynamic loading
13326 if test "$ac_cv_func_dlopen" = yes
13327 then DYNLOADFILE="dynload_shlib.o"
13328 else DYNLOADFILE="dynload_stub.o"
13329 fi
13330 ;;
13331 esac
13332fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013333echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13334echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013335if test "$DYNLOADFILE" != "dynload_stub.o"
13336then
Martin v. Löwis11437992002-04-12 09:54:03 +000013337
13338cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013339#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013340_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013341
13342fi
13343
Neil Schemenauer4e425612001-06-19 15:44:15 +000013344# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13345
Michael W. Hudson54241132001-12-07 15:38:26 +000013346
Martin v. Löwis11437992002-04-12 09:54:03 +000013347echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13348echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013349if test -z "$MACHDEP_OBJS"
13350then
Jack Jansene578a632001-08-15 01:27:14 +000013351 MACHDEP_OBJS=$extra_machdep_objs
13352else
13353 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013354fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013355echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13356echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013357
Guido van Rossum627b2d71993-12-24 10:39:16 +000013358# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
Martin v. Löwisd6320502004-08-12 13:45:08 +000013430
13431for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
13432 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013433 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000013434 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013435 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013436 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013437 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013438 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013439 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000013440 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013441 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013442 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013443do
Martin v. Löwis11437992002-04-12 09:54:03 +000013444as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13445echo "$as_me:$LINENO: checking for $ac_func" >&5
13446echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13447if eval "test \"\${$as_ac_var+set}\" = set"; then
13448 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013449else
Martin v. Löwis11437992002-04-12 09:54:03 +000013450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013451/* confdefs.h. */
13452_ACEOF
13453cat confdefs.h >>conftest.$ac_ext
13454cat >>conftest.$ac_ext <<_ACEOF
13455/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013456/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013457 which can conflict with char $ac_func (); below.
13458 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013459 <limits.h> exists even on freestanding compilers. Under hpux,
13460 including <limits.h> includes <sys/time.h> and causes problems
13461 checking for functions defined therein. */
13462#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013463# include <limits.h>
13464#else
13465# include <assert.h>
13466#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013467/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013468#ifdef __cplusplus
13469extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013470{
Martin v. Löwis11437992002-04-12 09:54:03 +000013471#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013472/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013473 builtin and then its argument prototype would still apply. */
13474char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013475/* The GNU C library defines this for functions which it implements
13476 to always fail with ENOSYS. Some functions are actually named
13477 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013478#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013479choke me
13480#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013481char (*f) () = $ac_func;
13482#endif
13483#ifdef __cplusplus
13484}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013485#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013486
Skip Montanaro6dead952003-09-25 14:50:04 +000013487int
13488main ()
13489{
13490return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013491 ;
13492 return 0;
13493}
13494_ACEOF
13495rm -f conftest.$ac_objext conftest$ac_exeext
13496if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013497 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013499 grep -v '^ *+' conftest.er1 >conftest.err
13500 rm -f conftest.er1
13501 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13503 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013504 { ac_try='test -z "$ac_c_werror_flag"
13505 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13507 (eval $ac_try) 2>&5
13508 ac_status=$?
13509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13510 (exit $ac_status); }; } &&
13511 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13513 (eval $ac_try) 2>&5
13514 ac_status=$?
13515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13516 (exit $ac_status); }; }; then
13517 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013518else
Martin v. Löwis11437992002-04-12 09:54:03 +000013519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013520sed 's/^/| /' conftest.$ac_ext >&5
13521
Martin v. Löwis11437992002-04-12 09:54:03 +000013522eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013523fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013524rm -f conftest.err conftest.$ac_objext \
13525 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013526fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013527echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13528echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13529if test `eval echo '${'$as_ac_var'}'` = yes; then
13530 cat >>confdefs.h <<_ACEOF
13531#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13532_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013533
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013534fi
13535done
13536
Michael W. Hudson54241132001-12-07 15:38:26 +000013537
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013538# For some functions, having a definition is not sufficient, since
13539# we want to take their address.
13540echo "$as_me:$LINENO: checking for chroot" >&5
13541echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013543/* confdefs.h. */
13544_ACEOF
13545cat confdefs.h >>conftest.$ac_ext
13546cat >>conftest.$ac_ext <<_ACEOF
13547/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013548#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013549int
13550main ()
13551{
13552void *x=chroot
13553 ;
13554 return 0;
13555}
13556_ACEOF
13557rm -f conftest.$ac_objext
13558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013559 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013561 grep -v '^ *+' conftest.er1 >conftest.err
13562 rm -f conftest.er1
13563 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13565 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013566 { ac_try='test -z "$ac_c_werror_flag"
13567 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13569 (eval $ac_try) 2>&5
13570 ac_status=$?
13571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13572 (exit $ac_status); }; } &&
13573 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13575 (eval $ac_try) 2>&5
13576 ac_status=$?
13577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13578 (exit $ac_status); }; }; then
13579
13580cat >>confdefs.h <<\_ACEOF
13581#define HAVE_CHROOT 1
13582_ACEOF
13583
13584 echo "$as_me:$LINENO: result: yes" >&5
13585echo "${ECHO_T}yes" >&6
13586else
13587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013588sed 's/^/| /' conftest.$ac_ext >&5
13589
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013590echo "$as_me:$LINENO: result: no" >&5
13591echo "${ECHO_T}no" >&6
13592
13593fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013594rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013595echo "$as_me:$LINENO: checking for link" >&5
13596echo $ECHO_N "checking for link... $ECHO_C" >&6
13597cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013598/* confdefs.h. */
13599_ACEOF
13600cat confdefs.h >>conftest.$ac_ext
13601cat >>conftest.$ac_ext <<_ACEOF
13602/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013603#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013604int
13605main ()
13606{
13607void *x=link
13608 ;
13609 return 0;
13610}
13611_ACEOF
13612rm -f conftest.$ac_objext
13613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013614 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013616 grep -v '^ *+' conftest.er1 >conftest.err
13617 rm -f conftest.er1
13618 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13620 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013621 { ac_try='test -z "$ac_c_werror_flag"
13622 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13624 (eval $ac_try) 2>&5
13625 ac_status=$?
13626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13627 (exit $ac_status); }; } &&
13628 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13630 (eval $ac_try) 2>&5
13631 ac_status=$?
13632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13633 (exit $ac_status); }; }; then
13634
13635cat >>confdefs.h <<\_ACEOF
13636#define HAVE_LINK 1
13637_ACEOF
13638
13639 echo "$as_me:$LINENO: result: yes" >&5
13640echo "${ECHO_T}yes" >&6
13641else
13642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013643sed 's/^/| /' conftest.$ac_ext >&5
13644
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013645echo "$as_me:$LINENO: result: no" >&5
13646echo "${ECHO_T}no" >&6
13647
13648fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013649rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013650echo "$as_me:$LINENO: checking for symlink" >&5
13651echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013653/* confdefs.h. */
13654_ACEOF
13655cat confdefs.h >>conftest.$ac_ext
13656cat >>conftest.$ac_ext <<_ACEOF
13657/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013658#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013659int
13660main ()
13661{
13662void *x=symlink
13663 ;
13664 return 0;
13665}
13666_ACEOF
13667rm -f conftest.$ac_objext
13668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013669 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013671 grep -v '^ *+' conftest.er1 >conftest.err
13672 rm -f conftest.er1
13673 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13675 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013676 { ac_try='test -z "$ac_c_werror_flag"
13677 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13679 (eval $ac_try) 2>&5
13680 ac_status=$?
13681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13682 (exit $ac_status); }; } &&
13683 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13685 (eval $ac_try) 2>&5
13686 ac_status=$?
13687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13688 (exit $ac_status); }; }; then
13689
13690cat >>confdefs.h <<\_ACEOF
13691#define HAVE_SYMLINK 1
13692_ACEOF
13693
13694 echo "$as_me:$LINENO: result: yes" >&5
13695echo "${ECHO_T}yes" >&6
13696else
13697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013698sed 's/^/| /' conftest.$ac_ext >&5
13699
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013700echo "$as_me:$LINENO: result: no" >&5
13701echo "${ECHO_T}no" >&6
13702
13703fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013704rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013705echo "$as_me:$LINENO: checking for fchdir" >&5
13706echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13707cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013708/* confdefs.h. */
13709_ACEOF
13710cat confdefs.h >>conftest.$ac_ext
13711cat >>conftest.$ac_ext <<_ACEOF
13712/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013713#include <unistd.h>
13714int
13715main ()
13716{
13717void *x=fchdir
13718 ;
13719 return 0;
13720}
13721_ACEOF
13722rm -f conftest.$ac_objext
13723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013724 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013726 grep -v '^ *+' conftest.er1 >conftest.err
13727 rm -f conftest.er1
13728 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13730 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013731 { ac_try='test -z "$ac_c_werror_flag"
13732 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13734 (eval $ac_try) 2>&5
13735 ac_status=$?
13736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13737 (exit $ac_status); }; } &&
13738 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13740 (eval $ac_try) 2>&5
13741 ac_status=$?
13742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13743 (exit $ac_status); }; }; then
13744
13745cat >>confdefs.h <<\_ACEOF
13746#define HAVE_FCHDIR 1
13747_ACEOF
13748
13749 echo "$as_me:$LINENO: result: yes" >&5
13750echo "${ECHO_T}yes" >&6
13751else
13752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013753sed 's/^/| /' conftest.$ac_ext >&5
13754
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013755echo "$as_me:$LINENO: result: no" >&5
13756echo "${ECHO_T}no" >&6
13757
13758fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013760echo "$as_me:$LINENO: checking for fsync" >&5
13761echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13762cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013763/* confdefs.h. */
13764_ACEOF
13765cat confdefs.h >>conftest.$ac_ext
13766cat >>conftest.$ac_ext <<_ACEOF
13767/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013768#include <unistd.h>
13769int
13770main ()
13771{
13772void *x=fsync
13773 ;
13774 return 0;
13775}
13776_ACEOF
13777rm -f conftest.$ac_objext
13778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013779 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013781 grep -v '^ *+' conftest.er1 >conftest.err
13782 rm -f conftest.er1
13783 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13785 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013786 { ac_try='test -z "$ac_c_werror_flag"
13787 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13789 (eval $ac_try) 2>&5
13790 ac_status=$?
13791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13792 (exit $ac_status); }; } &&
13793 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13795 (eval $ac_try) 2>&5
13796 ac_status=$?
13797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13798 (exit $ac_status); }; }; then
13799
13800cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013801#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013802_ACEOF
13803
13804 echo "$as_me:$LINENO: result: yes" >&5
13805echo "${ECHO_T}yes" >&6
13806else
13807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013808sed 's/^/| /' conftest.$ac_ext >&5
13809
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013810echo "$as_me:$LINENO: result: no" >&5
13811echo "${ECHO_T}no" >&6
13812
13813fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013815echo "$as_me:$LINENO: checking for fdatasync" >&5
13816echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13817cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013818/* confdefs.h. */
13819_ACEOF
13820cat confdefs.h >>conftest.$ac_ext
13821cat >>conftest.$ac_ext <<_ACEOF
13822/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013823#include <unistd.h>
13824int
13825main ()
13826{
13827void *x=fdatasync
13828 ;
13829 return 0;
13830}
13831_ACEOF
13832rm -f conftest.$ac_objext
13833if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013834 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013836 grep -v '^ *+' conftest.er1 >conftest.err
13837 rm -f conftest.er1
13838 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13840 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013841 { ac_try='test -z "$ac_c_werror_flag"
13842 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13844 (eval $ac_try) 2>&5
13845 ac_status=$?
13846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13847 (exit $ac_status); }; } &&
13848 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13850 (eval $ac_try) 2>&5
13851 ac_status=$?
13852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13853 (exit $ac_status); }; }; then
13854
13855cat >>confdefs.h <<\_ACEOF
13856#define HAVE_FDATASYNC 1
13857_ACEOF
13858
13859 echo "$as_me:$LINENO: result: yes" >&5
13860echo "${ECHO_T}yes" >&6
13861else
13862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013863sed 's/^/| /' conftest.$ac_ext >&5
13864
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013865echo "$as_me:$LINENO: result: no" >&5
13866echo "${ECHO_T}no" >&6
13867
13868fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013869rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013870
Martin v. Löwisd5843682002-11-21 20:41:28 +000013871# On some systems (eg. FreeBSD 5), we would find a definition of the
13872# functions ctermid_r, setgroups in the library, but no prototype
13873# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13874# address to avoid compiler warnings and potential miscompilations
13875# because of the missing prototypes.
13876
13877echo "$as_me:$LINENO: checking for ctermid_r" >&5
13878echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013880/* confdefs.h. */
13881_ACEOF
13882cat confdefs.h >>conftest.$ac_ext
13883cat >>conftest.$ac_ext <<_ACEOF
13884/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013885
13886#include "confdefs.h"
13887#include <stdio.h>
13888
Martin v. Löwisd5843682002-11-21 20:41:28 +000013889int
13890main ()
13891{
13892void* p = ctermid_r
13893 ;
13894 return 0;
13895}
13896_ACEOF
13897rm -f conftest.$ac_objext
13898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013899 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000013900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013901 grep -v '^ *+' conftest.er1 >conftest.err
13902 rm -f conftest.er1
13903 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000013904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13905 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013906 { ac_try='test -z "$ac_c_werror_flag"
13907 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13909 (eval $ac_try) 2>&5
13910 ac_status=$?
13911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13912 (exit $ac_status); }; } &&
13913 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000013914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13915 (eval $ac_try) 2>&5
13916 ac_status=$?
13917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13918 (exit $ac_status); }; }; then
13919
13920cat >>confdefs.h <<\_ACEOF
13921#define HAVE_CTERMID_R 1
13922_ACEOF
13923
13924 echo "$as_me:$LINENO: result: yes" >&5
13925echo "${ECHO_T}yes" >&6
13926else
13927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013928sed 's/^/| /' conftest.$ac_ext >&5
13929
Martin v. Löwisd5843682002-11-21 20:41:28 +000013930echo "$as_me:$LINENO: result: no" >&5
13931echo "${ECHO_T}no" >&6
13932
13933fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013934rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000013935
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013936echo "$as_me:$LINENO: checking for flock" >&5
13937echo $ECHO_N "checking for flock... $ECHO_C" >&6
13938cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013939/* confdefs.h. */
13940_ACEOF
13941cat confdefs.h >>conftest.$ac_ext
13942cat >>conftest.$ac_ext <<_ACEOF
13943/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013944
13945#include "confdefs.h"
13946#include <sys/file.h>
13947
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013948int
13949main ()
13950{
13951void* p = flock
13952 ;
13953 return 0;
13954}
13955_ACEOF
13956rm -f conftest.$ac_objext
13957if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013958 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013960 grep -v '^ *+' conftest.er1 >conftest.err
13961 rm -f conftest.er1
13962 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13964 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013965 { ac_try='test -z "$ac_c_werror_flag"
13966 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13968 (eval $ac_try) 2>&5
13969 ac_status=$?
13970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13971 (exit $ac_status); }; } &&
13972 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13974 (eval $ac_try) 2>&5
13975 ac_status=$?
13976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13977 (exit $ac_status); }; }; then
13978
13979cat >>confdefs.h <<\_ACEOF
13980#define HAVE_FLOCK 1
13981_ACEOF
13982
13983 echo "$as_me:$LINENO: result: yes" >&5
13984echo "${ECHO_T}yes" >&6
13985else
13986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013987sed 's/^/| /' conftest.$ac_ext >&5
13988
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013989echo "$as_me:$LINENO: result: no" >&5
13990echo "${ECHO_T}no" >&6
13991
13992fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013993rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013994
13995echo "$as_me:$LINENO: checking for getpagesize" >&5
13996echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
13997cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013998/* confdefs.h. */
13999_ACEOF
14000cat confdefs.h >>conftest.$ac_ext
14001cat >>conftest.$ac_ext <<_ACEOF
14002/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014003
14004#include "confdefs.h"
14005#include <unistd.h>
14006
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014007int
14008main ()
14009{
14010void* p = getpagesize
14011 ;
14012 return 0;
14013}
14014_ACEOF
14015rm -f conftest.$ac_objext
14016if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014017 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014019 grep -v '^ *+' conftest.er1 >conftest.err
14020 rm -f conftest.er1
14021 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14023 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014024 { ac_try='test -z "$ac_c_werror_flag"
14025 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14027 (eval $ac_try) 2>&5
14028 ac_status=$?
14029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14030 (exit $ac_status); }; } &&
14031 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14033 (eval $ac_try) 2>&5
14034 ac_status=$?
14035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14036 (exit $ac_status); }; }; then
14037
14038cat >>confdefs.h <<\_ACEOF
14039#define HAVE_GETPAGESIZE 1
14040_ACEOF
14041
14042 echo "$as_me:$LINENO: result: yes" >&5
14043echo "${ECHO_T}yes" >&6
14044else
14045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014046sed 's/^/| /' conftest.$ac_ext >&5
14047
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014048echo "$as_me:$LINENO: result: no" >&5
14049echo "${ECHO_T}no" >&6
14050
14051fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014052rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014053
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014054for ac_prog in true
14055do
14056 # Extract the first word of "$ac_prog", so it can be a program name with args.
14057set dummy $ac_prog; ac_word=$2
14058echo "$as_me:$LINENO: checking for $ac_word" >&5
14059echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14060if test "${ac_cv_prog_TRUE+set}" = set; then
14061 echo $ECHO_N "(cached) $ECHO_C" >&6
14062else
14063 if test -n "$TRUE"; then
14064 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14065else
14066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14067for as_dir in $PATH
14068do
14069 IFS=$as_save_IFS
14070 test -z "$as_dir" && as_dir=.
14071 for ac_exec_ext in '' $ac_executable_extensions; do
14072 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14073 ac_cv_prog_TRUE="$ac_prog"
14074 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14075 break 2
14076 fi
14077done
14078done
14079
14080fi
14081fi
14082TRUE=$ac_cv_prog_TRUE
14083if test -n "$TRUE"; then
14084 echo "$as_me:$LINENO: result: $TRUE" >&5
14085echo "${ECHO_T}$TRUE" >&6
14086else
14087 echo "$as_me:$LINENO: result: no" >&5
14088echo "${ECHO_T}no" >&6
14089fi
14090
14091 test -n "$TRUE" && break
14092done
14093test -n "$TRUE" || TRUE="/bin/true"
14094
14095
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014096echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14097echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14098if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14099 echo $ECHO_N "(cached) $ECHO_C" >&6
14100else
14101 ac_check_lib_save_LIBS=$LIBS
14102LIBS="-lc $LIBS"
14103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014104/* confdefs.h. */
14105_ACEOF
14106cat confdefs.h >>conftest.$ac_ext
14107cat >>conftest.$ac_ext <<_ACEOF
14108/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014109
14110/* Override any gcc2 internal prototype to avoid an error. */
14111#ifdef __cplusplus
14112extern "C"
14113#endif
14114/* We use char because int might match the return type of a gcc2
14115 builtin and then its argument prototype would still apply. */
14116char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014117int
14118main ()
14119{
14120inet_aton ();
14121 ;
14122 return 0;
14123}
14124_ACEOF
14125rm -f conftest.$ac_objext conftest$ac_exeext
14126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014127 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014129 grep -v '^ *+' conftest.er1 >conftest.err
14130 rm -f conftest.er1
14131 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14133 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014134 { ac_try='test -z "$ac_c_werror_flag"
14135 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14137 (eval $ac_try) 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'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014142 { (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 ac_cv_lib_c_inet_aton=yes
14148else
14149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014150sed 's/^/| /' conftest.$ac_ext >&5
14151
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014152ac_cv_lib_c_inet_aton=no
14153fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014154rm -f conftest.err conftest.$ac_objext \
14155 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014156LIBS=$ac_check_lib_save_LIBS
14157fi
14158echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14159echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14160if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014161 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014162else
14163
14164echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14165echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14166if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14167 echo $ECHO_N "(cached) $ECHO_C" >&6
14168else
14169 ac_check_lib_save_LIBS=$LIBS
14170LIBS="-lresolv $LIBS"
14171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014172/* confdefs.h. */
14173_ACEOF
14174cat confdefs.h >>conftest.$ac_ext
14175cat >>conftest.$ac_ext <<_ACEOF
14176/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014177
14178/* Override any gcc2 internal prototype to avoid an error. */
14179#ifdef __cplusplus
14180extern "C"
14181#endif
14182/* We use char because int might match the return type of a gcc2
14183 builtin and then its argument prototype would still apply. */
14184char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014185int
14186main ()
14187{
14188inet_aton ();
14189 ;
14190 return 0;
14191}
14192_ACEOF
14193rm -f conftest.$ac_objext conftest$ac_exeext
14194if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014195 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014197 grep -v '^ *+' conftest.er1 >conftest.err
14198 rm -f conftest.er1
14199 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14201 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014202 { ac_try='test -z "$ac_c_werror_flag"
14203 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14205 (eval $ac_try) 2>&5
14206 ac_status=$?
14207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14208 (exit $ac_status); }; } &&
14209 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14211 (eval $ac_try) 2>&5
14212 ac_status=$?
14213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14214 (exit $ac_status); }; }; then
14215 ac_cv_lib_resolv_inet_aton=yes
14216else
14217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014218sed 's/^/| /' conftest.$ac_ext >&5
14219
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014220ac_cv_lib_resolv_inet_aton=no
14221fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014222rm -f conftest.err conftest.$ac_objext \
14223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014224LIBS=$ac_check_lib_save_LIBS
14225fi
14226echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14227echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14228if test $ac_cv_lib_resolv_inet_aton = yes; then
14229 cat >>confdefs.h <<_ACEOF
14230#define HAVE_LIBRESOLV 1
14231_ACEOF
14232
14233 LIBS="-lresolv $LIBS"
14234
14235fi
14236
14237
14238fi
14239
14240
Martin v. Löwise9416172003-05-03 10:12:45 +000014241echo "$as_me:$LINENO: checking for hstrerror" >&5
14242echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014244/* confdefs.h. */
14245_ACEOF
14246cat confdefs.h >>conftest.$ac_ext
14247cat >>conftest.$ac_ext <<_ACEOF
14248/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014249
14250#include "confdefs.h"
14251#include <netdb.h>
14252
Martin v. Löwise9416172003-05-03 10:12:45 +000014253int
14254main ()
14255{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014256void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014257 ;
14258 return 0;
14259}
14260_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014261rm -f conftest.$ac_objext conftest$ac_exeext
14262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014263 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014265 grep -v '^ *+' conftest.er1 >conftest.err
14266 rm -f conftest.er1
14267 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14269 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014270 { ac_try='test -z "$ac_c_werror_flag"
14271 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14273 (eval $ac_try) 2>&5
14274 ac_status=$?
14275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14276 (exit $ac_status); }; } &&
14277 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14279 (eval $ac_try) 2>&5
14280 ac_status=$?
14281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14282 (exit $ac_status); }; }; then
14283
14284cat >>confdefs.h <<\_ACEOF
14285#define HAVE_HSTRERROR 1
14286_ACEOF
14287
14288 echo "$as_me:$LINENO: result: yes" >&5
14289echo "${ECHO_T}yes" >&6
14290else
14291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014292sed 's/^/| /' conftest.$ac_ext >&5
14293
Martin v. Löwise9416172003-05-03 10:12:45 +000014294echo "$as_me:$LINENO: result: no" >&5
14295echo "${ECHO_T}no" >&6
14296
14297fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014298rm -f conftest.err conftest.$ac_objext \
14299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014300
14301echo "$as_me:$LINENO: checking for inet_aton" >&5
14302echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
14303cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014304/* confdefs.h. */
14305_ACEOF
14306cat confdefs.h >>conftest.$ac_ext
14307cat >>conftest.$ac_ext <<_ACEOF
14308/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014309
14310#include "confdefs.h"
14311#include <sys/socket.h>
14312#include <netinet/in.h>
14313#include <arpa/inet.h>
14314
Martin v. Löwise9416172003-05-03 10:12:45 +000014315int
14316main ()
14317{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014318void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014319 ;
14320 return 0;
14321}
14322_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014323rm -f conftest.$ac_objext conftest$ac_exeext
14324if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014325 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014327 grep -v '^ *+' conftest.er1 >conftest.err
14328 rm -f conftest.er1
14329 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14331 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014332 { ac_try='test -z "$ac_c_werror_flag"
14333 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14335 (eval $ac_try) 2>&5
14336 ac_status=$?
14337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14338 (exit $ac_status); }; } &&
14339 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14341 (eval $ac_try) 2>&5
14342 ac_status=$?
14343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14344 (exit $ac_status); }; }; then
14345
14346cat >>confdefs.h <<\_ACEOF
14347#define HAVE_INET_ATON 1
14348_ACEOF
14349
14350 echo "$as_me:$LINENO: result: yes" >&5
14351echo "${ECHO_T}yes" >&6
14352else
14353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014354sed 's/^/| /' conftest.$ac_ext >&5
14355
Martin v. Löwise9416172003-05-03 10:12:45 +000014356echo "$as_me:$LINENO: result: no" >&5
14357echo "${ECHO_T}no" >&6
14358
14359fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014360rm -f conftest.err conftest.$ac_objext \
14361 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014362
14363echo "$as_me:$LINENO: checking for inet_pton" >&5
14364echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
14365cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014366/* confdefs.h. */
14367_ACEOF
14368cat confdefs.h >>conftest.$ac_ext
14369cat >>conftest.$ac_ext <<_ACEOF
14370/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014371
14372#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014373#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014374#include <sys/socket.h>
14375#include <netinet/in.h>
14376#include <arpa/inet.h>
14377
Martin v. Löwise9416172003-05-03 10:12:45 +000014378int
14379main ()
14380{
14381void* p = inet_pton
14382 ;
14383 return 0;
14384}
14385_ACEOF
14386rm -f conftest.$ac_objext
14387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014388 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014390 grep -v '^ *+' conftest.er1 >conftest.err
14391 rm -f conftest.er1
14392 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14394 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014395 { ac_try='test -z "$ac_c_werror_flag"
14396 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14398 (eval $ac_try) 2>&5
14399 ac_status=$?
14400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14401 (exit $ac_status); }; } &&
14402 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14404 (eval $ac_try) 2>&5
14405 ac_status=$?
14406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14407 (exit $ac_status); }; }; then
14408
14409cat >>confdefs.h <<\_ACEOF
14410#define HAVE_INET_PTON 1
14411_ACEOF
14412
14413 echo "$as_me:$LINENO: result: yes" >&5
14414echo "${ECHO_T}yes" >&6
14415else
14416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014417sed 's/^/| /' conftest.$ac_ext >&5
14418
Martin v. Löwise9416172003-05-03 10:12:45 +000014419echo "$as_me:$LINENO: result: no" >&5
14420echo "${ECHO_T}no" >&6
14421
14422fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014423rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014424
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014425# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014426echo "$as_me:$LINENO: checking for setgroups" >&5
14427echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
14428cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014429/* confdefs.h. */
14430_ACEOF
14431cat confdefs.h >>conftest.$ac_ext
14432cat >>conftest.$ac_ext <<_ACEOF
14433/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014434
14435#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014436#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014437#ifdef HAVE_GRP_H
14438#include <grp.h>
14439#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014440
Martin v. Löwisd5843682002-11-21 20:41:28 +000014441int
14442main ()
14443{
14444void* p = setgroups
14445 ;
14446 return 0;
14447}
14448_ACEOF
14449rm -f conftest.$ac_objext
14450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014451 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014453 grep -v '^ *+' conftest.er1 >conftest.err
14454 rm -f conftest.er1
14455 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14457 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014458 { ac_try='test -z "$ac_c_werror_flag"
14459 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14461 (eval $ac_try) 2>&5
14462 ac_status=$?
14463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14464 (exit $ac_status); }; } &&
14465 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14467 (eval $ac_try) 2>&5
14468 ac_status=$?
14469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14470 (exit $ac_status); }; }; then
14471
14472cat >>confdefs.h <<\_ACEOF
14473#define HAVE_SETGROUPS 1
14474_ACEOF
14475
14476 echo "$as_me:$LINENO: result: yes" >&5
14477echo "${ECHO_T}yes" >&6
14478else
14479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014480sed 's/^/| /' conftest.$ac_ext >&5
14481
Martin v. Löwisd5843682002-11-21 20:41:28 +000014482echo "$as_me:$LINENO: result: no" >&5
14483echo "${ECHO_T}no" >&6
14484
14485fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014486rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014487
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014488# check for openpty and forkpty
14489
Martin v. Löwis11437992002-04-12 09:54:03 +000014490
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014491for ac_func in openpty
14492do
Martin v. Löwis11437992002-04-12 09:54:03 +000014493as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14494echo "$as_me:$LINENO: checking for $ac_func" >&5
14495echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14496if eval "test \"\${$as_ac_var+set}\" = set"; then
14497 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014498else
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014500/* confdefs.h. */
14501_ACEOF
14502cat confdefs.h >>conftest.$ac_ext
14503cat >>conftest.$ac_ext <<_ACEOF
14504/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014505/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014506 which can conflict with char $ac_func (); below.
14507 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014508 <limits.h> exists even on freestanding compilers. Under hpux,
14509 including <limits.h> includes <sys/time.h> and causes problems
14510 checking for functions defined therein. */
14511#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014512# include <limits.h>
14513#else
14514# include <assert.h>
14515#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014516/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014517#ifdef __cplusplus
14518extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014519{
Martin v. Löwis11437992002-04-12 09:54:03 +000014520#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014521/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014522 builtin and then its argument prototype would still apply. */
14523char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014524/* The GNU C library defines this for functions which it implements
14525 to always fail with ENOSYS. Some functions are actually named
14526 something starting with __ and the normal name is an alias. */
14527#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14528choke me
14529#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014530char (*f) () = $ac_func;
14531#endif
14532#ifdef __cplusplus
14533}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014534#endif
14535
Skip Montanaro6dead952003-09-25 14:50:04 +000014536int
14537main ()
14538{
14539return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014540 ;
14541 return 0;
14542}
14543_ACEOF
14544rm -f conftest.$ac_objext conftest$ac_exeext
14545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014546 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014548 grep -v '^ *+' conftest.er1 >conftest.err
14549 rm -f conftest.er1
14550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14552 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014553 { ac_try='test -z "$ac_c_werror_flag"
14554 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14556 (eval $ac_try) 2>&5
14557 ac_status=$?
14558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14559 (exit $ac_status); }; } &&
14560 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14562 (eval $ac_try) 2>&5
14563 ac_status=$?
14564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14565 (exit $ac_status); }; }; then
14566 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014567else
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014569sed 's/^/| /' conftest.$ac_ext >&5
14570
Martin v. Löwis11437992002-04-12 09:54:03 +000014571eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014572fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014573rm -f conftest.err conftest.$ac_objext \
14574 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014575fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014576echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14577echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14578if test `eval echo '${'$as_ac_var'}'` = yes; then
14579 cat >>confdefs.h <<_ACEOF
14580#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14581_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014582
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014583else
Martin v. Löwis11437992002-04-12 09:54:03 +000014584 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14585echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14586if test "${ac_cv_lib_util_openpty+set}" = set; then
14587 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014588else
Martin v. Löwis11437992002-04-12 09:54:03 +000014589 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014590LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014591cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014592/* confdefs.h. */
14593_ACEOF
14594cat confdefs.h >>conftest.$ac_ext
14595cat >>conftest.$ac_ext <<_ACEOF
14596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014597
Fred Drake8cef4cf2000-06-28 16:40:38 +000014598/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014599#ifdef __cplusplus
14600extern "C"
14601#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014602/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014603 builtin and then its argument prototype would still apply. */
14604char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014605int
14606main ()
14607{
14608openpty ();
14609 ;
14610 return 0;
14611}
14612_ACEOF
14613rm -f conftest.$ac_objext conftest$ac_exeext
14614if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014615 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014617 grep -v '^ *+' conftest.er1 >conftest.err
14618 rm -f conftest.er1
14619 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14621 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014622 { ac_try='test -z "$ac_c_werror_flag"
14623 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14625 (eval $ac_try) 2>&5
14626 ac_status=$?
14627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14628 (exit $ac_status); }; } &&
14629 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14631 (eval $ac_try) 2>&5
14632 ac_status=$?
14633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14634 (exit $ac_status); }; }; then
14635 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014636else
Martin v. Löwis11437992002-04-12 09:54:03 +000014637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014638sed 's/^/| /' conftest.$ac_ext >&5
14639
Martin v. Löwis11437992002-04-12 09:54:03 +000014640ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014641fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014642rm -f conftest.err conftest.$ac_objext \
14643 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014644LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014645fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014646echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14647echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14648if test $ac_cv_lib_util_openpty = yes; then
14649 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014650#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014651_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014652 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014653fi
14654
14655fi
14656done
14657
Martin v. Löwis11437992002-04-12 09:54:03 +000014658
Fred Drake8cef4cf2000-06-28 16:40:38 +000014659for ac_func in forkpty
14660do
Martin v. Löwis11437992002-04-12 09:54:03 +000014661as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14662echo "$as_me:$LINENO: checking for $ac_func" >&5
14663echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14664if eval "test \"\${$as_ac_var+set}\" = set"; then
14665 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014666else
Martin v. Löwis11437992002-04-12 09:54:03 +000014667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014668/* confdefs.h. */
14669_ACEOF
14670cat confdefs.h >>conftest.$ac_ext
14671cat >>conftest.$ac_ext <<_ACEOF
14672/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014673/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014674 which can conflict with char $ac_func (); below.
14675 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014676 <limits.h> exists even on freestanding compilers. Under hpux,
14677 including <limits.h> includes <sys/time.h> and causes problems
14678 checking for functions defined therein. */
14679#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014680# include <limits.h>
14681#else
14682# include <assert.h>
14683#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014684/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014685#ifdef __cplusplus
14686extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014687{
Martin v. Löwis11437992002-04-12 09:54:03 +000014688#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014689/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014690 builtin and then its argument prototype would still apply. */
14691char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014692/* The GNU C library defines this for functions which it implements
14693 to always fail with ENOSYS. Some functions are actually named
14694 something starting with __ and the normal name is an alias. */
14695#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14696choke me
14697#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014698char (*f) () = $ac_func;
14699#endif
14700#ifdef __cplusplus
14701}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014702#endif
14703
Skip Montanaro6dead952003-09-25 14:50:04 +000014704int
14705main ()
14706{
14707return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014708 ;
14709 return 0;
14710}
14711_ACEOF
14712rm -f conftest.$ac_objext conftest$ac_exeext
14713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014714 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014716 grep -v '^ *+' conftest.er1 >conftest.err
14717 rm -f conftest.er1
14718 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14720 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014721 { ac_try='test -z "$ac_c_werror_flag"
14722 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14724 (eval $ac_try) 2>&5
14725 ac_status=$?
14726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14727 (exit $ac_status); }; } &&
14728 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14730 (eval $ac_try) 2>&5
14731 ac_status=$?
14732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14733 (exit $ac_status); }; }; then
14734 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014735else
Martin v. Löwis11437992002-04-12 09:54:03 +000014736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014737sed 's/^/| /' conftest.$ac_ext >&5
14738
Martin v. Löwis11437992002-04-12 09:54:03 +000014739eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014740fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014741rm -f conftest.err conftest.$ac_objext \
14742 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014743fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014744echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14745echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14746if test `eval echo '${'$as_ac_var'}'` = yes; then
14747 cat >>confdefs.h <<_ACEOF
14748#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14749_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014750
Fred Drake8cef4cf2000-06-28 16:40:38 +000014751else
Martin v. Löwis11437992002-04-12 09:54:03 +000014752 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14753echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14754if test "${ac_cv_lib_util_forkpty+set}" = set; then
14755 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014756else
Martin v. Löwis11437992002-04-12 09:54:03 +000014757 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014758LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014759cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014760/* confdefs.h. */
14761_ACEOF
14762cat confdefs.h >>conftest.$ac_ext
14763cat >>conftest.$ac_ext <<_ACEOF
14764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014765
Fred Drake8cef4cf2000-06-28 16:40:38 +000014766/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014767#ifdef __cplusplus
14768extern "C"
14769#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014770/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014771 builtin and then its argument prototype would still apply. */
14772char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014773int
14774main ()
14775{
14776forkpty ();
14777 ;
14778 return 0;
14779}
14780_ACEOF
14781rm -f conftest.$ac_objext conftest$ac_exeext
14782if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014783 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014785 grep -v '^ *+' conftest.er1 >conftest.err
14786 rm -f conftest.er1
14787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14789 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014790 { ac_try='test -z "$ac_c_werror_flag"
14791 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14793 (eval $ac_try) 2>&5
14794 ac_status=$?
14795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14796 (exit $ac_status); }; } &&
14797 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14799 (eval $ac_try) 2>&5
14800 ac_status=$?
14801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802 (exit $ac_status); }; }; then
14803 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014804else
Martin v. Löwis11437992002-04-12 09:54:03 +000014805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014806sed 's/^/| /' conftest.$ac_ext >&5
14807
Martin v. Löwis11437992002-04-12 09:54:03 +000014808ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014809fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014810rm -f conftest.err conftest.$ac_objext \
14811 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014812LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014813fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014814echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14815echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14816if test $ac_cv_lib_util_forkpty = yes; then
14817 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014818#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014819_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014820 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014821fi
14822
14823fi
14824done
14825
Jack Jansendd19cf82001-12-06 22:36:17 +000014826
Michael W. Hudson54241132001-12-07 15:38:26 +000014827# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014828
14829
14830
14831
14832
14833
Fred Drake8cef4cf2000-06-28 16:40:38 +000014834for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14835do
Martin v. Löwis11437992002-04-12 09:54:03 +000014836as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14837echo "$as_me:$LINENO: checking for $ac_func" >&5
14838echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14839if eval "test \"\${$as_ac_var+set}\" = set"; then
14840 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014841else
Martin v. Löwis11437992002-04-12 09:54:03 +000014842 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014843/* confdefs.h. */
14844_ACEOF
14845cat confdefs.h >>conftest.$ac_ext
14846cat >>conftest.$ac_ext <<_ACEOF
14847/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014848/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014849 which can conflict with char $ac_func (); below.
14850 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014851 <limits.h> exists even on freestanding compilers. Under hpux,
14852 including <limits.h> includes <sys/time.h> and causes problems
14853 checking for functions defined therein. */
14854#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014855# include <limits.h>
14856#else
14857# include <assert.h>
14858#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014859/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014860#ifdef __cplusplus
14861extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014862{
Martin v. Löwis11437992002-04-12 09:54:03 +000014863#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014864/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014865 builtin and then its argument prototype would still apply. */
14866char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014867/* The GNU C library defines this for functions which it implements
14868 to always fail with ENOSYS. Some functions are actually named
14869 something starting with __ and the normal name is an alias. */
14870#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14871choke me
14872#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014873char (*f) () = $ac_func;
14874#endif
14875#ifdef __cplusplus
14876}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014877#endif
14878
Skip Montanaro6dead952003-09-25 14:50:04 +000014879int
14880main ()
14881{
14882return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014883 ;
14884 return 0;
14885}
14886_ACEOF
14887rm -f conftest.$ac_objext conftest$ac_exeext
14888if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014889 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014891 grep -v '^ *+' conftest.er1 >conftest.err
14892 rm -f conftest.er1
14893 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14895 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014896 { ac_try='test -z "$ac_c_werror_flag"
14897 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14899 (eval $ac_try) 2>&5
14900 ac_status=$?
14901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14902 (exit $ac_status); }; } &&
14903 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14905 (eval $ac_try) 2>&5
14906 ac_status=$?
14907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14908 (exit $ac_status); }; }; then
14909 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014910else
Martin v. Löwis11437992002-04-12 09:54:03 +000014911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014912sed 's/^/| /' conftest.$ac_ext >&5
14913
Martin v. Löwis11437992002-04-12 09:54:03 +000014914eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014915fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014916rm -f conftest.err conftest.$ac_objext \
14917 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014918fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014919echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14920echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14921if test `eval echo '${'$as_ac_var'}'` = yes; then
14922 cat >>confdefs.h <<_ACEOF
14923#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14924_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014925
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014926fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014927done
14928
Michael W. Hudson54241132001-12-07 15:38:26 +000014929
Martin v. Löwis11437992002-04-12 09:54:03 +000014930
14931
14932
14933
14934
Martin v. Löwis1142de32002-03-29 16:28:31 +000014935for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000014936do
Martin v. Löwis11437992002-04-12 09:54:03 +000014937as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14938echo "$as_me:$LINENO: checking for $ac_func" >&5
14939echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14940if eval "test \"\${$as_ac_var+set}\" = set"; then
14941 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014942else
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014944/* confdefs.h. */
14945_ACEOF
14946cat confdefs.h >>conftest.$ac_ext
14947cat >>conftest.$ac_ext <<_ACEOF
14948/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014949/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014950 which can conflict with char $ac_func (); below.
14951 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014952 <limits.h> exists even on freestanding compilers. Under hpux,
14953 including <limits.h> includes <sys/time.h> and causes problems
14954 checking for functions defined therein. */
14955#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014956# include <limits.h>
14957#else
14958# include <assert.h>
14959#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014960/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014961#ifdef __cplusplus
14962extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014963{
Martin v. Löwis11437992002-04-12 09:54:03 +000014964#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014965/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 builtin and then its argument prototype would still apply. */
14967char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014968/* The GNU C library defines this for functions which it implements
14969 to always fail with ENOSYS. Some functions are actually named
14970 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014971#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014972choke me
14973#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014974char (*f) () = $ac_func;
14975#endif
14976#ifdef __cplusplus
14977}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014978#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014979
Skip Montanaro6dead952003-09-25 14:50:04 +000014980int
14981main ()
14982{
14983return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014984 ;
14985 return 0;
14986}
14987_ACEOF
14988rm -f conftest.$ac_objext conftest$ac_exeext
14989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014990 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014992 grep -v '^ *+' conftest.er1 >conftest.err
14993 rm -f conftest.er1
14994 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14996 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014997 { ac_try='test -z "$ac_c_werror_flag"
14998 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15000 (eval $ac_try) 2>&5
15001 ac_status=$?
15002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15003 (exit $ac_status); }; } &&
15004 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15006 (eval $ac_try) 2>&5
15007 ac_status=$?
15008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15009 (exit $ac_status); }; }; then
15010 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015011else
Martin v. Löwis11437992002-04-12 09:54:03 +000015012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015013sed 's/^/| /' conftest.$ac_ext >&5
15014
Martin v. Löwis11437992002-04-12 09:54:03 +000015015eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015016fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015017rm -f conftest.err conftest.$ac_objext \
15018 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000015019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015020echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15021echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15022if test `eval echo '${'$as_ac_var'}'` = yes; then
15023 cat >>confdefs.h <<_ACEOF
15024#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15025_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000015026
Martin v. Löwis1142de32002-03-29 16:28:31 +000015027else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015028 case $LIBOBJS in
15029 "$ac_func.$ac_objext" | \
15030 *" $ac_func.$ac_objext" | \
15031 "$ac_func.$ac_objext "* | \
15032 *" $ac_func.$ac_objext "* ) ;;
15033 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15034esac
15035
Martin v. Löwis1142de32002-03-29 16:28:31 +000015036fi
15037done
15038
15039
Martin v. Löwis11437992002-04-12 09:54:03 +000015040
Martin v. Löwis1142de32002-03-29 16:28:31 +000015041for ac_func in getpgrp
15042do
Martin v. Löwis11437992002-04-12 09:54:03 +000015043as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15044echo "$as_me:$LINENO: checking for $ac_func" >&5
15045echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15046if eval "test \"\${$as_ac_var+set}\" = set"; then
15047 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000015048else
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015050/* confdefs.h. */
15051_ACEOF
15052cat confdefs.h >>conftest.$ac_ext
15053cat >>conftest.$ac_ext <<_ACEOF
15054/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000015055/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015056 which can conflict with char $ac_func (); below.
15057 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015058 <limits.h> exists even on freestanding compilers. Under hpux,
15059 including <limits.h> includes <sys/time.h> and causes problems
15060 checking for functions defined therein. */
15061#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015062# include <limits.h>
15063#else
15064# include <assert.h>
15065#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015066/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015067#ifdef __cplusplus
15068extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015069{
Martin v. Löwis11437992002-04-12 09:54:03 +000015070#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015071/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015072 builtin and then its argument prototype would still apply. */
15073char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015074/* The GNU C library defines this for functions which it implements
15075 to always fail with ENOSYS. Some functions are actually named
15076 something starting with __ and the normal name is an alias. */
15077#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15078choke me
15079#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015080char (*f) () = $ac_func;
15081#endif
15082#ifdef __cplusplus
15083}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015084#endif
15085
Skip Montanaro6dead952003-09-25 14:50:04 +000015086int
15087main ()
15088{
15089return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015090 ;
15091 return 0;
15092}
15093_ACEOF
15094rm -f conftest.$ac_objext conftest$ac_exeext
15095if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015096 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015098 grep -v '^ *+' conftest.er1 >conftest.err
15099 rm -f conftest.er1
15100 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15102 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015103 { ac_try='test -z "$ac_c_werror_flag"
15104 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15106 (eval $ac_try) 2>&5
15107 ac_status=$?
15108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15109 (exit $ac_status); }; } &&
15110 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15112 (eval $ac_try) 2>&5
15113 ac_status=$?
15114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15115 (exit $ac_status); }; }; then
15116 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015117else
Martin v. Löwis11437992002-04-12 09:54:03 +000015118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015119sed 's/^/| /' conftest.$ac_ext >&5
15120
Martin v. Löwis11437992002-04-12 09:54:03 +000015121eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015122fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015123rm -f conftest.err conftest.$ac_objext \
15124 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015126echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15127echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15128if test `eval echo '${'$as_ac_var'}'` = yes; then
15129 cat >>confdefs.h <<_ACEOF
15130#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15131_ACEOF
15132 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015133/* confdefs.h. */
15134_ACEOF
15135cat confdefs.h >>conftest.$ac_ext
15136cat >>conftest.$ac_ext <<_ACEOF
15137/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015138#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015139int
15140main ()
15141{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015142getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 ;
15144 return 0;
15145}
15146_ACEOF
15147rm -f conftest.$ac_objext
15148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015149 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015151 grep -v '^ *+' conftest.er1 >conftest.err
15152 rm -f conftest.er1
15153 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15155 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015156 { ac_try='test -z "$ac_c_werror_flag"
15157 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15159 (eval $ac_try) 2>&5
15160 ac_status=$?
15161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15162 (exit $ac_status); }; } &&
15163 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15165 (eval $ac_try) 2>&5
15166 ac_status=$?
15167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15168 (exit $ac_status); }; }; then
15169
15170cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015171#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015172_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015173
Martin v. Löwis11437992002-04-12 09:54:03 +000015174
Guido van Rossumf78abae1997-01-21 22:02:36 +000015175else
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015177sed 's/^/| /' conftest.$ac_ext >&5
15178
Guido van Rossum627b2d71993-12-24 10:39:16 +000015179fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015180rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015181
Guido van Rossum627b2d71993-12-24 10:39:16 +000015182fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015183done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015184
Jack Jansen150753c2003-03-29 22:07:47 +000015185
15186for ac_func in setpgrp
15187do
15188as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15189echo "$as_me:$LINENO: checking for $ac_func" >&5
15190echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15191if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015193else
Martin v. Löwis11437992002-04-12 09:54:03 +000015194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015195/* confdefs.h. */
15196_ACEOF
15197cat confdefs.h >>conftest.$ac_ext
15198cat >>conftest.$ac_ext <<_ACEOF
15199/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015200/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015201 which can conflict with char $ac_func (); below.
15202 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015203 <limits.h> exists even on freestanding compilers. Under hpux,
15204 including <limits.h> includes <sys/time.h> and causes problems
15205 checking for functions defined therein. */
15206#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015207# include <limits.h>
15208#else
15209# include <assert.h>
15210#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015211/* Override any gcc2 internal prototype to avoid an error. */
15212#ifdef __cplusplus
15213extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015214{
Martin v. Löwis11437992002-04-12 09:54:03 +000015215#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015216/* We use char because int might match the return type of a gcc2
15217 builtin and then its argument prototype would still apply. */
15218char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000015219/* The GNU C library defines this for functions which it implements
15220 to always fail with ENOSYS. Some functions are actually named
15221 something starting with __ and the normal name is an alias. */
15222#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15223choke me
15224#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015225char (*f) () = $ac_func;
15226#endif
15227#ifdef __cplusplus
15228}
Jack Jansen150753c2003-03-29 22:07:47 +000015229#endif
15230
Skip Montanaro6dead952003-09-25 14:50:04 +000015231int
15232main ()
15233{
15234return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 ;
15236 return 0;
15237}
15238_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015239rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000015240if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015241 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015243 grep -v '^ *+' conftest.er1 >conftest.err
15244 rm -f conftest.er1
15245 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015247 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015248 { ac_try='test -z "$ac_c_werror_flag"
15249 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15251 (eval $ac_try) 2>&5
15252 ac_status=$?
15253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15254 (exit $ac_status); }; } &&
15255 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15257 (eval $ac_try) 2>&5
15258 ac_status=$?
15259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15260 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000015261 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015262else
Jack Jansen150753c2003-03-29 22:07:47 +000015263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015264sed 's/^/| /' conftest.$ac_ext >&5
15265
Jack Jansen150753c2003-03-29 22:07:47 +000015266eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015267fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015268rm -f conftest.err conftest.$ac_objext \
15269 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015270fi
Jack Jansen150753c2003-03-29 22:07:47 +000015271echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15272echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15273if test `eval echo '${'$as_ac_var'}'` = yes; then
15274 cat >>confdefs.h <<_ACEOF
15275#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15276_ACEOF
15277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015278/* confdefs.h. */
15279_ACEOF
15280cat confdefs.h >>conftest.$ac_ext
15281cat >>conftest.$ac_ext <<_ACEOF
15282/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015283#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015284int
15285main ()
15286{
15287setpgrp(0,0);
15288 ;
15289 return 0;
15290}
15291_ACEOF
15292rm -f conftest.$ac_objext
15293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015294 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000015295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015296 grep -v '^ *+' conftest.er1 >conftest.err
15297 rm -f conftest.er1
15298 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15300 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015301 { ac_try='test -z "$ac_c_werror_flag"
15302 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15304 (eval $ac_try) 2>&5
15305 ac_status=$?
15306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15307 (exit $ac_status); }; } &&
15308 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000015309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15310 (eval $ac_try) 2>&5
15311 ac_status=$?
15312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15313 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015314
15315cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015316#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015317_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015318
Jack Jansen150753c2003-03-29 22:07:47 +000015319
15320else
15321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015322sed 's/^/| /' conftest.$ac_ext >&5
15323
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015324fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015325rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015326
15327fi
15328done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015329
Martin v. Löwis11437992002-04-12 09:54:03 +000015330
Thomas Wouters3a584202000-08-05 23:28:51 +000015331for ac_func in gettimeofday
15332do
Martin v. Löwis11437992002-04-12 09:54:03 +000015333as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15334echo "$as_me:$LINENO: checking for $ac_func" >&5
15335echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15336if eval "test \"\${$as_ac_var+set}\" = set"; then
15337 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015338else
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015340/* confdefs.h. */
15341_ACEOF
15342cat confdefs.h >>conftest.$ac_ext
15343cat >>conftest.$ac_ext <<_ACEOF
15344/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015345/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015346 which can conflict with char $ac_func (); below.
15347 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015348 <limits.h> exists even on freestanding compilers. Under hpux,
15349 including <limits.h> includes <sys/time.h> and causes problems
15350 checking for functions defined therein. */
15351#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015352# include <limits.h>
15353#else
15354# include <assert.h>
15355#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015356/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015357#ifdef __cplusplus
15358extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015359{
Martin v. Löwis11437992002-04-12 09:54:03 +000015360#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015361/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015362 builtin and then its argument prototype would still apply. */
15363char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015364/* The GNU C library defines this for functions which it implements
15365 to always fail with ENOSYS. Some functions are actually named
15366 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015367#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015368choke me
15369#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015370char (*f) () = $ac_func;
15371#endif
15372#ifdef __cplusplus
15373}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015374#endif
15375
Skip Montanaro6dead952003-09-25 14:50:04 +000015376int
15377main ()
15378{
15379return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015380 ;
15381 return 0;
15382}
15383_ACEOF
15384rm -f conftest.$ac_objext conftest$ac_exeext
15385if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015386 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015388 grep -v '^ *+' conftest.er1 >conftest.err
15389 rm -f conftest.er1
15390 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15392 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015393 { ac_try='test -z "$ac_c_werror_flag"
15394 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15396 (eval $ac_try) 2>&5
15397 ac_status=$?
15398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15399 (exit $ac_status); }; } &&
15400 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15402 (eval $ac_try) 2>&5
15403 ac_status=$?
15404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15405 (exit $ac_status); }; }; then
15406 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015407else
Martin v. Löwis11437992002-04-12 09:54:03 +000015408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015409sed 's/^/| /' conftest.$ac_ext >&5
15410
Martin v. Löwis11437992002-04-12 09:54:03 +000015411eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015412fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015413rm -f conftest.err conftest.$ac_objext \
15414 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015415fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015416echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15417echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15418if test `eval echo '${'$as_ac_var'}'` = yes; then
15419 cat >>confdefs.h <<_ACEOF
15420#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15421_ACEOF
15422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015423/* confdefs.h. */
15424_ACEOF
15425cat confdefs.h >>conftest.$ac_ext
15426cat >>conftest.$ac_ext <<_ACEOF
15427/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015428#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015429int
15430main ()
15431{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015432gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 ;
15434 return 0;
15435}
15436_ACEOF
15437rm -f conftest.$ac_objext
15438if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015439 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015441 grep -v '^ *+' conftest.er1 >conftest.err
15442 rm -f conftest.er1
15443 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15445 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015446 { ac_try='test -z "$ac_c_werror_flag"
15447 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15449 (eval $ac_try) 2>&5
15450 ac_status=$?
15451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15452 (exit $ac_status); }; } &&
15453 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15455 (eval $ac_try) 2>&5
15456 ac_status=$?
15457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15458 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015459 :
15460else
Martin v. Löwis11437992002-04-12 09:54:03 +000015461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015462sed 's/^/| /' conftest.$ac_ext >&5
15463
Martin v. Löwis11437992002-04-12 09:54:03 +000015464
15465cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015466#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015467_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015468
Martin v. Löwis11437992002-04-12 09:54:03 +000015469
Guido van Rossum627b2d71993-12-24 10:39:16 +000015470fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015471rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015472
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015473fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015474done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015475
Michael W. Hudson54241132001-12-07 15:38:26 +000015476
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015477echo "$as_me:$LINENO: checking for major" >&5
15478echo $ECHO_N "checking for major... $ECHO_C" >&6
15479cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015480/* confdefs.h. */
15481_ACEOF
15482cat confdefs.h >>conftest.$ac_ext
15483cat >>conftest.$ac_ext <<_ACEOF
15484/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015485
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015486#if defined(MAJOR_IN_MKDEV)
15487#include <sys/mkdev.h>
15488#elif defined(MAJOR_IN_SYSMACROS)
15489#include <sys/sysmacros.h>
15490#else
15491#include <sys/types.h>
15492#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015493
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015494int
15495main ()
15496{
15497
15498 makedev(major(0),minor(0));
15499
15500 ;
15501 return 0;
15502}
15503_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000015504rm -f conftest.$ac_objext conftest$ac_exeext
15505if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015506 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015508 grep -v '^ *+' conftest.er1 >conftest.err
15509 rm -f conftest.er1
15510 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15512 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015513 { ac_try='test -z "$ac_c_werror_flag"
15514 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15516 (eval $ac_try) 2>&5
15517 ac_status=$?
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); }; } &&
15520 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15522 (eval $ac_try) 2>&5
15523 ac_status=$?
15524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525 (exit $ac_status); }; }; then
15526
15527
15528cat >>confdefs.h <<\_ACEOF
15529#define HAVE_DEVICE_MACROS 1
15530_ACEOF
15531
15532 echo "$as_me:$LINENO: result: yes" >&5
15533echo "${ECHO_T}yes" >&6
15534
15535else
15536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015537sed 's/^/| /' conftest.$ac_ext >&5
15538
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015539
15540 echo "$as_me:$LINENO: result: no" >&5
15541echo "${ECHO_T}no" >&6
15542
15543fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015544rm -f conftest.err conftest.$ac_objext \
15545 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015546
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015547# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015548# for [no]getaddrinfo in netdb.h.
15549echo "$as_me:$LINENO: checking for getaddrinfo" >&5
15550echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
15551cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015552/* confdefs.h. */
15553_ACEOF
15554cat confdefs.h >>conftest.$ac_ext
15555cat >>conftest.$ac_ext <<_ACEOF
15556/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015557
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015558#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015559#include <sys/socket.h>
15560#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015561#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015562
Martin v. Löwis11437992002-04-12 09:54:03 +000015563int
15564main ()
15565{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015566
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015567getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015568
Martin v. Löwis11437992002-04-12 09:54:03 +000015569 ;
15570 return 0;
15571}
15572_ACEOF
15573rm -f conftest.$ac_objext conftest$ac_exeext
15574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015575 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015577 grep -v '^ *+' conftest.er1 >conftest.err
15578 rm -f conftest.er1
15579 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15581 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015582 { ac_try='test -z "$ac_c_werror_flag"
15583 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15585 (eval $ac_try) 2>&5
15586 ac_status=$?
15587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15588 (exit $ac_status); }; } &&
15589 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15591 (eval $ac_try) 2>&5
15592 ac_status=$?
15593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15594 (exit $ac_status); }; }; then
15595
15596echo "$as_me:$LINENO: result: yes" >&5
15597echo "${ECHO_T}yes" >&6
15598echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
15599echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015600if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015601 echo "$as_me:$LINENO: result: buggy" >&5
15602echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015603buggygetaddrinfo=yes
15604else
Martin v. Löwis11437992002-04-12 09:54:03 +000015605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015606/* confdefs.h. */
15607_ACEOF
15608cat confdefs.h >>conftest.$ac_ext
15609cat >>conftest.$ac_ext <<_ACEOF
15610/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015611
15612#include <sys/types.h>
15613#include <netdb.h>
15614#include <string.h>
15615#include <sys/socket.h>
15616#include <netinet/in.h>
15617
15618main()
15619{
15620 int passive, gaierr, inet4 = 0, inet6 = 0;
15621 struct addrinfo hints, *ai, *aitop;
15622 char straddr[INET6_ADDRSTRLEN], strport[16];
15623
15624 for (passive = 0; passive <= 1; passive++) {
15625 memset(&hints, 0, sizeof(hints));
15626 hints.ai_family = AF_UNSPEC;
15627 hints.ai_flags = passive ? AI_PASSIVE : 0;
15628 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015629 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015630 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15631 (void)gai_strerror(gaierr);
15632 goto bad;
15633 }
15634 for (ai = aitop; ai; ai = ai->ai_next) {
15635 if (ai->ai_addr == NULL ||
15636 ai->ai_addrlen == 0 ||
15637 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15638 straddr, sizeof(straddr), strport, sizeof(strport),
15639 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15640 goto bad;
15641 }
15642 switch (ai->ai_family) {
15643 case AF_INET:
15644 if (strcmp(strport, "54321") != 0) {
15645 goto bad;
15646 }
15647 if (passive) {
15648 if (strcmp(straddr, "0.0.0.0") != 0) {
15649 goto bad;
15650 }
15651 } else {
15652 if (strcmp(straddr, "127.0.0.1") != 0) {
15653 goto bad;
15654 }
15655 }
15656 inet4++;
15657 break;
15658 case AF_INET6:
15659 if (strcmp(strport, "54321") != 0) {
15660 goto bad;
15661 }
15662 if (passive) {
15663 if (strcmp(straddr, "::") != 0) {
15664 goto bad;
15665 }
15666 } else {
15667 if (strcmp(straddr, "::1") != 0) {
15668 goto bad;
15669 }
15670 }
15671 inet6++;
15672 break;
15673 case AF_UNSPEC:
15674 goto bad;
15675 break;
15676 default:
15677 /* another family support? */
15678 break;
15679 }
15680 }
15681 }
15682
15683 if (!(inet4 == 0 || inet4 == 2))
15684 goto bad;
15685 if (!(inet6 == 0 || inet6 == 2))
15686 goto bad;
15687
15688 if (aitop)
15689 freeaddrinfo(aitop);
15690 exit(0);
15691
15692 bad:
15693 if (aitop)
15694 freeaddrinfo(aitop);
15695 exit(1);
15696}
15697
Martin v. Löwis11437992002-04-12 09:54:03 +000015698_ACEOF
15699rm -f conftest$ac_exeext
15700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15701 (eval $ac_link) 2>&5
15702 ac_status=$?
15703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15704 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15706 (eval $ac_try) 2>&5
15707 ac_status=$?
15708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15709 (exit $ac_status); }; }; then
15710 echo "$as_me:$LINENO: result: good" >&5
15711echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015712buggygetaddrinfo=no
15713else
Martin v. Löwis11437992002-04-12 09:54:03 +000015714 echo "$as_me: program exited with status $ac_status" >&5
15715echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015716sed 's/^/| /' conftest.$ac_ext >&5
15717
Martin v. Löwis11437992002-04-12 09:54:03 +000015718( exit $ac_status )
15719echo "$as_me:$LINENO: result: buggy" >&5
15720echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015721buggygetaddrinfo=yes
15722fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015723rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015724fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015725else
Martin v. Löwis11437992002-04-12 09:54:03 +000015726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015727sed 's/^/| /' conftest.$ac_ext >&5
15728
Martin v. Löwis11437992002-04-12 09:54:03 +000015729
15730echo "$as_me:$LINENO: result: no" >&5
15731echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015732buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015733
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015734fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015735rm -f conftest.err conftest.$ac_objext \
15736 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015737
15738if test "$buggygetaddrinfo" = "yes"; then
15739 if test "$ipv6" = "yes"; then
15740 echo 'Fatal: You must get working getaddrinfo() function.'
15741 echo ' or you can specify "--disable-ipv6"'.
15742 exit 1
15743 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015744else
Martin v. Löwis11437992002-04-12 09:54:03 +000015745
15746cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015747#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015748_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015749
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015751
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015752for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015753do
Martin v. Löwis11437992002-04-12 09:54:03 +000015754as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15755echo "$as_me:$LINENO: checking for $ac_func" >&5
15756echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15757if eval "test \"\${$as_ac_var+set}\" = set"; then
15758 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015759else
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015761/* confdefs.h. */
15762_ACEOF
15763cat confdefs.h >>conftest.$ac_ext
15764cat >>conftest.$ac_ext <<_ACEOF
15765/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015766/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015767 which can conflict with char $ac_func (); below.
15768 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015769 <limits.h> exists even on freestanding compilers. Under hpux,
15770 including <limits.h> includes <sys/time.h> and causes problems
15771 checking for functions defined therein. */
15772#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015773# include <limits.h>
15774#else
15775# include <assert.h>
15776#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015777/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015778#ifdef __cplusplus
15779extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015780{
Martin v. Löwis11437992002-04-12 09:54:03 +000015781#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015782/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015783 builtin and then its argument prototype would still apply. */
15784char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015785/* The GNU C library defines this for functions which it implements
15786 to always fail with ENOSYS. Some functions are actually named
15787 something starting with __ and the normal name is an alias. */
15788#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15789choke me
15790#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015791char (*f) () = $ac_func;
15792#endif
15793#ifdef __cplusplus
15794}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015795#endif
15796
Skip Montanaro6dead952003-09-25 14:50:04 +000015797int
15798main ()
15799{
15800return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015801 ;
15802 return 0;
15803}
15804_ACEOF
15805rm -f conftest.$ac_objext conftest$ac_exeext
15806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015807 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015809 grep -v '^ *+' conftest.er1 >conftest.err
15810 rm -f conftest.er1
15811 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15813 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015814 { ac_try='test -z "$ac_c_werror_flag"
15815 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15817 (eval $ac_try) 2>&5
15818 ac_status=$?
15819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15820 (exit $ac_status); }; } &&
15821 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15823 (eval $ac_try) 2>&5
15824 ac_status=$?
15825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15826 (exit $ac_status); }; }; then
15827 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015828else
Martin v. Löwis11437992002-04-12 09:54:03 +000015829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015830sed 's/^/| /' conftest.$ac_ext >&5
15831
Martin v. Löwis11437992002-04-12 09:54:03 +000015832eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015833fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015834rm -f conftest.err conftest.$ac_objext \
15835 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015837echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15838echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15839if test `eval echo '${'$as_ac_var'}'` = yes; then
15840 cat >>confdefs.h <<_ACEOF
15841#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15842_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015843
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015844fi
15845done
15846
Michael W. Hudson54241132001-12-07 15:38:26 +000015847
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015848# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015849echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15850echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15851if test "${ac_cv_header_time+set}" = set; then
15852 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015853else
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015855/* confdefs.h. */
15856_ACEOF
15857cat confdefs.h >>conftest.$ac_ext
15858cat >>conftest.$ac_ext <<_ACEOF
15859/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015860#include <sys/types.h>
15861#include <sys/time.h>
15862#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015863
Martin v. Löwis11437992002-04-12 09:54:03 +000015864int
15865main ()
15866{
15867if ((struct tm *) 0)
15868return 0;
15869 ;
15870 return 0;
15871}
15872_ACEOF
15873rm -f conftest.$ac_objext
15874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015875 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015877 grep -v '^ *+' conftest.er1 >conftest.err
15878 rm -f conftest.er1
15879 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15881 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015882 { ac_try='test -z "$ac_c_werror_flag"
15883 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15885 (eval $ac_try) 2>&5
15886 ac_status=$?
15887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15888 (exit $ac_status); }; } &&
15889 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15891 (eval $ac_try) 2>&5
15892 ac_status=$?
15893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15894 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015895 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015896else
Martin v. Löwis11437992002-04-12 09:54:03 +000015897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015898sed 's/^/| /' conftest.$ac_ext >&5
15899
Martin v. Löwis11437992002-04-12 09:54:03 +000015900ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015901fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015902rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015903fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015904echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15905echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015906if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015907
15908cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015909#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015910_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015911
15912fi
15913
Martin v. Löwis11437992002-04-12 09:54:03 +000015914echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15915echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
15916if test "${ac_cv_struct_tm+set}" = set; then
15917 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015918else
Martin v. Löwis11437992002-04-12 09:54:03 +000015919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015920/* confdefs.h. */
15921_ACEOF
15922cat confdefs.h >>conftest.$ac_ext
15923cat >>conftest.$ac_ext <<_ACEOF
15924/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015925#include <sys/types.h>
15926#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015927
Martin v. Löwis11437992002-04-12 09:54:03 +000015928int
15929main ()
15930{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015931struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000015932 ;
15933 return 0;
15934}
15935_ACEOF
15936rm -f conftest.$ac_objext
15937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015938 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015940 grep -v '^ *+' conftest.er1 >conftest.err
15941 rm -f conftest.er1
15942 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15944 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015945 { ac_try='test -z "$ac_c_werror_flag"
15946 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15948 (eval $ac_try) 2>&5
15949 ac_status=$?
15950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15951 (exit $ac_status); }; } &&
15952 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15954 (eval $ac_try) 2>&5
15955 ac_status=$?
15956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15957 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015958 ac_cv_struct_tm=time.h
15959else
Martin v. Löwis11437992002-04-12 09:54:03 +000015960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015961sed 's/^/| /' conftest.$ac_ext >&5
15962
Martin v. Löwis11437992002-04-12 09:54:03 +000015963ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015964fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015965rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015967echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15968echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015969if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015970
15971cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015972#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015973_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015974
15975fi
15976
Martin v. Löwis11437992002-04-12 09:54:03 +000015977echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
15978echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
15979if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
15980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015981else
Martin v. Löwis11437992002-04-12 09:54:03 +000015982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015983/* confdefs.h. */
15984_ACEOF
15985cat confdefs.h >>conftest.$ac_ext
15986cat >>conftest.$ac_ext <<_ACEOF
15987/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015988#include <sys/types.h>
15989#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015990
15991
Martin v. Löwis11437992002-04-12 09:54:03 +000015992int
15993main ()
15994{
15995static struct tm ac_aggr;
15996if (ac_aggr.tm_zone)
15997return 0;
15998 ;
15999 return 0;
16000}
16001_ACEOF
16002rm -f conftest.$ac_objext
16003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016004 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016006 grep -v '^ *+' conftest.er1 >conftest.err
16007 rm -f conftest.er1
16008 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16010 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016011 { ac_try='test -z "$ac_c_werror_flag"
16012 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16014 (eval $ac_try) 2>&5
16015 ac_status=$?
16016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16017 (exit $ac_status); }; } &&
16018 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16020 (eval $ac_try) 2>&5
16021 ac_status=$?
16022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16023 (exit $ac_status); }; }; then
16024 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016025else
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016027sed 's/^/| /' conftest.$ac_ext >&5
16028
16029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016030/* confdefs.h. */
16031_ACEOF
16032cat confdefs.h >>conftest.$ac_ext
16033cat >>conftest.$ac_ext <<_ACEOF
16034/* end confdefs.h. */
16035#include <sys/types.h>
16036#include <$ac_cv_struct_tm>
16037
16038
16039int
16040main ()
16041{
16042static struct tm ac_aggr;
16043if (sizeof ac_aggr.tm_zone)
16044return 0;
16045 ;
16046 return 0;
16047}
16048_ACEOF
16049rm -f conftest.$ac_objext
16050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016051 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016053 grep -v '^ *+' conftest.er1 >conftest.err
16054 rm -f conftest.er1
16055 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16057 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016058 { ac_try='test -z "$ac_c_werror_flag"
16059 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16061 (eval $ac_try) 2>&5
16062 ac_status=$?
16063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16064 (exit $ac_status); }; } &&
16065 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16067 (eval $ac_try) 2>&5
16068 ac_status=$?
16069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16070 (exit $ac_status); }; }; then
16071 ac_cv_member_struct_tm_tm_zone=yes
16072else
16073 echo "$as_me: failed program was:" >&5
16074sed 's/^/| /' conftest.$ac_ext >&5
16075
Martin v. Löwis11437992002-04-12 09:54:03 +000016076ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016077fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016078rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016079fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016080rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016082echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16083echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16084if test $ac_cv_member_struct_tm_tm_zone = yes; then
16085
16086cat >>confdefs.h <<_ACEOF
16087#define HAVE_STRUCT_TM_TM_ZONE 1
16088_ACEOF
16089
16090
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016091fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016092
Martin v. Löwis11437992002-04-12 09:54:03 +000016093if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16094
16095cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016096#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016097_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016098
16099else
Martin v. Löwis11437992002-04-12 09:54:03 +000016100 echo "$as_me:$LINENO: checking for tzname" >&5
16101echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16102if test "${ac_cv_var_tzname+set}" = set; then
16103 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016104else
Martin v. Löwis11437992002-04-12 09:54:03 +000016105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016106/* confdefs.h. */
16107_ACEOF
16108cat confdefs.h >>conftest.$ac_ext
16109cat >>conftest.$ac_ext <<_ACEOF
16110/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016111#include <time.h>
16112#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016113extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016115
Martin v. Löwis11437992002-04-12 09:54:03 +000016116int
16117main ()
16118{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016119atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000016120 ;
16121 return 0;
16122}
16123_ACEOF
16124rm -f conftest.$ac_objext conftest$ac_exeext
16125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016126 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016128 grep -v '^ *+' conftest.er1 >conftest.err
16129 rm -f conftest.er1
16130 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16132 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016133 { ac_try='test -z "$ac_c_werror_flag"
16134 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16136 (eval $ac_try) 2>&5
16137 ac_status=$?
16138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16139 (exit $ac_status); }; } &&
16140 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16142 (eval $ac_try) 2>&5
16143 ac_status=$?
16144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16145 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016146 ac_cv_var_tzname=yes
16147else
Martin v. Löwis11437992002-04-12 09:54:03 +000016148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016149sed 's/^/| /' conftest.$ac_ext >&5
16150
Martin v. Löwis11437992002-04-12 09:54:03 +000016151ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016152fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016153rm -f conftest.err conftest.$ac_objext \
16154 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000016155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016156echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16157echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016158 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016159
16160cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016161#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016162_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016163
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016164 fi
16165fi
16166
Martin v. Löwis11437992002-04-12 09:54:03 +000016167echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
16168echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
16169if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
16170 echo $ECHO_N "(cached) $ECHO_C" >&6
16171else
16172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016173/* confdefs.h. */
16174_ACEOF
16175cat confdefs.h >>conftest.$ac_ext
16176cat >>conftest.$ac_ext <<_ACEOF
16177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016178$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016179int
16180main ()
16181{
16182static struct stat ac_aggr;
16183if (ac_aggr.st_rdev)
16184return 0;
16185 ;
16186 return 0;
16187}
16188_ACEOF
16189rm -f conftest.$ac_objext
16190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016191 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016193 grep -v '^ *+' conftest.er1 >conftest.err
16194 rm -f conftest.er1
16195 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16197 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016198 { ac_try='test -z "$ac_c_werror_flag"
16199 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16201 (eval $ac_try) 2>&5
16202 ac_status=$?
16203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16204 (exit $ac_status); }; } &&
16205 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16207 (eval $ac_try) 2>&5
16208 ac_status=$?
16209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210 (exit $ac_status); }; }; then
16211 ac_cv_member_struct_stat_st_rdev=yes
16212else
16213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016214sed 's/^/| /' conftest.$ac_ext >&5
16215
16216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016217/* confdefs.h. */
16218_ACEOF
16219cat confdefs.h >>conftest.$ac_ext
16220cat >>conftest.$ac_ext <<_ACEOF
16221/* end confdefs.h. */
16222$ac_includes_default
16223int
16224main ()
16225{
16226static struct stat ac_aggr;
16227if (sizeof ac_aggr.st_rdev)
16228return 0;
16229 ;
16230 return 0;
16231}
16232_ACEOF
16233rm -f conftest.$ac_objext
16234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016235 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016236 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016237 grep -v '^ *+' conftest.er1 >conftest.err
16238 rm -f conftest.er1
16239 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16241 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016242 { ac_try='test -z "$ac_c_werror_flag"
16243 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16245 (eval $ac_try) 2>&5
16246 ac_status=$?
16247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16248 (exit $ac_status); }; } &&
16249 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16251 (eval $ac_try) 2>&5
16252 ac_status=$?
16253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16254 (exit $ac_status); }; }; then
16255 ac_cv_member_struct_stat_st_rdev=yes
16256else
16257 echo "$as_me: failed program was:" >&5
16258sed 's/^/| /' conftest.$ac_ext >&5
16259
Martin v. Löwis11437992002-04-12 09:54:03 +000016260ac_cv_member_struct_stat_st_rdev=no
16261fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016262rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016263fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016264rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016266echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
16267echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
16268if test $ac_cv_member_struct_stat_st_rdev = yes; then
16269
16270cat >>confdefs.h <<_ACEOF
16271#define HAVE_STRUCT_STAT_ST_RDEV 1
16272_ACEOF
16273
16274
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016275fi
16276
Martin v. Löwis11437992002-04-12 09:54:03 +000016277echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
16278echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
16279if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
16280 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016281else
Martin v. Löwis11437992002-04-12 09:54:03 +000016282 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016283/* confdefs.h. */
16284_ACEOF
16285cat confdefs.h >>conftest.$ac_ext
16286cat >>conftest.$ac_ext <<_ACEOF
16287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016288$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016289int
16290main ()
16291{
16292static struct stat ac_aggr;
16293if (ac_aggr.st_blksize)
16294return 0;
16295 ;
16296 return 0;
16297}
16298_ACEOF
16299rm -f conftest.$ac_objext
16300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016301 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016303 grep -v '^ *+' conftest.er1 >conftest.err
16304 rm -f conftest.er1
16305 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16307 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016308 { ac_try='test -z "$ac_c_werror_flag"
16309 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16311 (eval $ac_try) 2>&5
16312 ac_status=$?
16313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16314 (exit $ac_status); }; } &&
16315 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16317 (eval $ac_try) 2>&5
16318 ac_status=$?
16319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16320 (exit $ac_status); }; }; then
16321 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016322else
Martin v. Löwis11437992002-04-12 09:54:03 +000016323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016324sed 's/^/| /' conftest.$ac_ext >&5
16325
16326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016327/* confdefs.h. */
16328_ACEOF
16329cat confdefs.h >>conftest.$ac_ext
16330cat >>conftest.$ac_ext <<_ACEOF
16331/* end confdefs.h. */
16332$ac_includes_default
16333int
16334main ()
16335{
16336static struct stat ac_aggr;
16337if (sizeof ac_aggr.st_blksize)
16338return 0;
16339 ;
16340 return 0;
16341}
16342_ACEOF
16343rm -f conftest.$ac_objext
16344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016345 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016347 grep -v '^ *+' conftest.er1 >conftest.err
16348 rm -f conftest.er1
16349 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16351 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016352 { ac_try='test -z "$ac_c_werror_flag"
16353 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16355 (eval $ac_try) 2>&5
16356 ac_status=$?
16357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16358 (exit $ac_status); }; } &&
16359 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16361 (eval $ac_try) 2>&5
16362 ac_status=$?
16363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16364 (exit $ac_status); }; }; then
16365 ac_cv_member_struct_stat_st_blksize=yes
16366else
16367 echo "$as_me: failed program was:" >&5
16368sed 's/^/| /' conftest.$ac_ext >&5
16369
Martin v. Löwis11437992002-04-12 09:54:03 +000016370ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016371fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016372rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016373fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016374rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016376echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
16377echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
16378if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016379
Martin v. Löwis11437992002-04-12 09:54:03 +000016380cat >>confdefs.h <<_ACEOF
16381#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
16382_ACEOF
16383
16384
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016385fi
16386
Martin v. Löwis11437992002-04-12 09:54:03 +000016387echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
16388echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
16389if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
16390 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016391else
Martin v. Löwis11437992002-04-12 09:54:03 +000016392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016393/* confdefs.h. */
16394_ACEOF
16395cat confdefs.h >>conftest.$ac_ext
16396cat >>conftest.$ac_ext <<_ACEOF
16397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016398$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016399int
16400main ()
16401{
16402static struct stat ac_aggr;
16403if (ac_aggr.st_blocks)
16404return 0;
16405 ;
16406 return 0;
16407}
16408_ACEOF
16409rm -f conftest.$ac_objext
16410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016411 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016413 grep -v '^ *+' conftest.er1 >conftest.err
16414 rm -f conftest.er1
16415 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16417 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016418 { ac_try='test -z "$ac_c_werror_flag"
16419 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16421 (eval $ac_try) 2>&5
16422 ac_status=$?
16423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16424 (exit $ac_status); }; } &&
16425 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16427 (eval $ac_try) 2>&5
16428 ac_status=$?
16429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16430 (exit $ac_status); }; }; then
16431 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016432else
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016434sed 's/^/| /' conftest.$ac_ext >&5
16435
16436cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016437/* confdefs.h. */
16438_ACEOF
16439cat confdefs.h >>conftest.$ac_ext
16440cat >>conftest.$ac_ext <<_ACEOF
16441/* end confdefs.h. */
16442$ac_includes_default
16443int
16444main ()
16445{
16446static struct stat ac_aggr;
16447if (sizeof ac_aggr.st_blocks)
16448return 0;
16449 ;
16450 return 0;
16451}
16452_ACEOF
16453rm -f conftest.$ac_objext
16454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016455 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016457 grep -v '^ *+' conftest.er1 >conftest.err
16458 rm -f conftest.er1
16459 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16461 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016462 { ac_try='test -z "$ac_c_werror_flag"
16463 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16465 (eval $ac_try) 2>&5
16466 ac_status=$?
16467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16468 (exit $ac_status); }; } &&
16469 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16471 (eval $ac_try) 2>&5
16472 ac_status=$?
16473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16474 (exit $ac_status); }; }; then
16475 ac_cv_member_struct_stat_st_blocks=yes
16476else
16477 echo "$as_me: failed program was:" >&5
16478sed 's/^/| /' conftest.$ac_ext >&5
16479
Martin v. Löwis11437992002-04-12 09:54:03 +000016480ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016481fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016482rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016483fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016484rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016486echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
16487echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
16488if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016489
Martin v. Löwis11437992002-04-12 09:54:03 +000016490cat >>confdefs.h <<_ACEOF
16491#define HAVE_STRUCT_STAT_ST_BLOCKS 1
16492_ACEOF
16493
16494
16495cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016496#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016497_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016498
16499else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016500 case $LIBOBJS in
16501 "fileblocks.$ac_objext" | \
16502 *" fileblocks.$ac_objext" | \
16503 "fileblocks.$ac_objext "* | \
16504 *" fileblocks.$ac_objext "* ) ;;
16505 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
16506esac
16507
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016508fi
16509
Michael W. Hudson54241132001-12-07 15:38:26 +000016510
Martin v. Löwis11437992002-04-12 09:54:03 +000016511
16512echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
16513echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
16514if test "${ac_cv_header_time_altzone+set}" = set; then
16515 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016516else
Martin v. Löwis11437992002-04-12 09:54:03 +000016517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016518/* confdefs.h. */
16519_ACEOF
16520cat confdefs.h >>conftest.$ac_ext
16521cat >>conftest.$ac_ext <<_ACEOF
16522/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016523#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016524int
16525main ()
16526{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016527return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000016528 ;
16529 return 0;
16530}
16531_ACEOF
16532rm -f conftest.$ac_objext
16533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016534 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016536 grep -v '^ *+' conftest.er1 >conftest.err
16537 rm -f conftest.er1
16538 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16540 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016541 { ac_try='test -z "$ac_c_werror_flag"
16542 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16544 (eval $ac_try) 2>&5
16545 ac_status=$?
16546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16547 (exit $ac_status); }; } &&
16548 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16550 (eval $ac_try) 2>&5
16551 ac_status=$?
16552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16553 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016554 ac_cv_header_time_altzone=yes
16555else
Martin v. Löwis11437992002-04-12 09:54:03 +000016556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016557sed 's/^/| /' conftest.$ac_ext >&5
16558
Martin v. Löwis11437992002-04-12 09:54:03 +000016559ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000016560fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016561rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016562fi
16563
Martin v. Löwis11437992002-04-12 09:54:03 +000016564echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
16565echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016566if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016567
16568cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016569#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016570_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016571
16572fi
16573
Guido van Rossumda88dad1995-01-26 00:46:29 +000016574was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016575echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
16576echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
16577cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016578/* confdefs.h. */
16579_ACEOF
16580cat confdefs.h >>conftest.$ac_ext
16581cat >>conftest.$ac_ext <<_ACEOF
16582/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016583
16584#include <sys/types.h>
16585#include <sys/select.h>
16586#include <sys/time.h>
16587
Martin v. Löwis11437992002-04-12 09:54:03 +000016588int
16589main ()
16590{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016591;
Martin v. Löwis11437992002-04-12 09:54:03 +000016592 ;
16593 return 0;
16594}
16595_ACEOF
16596rm -f conftest.$ac_objext
16597if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016598 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016600 grep -v '^ *+' conftest.er1 >conftest.err
16601 rm -f conftest.er1
16602 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16604 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016605 { ac_try='test -z "$ac_c_werror_flag"
16606 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16608 (eval $ac_try) 2>&5
16609 ac_status=$?
16610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16611 (exit $ac_status); }; } &&
16612 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16614 (eval $ac_try) 2>&5
16615 ac_status=$?
16616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16617 (exit $ac_status); }; }; then
16618
16619
16620cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016621#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016622_ACEOF
16623
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016624 was_it_defined=yes
16625
Guido van Rossumf78abae1997-01-21 22:02:36 +000016626else
Martin v. Löwis11437992002-04-12 09:54:03 +000016627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016628sed 's/^/| /' conftest.$ac_ext >&5
16629
Guido van Rossum7f43da71994-08-01 12:15:30 +000016630fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016631rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016632echo "$as_me:$LINENO: result: $was_it_defined" >&5
16633echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000016634
Martin v. Löwis11437992002-04-12 09:54:03 +000016635echo "$as_me:$LINENO: checking for addrinfo" >&5
16636echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
16637if test "${ac_cv_struct_addrinfo+set}" = set; then
16638 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016639else
Martin v. Löwis11437992002-04-12 09:54:03 +000016640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016641/* confdefs.h. */
16642_ACEOF
16643cat confdefs.h >>conftest.$ac_ext
16644cat >>conftest.$ac_ext <<_ACEOF
16645/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016646
16647# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016648int
16649main ()
16650{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016651struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000016652 ;
16653 return 0;
16654}
16655_ACEOF
16656rm -f conftest.$ac_objext
16657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016658 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016660 grep -v '^ *+' conftest.er1 >conftest.err
16661 rm -f conftest.er1
16662 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16664 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016665 { ac_try='test -z "$ac_c_werror_flag"
16666 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16668 (eval $ac_try) 2>&5
16669 ac_status=$?
16670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16671 (exit $ac_status); }; } &&
16672 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16674 (eval $ac_try) 2>&5
16675 ac_status=$?
16676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16677 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016678 ac_cv_struct_addrinfo=yes
16679else
Martin v. Löwis11437992002-04-12 09:54:03 +000016680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016681sed 's/^/| /' conftest.$ac_ext >&5
16682
Martin v. Löwis11437992002-04-12 09:54:03 +000016683ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016684fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016685rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016686fi
16687
Martin v. Löwis11437992002-04-12 09:54:03 +000016688echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
16689echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016690if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016691
16692cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016693#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016694_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016695
16696fi
16697
Martin v. Löwis11437992002-04-12 09:54:03 +000016698echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
16699echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
16700if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
16701 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016702else
Martin v. Löwis11437992002-04-12 09:54:03 +000016703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016704/* confdefs.h. */
16705_ACEOF
16706cat confdefs.h >>conftest.$ac_ext
16707cat >>conftest.$ac_ext <<_ACEOF
16708/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016709
16710# include <sys/types.h>
16711# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016712int
16713main ()
16714{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016715struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000016716 ;
16717 return 0;
16718}
16719_ACEOF
16720rm -f conftest.$ac_objext
16721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016722 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016723 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016724 grep -v '^ *+' conftest.er1 >conftest.err
16725 rm -f conftest.er1
16726 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16728 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016729 { ac_try='test -z "$ac_c_werror_flag"
16730 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16732 (eval $ac_try) 2>&5
16733 ac_status=$?
16734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16735 (exit $ac_status); }; } &&
16736 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16738 (eval $ac_try) 2>&5
16739 ac_status=$?
16740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16741 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016742 ac_cv_struct_sockaddr_storage=yes
16743else
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016745sed 's/^/| /' conftest.$ac_ext >&5
16746
Martin v. Löwis11437992002-04-12 09:54:03 +000016747ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016748fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016749rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016750fi
16751
Martin v. Löwis11437992002-04-12 09:54:03 +000016752echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
16753echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016754if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016755
16756cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016757#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016758_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016759
16760fi
16761
Guido van Rossum627b2d71993-12-24 10:39:16 +000016762# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000016763
Michael W. Hudson54241132001-12-07 15:38:26 +000016764
Martin v. Löwis11437992002-04-12 09:54:03 +000016765echo "$as_me:$LINENO: checking whether char is unsigned" >&5
16766echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
16767if test "${ac_cv_c_char_unsigned+set}" = set; then
16768 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000016769else
Martin v. Löwis11437992002-04-12 09:54:03 +000016770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016771/* confdefs.h. */
16772_ACEOF
16773cat confdefs.h >>conftest.$ac_ext
16774cat >>conftest.$ac_ext <<_ACEOF
16775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016776$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016777int
16778main ()
16779{
16780static int test_array [1 - 2 * !(((char) -1) < 0)];
16781test_array [0] = 0
16782
16783 ;
16784 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016785}
Martin v. Löwis11437992002-04-12 09:54:03 +000016786_ACEOF
16787rm -f conftest.$ac_objext
16788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016789 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016791 grep -v '^ *+' conftest.er1 >conftest.err
16792 rm -f conftest.er1
16793 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16795 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016796 { ac_try='test -z "$ac_c_werror_flag"
16797 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16799 (eval $ac_try) 2>&5
16800 ac_status=$?
16801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16802 (exit $ac_status); }; } &&
16803 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16805 (eval $ac_try) 2>&5
16806 ac_status=$?
16807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16808 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016809 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016810else
16811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016812sed 's/^/| /' conftest.$ac_ext >&5
16813
Martin v. Löwis11437992002-04-12 09:54:03 +000016814ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016815fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016816rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016817fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016818echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16819echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016820if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016821 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016822#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016823_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016824
16825fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016826
Martin v. Löwis11437992002-04-12 09:54:03 +000016827echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
16828echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16829if test "${ac_cv_c_const+set}" = set; then
16830 echo $ECHO_N "(cached) $ECHO_C" >&6
16831else
16832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016833/* confdefs.h. */
16834_ACEOF
16835cat confdefs.h >>conftest.$ac_ext
16836cat >>conftest.$ac_ext <<_ACEOF
16837/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016838
Martin v. Löwis11437992002-04-12 09:54:03 +000016839int
16840main ()
16841{
16842/* FIXME: Include the comments suggested by Paul. */
16843#ifndef __cplusplus
16844 /* Ultrix mips cc rejects this. */
16845 typedef int charset[2];
16846 const charset x;
16847 /* SunOS 4.1.1 cc rejects this. */
16848 char const *const *ccp;
16849 char **p;
16850 /* NEC SVR4.0.2 mips cc rejects this. */
16851 struct point {int x, y;};
16852 static struct point const zero = {0,0};
16853 /* AIX XL C 1.02.0.0 rejects this.
16854 It does not let you subtract one const X* pointer from another in
16855 an arm of an if-expression whose if-part is not a constant
16856 expression */
16857 const char *g = "string";
16858 ccp = &g + (g ? g-g : 0);
16859 /* HPUX 7.0 cc rejects these. */
16860 ++ccp;
16861 p = (char**) ccp;
16862 ccp = (char const *const *) p;
16863 { /* SCO 3.2v4 cc rejects this. */
16864 char *t;
16865 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016866
Martin v. Löwis11437992002-04-12 09:54:03 +000016867 *t++ = 0;
16868 }
16869 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16870 int x[] = {25, 17};
16871 const int *foo = &x[0];
16872 ++foo;
16873 }
16874 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16875 typedef const int *iptr;
16876 iptr p = 0;
16877 ++p;
16878 }
16879 { /* AIX XL C 1.02.0.0 rejects this saying
16880 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16881 struct s { int j; const int *ap[3]; };
16882 struct s *b; b->j = 5;
16883 }
16884 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16885 const int foo = 10;
16886 }
16887#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016888
Martin v. Löwis11437992002-04-12 09:54:03 +000016889 ;
16890 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016891}
Martin v. Löwis11437992002-04-12 09:54:03 +000016892_ACEOF
16893rm -f conftest.$ac_objext
16894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016895 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016897 grep -v '^ *+' conftest.er1 >conftest.err
16898 rm -f conftest.er1
16899 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16901 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016902 { ac_try='test -z "$ac_c_werror_flag"
16903 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16905 (eval $ac_try) 2>&5
16906 ac_status=$?
16907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16908 (exit $ac_status); }; } &&
16909 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16911 (eval $ac_try) 2>&5
16912 ac_status=$?
16913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16914 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016915 ac_cv_c_const=yes
16916else
Martin v. Löwis11437992002-04-12 09:54:03 +000016917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016918sed 's/^/| /' conftest.$ac_ext >&5
16919
Martin v. Löwis11437992002-04-12 09:54:03 +000016920ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016921fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016922rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016923fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016924echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
16925echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016926if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016927
16928cat >>confdefs.h <<\_ACEOF
16929#define const
16930_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016931
16932fi
16933
Michael W. Hudson54241132001-12-07 15:38:26 +000016934
Guido van Rossumda88dad1995-01-26 00:46:29 +000016935works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016936echo "$as_me:$LINENO: checking for working volatile" >&5
16937echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
16938cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016939/* confdefs.h. */
16940_ACEOF
16941cat confdefs.h >>conftest.$ac_ext
16942cat >>conftest.$ac_ext <<_ACEOF
16943/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016944
Martin v. Löwis11437992002-04-12 09:54:03 +000016945int
16946main ()
16947{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016948volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016949 ;
16950 return 0;
16951}
16952_ACEOF
16953rm -f conftest.$ac_objext
16954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016955 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016957 grep -v '^ *+' conftest.er1 >conftest.err
16958 rm -f conftest.er1
16959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16961 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016962 { ac_try='test -z "$ac_c_werror_flag"
16963 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16965 (eval $ac_try) 2>&5
16966 ac_status=$?
16967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16968 (exit $ac_status); }; } &&
16969 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16971 (eval $ac_try) 2>&5
16972 ac_status=$?
16973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16974 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016975 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016976else
Martin v. Löwis11437992002-04-12 09:54:03 +000016977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016978sed 's/^/| /' conftest.$ac_ext >&5
16979
Martin v. Löwis11437992002-04-12 09:54:03 +000016980
16981cat >>confdefs.h <<\_ACEOF
16982#define volatile
16983_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016984
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016985
Guido van Rossum627b2d71993-12-24 10:39:16 +000016986fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016987rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016988echo "$as_me:$LINENO: result: $works" >&5
16989echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016990
Guido van Rossumda88dad1995-01-26 00:46:29 +000016991works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016992echo "$as_me:$LINENO: checking for working signed char" >&5
16993echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
16994cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016995/* confdefs.h. */
16996_ACEOF
16997cat confdefs.h >>conftest.$ac_ext
16998cat >>conftest.$ac_ext <<_ACEOF
16999/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017000
Martin v. Löwis11437992002-04-12 09:54:03 +000017001int
17002main ()
17003{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017004signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000017005 ;
17006 return 0;
17007}
17008_ACEOF
17009rm -f conftest.$ac_objext
17010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017011 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017013 grep -v '^ *+' conftest.er1 >conftest.err
17014 rm -f conftest.er1
17015 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17017 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017018 { ac_try='test -z "$ac_c_werror_flag"
17019 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17021 (eval $ac_try) 2>&5
17022 ac_status=$?
17023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17024 (exit $ac_status); }; } &&
17025 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17027 (eval $ac_try) 2>&5
17028 ac_status=$?
17029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17030 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017031 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017032else
Martin v. Löwis11437992002-04-12 09:54:03 +000017033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017034sed 's/^/| /' conftest.$ac_ext >&5
17035
Martin v. Löwis11437992002-04-12 09:54:03 +000017036
17037cat >>confdefs.h <<\_ACEOF
17038#define signed
17039_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017040
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017041
Guido van Rossum7f43da71994-08-01 12:15:30 +000017042fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017043rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017044echo "$as_me:$LINENO: result: $works" >&5
17045echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017046
Guido van Rossumda88dad1995-01-26 00:46:29 +000017047have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017048echo "$as_me:$LINENO: checking for prototypes" >&5
17049echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
17050cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017051/* confdefs.h. */
17052_ACEOF
17053cat confdefs.h >>conftest.$ac_ext
17054cat >>conftest.$ac_ext <<_ACEOF
17055/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017056int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017057int
17058main ()
17059{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017060return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000017061 ;
17062 return 0;
17063}
17064_ACEOF
17065rm -f conftest.$ac_objext
17066if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017067 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017069 grep -v '^ *+' conftest.er1 >conftest.err
17070 rm -f conftest.er1
17071 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17073 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017074 { ac_try='test -z "$ac_c_werror_flag"
17075 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17077 (eval $ac_try) 2>&5
17078 ac_status=$?
17079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17080 (exit $ac_status); }; } &&
17081 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17083 (eval $ac_try) 2>&5
17084 ac_status=$?
17085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17086 (exit $ac_status); }; }; then
17087
17088
17089cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017090#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017091_ACEOF
17092
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017093 have_prototypes=yes
17094
Guido van Rossumf78abae1997-01-21 22:02:36 +000017095else
Martin v. Löwis11437992002-04-12 09:54:03 +000017096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017097sed 's/^/| /' conftest.$ac_ext >&5
17098
Guido van Rossum7f43da71994-08-01 12:15:30 +000017099fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017100rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017101echo "$as_me:$LINENO: result: $have_prototypes" >&5
17102echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017103
Guido van Rossumda88dad1995-01-26 00:46:29 +000017104works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017105echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
17106echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
17107cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017108/* confdefs.h. */
17109_ACEOF
17110cat confdefs.h >>conftest.$ac_ext
17111cat >>conftest.$ac_ext <<_ACEOF
17112/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017113
17114#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000017115int foo(int x, ...) {
17116 va_list va;
17117 va_start(va, x);
17118 va_arg(va, int);
17119 va_arg(va, char *);
17120 va_arg(va, double);
17121 return 0;
17122}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017123
Martin v. Löwis11437992002-04-12 09:54:03 +000017124int
17125main ()
17126{
Guido van Rossum90eea071996-08-30 20:58:57 +000017127return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000017128 ;
17129 return 0;
17130}
17131_ACEOF
17132rm -f conftest.$ac_objext
17133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017134 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017136 grep -v '^ *+' conftest.er1 >conftest.err
17137 rm -f conftest.er1
17138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17140 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017141 { ac_try='test -z "$ac_c_werror_flag"
17142 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17144 (eval $ac_try) 2>&5
17145 ac_status=$?
17146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17147 (exit $ac_status); }; } &&
17148 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17150 (eval $ac_try) 2>&5
17151 ac_status=$?
17152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17153 (exit $ac_status); }; }; then
17154
17155
17156cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017157#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017158_ACEOF
17159
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017160 works=yes
17161
Guido van Rossumf78abae1997-01-21 22:02:36 +000017162else
Martin v. Löwis11437992002-04-12 09:54:03 +000017163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017164sed 's/^/| /' conftest.$ac_ext >&5
17165
Guido van Rossum627b2d71993-12-24 10:39:16 +000017166fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017167rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017168echo "$as_me:$LINENO: result: $works" >&5
17169echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017170
Martin v. Löwisd6320502004-08-12 13:45:08 +000017171# check for socketpair
17172echo "$as_me:$LINENO: checking for socketpair" >&5
17173echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
17174cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000017175/* confdefs.h. */
17176_ACEOF
17177cat confdefs.h >>conftest.$ac_ext
17178cat >>conftest.$ac_ext <<_ACEOF
17179/* end confdefs.h. */
17180
17181#include <sys/types.h>
17182#include <sys/socket.h>
17183
17184int
17185main ()
17186{
17187void *x=socketpair
17188 ;
17189 return 0;
17190}
17191_ACEOF
17192rm -f conftest.$ac_objext
17193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017194 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000017195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017196 grep -v '^ *+' conftest.er1 >conftest.err
17197 rm -f conftest.er1
17198 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000017199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17200 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017201 { ac_try='test -z "$ac_c_werror_flag"
17202 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17204 (eval $ac_try) 2>&5
17205 ac_status=$?
17206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17207 (exit $ac_status); }; } &&
17208 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000017209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17210 (eval $ac_try) 2>&5
17211 ac_status=$?
17212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17213 (exit $ac_status); }; }; then
17214
17215cat >>confdefs.h <<\_ACEOF
17216#define HAVE_SOCKETPAIR 1
17217_ACEOF
17218
17219 echo "$as_me:$LINENO: result: yes" >&5
17220echo "${ECHO_T}yes" >&6
17221else
17222 echo "$as_me: failed program was:" >&5
17223sed 's/^/| /' conftest.$ac_ext >&5
17224
17225echo "$as_me:$LINENO: result: no" >&5
17226echo "${ECHO_T}no" >&6
17227
17228fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017229rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000017230
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017231# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000017232echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
17233echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
17234cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017235/* confdefs.h. */
17236_ACEOF
17237cat confdefs.h >>conftest.$ac_ext
17238cat >>conftest.$ac_ext <<_ACEOF
17239/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017240#include <sys/types.h>
17241#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017242int
17243main ()
17244{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017245struct sockaddr x;
17246x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017247 ;
17248 return 0;
17249}
17250_ACEOF
17251rm -f conftest.$ac_objext
17252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017253 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017254 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017255 grep -v '^ *+' conftest.er1 >conftest.err
17256 rm -f conftest.er1
17257 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17259 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017260 { ac_try='test -z "$ac_c_werror_flag"
17261 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17263 (eval $ac_try) 2>&5
17264 ac_status=$?
17265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17266 (exit $ac_status); }; } &&
17267 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17269 (eval $ac_try) 2>&5
17270 ac_status=$?
17271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17272 (exit $ac_status); }; }; then
17273 echo "$as_me:$LINENO: result: yes" >&5
17274echo "${ECHO_T}yes" >&6
17275
17276cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017277#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017278_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017279
17280else
Martin v. Löwis11437992002-04-12 09:54:03 +000017281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017282sed 's/^/| /' conftest.$ac_ext >&5
17283
Martin v. Löwis11437992002-04-12 09:54:03 +000017284echo "$as_me:$LINENO: result: no" >&5
17285echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017286fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017287rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017288
Guido van Rossumda88dad1995-01-26 00:46:29 +000017289va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017290echo "$as_me:$LINENO: checking whether va_list is an array" >&5
17291echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
17292cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017293/* confdefs.h. */
17294_ACEOF
17295cat confdefs.h >>conftest.$ac_ext
17296cat >>conftest.$ac_ext <<_ACEOF
17297/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017298
17299#ifdef HAVE_STDARG_PROTOTYPES
17300#include <stdarg.h>
17301#else
17302#include <varargs.h>
17303#endif
17304
Martin v. Löwis11437992002-04-12 09:54:03 +000017305int
17306main ()
17307{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017308va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000017309 ;
17310 return 0;
17311}
17312_ACEOF
17313rm -f conftest.$ac_objext
17314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017315 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017317 grep -v '^ *+' conftest.er1 >conftest.err
17318 rm -f conftest.er1
17319 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17321 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017322 { ac_try='test -z "$ac_c_werror_flag"
17323 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17325 (eval $ac_try) 2>&5
17326 ac_status=$?
17327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17328 (exit $ac_status); }; } &&
17329 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17331 (eval $ac_try) 2>&5
17332 ac_status=$?
17333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17334 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017335 :
17336else
Martin v. Löwis11437992002-04-12 09:54:03 +000017337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017338sed 's/^/| /' conftest.$ac_ext >&5
17339
Martin v. Löwis11437992002-04-12 09:54:03 +000017340
17341
17342cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017343#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017344_ACEOF
17345
Guido van Rossumda88dad1995-01-26 00:46:29 +000017346 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017347
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017348fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017349rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017350echo "$as_me:$LINENO: result: $va_list_is_array" >&5
17351echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017352
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017353# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000017354
17355
17356
17357echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
17358echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
17359if test "${ac_cv_func_gethostbyname_r+set}" = set; then
17360 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017361else
Martin v. Löwis11437992002-04-12 09:54:03 +000017362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017363/* confdefs.h. */
17364_ACEOF
17365cat confdefs.h >>conftest.$ac_ext
17366cat >>conftest.$ac_ext <<_ACEOF
17367/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017368/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017369 which can conflict with char gethostbyname_r (); below.
17370 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017371 <limits.h> exists even on freestanding compilers. Under hpux,
17372 including <limits.h> includes <sys/time.h> and causes problems
17373 checking for functions defined therein. */
17374#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017375# include <limits.h>
17376#else
17377# include <assert.h>
17378#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017379/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017380#ifdef __cplusplus
17381extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017382{
Martin v. Löwis11437992002-04-12 09:54:03 +000017383#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017384/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017385 builtin and then its argument prototype would still apply. */
17386char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017387/* The GNU C library defines this for functions which it implements
17388 to always fail with ENOSYS. Some functions are actually named
17389 something starting with __ and the normal name is an alias. */
17390#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
17391choke me
17392#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017393char (*f) () = gethostbyname_r;
17394#endif
17395#ifdef __cplusplus
17396}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017397#endif
17398
Skip Montanaro6dead952003-09-25 14:50:04 +000017399int
17400main ()
17401{
17402return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 ;
17404 return 0;
17405}
17406_ACEOF
17407rm -f conftest.$ac_objext conftest$ac_exeext
17408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017409 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017411 grep -v '^ *+' conftest.er1 >conftest.err
17412 rm -f conftest.er1
17413 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17415 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017416 { ac_try='test -z "$ac_c_werror_flag"
17417 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17419 (eval $ac_try) 2>&5
17420 ac_status=$?
17421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17422 (exit $ac_status); }; } &&
17423 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17425 (eval $ac_try) 2>&5
17426 ac_status=$?
17427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17428 (exit $ac_status); }; }; then
17429 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017430else
Martin v. Löwis11437992002-04-12 09:54:03 +000017431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017432sed 's/^/| /' conftest.$ac_ext >&5
17433
Martin v. Löwis11437992002-04-12 09:54:03 +000017434ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017435fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017436rm -f conftest.err conftest.$ac_objext \
17437 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017438fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017439echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
17440echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
17441if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017442
Martin v. Löwis11437992002-04-12 09:54:03 +000017443 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017444#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017445_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017446
Martin v. Löwis11437992002-04-12 09:54:03 +000017447 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
17448echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017449 OLD_CFLAGS=$CFLAGS
17450 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017452/* confdefs.h. */
17453_ACEOF
17454cat confdefs.h >>conftest.$ac_ext
17455cat >>conftest.$ac_ext <<_ACEOF
17456/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017457
17458# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017459
Martin v. Löwis11437992002-04-12 09:54:03 +000017460int
17461main ()
17462{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017463
17464 char *name;
17465 struct hostent *he, *res;
17466 char buffer[2048];
17467 int buflen = 2048;
17468 int h_errnop;
17469
17470 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017471
17472 ;
17473 return 0;
17474}
17475_ACEOF
17476rm -f conftest.$ac_objext
17477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017478 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017480 grep -v '^ *+' conftest.er1 >conftest.err
17481 rm -f conftest.er1
17482 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17484 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017485 { ac_try='test -z "$ac_c_werror_flag"
17486 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17488 (eval $ac_try) 2>&5
17489 ac_status=$?
17490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17491 (exit $ac_status); }; } &&
17492 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17494 (eval $ac_try) 2>&5
17495 ac_status=$?
17496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17497 (exit $ac_status); }; }; then
17498
17499 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017500#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017501_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017502
Martin v. Löwis11437992002-04-12 09:54:03 +000017503
17504cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017505#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017506_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017507
Martin v. Löwis11437992002-04-12 09:54:03 +000017508 echo "$as_me:$LINENO: result: yes" >&5
17509echo "${ECHO_T}yes" >&6
17510
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017511else
Martin v. Löwis11437992002-04-12 09:54:03 +000017512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017513sed 's/^/| /' conftest.$ac_ext >&5
17514
Martin v. Löwis11437992002-04-12 09:54:03 +000017515
17516 echo "$as_me:$LINENO: result: no" >&5
17517echo "${ECHO_T}no" >&6
17518 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
17519echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
17520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017521/* confdefs.h. */
17522_ACEOF
17523cat confdefs.h >>conftest.$ac_ext
17524cat >>conftest.$ac_ext <<_ACEOF
17525/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017526
17527# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017528
Martin v. Löwis11437992002-04-12 09:54:03 +000017529int
17530main ()
17531{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017532
17533 char *name;
17534 struct hostent *he;
17535 char buffer[2048];
17536 int buflen = 2048;
17537 int h_errnop;
17538
17539 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017540
17541 ;
17542 return 0;
17543}
17544_ACEOF
17545rm -f conftest.$ac_objext
17546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017547 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017549 grep -v '^ *+' conftest.er1 >conftest.err
17550 rm -f conftest.er1
17551 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17553 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017554 { ac_try='test -z "$ac_c_werror_flag"
17555 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17557 (eval $ac_try) 2>&5
17558 ac_status=$?
17559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17560 (exit $ac_status); }; } &&
17561 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17563 (eval $ac_try) 2>&5
17564 ac_status=$?
17565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17566 (exit $ac_status); }; }; then
17567
17568 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017569#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017570_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017571
Martin v. Löwis11437992002-04-12 09:54:03 +000017572
17573cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017574#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017575_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017576
Martin v. Löwis11437992002-04-12 09:54:03 +000017577 echo "$as_me:$LINENO: result: yes" >&5
17578echo "${ECHO_T}yes" >&6
17579
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017580else
Martin v. Löwis11437992002-04-12 09:54:03 +000017581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017582sed 's/^/| /' conftest.$ac_ext >&5
17583
Martin v. Löwis11437992002-04-12 09:54:03 +000017584
17585 echo "$as_me:$LINENO: result: no" >&5
17586echo "${ECHO_T}no" >&6
17587 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
17588echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
17589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017590/* confdefs.h. */
17591_ACEOF
17592cat confdefs.h >>conftest.$ac_ext
17593cat >>conftest.$ac_ext <<_ACEOF
17594/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017595
17596# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017597
Martin v. Löwis11437992002-04-12 09:54:03 +000017598int
17599main ()
17600{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017601
17602 char *name;
17603 struct hostent *he;
17604 struct hostent_data data;
17605
17606 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000017607
17608 ;
17609 return 0;
17610}
17611_ACEOF
17612rm -f conftest.$ac_objext
17613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017614 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017616 grep -v '^ *+' conftest.er1 >conftest.err
17617 rm -f conftest.er1
17618 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17620 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017621 { ac_try='test -z "$ac_c_werror_flag"
17622 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17624 (eval $ac_try) 2>&5
17625 ac_status=$?
17626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17627 (exit $ac_status); }; } &&
17628 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17630 (eval $ac_try) 2>&5
17631 ac_status=$?
17632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17633 (exit $ac_status); }; }; then
17634
17635 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017636#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017637_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017638
Martin v. Löwis11437992002-04-12 09:54:03 +000017639
17640cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017641#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017642_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017643
Martin v. Löwis11437992002-04-12 09:54:03 +000017644 echo "$as_me:$LINENO: result: yes" >&5
17645echo "${ECHO_T}yes" >&6
17646
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017647else
Martin v. Löwis11437992002-04-12 09:54:03 +000017648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017649sed 's/^/| /' conftest.$ac_ext >&5
17650
Martin v. Löwis11437992002-04-12 09:54:03 +000017651
17652 echo "$as_me:$LINENO: result: no" >&5
17653echo "${ECHO_T}no" >&6
17654
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017655fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017656rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017657
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017658fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017659rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017660
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017661fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017662rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017663 CFLAGS=$OLD_CFLAGS
17664
17665else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017666
Martin v. Löwis11437992002-04-12 09:54:03 +000017667
17668for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000017669do
Martin v. Löwis11437992002-04-12 09:54:03 +000017670as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17671echo "$as_me:$LINENO: checking for $ac_func" >&5
17672echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17673if eval "test \"\${$as_ac_var+set}\" = set"; then
17674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017675else
Martin v. Löwis11437992002-04-12 09:54:03 +000017676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017677/* confdefs.h. */
17678_ACEOF
17679cat confdefs.h >>conftest.$ac_ext
17680cat >>conftest.$ac_ext <<_ACEOF
17681/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017682/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017683 which can conflict with char $ac_func (); below.
17684 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017685 <limits.h> exists even on freestanding compilers. Under hpux,
17686 including <limits.h> includes <sys/time.h> and causes problems
17687 checking for functions defined therein. */
17688#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017689# include <limits.h>
17690#else
17691# include <assert.h>
17692#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017693/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017694#ifdef __cplusplus
17695extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017696{
Martin v. Löwis11437992002-04-12 09:54:03 +000017697#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017698/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017699 builtin and then its argument prototype would still apply. */
17700char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017701/* The GNU C library defines this for functions which it implements
17702 to always fail with ENOSYS. Some functions are actually named
17703 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000017704#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017705choke me
17706#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017707char (*f) () = $ac_func;
17708#endif
17709#ifdef __cplusplus
17710}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017711#endif
17712
Skip Montanaro6dead952003-09-25 14:50:04 +000017713int
17714main ()
17715{
17716return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017717 ;
17718 return 0;
17719}
17720_ACEOF
17721rm -f conftest.$ac_objext conftest$ac_exeext
17722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017723 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017725 grep -v '^ *+' conftest.er1 >conftest.err
17726 rm -f conftest.er1
17727 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17729 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017730 { ac_try='test -z "$ac_c_werror_flag"
17731 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17733 (eval $ac_try) 2>&5
17734 ac_status=$?
17735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17736 (exit $ac_status); }; } &&
17737 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17739 (eval $ac_try) 2>&5
17740 ac_status=$?
17741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17742 (exit $ac_status); }; }; then
17743 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017744else
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017746sed 's/^/| /' conftest.$ac_ext >&5
17747
Martin v. Löwis11437992002-04-12 09:54:03 +000017748eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017749fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017750rm -f conftest.err conftest.$ac_objext \
17751 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017752fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017753echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17754echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17755if test `eval echo '${'$as_ac_var'}'` = yes; then
17756 cat >>confdefs.h <<_ACEOF
17757#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17758_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017759
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017760fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017761done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017762
Michael W. Hudson54241132001-12-07 15:38:26 +000017763
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017764fi
17765
Michael W. Hudson54241132001-12-07 15:38:26 +000017766
17767
17768
17769
17770
17771
Guido van Rossum627b2d71993-12-24 10:39:16 +000017772# checks for system services
17773# (none yet)
17774
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017775# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000017776echo "$as_me:$LINENO: checking for __fpu_control" >&5
17777echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
17778if test "${ac_cv_func___fpu_control+set}" = set; then
17779 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017780else
Martin v. Löwis11437992002-04-12 09:54:03 +000017781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017782/* confdefs.h. */
17783_ACEOF
17784cat confdefs.h >>conftest.$ac_ext
17785cat >>conftest.$ac_ext <<_ACEOF
17786/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017787/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017788 which can conflict with char __fpu_control (); below.
17789 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017790 <limits.h> exists even on freestanding compilers. Under hpux,
17791 including <limits.h> includes <sys/time.h> and causes problems
17792 checking for functions defined therein. */
17793#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017794# include <limits.h>
17795#else
17796# include <assert.h>
17797#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017798/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017799#ifdef __cplusplus
17800extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017801{
Martin v. Löwis11437992002-04-12 09:54:03 +000017802#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017803/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017804 builtin and then its argument prototype would still apply. */
17805char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017806/* The GNU C library defines this for functions which it implements
17807 to always fail with ENOSYS. Some functions are actually named
17808 something starting with __ and the normal name is an alias. */
17809#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
17810choke me
17811#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017812char (*f) () = __fpu_control;
17813#endif
17814#ifdef __cplusplus
17815}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017816#endif
17817
Skip Montanaro6dead952003-09-25 14:50:04 +000017818int
17819main ()
17820{
17821return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000017822 ;
17823 return 0;
17824}
17825_ACEOF
17826rm -f conftest.$ac_objext conftest$ac_exeext
17827if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017828 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017830 grep -v '^ *+' conftest.er1 >conftest.err
17831 rm -f conftest.er1
17832 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17834 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017835 { ac_try='test -z "$ac_c_werror_flag"
17836 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17838 (eval $ac_try) 2>&5
17839 ac_status=$?
17840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17841 (exit $ac_status); }; } &&
17842 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17844 (eval $ac_try) 2>&5
17845 ac_status=$?
17846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17847 (exit $ac_status); }; }; then
17848 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017849else
Martin v. Löwis11437992002-04-12 09:54:03 +000017850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017851sed 's/^/| /' conftest.$ac_ext >&5
17852
Martin v. Löwis11437992002-04-12 09:54:03 +000017853ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017854fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017855rm -f conftest.err conftest.$ac_objext \
17856 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017858echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
17859echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
17860if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017861 :
17862else
Martin v. Löwis11437992002-04-12 09:54:03 +000017863
17864echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
17865echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
17866if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
17867 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017868else
Martin v. Löwis11437992002-04-12 09:54:03 +000017869 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017870LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017871cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017872/* confdefs.h. */
17873_ACEOF
17874cat confdefs.h >>conftest.$ac_ext
17875cat >>conftest.$ac_ext <<_ACEOF
17876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017877
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017878/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017879#ifdef __cplusplus
17880extern "C"
17881#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017882/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017883 builtin and then its argument prototype would still apply. */
17884char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017885int
17886main ()
17887{
17888__fpu_control ();
17889 ;
17890 return 0;
17891}
17892_ACEOF
17893rm -f conftest.$ac_objext conftest$ac_exeext
17894if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017895 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017897 grep -v '^ *+' conftest.er1 >conftest.err
17898 rm -f conftest.er1
17899 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17901 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017902 { ac_try='test -z "$ac_c_werror_flag"
17903 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17905 (eval $ac_try) 2>&5
17906 ac_status=$?
17907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17908 (exit $ac_status); }; } &&
17909 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17911 (eval $ac_try) 2>&5
17912 ac_status=$?
17913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17914 (exit $ac_status); }; }; then
17915 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017916else
Martin v. Löwis11437992002-04-12 09:54:03 +000017917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017918sed 's/^/| /' conftest.$ac_ext >&5
17919
Martin v. Löwis11437992002-04-12 09:54:03 +000017920ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017921fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017922rm -f conftest.err conftest.$ac_objext \
17923 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017924LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017925fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017926echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
17927echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
17928if test $ac_cv_lib_ieee___fpu_control = yes; then
17929 cat >>confdefs.h <<_ACEOF
17930#define HAVE_LIBIEEE 1
17931_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017932
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017933 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017934
Guido van Rossum627b2d71993-12-24 10:39:16 +000017935fi
17936
Michael W. Hudson54241132001-12-07 15:38:26 +000017937
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017938fi
17939
Michael W. Hudson54241132001-12-07 15:38:26 +000017940
Guido van Rossum7f253911997-05-09 02:42:48 +000017941# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000017942echo "$as_me:$LINENO: checking for --with-fpectl" >&5
17943echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
17944
Guido van Rossum7f253911997-05-09 02:42:48 +000017945# Check whether --with-fpectl or --without-fpectl was given.
17946if test "${with_fpectl+set}" = set; then
17947 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000017948
Guido van Rossum7f253911997-05-09 02:42:48 +000017949if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017950then
17951
17952cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000017953#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017954_ACEOF
17955
17956 echo "$as_me:$LINENO: result: yes" >&5
17957echo "${ECHO_T}yes" >&6
17958else echo "$as_me:$LINENO: result: no" >&5
17959echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017960fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017961else
Martin v. Löwis11437992002-04-12 09:54:03 +000017962 echo "$as_me:$LINENO: result: no" >&5
17963echo "${ECHO_T}no" >&6
17964fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000017965
Guido van Rossum7f43da71994-08-01 12:15:30 +000017966# check for --with-libm=...
17967
Guido van Rossum563e7081996-09-10 18:20:48 +000017968case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000017969Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000017970BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000017971*) LIBM=-lm
17972esac
Martin v. Löwis11437992002-04-12 09:54:03 +000017973echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
17974echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
17975
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017976# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017977if test "${with_libm+set}" = set; then
17978 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000017979
Guido van Rossum7f253911997-05-09 02:42:48 +000017980if test "$withval" = no
17981then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000017982 echo "$as_me:$LINENO: result: force LIBM empty" >&5
17983echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017984elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017985then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017986 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
17987echo "${ECHO_T}set LIBM=\"$withval\"" >&6
17988else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
17989echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
17990 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017991fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017992else
Martin v. Löwis11437992002-04-12 09:54:03 +000017993 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
17994echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
17995fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017996
17997# check for --with-libc=...
17998
Martin v. Löwis11437992002-04-12 09:54:03 +000017999echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
18000echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
18001
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018002# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018003if test "${with_libc+set}" = set; then
18004 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000018005
Guido van Rossum7f253911997-05-09 02:42:48 +000018006if test "$withval" = no
18007then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000018008 echo "$as_me:$LINENO: result: force LIBC empty" >&5
18009echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018010elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018011then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018012 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
18013echo "${ECHO_T}set LIBC=\"$withval\"" >&6
18014else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
18015echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
18016 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018017fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018018else
Martin v. Löwis11437992002-04-12 09:54:03 +000018019 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
18020echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
18021fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018022
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018023# check for hypot() in math library
18024LIBS_SAVE=$LIBS
18025LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000018026
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018027for ac_func in hypot
18028do
Martin v. Löwis11437992002-04-12 09:54:03 +000018029as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18030echo "$as_me:$LINENO: checking for $ac_func" >&5
18031echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18032if eval "test \"\${$as_ac_var+set}\" = set"; then
18033 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018034else
Martin v. Löwis11437992002-04-12 09:54:03 +000018035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018036/* confdefs.h. */
18037_ACEOF
18038cat confdefs.h >>conftest.$ac_ext
18039cat >>conftest.$ac_ext <<_ACEOF
18040/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018041/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018042 which can conflict with char $ac_func (); below.
18043 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018044 <limits.h> exists even on freestanding compilers. Under hpux,
18045 including <limits.h> includes <sys/time.h> and causes problems
18046 checking for functions defined therein. */
18047#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018048# include <limits.h>
18049#else
18050# include <assert.h>
18051#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018052/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018053#ifdef __cplusplus
18054extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018055{
Martin v. Löwis11437992002-04-12 09:54:03 +000018056#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018057/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018058 builtin and then its argument prototype would still apply. */
18059char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018060/* The GNU C library defines this for functions which it implements
18061 to always fail with ENOSYS. Some functions are actually named
18062 something starting with __ and the normal name is an alias. */
18063#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18064choke me
18065#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018066char (*f) () = $ac_func;
18067#endif
18068#ifdef __cplusplus
18069}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018070#endif
18071
Skip Montanaro6dead952003-09-25 14:50:04 +000018072int
18073main ()
18074{
18075return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018076 ;
18077 return 0;
18078}
18079_ACEOF
18080rm -f conftest.$ac_objext conftest$ac_exeext
18081if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018082 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018084 grep -v '^ *+' conftest.er1 >conftest.err
18085 rm -f conftest.er1
18086 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18088 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018089 { ac_try='test -z "$ac_c_werror_flag"
18090 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18092 (eval $ac_try) 2>&5
18093 ac_status=$?
18094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18095 (exit $ac_status); }; } &&
18096 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18098 (eval $ac_try) 2>&5
18099 ac_status=$?
18100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18101 (exit $ac_status); }; }; then
18102 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018103else
Martin v. Löwis11437992002-04-12 09:54:03 +000018104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018105sed 's/^/| /' conftest.$ac_ext >&5
18106
Martin v. Löwis11437992002-04-12 09:54:03 +000018107eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018108fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018109rm -f conftest.err conftest.$ac_objext \
18110 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018112echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18113echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18114if test `eval echo '${'$as_ac_var'}'` = yes; then
18115 cat >>confdefs.h <<_ACEOF
18116#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18117_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018118
Michael W. Hudson54241132001-12-07 15:38:26 +000018119else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018120 case $LIBOBJS in
18121 "$ac_func.$ac_objext" | \
18122 *" $ac_func.$ac_objext" | \
18123 "$ac_func.$ac_objext "* | \
18124 *" $ac_func.$ac_objext "* ) ;;
18125 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
18126esac
18127
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018128fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018129done
18130
Michael W. Hudson54241132001-12-07 15:38:26 +000018131
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018132LIBS=$LIBS_SAVE
18133
Guido van Rossumef2255b2000-03-10 22:30:29 +000018134# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000018135if test "${ac_cv_header_wchar_h+set}" = set; then
18136 echo "$as_me:$LINENO: checking for wchar.h" >&5
18137echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18138if test "${ac_cv_header_wchar_h+set}" = set; then
18139 echo $ECHO_N "(cached) $ECHO_C" >&6
18140fi
18141echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18142echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018143else
Martin v. Löwis11437992002-04-12 09:54:03 +000018144 # Is the header compilable?
18145echo "$as_me:$LINENO: checking wchar.h usability" >&5
18146echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
18147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018148/* confdefs.h. */
18149_ACEOF
18150cat confdefs.h >>conftest.$ac_ext
18151cat >>conftest.$ac_ext <<_ACEOF
18152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018153$ac_includes_default
18154#include <wchar.h>
18155_ACEOF
18156rm -f conftest.$ac_objext
18157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018158 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018160 grep -v '^ *+' conftest.er1 >conftest.err
18161 rm -f conftest.er1
18162 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18164 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018165 { ac_try='test -z "$ac_c_werror_flag"
18166 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18168 (eval $ac_try) 2>&5
18169 ac_status=$?
18170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18171 (exit $ac_status); }; } &&
18172 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18174 (eval $ac_try) 2>&5
18175 ac_status=$?
18176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18177 (exit $ac_status); }; }; then
18178 ac_header_compiler=yes
18179else
18180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018181sed 's/^/| /' conftest.$ac_ext >&5
18182
Martin v. Löwis11437992002-04-12 09:54:03 +000018183ac_header_compiler=no
18184fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018185rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018186echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18187echo "${ECHO_T}$ac_header_compiler" >&6
18188
18189# Is the header present?
18190echo "$as_me:$LINENO: checking wchar.h presence" >&5
18191echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
18192cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018193/* confdefs.h. */
18194_ACEOF
18195cat confdefs.h >>conftest.$ac_ext
18196cat >>conftest.$ac_ext <<_ACEOF
18197/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018198#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018199_ACEOF
18200if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18201 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18202 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018203 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000018204 rm -f conftest.er1
18205 cat conftest.err >&5
18206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18207 (exit $ac_status); } >/dev/null; then
18208 if test -s conftest.err; then
18209 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000018210 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000018211 else
18212 ac_cpp_err=
18213 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018214else
Martin v. Löwis11437992002-04-12 09:54:03 +000018215 ac_cpp_err=yes
18216fi
18217if test -z "$ac_cpp_err"; then
18218 ac_header_preproc=yes
18219else
18220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018221sed 's/^/| /' conftest.$ac_ext >&5
18222
Martin v. Löwis11437992002-04-12 09:54:03 +000018223 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000018224fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018225rm -f conftest.err conftest.$ac_ext
18226echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18227echo "${ECHO_T}$ac_header_preproc" >&6
18228
18229# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018230case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18231 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000018232 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
18233echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018234 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
18235echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
18236 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018237 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018238 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018239 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
18240echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018241 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
18242echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
18243 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
18244echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
18245 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
18246echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018247 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
18248echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018249 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
18250echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018251 (
18252 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000018253## --------------------------------- ##
18254## Report this to the python lists. ##
18255## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000018256_ASBOX
18257 ) |
18258 sed "s/^/$as_me: WARNING: /" >&2
18259 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018260esac
18261echo "$as_me:$LINENO: checking for wchar.h" >&5
18262echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18263if test "${ac_cv_header_wchar_h+set}" = set; then
18264 echo $ECHO_N "(cached) $ECHO_C" >&6
18265else
18266 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000018267fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018268echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18269echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
18270
18271fi
18272if test $ac_cv_header_wchar_h = yes; then
18273
18274
18275cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018276#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018277_ACEOF
18278
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018279 wchar_h="yes"
18280
Guido van Rossumef2255b2000-03-10 22:30:29 +000018281else
Martin v. Löwis11437992002-04-12 09:54:03 +000018282 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000018283
18284fi
18285
Michael W. Hudson54241132001-12-07 15:38:26 +000018286
Martin v. Löwis11437992002-04-12 09:54:03 +000018287
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018288# determine wchar_t size
18289if test "$wchar_h" = yes
18290then
Martin v. Löwis11437992002-04-12 09:54:03 +000018291 echo "$as_me:$LINENO: checking for wchar_t" >&5
18292echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
18293if test "${ac_cv_type_wchar_t+set}" = set; then
18294 echo $ECHO_N "(cached) $ECHO_C" >&6
18295else
18296 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018297/* confdefs.h. */
18298_ACEOF
18299cat confdefs.h >>conftest.$ac_ext
18300cat >>conftest.$ac_ext <<_ACEOF
18301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018302#include <wchar.h>
18303
Martin v. Löwis11437992002-04-12 09:54:03 +000018304int
18305main ()
18306{
18307if ((wchar_t *) 0)
18308 return 0;
18309if (sizeof (wchar_t))
18310 return 0;
18311 ;
18312 return 0;
18313}
18314_ACEOF
18315rm -f conftest.$ac_objext
18316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018317 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018319 grep -v '^ *+' conftest.er1 >conftest.err
18320 rm -f conftest.er1
18321 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18323 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018324 { ac_try='test -z "$ac_c_werror_flag"
18325 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18327 (eval $ac_try) 2>&5
18328 ac_status=$?
18329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18330 (exit $ac_status); }; } &&
18331 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18333 (eval $ac_try) 2>&5
18334 ac_status=$?
18335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18336 (exit $ac_status); }; }; then
18337 ac_cv_type_wchar_t=yes
18338else
18339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018340sed 's/^/| /' conftest.$ac_ext >&5
18341
Martin v. Löwis11437992002-04-12 09:54:03 +000018342ac_cv_type_wchar_t=no
18343fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018344rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018345fi
18346echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
18347echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
18348
18349echo "$as_me:$LINENO: checking size of wchar_t" >&5
18350echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
18351if test "${ac_cv_sizeof_wchar_t+set}" = set; then
18352 echo $ECHO_N "(cached) $ECHO_C" >&6
18353else
18354 if test "$ac_cv_type_wchar_t" = yes; then
18355 # The cast to unsigned long works around a bug in the HP C Compiler
18356 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18357 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18358 # This bug is HP SR number 8606223364.
18359 if test "$cross_compiling" = yes; then
18360 # Depending upon the size, compute the lo and hi bounds.
18361cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018362/* confdefs.h. */
18363_ACEOF
18364cat confdefs.h >>conftest.$ac_ext
18365cat >>conftest.$ac_ext <<_ACEOF
18366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018367#include <wchar.h>
18368
Martin v. Löwis11437992002-04-12 09:54:03 +000018369int
18370main ()
18371{
18372static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
18373test_array [0] = 0
18374
18375 ;
18376 return 0;
18377}
18378_ACEOF
18379rm -f conftest.$ac_objext
18380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018381 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018383 grep -v '^ *+' conftest.er1 >conftest.err
18384 rm -f conftest.er1
18385 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18387 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018388 { ac_try='test -z "$ac_c_werror_flag"
18389 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18391 (eval $ac_try) 2>&5
18392 ac_status=$?
18393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18394 (exit $ac_status); }; } &&
18395 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18397 (eval $ac_try) 2>&5
18398 ac_status=$?
18399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18400 (exit $ac_status); }; }; then
18401 ac_lo=0 ac_mid=0
18402 while :; do
18403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018404/* confdefs.h. */
18405_ACEOF
18406cat confdefs.h >>conftest.$ac_ext
18407cat >>conftest.$ac_ext <<_ACEOF
18408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018409#include <wchar.h>
18410
Martin v. Löwis11437992002-04-12 09:54:03 +000018411int
18412main ()
18413{
18414static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18415test_array [0] = 0
18416
18417 ;
18418 return 0;
18419}
18420_ACEOF
18421rm -f conftest.$ac_objext
18422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018423 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018425 grep -v '^ *+' conftest.er1 >conftest.err
18426 rm -f conftest.er1
18427 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18429 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018430 { ac_try='test -z "$ac_c_werror_flag"
18431 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18433 (eval $ac_try) 2>&5
18434 ac_status=$?
18435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18436 (exit $ac_status); }; } &&
18437 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18439 (eval $ac_try) 2>&5
18440 ac_status=$?
18441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18442 (exit $ac_status); }; }; then
18443 ac_hi=$ac_mid; break
18444else
18445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018446sed 's/^/| /' conftest.$ac_ext >&5
18447
Martin v. Löwis11437992002-04-12 09:54:03 +000018448ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018449 if test $ac_lo -le $ac_mid; then
18450 ac_lo= ac_hi=
18451 break
18452 fi
18453 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000018454fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018455rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018456 done
18457else
18458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018459sed 's/^/| /' conftest.$ac_ext >&5
18460
Martin v. Löwis11437992002-04-12 09:54:03 +000018461cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018462/* confdefs.h. */
18463_ACEOF
18464cat confdefs.h >>conftest.$ac_ext
18465cat >>conftest.$ac_ext <<_ACEOF
18466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018467#include <wchar.h>
18468
Martin v. Löwis11437992002-04-12 09:54:03 +000018469int
18470main ()
18471{
18472static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
18473test_array [0] = 0
18474
18475 ;
18476 return 0;
18477}
18478_ACEOF
18479rm -f conftest.$ac_objext
18480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018481 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018483 grep -v '^ *+' conftest.er1 >conftest.err
18484 rm -f conftest.er1
18485 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18487 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018488 { ac_try='test -z "$ac_c_werror_flag"
18489 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18491 (eval $ac_try) 2>&5
18492 ac_status=$?
18493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18494 (exit $ac_status); }; } &&
18495 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18497 (eval $ac_try) 2>&5
18498 ac_status=$?
18499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18500 (exit $ac_status); }; }; then
18501 ac_hi=-1 ac_mid=-1
18502 while :; do
18503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018504/* confdefs.h. */
18505_ACEOF
18506cat confdefs.h >>conftest.$ac_ext
18507cat >>conftest.$ac_ext <<_ACEOF
18508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018509#include <wchar.h>
18510
Martin v. Löwis11437992002-04-12 09:54:03 +000018511int
18512main ()
18513{
18514static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
18515test_array [0] = 0
18516
18517 ;
18518 return 0;
18519}
18520_ACEOF
18521rm -f conftest.$ac_objext
18522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018523 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018525 grep -v '^ *+' conftest.er1 >conftest.err
18526 rm -f conftest.er1
18527 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18529 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018530 { ac_try='test -z "$ac_c_werror_flag"
18531 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18533 (eval $ac_try) 2>&5
18534 ac_status=$?
18535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18536 (exit $ac_status); }; } &&
18537 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18539 (eval $ac_try) 2>&5
18540 ac_status=$?
18541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18542 (exit $ac_status); }; }; then
18543 ac_lo=$ac_mid; break
18544else
18545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018546sed 's/^/| /' conftest.$ac_ext >&5
18547
Martin v. Löwis11437992002-04-12 09:54:03 +000018548ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018549 if test $ac_mid -le $ac_hi; then
18550 ac_lo= ac_hi=
18551 break
18552 fi
18553 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000018554fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018555rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018556 done
18557else
18558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018559sed 's/^/| /' conftest.$ac_ext >&5
18560
Martin v. Löwis11437992002-04-12 09:54:03 +000018561ac_lo= ac_hi=
18562fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018563rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018564fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018565rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018566# Binary search between lo and hi bounds.
18567while test "x$ac_lo" != "x$ac_hi"; do
18568 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18569 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018570/* confdefs.h. */
18571_ACEOF
18572cat confdefs.h >>conftest.$ac_ext
18573cat >>conftest.$ac_ext <<_ACEOF
18574/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018575#include <wchar.h>
18576
Martin v. Löwis11437992002-04-12 09:54:03 +000018577int
18578main ()
18579{
18580static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18581test_array [0] = 0
18582
18583 ;
18584 return 0;
18585}
18586_ACEOF
18587rm -f conftest.$ac_objext
18588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018589 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018591 grep -v '^ *+' conftest.er1 >conftest.err
18592 rm -f conftest.er1
18593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18595 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018596 { ac_try='test -z "$ac_c_werror_flag"
18597 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18599 (eval $ac_try) 2>&5
18600 ac_status=$?
18601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18602 (exit $ac_status); }; } &&
18603 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18605 (eval $ac_try) 2>&5
18606 ac_status=$?
18607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18608 (exit $ac_status); }; }; then
18609 ac_hi=$ac_mid
18610else
18611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018612sed 's/^/| /' conftest.$ac_ext >&5
18613
Martin v. Löwis11437992002-04-12 09:54:03 +000018614ac_lo=`expr '(' $ac_mid ')' + 1`
18615fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018616rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018617done
18618case $ac_lo in
18619?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018620'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
18621See \`config.log' for more details." >&5
18622echo "$as_me: error: cannot compute sizeof (wchar_t), 77
18623See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018624 { (exit 1); exit 1; }; } ;;
18625esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018626else
18627 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +000018628 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18629See \`config.log' for more details." >&5
18630echo "$as_me: error: cannot run test program while cross compiling
18631See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018632 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000018633else
Martin v. Löwis11437992002-04-12 09:54:03 +000018634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018635/* confdefs.h. */
18636_ACEOF
18637cat confdefs.h >>conftest.$ac_ext
18638cat >>conftest.$ac_ext <<_ACEOF
18639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018640#include <wchar.h>
18641
18642long longval () { return (long) (sizeof (wchar_t)); }
18643unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000018644#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018645#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018646int
18647main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018648{
Martin v. Löwis11437992002-04-12 09:54:03 +000018649
18650 FILE *f = fopen ("conftest.val", "w");
18651 if (! f)
18652 exit (1);
18653 if (((long) (sizeof (wchar_t))) < 0)
18654 {
18655 long i = longval ();
18656 if (i != ((long) (sizeof (wchar_t))))
18657 exit (1);
18658 fprintf (f, "%ld\n", i);
18659 }
18660 else
18661 {
18662 unsigned long i = ulongval ();
18663 if (i != ((long) (sizeof (wchar_t))))
18664 exit (1);
18665 fprintf (f, "%lu\n", i);
18666 }
18667 exit (ferror (f) || fclose (f) != 0);
18668
18669 ;
18670 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000018671}
Martin v. Löwis11437992002-04-12 09:54:03 +000018672_ACEOF
18673rm -f conftest$ac_exeext
18674if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18675 (eval $ac_link) 2>&5
18676 ac_status=$?
18677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18678 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18680 (eval $ac_try) 2>&5
18681 ac_status=$?
18682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18683 (exit $ac_status); }; }; then
18684 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000018685else
Martin v. Löwis11437992002-04-12 09:54:03 +000018686 echo "$as_me: program exited with status $ac_status" >&5
18687echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018688sed 's/^/| /' conftest.$ac_ext >&5
18689
Martin v. Löwis11437992002-04-12 09:54:03 +000018690( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000018691{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
18692See \`config.log' for more details." >&5
18693echo "$as_me: error: cannot compute sizeof (wchar_t), 77
18694See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018695 { (exit 1); exit 1; }; }
18696fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018697rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018698fi
18699fi
18700rm -f conftest.val
18701else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018702 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000018703fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018704fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018705echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
18706echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
18707cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018708#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000018709_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018710
Michael W. Hudson54241132001-12-07 15:38:26 +000018711
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018712fi
18713
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018714echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
18715echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
18716have_ucs4_tcl=no
18717cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018718/* confdefs.h. */
18719_ACEOF
18720cat confdefs.h >>conftest.$ac_ext
18721cat >>conftest.$ac_ext <<_ACEOF
18722/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018723
18724#include <tcl.h>
18725#if TCL_UTF_MAX != 6
18726# error "NOT UCS4_TCL"
18727#endif
18728int
18729main ()
18730{
18731
18732 ;
18733 return 0;
18734}
18735_ACEOF
18736rm -f conftest.$ac_objext
18737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018738 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018740 grep -v '^ *+' conftest.er1 >conftest.err
18741 rm -f conftest.er1
18742 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18744 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018745 { ac_try='test -z "$ac_c_werror_flag"
18746 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18748 (eval $ac_try) 2>&5
18749 ac_status=$?
18750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18751 (exit $ac_status); }; } &&
18752 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18754 (eval $ac_try) 2>&5
18755 ac_status=$?
18756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18757 (exit $ac_status); }; }; then
18758
18759
18760cat >>confdefs.h <<\_ACEOF
18761#define HAVE_UCS4_TCL 1
18762_ACEOF
18763
18764 have_ucs4_tcl=yes
18765
18766else
18767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018768sed 's/^/| /' conftest.$ac_ext >&5
18769
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018770fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018771rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018772echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
18773echo "${ECHO_T}$have_ucs4_tcl" >&6
18774
Skip Montanaro6dead952003-09-25 14:50:04 +000018775# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018776if test "$wchar_h" = yes
18777then
18778 # check whether wchar_t is signed or not
18779 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
18780echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
18781 if test "${ac_cv_wchar_t_signed+set}" = set; then
18782 echo $ECHO_N "(cached) $ECHO_C" >&6
18783else
18784
18785 if test "$cross_compiling" = yes; then
18786 ac_cv_wchar_t_signed=yes
18787else
18788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018789/* confdefs.h. */
18790_ACEOF
18791cat confdefs.h >>conftest.$ac_ext
18792cat >>conftest.$ac_ext <<_ACEOF
18793/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018794
18795 #include <wchar.h>
18796 int main()
18797 {
18798 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
18799 }
18800
18801_ACEOF
18802rm -f conftest$ac_exeext
18803if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18804 (eval $ac_link) 2>&5
18805 ac_status=$?
18806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18807 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18809 (eval $ac_try) 2>&5
18810 ac_status=$?
18811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18812 (exit $ac_status); }; }; then
18813 ac_cv_wchar_t_signed=yes
18814else
18815 echo "$as_me: program exited with status $ac_status" >&5
18816echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018817sed 's/^/| /' conftest.$ac_ext >&5
18818
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018819( exit $ac_status )
18820ac_cv_wchar_t_signed=no
18821fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018822rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018823fi
18824fi
18825
18826 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
18827echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
18828fi
18829
Martin v. Löwis11437992002-04-12 09:54:03 +000018830echo "$as_me:$LINENO: checking what type to use for unicode" >&5
18831echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018832# Check whether --enable-unicode or --disable-unicode was given.
18833if test "${enable_unicode+set}" = set; then
18834 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000018835
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018836else
18837 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000018838fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018839
18840if test $enable_unicode = yes
18841then
Martin v. Löwisfd917792001-06-27 20:22:04 +000018842 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018843 case "$have_ucs4_tcl" in
18844 yes) enable_unicode="ucs4"
18845 ;;
18846 *) enable_unicode="ucs2"
18847 ;;
18848 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018849fi
18850
Martin v. Löwis0036cba2002-04-12 09:58:45 +000018851
18852
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018853case "$enable_unicode" in
18854ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000018855 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018856#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000018857_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018858
18859 ;;
18860ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000018861 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018862#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000018863_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018864
18865 ;;
18866esac
18867
Michael W. Hudson54241132001-12-07 15:38:26 +000018868
Martin v. Löwis11437992002-04-12 09:54:03 +000018869
18870
Martin v. Löwis0036cba2002-04-12 09:58:45 +000018871
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018872if test "$enable_unicode" = "no"
18873then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000018874 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000018875 echo "$as_me:$LINENO: result: not used" >&5
18876echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018877else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000018878 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000018879
18880cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018881#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018882_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018883
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018884
18885 # wchar_t is only usable if it maps to an unsigned type
18886 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
18887 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018888 then
18889 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018890
Martin v. Löwis11437992002-04-12 09:54:03 +000018891cat >>confdefs.h <<\_ACEOF
18892#define HAVE_USABLE_WCHAR_T 1
18893_ACEOF
18894
18895 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018896#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000018897_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018898
18899 elif test "$ac_cv_sizeof_short" = "$unicode_size"
18900 then
18901 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000018902 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018903#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000018904_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018905
18906 elif test "$ac_cv_sizeof_long" = "$unicode_size"
18907 then
18908 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000018909 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018910#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000018911_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018912
18913 else
18914 PY_UNICODE_TYPE="no type found"
18915 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018916 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
18917echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018918fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018919
18920# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018921echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
18922echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
18923if test "${ac_cv_c_bigendian+set}" = set; then
18924 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018925else
Martin v. Löwis11437992002-04-12 09:54:03 +000018926 # See if sys/param.h defines the BYTE_ORDER macro.
18927cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018928/* confdefs.h. */
18929_ACEOF
18930cat confdefs.h >>conftest.$ac_ext
18931cat >>conftest.$ac_ext <<_ACEOF
18932/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018933#include <sys/types.h>
18934#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000018935
Martin v. Löwis11437992002-04-12 09:54:03 +000018936int
18937main ()
18938{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018939#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
18940 bogus endian macros
18941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018942
18943 ;
18944 return 0;
18945}
18946_ACEOF
18947rm -f conftest.$ac_objext
18948if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018949 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018951 grep -v '^ *+' conftest.er1 >conftest.err
18952 rm -f conftest.er1
18953 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18955 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018956 { ac_try='test -z "$ac_c_werror_flag"
18957 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18959 (eval $ac_try) 2>&5
18960 ac_status=$?
18961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18962 (exit $ac_status); }; } &&
18963 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18965 (eval $ac_try) 2>&5
18966 ac_status=$?
18967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18968 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000018969 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000018970cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018971/* confdefs.h. */
18972_ACEOF
18973cat confdefs.h >>conftest.$ac_ext
18974cat >>conftest.$ac_ext <<_ACEOF
18975/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018976#include <sys/types.h>
18977#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000018978
Martin v. Löwis11437992002-04-12 09:54:03 +000018979int
18980main ()
18981{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018982#if BYTE_ORDER != BIG_ENDIAN
18983 not big endian
18984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018985
18986 ;
18987 return 0;
18988}
18989_ACEOF
18990rm -f conftest.$ac_objext
18991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018992 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018994 grep -v '^ *+' conftest.er1 >conftest.err
18995 rm -f conftest.er1
18996 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18998 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018999 { ac_try='test -z "$ac_c_werror_flag"
19000 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19002 (eval $ac_try) 2>&5
19003 ac_status=$?
19004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19005 (exit $ac_status); }; } &&
19006 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19008 (eval $ac_try) 2>&5
19009 ac_status=$?
19010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19011 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019012 ac_cv_c_bigendian=yes
19013else
Martin v. Löwis11437992002-04-12 09:54:03 +000019014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019015sed 's/^/| /' conftest.$ac_ext >&5
19016
Martin v. Löwis11437992002-04-12 09:54:03 +000019017ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019018fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019019rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019020else
Martin v. Löwis11437992002-04-12 09:54:03 +000019021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019022sed 's/^/| /' conftest.$ac_ext >&5
19023
Martin v. Löwis11437992002-04-12 09:54:03 +000019024# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000019025if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019026 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000019027 ac_cv_c_bigendian=unknown
19028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019029/* confdefs.h. */
19030_ACEOF
19031cat confdefs.h >>conftest.$ac_ext
19032cat >>conftest.$ac_ext <<_ACEOF
19033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019034short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19035short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19036void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
19037short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19038short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19039void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019040int
19041main ()
19042{
19043 _ascii (); _ebcdic ();
19044 ;
19045 return 0;
19046}
19047_ACEOF
19048rm -f conftest.$ac_objext
19049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019050 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019052 grep -v '^ *+' conftest.er1 >conftest.err
19053 rm -f conftest.er1
19054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19056 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019057 { ac_try='test -z "$ac_c_werror_flag"
19058 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19060 (eval $ac_try) 2>&5
19061 ac_status=$?
19062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19063 (exit $ac_status); }; } &&
19064 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19066 (eval $ac_try) 2>&5
19067 ac_status=$?
19068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19069 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019070 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019071 ac_cv_c_bigendian=yes
19072fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019073if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019074 if test "$ac_cv_c_bigendian" = unknown; then
19075 ac_cv_c_bigendian=no
19076 else
19077 # finding both strings is unlikely to happen, but who knows?
19078 ac_cv_c_bigendian=unknown
19079 fi
19080fi
19081else
19082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019083sed 's/^/| /' conftest.$ac_ext >&5
19084
Martin v. Löwis11437992002-04-12 09:54:03 +000019085fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019086rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019087else
19088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019089/* confdefs.h. */
19090_ACEOF
19091cat confdefs.h >>conftest.$ac_ext
19092cat >>conftest.$ac_ext <<_ACEOF
19093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019094int
19095main ()
19096{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019097 /* Are we little or big endian? From Harbison&Steele. */
19098 union
19099 {
19100 long l;
19101 char c[sizeof (long)];
19102 } u;
19103 u.l = 1;
19104 exit (u.c[sizeof (long) - 1] == 1);
19105}
Martin v. Löwis11437992002-04-12 09:54:03 +000019106_ACEOF
19107rm -f conftest$ac_exeext
19108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19109 (eval $ac_link) 2>&5
19110 ac_status=$?
19111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19112 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19114 (eval $ac_try) 2>&5
19115 ac_status=$?
19116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19117 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019118 ac_cv_c_bigendian=no
19119else
Martin v. Löwis11437992002-04-12 09:54:03 +000019120 echo "$as_me: program exited with status $ac_status" >&5
19121echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019122sed 's/^/| /' conftest.$ac_ext >&5
19123
Martin v. Löwis11437992002-04-12 09:54:03 +000019124( exit $ac_status )
19125ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000019126fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019127rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019129fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019130rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019131fi
19132echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
19133echo "${ECHO_T}$ac_cv_c_bigendian" >&6
19134case $ac_cv_c_bigendian in
19135 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000019136
Martin v. Löwis11437992002-04-12 09:54:03 +000019137cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019138#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019139_ACEOF
19140 ;;
19141 no)
19142 ;;
19143 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000019144 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019145presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019146echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019147presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
19148 { (exit 1); exit 1; }; } ;;
19149esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000019150
Michael W. Hudson54241132001-12-07 15:38:26 +000019151
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019152# Check whether right shifting a negative integer extends the sign bit
19153# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000019154echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
19155echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
19156if test "${ac_cv_rshift_extends_sign+set}" = set; then
19157 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019158else
Martin v. Löwis11437992002-04-12 09:54:03 +000019159
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019160if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019161 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019162else
Martin v. Löwis11437992002-04-12 09:54:03 +000019163 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019164/* confdefs.h. */
19165_ACEOF
19166cat confdefs.h >>conftest.$ac_ext
19167cat >>conftest.$ac_ext <<_ACEOF
19168/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019169
19170int main()
19171{
Vladimir Marangozova6180282000-07-12 05:05:06 +000019172 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019173}
19174
Martin v. Löwis11437992002-04-12 09:54:03 +000019175_ACEOF
19176rm -f conftest$ac_exeext
19177if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19178 (eval $ac_link) 2>&5
19179 ac_status=$?
19180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19181 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19183 (eval $ac_try) 2>&5
19184 ac_status=$?
19185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19186 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000019187 ac_cv_rshift_extends_sign=yes
19188else
Martin v. Löwis11437992002-04-12 09:54:03 +000019189 echo "$as_me: program exited with status $ac_status" >&5
19190echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019191sed 's/^/| /' conftest.$ac_ext >&5
19192
Martin v. Löwis11437992002-04-12 09:54:03 +000019193( exit $ac_status )
19194ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000019195fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019196rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019197fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000019198fi
19199
Martin v. Löwis11437992002-04-12 09:54:03 +000019200echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
19201echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019202if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019203then
Martin v. Löwis11437992002-04-12 09:54:03 +000019204
19205cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019206#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019207_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019208
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019209fi
19210
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019211# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019212echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
19213echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
19214if test "${ac_cv_have_getc_unlocked+set}" = set; then
19215 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019216else
Martin v. Löwis11437992002-04-12 09:54:03 +000019217
19218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019219/* confdefs.h. */
19220_ACEOF
19221cat confdefs.h >>conftest.$ac_ext
19222cat >>conftest.$ac_ext <<_ACEOF
19223/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019224#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019225int
19226main ()
19227{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019228
19229 FILE *f = fopen("/dev/null", "r");
19230 flockfile(f);
19231 getc_unlocked(f);
19232 funlockfile(f);
19233
Martin v. Löwis11437992002-04-12 09:54:03 +000019234 ;
19235 return 0;
19236}
19237_ACEOF
19238rm -f conftest.$ac_objext conftest$ac_exeext
19239if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019240 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019242 grep -v '^ *+' conftest.er1 >conftest.err
19243 rm -f conftest.er1
19244 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19246 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019247 { ac_try='test -z "$ac_c_werror_flag"
19248 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19250 (eval $ac_try) 2>&5
19251 ac_status=$?
19252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19253 (exit $ac_status); }; } &&
19254 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19256 (eval $ac_try) 2>&5
19257 ac_status=$?
19258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19259 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019260 ac_cv_have_getc_unlocked=yes
19261else
Martin v. Löwis11437992002-04-12 09:54:03 +000019262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019263sed 's/^/| /' conftest.$ac_ext >&5
19264
Martin v. Löwis11437992002-04-12 09:54:03 +000019265ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019266fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019267rm -f conftest.err conftest.$ac_objext \
19268 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019269fi
19270
Martin v. Löwis11437992002-04-12 09:54:03 +000019271echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
19272echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019273if test "$ac_cv_have_getc_unlocked" = yes
19274then
Martin v. Löwis11437992002-04-12 09:54:03 +000019275
19276cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019277#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019278_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019279
19280fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019281
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019282# check for readline 2.1
19283echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
19284echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
19285if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
19286 echo $ECHO_N "(cached) $ECHO_C" >&6
19287else
19288 ac_check_lib_save_LIBS=$LIBS
19289LIBS="-lreadline -ltermcap $LIBS"
19290cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019291/* confdefs.h. */
19292_ACEOF
19293cat confdefs.h >>conftest.$ac_ext
19294cat >>conftest.$ac_ext <<_ACEOF
19295/* end confdefs.h. */
19296
19297/* Override any gcc2 internal prototype to avoid an error. */
19298#ifdef __cplusplus
19299extern "C"
19300#endif
19301/* We use char because int might match the return type of a gcc2
19302 builtin and then its argument prototype would still apply. */
19303char rl_callback_handler_install ();
19304int
19305main ()
19306{
19307rl_callback_handler_install ();
19308 ;
19309 return 0;
19310}
19311_ACEOF
19312rm -f conftest.$ac_objext conftest$ac_exeext
19313if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019314 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019316 grep -v '^ *+' conftest.er1 >conftest.err
19317 rm -f conftest.er1
19318 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19320 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019321 { ac_try='test -z "$ac_c_werror_flag"
19322 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19324 (eval $ac_try) 2>&5
19325 ac_status=$?
19326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19327 (exit $ac_status); }; } &&
19328 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19330 (eval $ac_try) 2>&5
19331 ac_status=$?
19332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19333 (exit $ac_status); }; }; then
19334 ac_cv_lib_readline_rl_callback_handler_install=yes
19335else
19336 echo "$as_me: failed program was:" >&5
19337sed 's/^/| /' conftest.$ac_ext >&5
19338
19339ac_cv_lib_readline_rl_callback_handler_install=no
19340fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019341rm -f conftest.err conftest.$ac_objext \
19342 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019343LIBS=$ac_check_lib_save_LIBS
19344fi
19345echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
19346echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
19347if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
19348
19349cat >>confdefs.h <<\_ACEOF
19350#define HAVE_RL_CALLBACK 1
19351_ACEOF
19352
19353fi
19354
19355
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019356# check for readline 2.2
19357cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019358/* confdefs.h. */
19359_ACEOF
19360cat confdefs.h >>conftest.$ac_ext
19361cat >>conftest.$ac_ext <<_ACEOF
19362/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019363#include <readline/readline.h>
19364_ACEOF
19365if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19366 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19367 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019368 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019369 rm -f conftest.er1
19370 cat conftest.err >&5
19371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19372 (exit $ac_status); } >/dev/null; then
19373 if test -s conftest.err; then
19374 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019375 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019376 else
19377 ac_cpp_err=
19378 fi
19379else
19380 ac_cpp_err=yes
19381fi
19382if test -z "$ac_cpp_err"; then
19383 have_readline=yes
19384else
19385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019386sed 's/^/| /' conftest.$ac_ext >&5
19387
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019388 have_readline=no
19389fi
19390rm -f conftest.err conftest.$ac_ext
19391if test $have_readline = yes
19392then
19393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019394/* confdefs.h. */
19395_ACEOF
19396cat confdefs.h >>conftest.$ac_ext
19397cat >>conftest.$ac_ext <<_ACEOF
19398/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019399#include <readline/readline.h>
19400
19401_ACEOF
19402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000019403 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019404
19405cat >>confdefs.h <<\_ACEOF
19406#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
19407_ACEOF
19408
19409fi
19410rm -f conftest*
19411
19412fi
19413
Martin v. Löwis0daad592001-09-30 21:09:59 +000019414# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000019415echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
19416echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
19417if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
19418 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000019419else
Martin v. Löwis11437992002-04-12 09:54:03 +000019420 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000019421LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019422cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019423/* confdefs.h. */
19424_ACEOF
19425cat confdefs.h >>conftest.$ac_ext
19426cat >>conftest.$ac_ext <<_ACEOF
19427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019428
Guido van Rossum353ae582001-07-10 16:45:32 +000019429/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019430#ifdef __cplusplus
19431extern "C"
19432#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000019433/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019434 builtin and then its argument prototype would still apply. */
19435char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019436int
19437main ()
19438{
19439rl_pre_input_hook ();
19440 ;
19441 return 0;
19442}
19443_ACEOF
19444rm -f conftest.$ac_objext conftest$ac_exeext
19445if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019446 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019448 grep -v '^ *+' conftest.er1 >conftest.err
19449 rm -f conftest.er1
19450 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19452 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019453 { ac_try='test -z "$ac_c_werror_flag"
19454 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19456 (eval $ac_try) 2>&5
19457 ac_status=$?
19458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19459 (exit $ac_status); }; } &&
19460 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19462 (eval $ac_try) 2>&5
19463 ac_status=$?
19464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19465 (exit $ac_status); }; }; then
19466 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000019467else
Martin v. Löwis11437992002-04-12 09:54:03 +000019468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019469sed 's/^/| /' conftest.$ac_ext >&5
19470
Martin v. Löwis11437992002-04-12 09:54:03 +000019471ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000019472fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019473rm -f conftest.err conftest.$ac_objext \
19474 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019475LIBS=$ac_check_lib_save_LIBS
19476fi
19477echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
19478echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
19479if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019480
Martin v. Löwis11437992002-04-12 09:54:03 +000019481cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000019482#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019483_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000019484
Martin v. Löwis0daad592001-09-30 21:09:59 +000019485fi
19486
Michael W. Hudson54241132001-12-07 15:38:26 +000019487
Martin v. Löwis0daad592001-09-30 21:09:59 +000019488# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000019489echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
19490echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
19491if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
19492 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000019493else
Martin v. Löwis11437992002-04-12 09:54:03 +000019494 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000019495LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019496cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019497/* confdefs.h. */
19498_ACEOF
19499cat confdefs.h >>conftest.$ac_ext
19500cat >>conftest.$ac_ext <<_ACEOF
19501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019502
Martin v. Löwis0daad592001-09-30 21:09:59 +000019503/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019504#ifdef __cplusplus
19505extern "C"
19506#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000019507/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019508 builtin and then its argument prototype would still apply. */
19509char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019510int
19511main ()
19512{
19513rl_completion_matches ();
19514 ;
19515 return 0;
19516}
19517_ACEOF
19518rm -f conftest.$ac_objext conftest$ac_exeext
19519if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019520 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019522 grep -v '^ *+' conftest.er1 >conftest.err
19523 rm -f conftest.er1
19524 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19526 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019527 { ac_try='test -z "$ac_c_werror_flag"
19528 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19530 (eval $ac_try) 2>&5
19531 ac_status=$?
19532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19533 (exit $ac_status); }; } &&
19534 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19536 (eval $ac_try) 2>&5
19537 ac_status=$?
19538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19539 (exit $ac_status); }; }; then
19540 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000019541else
Martin v. Löwis11437992002-04-12 09:54:03 +000019542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019543sed 's/^/| /' conftest.$ac_ext >&5
19544
Martin v. Löwis11437992002-04-12 09:54:03 +000019545ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000019546fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019547rm -f conftest.err conftest.$ac_objext \
19548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019549LIBS=$ac_check_lib_save_LIBS
19550fi
19551echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
19552echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
19553if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019554
Martin v. Löwis11437992002-04-12 09:54:03 +000019555cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000019556#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019557_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000019558
Guido van Rossum353ae582001-07-10 16:45:32 +000019559fi
19560
Jack Jansendd19cf82001-12-06 22:36:17 +000019561
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019562# also in readline 4.2
19563cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019564/* confdefs.h. */
19565_ACEOF
19566cat confdefs.h >>conftest.$ac_ext
19567cat >>conftest.$ac_ext <<_ACEOF
19568/* end confdefs.h. */
19569#include <readline/readline.h>
19570_ACEOF
19571if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19572 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19573 ac_status=$?
19574 grep -v '^ *+' conftest.er1 >conftest.err
19575 rm -f conftest.er1
19576 cat conftest.err >&5
19577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19578 (exit $ac_status); } >/dev/null; then
19579 if test -s conftest.err; then
19580 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019581 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019582 else
19583 ac_cpp_err=
19584 fi
19585else
19586 ac_cpp_err=yes
19587fi
19588if test -z "$ac_cpp_err"; then
19589 have_readline=yes
19590else
19591 echo "$as_me: failed program was:" >&5
19592sed 's/^/| /' conftest.$ac_ext >&5
19593
19594 have_readline=no
19595fi
19596rm -f conftest.err conftest.$ac_ext
19597if test $have_readline = yes
19598then
19599 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019600/* confdefs.h. */
19601_ACEOF
19602cat confdefs.h >>conftest.$ac_ext
19603cat >>conftest.$ac_ext <<_ACEOF
19604/* end confdefs.h. */
19605#include <readline/readline.h>
19606
19607_ACEOF
19608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19609 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
19610
19611cat >>confdefs.h <<\_ACEOF
19612#define HAVE_RL_CATCH_SIGNAL 1
19613_ACEOF
19614
19615fi
19616rm -f conftest*
19617
19618fi
19619
Martin v. Löwis11437992002-04-12 09:54:03 +000019620echo "$as_me:$LINENO: checking for broken nice()" >&5
19621echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
19622if test "${ac_cv_broken_nice+set}" = set; then
19623 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000019624else
Martin v. Löwis11437992002-04-12 09:54:03 +000019625
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019626if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019627 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019628else
Martin v. Löwis11437992002-04-12 09:54:03 +000019629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019630/* confdefs.h. */
19631_ACEOF
19632cat confdefs.h >>conftest.$ac_ext
19633cat >>conftest.$ac_ext <<_ACEOF
19634/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019635
19636int main()
19637{
19638 int val1 = nice(1);
19639 if (val1 != -1 && val1 == nice(2))
19640 exit(0);
19641 exit(1);
19642}
19643
Martin v. Löwis11437992002-04-12 09:54:03 +000019644_ACEOF
19645rm -f conftest$ac_exeext
19646if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19647 (eval $ac_link) 2>&5
19648 ac_status=$?
19649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19652 (eval $ac_try) 2>&5
19653 ac_status=$?
19654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19655 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019656 ac_cv_broken_nice=yes
19657else
Martin v. Löwis11437992002-04-12 09:54:03 +000019658 echo "$as_me: program exited with status $ac_status" >&5
19659echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019660sed 's/^/| /' conftest.$ac_ext >&5
19661
Martin v. Löwis11437992002-04-12 09:54:03 +000019662( exit $ac_status )
19663ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019664fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019665rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019666fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019667fi
19668
Martin v. Löwis11437992002-04-12 09:54:03 +000019669echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
19670echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019671if test "$ac_cv_broken_nice" = yes
19672then
Martin v. Löwis11437992002-04-12 09:54:03 +000019673
19674cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019675#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019676_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019677
19678fi
19679
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019680echo "$as_me:$LINENO: checking for broken poll()" >&5
19681echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
19682if test "$cross_compiling" = yes; then
19683 ac_cv_broken_poll=no
19684else
19685 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019686/* confdefs.h. */
19687_ACEOF
19688cat confdefs.h >>conftest.$ac_ext
19689cat >>conftest.$ac_ext <<_ACEOF
19690/* end confdefs.h. */
19691
19692#include <poll.h>
19693
19694int main (void)
19695 {
19696 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
19697
19698 close (42);
19699
19700 int poll_test = poll (&poll_struct, 1, 0);
19701
19702 if (poll_test < 0)
19703 {
19704 exit(0);
19705 }
19706 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
19707 {
19708 exit(0);
19709 }
19710 else
19711 {
19712 exit(1);
19713 }
19714 }
19715
19716_ACEOF
19717rm -f conftest$ac_exeext
19718if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19719 (eval $ac_link) 2>&5
19720 ac_status=$?
19721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19722 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19724 (eval $ac_try) 2>&5
19725 ac_status=$?
19726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19727 (exit $ac_status); }; }; then
19728 ac_cv_broken_poll=yes
19729else
19730 echo "$as_me: program exited with status $ac_status" >&5
19731echo "$as_me: failed program was:" >&5
19732sed 's/^/| /' conftest.$ac_ext >&5
19733
19734( exit $ac_status )
19735ac_cv_broken_poll=no
19736fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019737rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019738fi
19739echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
19740echo "${ECHO_T}$ac_cv_broken_poll" >&6
19741if test "$ac_cv_broken_poll" = yes
19742then
19743
19744cat >>confdefs.h <<\_ACEOF
19745#define HAVE_BROKEN_POLL 1
19746_ACEOF
19747
19748fi
19749
19750
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019751# tzset(3) exists and works like we expect it to
19752echo "$as_me:$LINENO: checking for working tzset()" >&5
19753echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
19754if test "${ac_cv_working_tzset+set}" = set; then
19755 echo $ECHO_N "(cached) $ECHO_C" >&6
19756else
19757
19758if test "$cross_compiling" = yes; then
19759 ac_cv_working_tzset=no
19760else
19761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019762/* confdefs.h. */
19763_ACEOF
19764cat confdefs.h >>conftest.$ac_ext
19765cat >>conftest.$ac_ext <<_ACEOF
19766/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019767
19768#include <stdlib.h>
19769#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000019770#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019771int main()
19772{
Brett Cannon18367812003-09-19 00:59:16 +000019773 /* Note that we need to ensure that not only does tzset(3)
19774 do 'something' with localtime, but it works as documented
19775 in the library reference and as expected by the test suite.
19776
19777 Red Hat 6.2 doesn't understand the southern hemisphere
19778 after New Year's Day; it thinks swaps on that day.
19779 */
19780
19781 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
19782 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
19783
Neal Norwitz7f2588c2003-04-11 15:35:53 +000019784 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019785 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000019786 if (localtime(&groundhogday)->tm_hour != 0)
19787 exit(1);
19788
Neal Norwitz7f2588c2003-04-11 15:35:53 +000019789 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019790 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000019791 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019792 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000019793
19794 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
19795 tzset();
19796 if (localtime(&groundhogday)->tm_hour != 11)
19797 exit(1);
19798 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
19799 exit(1);
19800 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
19801 exit(1);
19802
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019803 exit(0);
19804}
19805
19806_ACEOF
19807rm -f conftest$ac_exeext
19808if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19809 (eval $ac_link) 2>&5
19810 ac_status=$?
19811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19812 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19814 (eval $ac_try) 2>&5
19815 ac_status=$?
19816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19817 (exit $ac_status); }; }; then
19818 ac_cv_working_tzset=yes
19819else
19820 echo "$as_me: program exited with status $ac_status" >&5
19821echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019822sed 's/^/| /' conftest.$ac_ext >&5
19823
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019824( exit $ac_status )
19825ac_cv_working_tzset=no
19826fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019827rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019828fi
19829fi
19830
19831echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
19832echo "${ECHO_T}$ac_cv_working_tzset" >&6
19833if test "$ac_cv_working_tzset" = yes
19834then
19835
19836cat >>confdefs.h <<\_ACEOF
19837#define HAVE_WORKING_TZSET 1
19838_ACEOF
19839
19840fi
19841
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019842# Look for subsecond timestamps in struct stat
19843echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
19844echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
19845if test "${ac_cv_stat_tv_nsec+set}" = set; then
19846 echo $ECHO_N "(cached) $ECHO_C" >&6
19847else
19848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019849/* confdefs.h. */
19850_ACEOF
19851cat confdefs.h >>conftest.$ac_ext
19852cat >>conftest.$ac_ext <<_ACEOF
19853/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019854#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019855int
19856main ()
19857{
19858
19859struct stat st;
19860st.st_mtim.tv_nsec = 1;
19861
19862 ;
19863 return 0;
19864}
19865_ACEOF
19866rm -f conftest.$ac_objext
19867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019868 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019870 grep -v '^ *+' conftest.er1 >conftest.err
19871 rm -f conftest.er1
19872 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19874 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019875 { ac_try='test -z "$ac_c_werror_flag"
19876 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19878 (eval $ac_try) 2>&5
19879 ac_status=$?
19880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19881 (exit $ac_status); }; } &&
19882 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19884 (eval $ac_try) 2>&5
19885 ac_status=$?
19886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19887 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000019888 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019889else
19890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019891sed 's/^/| /' conftest.$ac_ext >&5
19892
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019893ac_cv_stat_tv_nsec=no
19894fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019895rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019896fi
19897
19898echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
19899echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
19900if test "$ac_cv_stat_tv_nsec" = yes
19901then
19902
19903cat >>confdefs.h <<\_ACEOF
19904#define HAVE_STAT_TV_NSEC 1
19905_ACEOF
19906
19907fi
19908
Jack Jansen666b1e72001-10-31 12:11:48 +000019909# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000019910echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
19911echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
19912if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
19913 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000019914else
Martin v. Löwis11437992002-04-12 09:54:03 +000019915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019916/* confdefs.h. */
19917_ACEOF
19918cat confdefs.h >>conftest.$ac_ext
19919cat >>conftest.$ac_ext <<_ACEOF
19920/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000019921#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019922int
19923main ()
19924{
Jack Jansen666b1e72001-10-31 12:11:48 +000019925
19926 int rtn;
19927 rtn = mvwdelch(0,0,0);
19928
Martin v. Löwis11437992002-04-12 09:54:03 +000019929 ;
19930 return 0;
19931}
19932_ACEOF
19933rm -f conftest.$ac_objext
19934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019935 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019937 grep -v '^ *+' conftest.er1 >conftest.err
19938 rm -f conftest.er1
19939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19941 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019942 { ac_try='test -z "$ac_c_werror_flag"
19943 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19945 (eval $ac_try) 2>&5
19946 ac_status=$?
19947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19948 (exit $ac_status); }; } &&
19949 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19951 (eval $ac_try) 2>&5
19952 ac_status=$?
19953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19954 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000019955 ac_cv_mvwdelch_is_expression=yes
19956else
Martin v. Löwis11437992002-04-12 09:54:03 +000019957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019958sed 's/^/| /' conftest.$ac_ext >&5
19959
Martin v. Löwis11437992002-04-12 09:54:03 +000019960ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000019961fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019962rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000019963fi
19964
Martin v. Löwis11437992002-04-12 09:54:03 +000019965echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
19966echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000019967
19968if test "$ac_cv_mvwdelch_is_expression" = yes
19969then
Martin v. Löwis11437992002-04-12 09:54:03 +000019970
19971cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000019972#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019973_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000019974
19975fi
19976
Martin v. Löwis11437992002-04-12 09:54:03 +000019977echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
19978echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
19979if test "${ac_cv_window_has_flags+set}" = set; then
19980 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000019981else
Martin v. Löwis11437992002-04-12 09:54:03 +000019982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019983/* confdefs.h. */
19984_ACEOF
19985cat confdefs.h >>conftest.$ac_ext
19986cat >>conftest.$ac_ext <<_ACEOF
19987/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000019988#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019989int
19990main ()
19991{
Jack Jansen666b1e72001-10-31 12:11:48 +000019992
19993 WINDOW *w;
19994 w->_flags = 0;
19995
Martin v. Löwis11437992002-04-12 09:54:03 +000019996 ;
19997 return 0;
19998}
19999_ACEOF
20000rm -f conftest.$ac_objext
20001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020002 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020004 grep -v '^ *+' conftest.er1 >conftest.err
20005 rm -f conftest.er1
20006 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20008 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000020009 { ac_try='test -z "$ac_c_werror_flag"
20010 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20012 (eval $ac_try) 2>&5
20013 ac_status=$?
20014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20015 (exit $ac_status); }; } &&
20016 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20018 (eval $ac_try) 2>&5
20019 ac_status=$?
20020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20021 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020022 ac_cv_window_has_flags=yes
20023else
Martin v. Löwis11437992002-04-12 09:54:03 +000020024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020025sed 's/^/| /' conftest.$ac_ext >&5
20026
Martin v. Löwis11437992002-04-12 09:54:03 +000020027ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020028fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020029rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020030fi
20031
Martin v. Löwis11437992002-04-12 09:54:03 +000020032echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
20033echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000020034
Jack Jansen666b1e72001-10-31 12:11:48 +000020035
20036if test "$ac_cv_window_has_flags" = yes
20037then
Martin v. Löwis11437992002-04-12 09:54:03 +000020038
20039cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020040#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020041_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020042
20043fi
20044
Martin v. Löwis24a880b2002-12-31 12:55:15 +000020045echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
20046echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
20047
20048if test -e /dev/ptmx
20049then
20050 echo "$as_me:$LINENO: result: yes" >&5
20051echo "${ECHO_T}yes" >&6
20052
20053cat >>confdefs.h <<\_ACEOF
20054#define HAVE_DEV_PTMX 1
20055_ACEOF
20056
20057else
20058 echo "$as_me:$LINENO: result: no" >&5
20059echo "${ECHO_T}no" >&6
20060fi
20061
Neal Norwitz865400f2003-03-21 01:42:58 +000020062echo "$as_me:$LINENO: checking for /dev/ptc" >&5
20063echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
20064
20065if test -e /dev/ptc
20066then
20067 echo "$as_me:$LINENO: result: yes" >&5
20068echo "${ECHO_T}yes" >&6
20069
20070cat >>confdefs.h <<\_ACEOF
20071#define HAVE_DEV_PTC 1
20072_ACEOF
20073
20074else
20075 echo "$as_me:$LINENO: result: no" >&5
20076echo "${ECHO_T}no" >&6
20077fi
20078
Martin v. Löwis11437992002-04-12 09:54:03 +000020079echo "$as_me:$LINENO: checking for socklen_t" >&5
20080echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
20081if test "${ac_cv_type_socklen_t+set}" = set; then
20082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000020083else
Martin v. Löwis11437992002-04-12 09:54:03 +000020084 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020085/* confdefs.h. */
20086_ACEOF
20087cat confdefs.h >>conftest.$ac_ext
20088cat >>conftest.$ac_ext <<_ACEOF
20089/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000020090
20091#ifdef HAVE_SYS_TYPES_H
20092#include <sys/types.h>
20093#endif
20094#ifdef HAVE_SYS_SOCKET_H
20095#include <sys/socket.h>
20096#endif
20097
20098
Martin v. Löwis11437992002-04-12 09:54:03 +000020099int
20100main ()
20101{
20102if ((socklen_t *) 0)
20103 return 0;
20104if (sizeof (socklen_t))
20105 return 0;
20106 ;
20107 return 0;
20108}
20109_ACEOF
20110rm -f conftest.$ac_objext
20111if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020112 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020114 grep -v '^ *+' conftest.er1 >conftest.err
20115 rm -f conftest.er1
20116 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20118 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000020119 { ac_try='test -z "$ac_c_werror_flag"
20120 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20122 (eval $ac_try) 2>&5
20123 ac_status=$?
20124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20125 (exit $ac_status); }; } &&
20126 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20128 (eval $ac_try) 2>&5
20129 ac_status=$?
20130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20131 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000020132 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000020133else
Martin v. Löwis11437992002-04-12 09:54:03 +000020134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020135sed 's/^/| /' conftest.$ac_ext >&5
20136
Martin v. Löwis11437992002-04-12 09:54:03 +000020137ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000020138fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020139rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020140fi
20141echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
20142echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
20143if test $ac_cv_type_socklen_t = yes; then
20144 :
20145else
Guido van Rossum95713eb2000-05-18 20:53:31 +000020146
Martin v. Löwis01c04012002-11-11 14:58:44 +000020147cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000020148#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000020149_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000020150
20151fi
20152
Michael W. Hudson54241132001-12-07 15:38:26 +000020153
Michael W. Hudson54241132001-12-07 15:38:26 +000020154
20155
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000020156for h in `(cd $srcdir;echo Python/thread_*.h)`
20157do
20158 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
20159done
20160
Michael W. Hudson54241132001-12-07 15:38:26 +000020161
Jack Jansen0b06be72002-06-21 14:48:38 +000020162SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000020163echo "$as_me:$LINENO: checking for build directories" >&5
20164echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000020165for dir in $SRCDIRS; do
20166 if test ! -d $dir; then
20167 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000020168 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000020169done
Martin v. Löwis11437992002-04-12 09:54:03 +000020170echo "$as_me:$LINENO: result: done" >&5
20171echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000020172
Guido van Rossum627b2d71993-12-24 10:39:16 +000020173# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000020174 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000020175
Martin v. Löwis11437992002-04-12 09:54:03 +000020176cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020177# This file is a shell script that caches the results of configure
20178# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000020179# scripts and configure runs, see configure's option --config-cache.
20180# It is not useful on other systems. If it contains results you don't
20181# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020182#
Martin v. Löwis11437992002-04-12 09:54:03 +000020183# config.status only pays attention to the cache file if you give it
20184# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020185#
Skip Montanaro6dead952003-09-25 14:50:04 +000020186# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000020187# loading this file, other *unset* `ac_cv_foo' will be assigned the
20188# following values.
20189
20190_ACEOF
20191
Guido van Rossumf78abae1997-01-21 22:02:36 +000020192# The following way of writing the cache mishandles newlines in values,
20193# but we know of no workaround that is simple, portable, and efficient.
20194# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020195# Ultrix sh set writes to stderr and can't be redirected directly,
20196# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000020197{
20198 (set) 2>&1 |
20199 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20200 *ac_space=\ *)
20201 # `set' does not quote correctly, so add quotes (double-quote
20202 # substitution turns \\\\ into \\, and sed turns \\ into \).
20203 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020204 "s/'/'\\\\''/g;
20205 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020206 ;;
20207 *)
20208 # `set' quotes correctly as required by POSIX, so do not add quotes.
20209 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020210 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020211 ;;
20212 esac;
20213} |
20214 sed '
20215 t clear
20216 : clear
20217 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20218 t end
20219 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20220 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000020221if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020222 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020223 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20224 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020225 else
20226 echo "not updating unwritable cache $cache_file"
20227 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020228fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020229rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000020230
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020231test "x$prefix" = xNONE && prefix=$ac_default_prefix
20232# Let make expand exec_prefix.
20233test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000020234
Martin v. Löwis11437992002-04-12 09:54:03 +000020235# VPATH may cause trouble with some makes, so we remove $(srcdir),
20236# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20237# trailing colons and then remove the whole line if VPATH becomes empty
20238# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000020239if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000020240 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000020241s/:*\$(srcdir):*/:/;
20242s/:*\${srcdir}:*/:/;
20243s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020244s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000020245s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020246s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000020247}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000020248fi
20249
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020250DEFS=-DHAVE_CONFIG_H
20251
Skip Montanaro6dead952003-09-25 14:50:04 +000020252ac_libobjs=
20253ac_ltlibobjs=
20254for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20255 # 1. Remove the extension, and $U if already installed.
20256 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000020257 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020258 # 2. Add them.
20259 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
20260 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
20261done
20262LIBOBJS=$ac_libobjs
20263
20264LTLIBOBJS=$ac_ltlibobjs
20265
20266
Martin v. Löwis11437992002-04-12 09:54:03 +000020267
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020268: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000020269ac_clean_files_save=$ac_clean_files
20270ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20271{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20272echo "$as_me: creating $CONFIG_STATUS" >&6;}
20273cat >$CONFIG_STATUS <<_ACEOF
20274#! $SHELL
20275# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020276# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020277# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000020278# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020279
Martin v. Löwis11437992002-04-12 09:54:03 +000020280debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000020281ac_cs_recheck=false
20282ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000020283SHELL=\${CONFIG_SHELL-$SHELL}
20284_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000020285
Martin v. Löwis11437992002-04-12 09:54:03 +000020286cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020287## --------------------- ##
20288## M4sh Initialization. ##
20289## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000020290
Martin v. Löwis11437992002-04-12 09:54:03 +000020291# Be Bourne compatible
20292if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20293 emulate sh
20294 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000020295 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20296 # is contrary to our usage. Disable this feature.
20297 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000020298elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20299 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000020300fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020301DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000020302
Martin v. Löwis11437992002-04-12 09:54:03 +000020303# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020304if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020305 as_unset=unset
20306else
20307 as_unset=false
20308fi
Michael W. Hudson54241132001-12-07 15:38:26 +000020309
Skip Montanaro6dead952003-09-25 14:50:04 +000020310
20311# Work around bugs in pre-3.0 UWIN ksh.
20312$as_unset ENV MAIL MAILPATH
20313PS1='$ '
20314PS2='> '
20315PS4='+ '
20316
20317# NLS nuisances.
20318for as_var in \
20319 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20320 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20321 LC_TELEPHONE LC_TIME
20322do
Skip Montanarof0d5f792004-08-15 14:08:23 +000020323 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000020324 eval $as_var=C; export $as_var
20325 else
20326 $as_unset $as_var
20327 fi
20328done
20329
20330# Required to use basename.
20331if expr a : '\(a\)' >/dev/null 2>&1; then
20332 as_expr=expr
20333else
20334 as_expr=false
20335fi
20336
20337if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
20338 as_basename=basename
20339else
20340 as_basename=false
20341fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020342
20343
20344# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000020345as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000020346$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20347 X"$0" : 'X\(//\)$' \| \
20348 X"$0" : 'X\(/\)$' \| \
20349 . : '\(.\)' 2>/dev/null ||
20350echo X/"$0" |
20351 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
20352 /^X\/\(\/\/\)$/{ s//\1/; q; }
20353 /^X\/\(\/\).*/{ s//\1/; q; }
20354 s/.*/./; q'`
20355
Skip Montanaro6dead952003-09-25 14:50:04 +000020356
Martin v. Löwis11437992002-04-12 09:54:03 +000020357# PATH needs CR, and LINENO needs CR and PATH.
20358# Avoid depending upon Character Ranges.
20359as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20360as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20361as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20362as_cr_digits='0123456789'
20363as_cr_alnum=$as_cr_Letters$as_cr_digits
20364
20365# The user is always right.
20366if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020367 echo "#! /bin/sh" >conf$$.sh
20368 echo "exit 0" >>conf$$.sh
20369 chmod +x conf$$.sh
20370 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020371 PATH_SEPARATOR=';'
20372 else
20373 PATH_SEPARATOR=:
20374 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000020375 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000020376fi
20377
20378
20379 as_lineno_1=$LINENO
20380 as_lineno_2=$LINENO
20381 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20382 test "x$as_lineno_1" != "x$as_lineno_2" &&
20383 test "x$as_lineno_3" = "x$as_lineno_2" || {
20384 # Find who we are. Look in the path if we contain no path at all
20385 # relative or not.
20386 case $0 in
20387 *[\\/]* ) as_myself=$0 ;;
20388 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20389for as_dir in $PATH
20390do
20391 IFS=$as_save_IFS
20392 test -z "$as_dir" && as_dir=.
20393 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20394done
20395
20396 ;;
20397 esac
20398 # We did not find ourselves, most probably we were run as `sh COMMAND'
20399 # in which case we are not to be found in the path.
20400 if test "x$as_myself" = x; then
20401 as_myself=$0
20402 fi
20403 if test ! -f "$as_myself"; then
20404 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
20405echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
20406 { (exit 1); exit 1; }; }
20407 fi
20408 case $CONFIG_SHELL in
20409 '')
20410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20411for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
20412do
20413 IFS=$as_save_IFS
20414 test -z "$as_dir" && as_dir=.
20415 for as_base in sh bash ksh sh5; do
20416 case $as_dir in
20417 /*)
20418 if ("$as_dir/$as_base" -c '
20419 as_lineno_1=$LINENO
20420 as_lineno_2=$LINENO
20421 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20422 test "x$as_lineno_1" != "x$as_lineno_2" &&
20423 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020424 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
20425 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020426 CONFIG_SHELL=$as_dir/$as_base
20427 export CONFIG_SHELL
20428 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
20429 fi;;
20430 esac
20431 done
20432done
20433;;
Jack Jansendd19cf82001-12-06 22:36:17 +000020434 esac
20435
Martin v. Löwis11437992002-04-12 09:54:03 +000020436 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20437 # uniformly replaced by the line number. The first 'sed' inserts a
20438 # line-number line before each line; the second 'sed' does the real
20439 # work. The second script uses 'N' to pair each line-number line
20440 # with the numbered line, and appends trailing '-' during
20441 # substitution so that $LINENO is not a special case at line end.
20442 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20443 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
20444 sed '=' <$as_myself |
20445 sed '
20446 N
20447 s,$,-,
20448 : loop
20449 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
20450 t loop
20451 s,-$,,
20452 s,^['$as_cr_digits']*\n,,
20453 ' >$as_me.lineno &&
20454 chmod +x $as_me.lineno ||
20455 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
20456echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
20457 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020458
Martin v. Löwis11437992002-04-12 09:54:03 +000020459 # Don't try to exec as it changes $[0], causing all sort of problems
20460 # (the dirname of $[0] is not the place where we might find the
20461 # original and so on. Autoconf is especially sensible to this).
20462 . ./$as_me.lineno
20463 # Exit status is that of the last command.
20464 exit
20465}
20466
20467
20468case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
20469 *c*,-n*) ECHO_N= ECHO_C='
20470' ECHO_T=' ' ;;
20471 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
20472 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
20473esac
20474
20475if expr a : '\(a\)' >/dev/null 2>&1; then
20476 as_expr=expr
20477else
20478 as_expr=false
20479fi
20480
20481rm -f conf$$ conf$$.exe conf$$.file
20482echo >conf$$.file
20483if ln -s conf$$.file conf$$ 2>/dev/null; then
20484 # We could just check for DJGPP; but this test a) works b) is more generic
20485 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20486 if test -f conf$$.exe; then
20487 # Don't use ln at all; we don't have any links
20488 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020489 else
Martin v. Löwis11437992002-04-12 09:54:03 +000020490 as_ln_s='ln -s'
20491 fi
20492elif ln conf$$.file conf$$ 2>/dev/null; then
20493 as_ln_s=ln
20494else
20495 as_ln_s='cp -p'
20496fi
20497rm -f conf$$ conf$$.exe conf$$.file
20498
Skip Montanaro6dead952003-09-25 14:50:04 +000020499if mkdir -p . 2>/dev/null; then
20500 as_mkdir_p=:
20501else
Skip Montanarof0d5f792004-08-15 14:08:23 +000020502 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000020503 as_mkdir_p=false
20504fi
20505
Martin v. Löwis11437992002-04-12 09:54:03 +000020506as_executable_p="test -f"
20507
20508# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020509as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020510
20511# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020512as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020513
20514
20515# IFS
20516# We need space, tab and new line, in precisely that order.
20517as_nl='
20518'
20519IFS=" $as_nl"
20520
20521# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000020522$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000020523
20524exec 6>&1
20525
20526# Open the log real soon, to keep \$[0] and so on meaningful, and to
20527# report actual input values of CONFIG_FILES etc. instead of their
20528# values after options handling. Logging --version etc. is OK.
20529exec 5>>config.log
20530{
20531 echo
20532 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20533## Running $as_me. ##
20534_ASBOX
20535} >&5
20536cat >&5 <<_CSEOF
20537
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +000020538This file was extended by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000020539generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000020540
20541 CONFIG_FILES = $CONFIG_FILES
20542 CONFIG_HEADERS = $CONFIG_HEADERS
20543 CONFIG_LINKS = $CONFIG_LINKS
20544 CONFIG_COMMANDS = $CONFIG_COMMANDS
20545 $ $0 $@
20546
20547_CSEOF
20548echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
20549echo >&5
20550_ACEOF
20551
20552# Files that config.status was made for.
20553if test -n "$ac_config_files"; then
20554 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20555fi
20556
20557if test -n "$ac_config_headers"; then
20558 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20559fi
20560
20561if test -n "$ac_config_links"; then
20562 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20563fi
20564
20565if test -n "$ac_config_commands"; then
20566 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20567fi
20568
20569cat >>$CONFIG_STATUS <<\_ACEOF
20570
20571ac_cs_usage="\
20572\`$as_me' instantiates files from templates according to the
20573current configuration.
20574
20575Usage: $0 [OPTIONS] [FILE]...
20576
20577 -h, --help print this help, then exit
20578 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000020579 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000020580 -d, --debug don't remove temporary files
20581 --recheck update $as_me by reconfiguring in the same conditions
20582 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000020583 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020584 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000020585 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020586
20587Configuration files:
20588$config_files
20589
20590Configuration headers:
20591$config_headers
20592
20593Report bugs to <bug-autoconf@gnu.org>."
20594_ACEOF
20595
20596cat >>$CONFIG_STATUS <<_ACEOF
20597ac_cs_version="\\
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +000020598python config.status 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020599configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000020600 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20601
Skip Montanarof0d5f792004-08-15 14:08:23 +000020602Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000020603This config.status script is free software; the Free Software Foundation
20604gives unlimited permission to copy, distribute and modify it."
20605srcdir=$srcdir
20606INSTALL="$INSTALL"
20607_ACEOF
20608
20609cat >>$CONFIG_STATUS <<\_ACEOF
20610# If no file are specified by the user, then we need to provide default
20611# value. By we need to know if files were specified by the user.
20612ac_need_defaults=:
20613while test $# != 0
20614do
20615 case $1 in
20616 --*=*)
20617 ac_option=`expr "x$1" : 'x\([^=]*\)='`
20618 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020619 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000020620 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020621 -*)
20622 ac_option=$1
20623 ac_optarg=$2
20624 ac_shift=shift
20625 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020626 *) # This is not an option, so the user has probably given explicit
20627 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000020628 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000020629 ac_need_defaults=false;;
20630 esac
20631
Skip Montanaro6dead952003-09-25 14:50:04 +000020632 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000020633 # Handling of the options.
20634_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020635cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020636 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20637 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020638 --version | --vers* | -V )
20639 echo "$ac_cs_version"; exit 0 ;;
20640 --he | --h)
20641 # Conflict between --help and --header
20642 { { echo "$as_me:$LINENO: error: ambiguous option: $1
20643Try \`$0 --help' for more information." >&5
20644echo "$as_me: error: ambiguous option: $1
20645Try \`$0 --help' for more information." >&2;}
20646 { (exit 1); exit 1; }; };;
20647 --help | --hel | -h )
20648 echo "$ac_cs_usage"; exit 0 ;;
20649 --debug | --d* | -d )
20650 debug=: ;;
20651 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000020652 $ac_shift
20653 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000020654 ac_need_defaults=false;;
20655 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000020656 $ac_shift
20657 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000020658 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020659 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20660 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20661 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020662
20663 # This is an error.
20664 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
20665Try \`$0 --help' for more information." >&5
20666echo "$as_me: error: unrecognized option: $1
20667Try \`$0 --help' for more information." >&2;}
20668 { (exit 1); exit 1; }; } ;;
20669
20670 *) ac_config_targets="$ac_config_targets $1" ;;
20671
20672 esac
20673 shift
20674done
20675
Skip Montanaro6dead952003-09-25 14:50:04 +000020676ac_configure_extra_args=
20677
20678if $ac_cs_silent; then
20679 exec 6>/dev/null
20680 ac_configure_extra_args="$ac_configure_extra_args --silent"
20681fi
20682
20683_ACEOF
20684cat >>$CONFIG_STATUS <<_ACEOF
20685if \$ac_cs_recheck; then
20686 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
20687 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20688fi
20689
Martin v. Löwis11437992002-04-12 09:54:03 +000020690_ACEOF
20691
20692
20693
20694
20695
20696cat >>$CONFIG_STATUS <<\_ACEOF
20697for ac_config_target in $ac_config_targets
20698do
20699 case "$ac_config_target" in
20700 # Handling of arguments.
20701 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
20702 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
20703 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
20704 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
20705echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20706 { (exit 1); exit 1; }; };;
20707 esac
20708done
20709
20710# If the user did not use the arguments to specify the items to instantiate,
20711# then the envvar interface is used. Set only those that are not.
20712# We use the long form for the default assignment because of an extremely
20713# bizarre bug on SunOS 4.1.3.
20714if $ac_need_defaults; then
20715 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20716 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20717fi
20718
Skip Montanaro6dead952003-09-25 14:50:04 +000020719# Have a temporary directory for convenience. Make it in the build tree
20720# simply because there is no reason to put it here, and in addition,
20721# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000020722# Create a temporary directory, and hook for its removal unless debugging.
20723$debug ||
20724{
20725 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20726 trap '{ (exit 1); exit 1; }' 1 2 13 15
20727}
20728
20729# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000020730
Martin v. Löwis11437992002-04-12 09:54:03 +000020731{
Skip Montanaro6dead952003-09-25 14:50:04 +000020732 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000020733 test -n "$tmp" && test -d "$tmp"
20734} ||
20735{
Skip Montanaro6dead952003-09-25 14:50:04 +000020736 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000020737 (umask 077 && mkdir $tmp)
20738} ||
20739{
Skip Montanaro6dead952003-09-25 14:50:04 +000020740 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000020741 { (exit 1); exit 1; }
20742}
20743
20744_ACEOF
20745
20746cat >>$CONFIG_STATUS <<_ACEOF
20747
20748#
20749# CONFIG_FILES section.
20750#
20751
20752# No need to generate the scripts if there are no CONFIG_FILES.
20753# This happens for instance when ./config.status config.h
20754if test -n "\$CONFIG_FILES"; then
20755 # Protect against being on the right side of a sed subst in config.status.
20756 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20757 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20758s,@SHELL@,$SHELL,;t t
20759s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20760s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20761s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20762s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20763s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20764s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20765s,@exec_prefix@,$exec_prefix,;t t
20766s,@prefix@,$prefix,;t t
20767s,@program_transform_name@,$program_transform_name,;t t
20768s,@bindir@,$bindir,;t t
20769s,@sbindir@,$sbindir,;t t
20770s,@libexecdir@,$libexecdir,;t t
20771s,@datadir@,$datadir,;t t
20772s,@sysconfdir@,$sysconfdir,;t t
20773s,@sharedstatedir@,$sharedstatedir,;t t
20774s,@localstatedir@,$localstatedir,;t t
20775s,@libdir@,$libdir,;t t
20776s,@includedir@,$includedir,;t t
20777s,@oldincludedir@,$oldincludedir,;t t
20778s,@infodir@,$infodir,;t t
20779s,@mandir@,$mandir,;t t
20780s,@build_alias@,$build_alias,;t t
20781s,@host_alias@,$host_alias,;t t
20782s,@target_alias@,$target_alias,;t t
20783s,@DEFS@,$DEFS,;t t
20784s,@ECHO_C@,$ECHO_C,;t t
20785s,@ECHO_N@,$ECHO_N,;t t
20786s,@ECHO_T@,$ECHO_T,;t t
20787s,@LIBS@,$LIBS,;t t
20788s,@VERSION@,$VERSION,;t t
20789s,@SOVERSION@,$SOVERSION,;t t
20790s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
20791s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
20792s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
20793s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
20794s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
20795s,@MACHDEP@,$MACHDEP,;t t
20796s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000020797s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000020798s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000020799s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000020800s,@CXX@,$CXX,;t t
20801s,@MAINOBJ@,$MAINOBJ,;t t
20802s,@EXEEXT@,$EXEEXT,;t t
20803s,@CC@,$CC,;t t
20804s,@CFLAGS@,$CFLAGS,;t t
20805s,@LDFLAGS@,$LDFLAGS,;t t
20806s,@CPPFLAGS@,$CPPFLAGS,;t t
20807s,@ac_ct_CC@,$ac_ct_CC,;t t
20808s,@OBJEXT@,$OBJEXT,;t t
20809s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000020810s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000020811s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
20812s,@LIBRARY@,$LIBRARY,;t t
20813s,@LDLIBRARY@,$LDLIBRARY,;t t
20814s,@DLLLIBRARY@,$DLLLIBRARY,;t t
20815s,@BLDLIBRARY@,$BLDLIBRARY,;t t
20816s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
20817s,@INSTSONAME@,$INSTSONAME,;t t
20818s,@RUNSHARED@,$RUNSHARED,;t t
20819s,@LINKCC@,$LINKCC,;t t
20820s,@RANLIB@,$RANLIB,;t t
20821s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20822s,@AR@,$AR,;t t
20823s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20824s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20825s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20826s,@LN@,$LN,;t t
20827s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000020828s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000020829s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
20830s,@SO@,$SO,;t t
20831s,@LDSHARED@,$LDSHARED,;t t
20832s,@BLDSHARED@,$BLDSHARED,;t t
20833s,@CCSHARED@,$CCSHARED,;t t
20834s,@LINKFORSHARED@,$LINKFORSHARED,;t t
20835s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000020836s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000020837s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
20838s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
20839s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
20840s,@LDLAST@,$LDLAST,;t t
20841s,@THREADOBJ@,$THREADOBJ,;t t
20842s,@DLINCLDIR@,$DLINCLDIR,;t t
20843s,@DYNLOADFILE@,$DYNLOADFILE,;t t
20844s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000020845s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000020846s,@LIBOBJS@,$LIBOBJS,;t t
20847s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
20848s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
20849s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
20850s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
20851s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
20852s,@LIBM@,$LIBM,;t t
20853s,@LIBC@,$LIBC,;t t
20854s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
20855s,@THREADHEADERS@,$THREADHEADERS,;t t
20856s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000020857s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000020858CEOF
20859
20860_ACEOF
20861
20862 cat >>$CONFIG_STATUS <<\_ACEOF
20863 # Split the substitutions into bite-sized pieces for seds with
20864 # small command number limits, like on Digital OSF/1 and HP-UX.
20865 ac_max_sed_lines=48
20866 ac_sed_frag=1 # Number of current file.
20867 ac_beg=1 # First line for current file.
20868 ac_end=$ac_max_sed_lines # Line after last line for current file.
20869 ac_more_lines=:
20870 ac_sed_cmds=
20871 while $ac_more_lines; do
20872 if test $ac_beg -gt 1; then
20873 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20874 else
20875 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20876 fi
20877 if test ! -s $tmp/subs.frag; then
20878 ac_more_lines=false
20879 else
20880 # The purpose of the label and of the branching condition is to
20881 # speed up the sed processing (if there are no `@' at all, there
20882 # is no need to browse any of the substitutions).
20883 # These are the two extra sed commands mentioned above.
20884 (echo ':t
20885 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20886 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000020887 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000020888 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000020889 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000020890 fi
20891 ac_sed_frag=`expr $ac_sed_frag + 1`
20892 ac_beg=$ac_end
20893 ac_end=`expr $ac_end + $ac_max_sed_lines`
20894 fi
20895 done
20896 if test -z "$ac_sed_cmds"; then
20897 ac_sed_cmds=cat
20898 fi
20899fi # test -n "$CONFIG_FILES"
20900
20901_ACEOF
20902cat >>$CONFIG_STATUS <<\_ACEOF
20903for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20904 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20905 case $ac_file in
20906 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000020907 cat >$tmp/stdin
20908 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20909 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020910 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000020911 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020912 * ) ac_file_in=$ac_file.in ;;
20913 esac
20914
20915 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20916 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
20917$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020918 X"$ac_file" : 'X\(//\)[^/]' \| \
20919 X"$ac_file" : 'X\(//\)$' \| \
20920 X"$ac_file" : 'X\(/\)' \| \
20921 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000020922echo X"$ac_file" |
20923 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20924 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20925 /^X\(\/\/\)$/{ s//\1/; q; }
20926 /^X\(\/\).*/{ s//\1/; q; }
20927 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020928 { if $as_mkdir_p; then
20929 mkdir -p "$ac_dir"
20930 else
20931 as_dir="$ac_dir"
20932 as_dirs=
20933 while test ! -d "$as_dir"; do
20934 as_dirs="$as_dir $as_dirs"
20935 as_dir=`(dirname "$as_dir") 2>/dev/null ||
20936$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020937 X"$as_dir" : 'X\(//\)[^/]' \| \
20938 X"$as_dir" : 'X\(//\)$' \| \
20939 X"$as_dir" : 'X\(/\)' \| \
20940 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000020941echo X"$as_dir" |
20942 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20943 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20944 /^X\(\/\/\)$/{ s//\1/; q; }
20945 /^X\(\/\).*/{ s//\1/; q; }
20946 s/.*/./; q'`
20947 done
20948 test ! -n "$as_dirs" || mkdir $as_dirs
20949 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20950echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20951 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020952
20953 ac_builddir=.
20954
20955if test "$ac_dir" != .; then
20956 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20957 # A "../" for each directory in $ac_dir_suffix.
20958 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20959else
20960 ac_dir_suffix= ac_top_builddir=
20961fi
20962
20963case $srcdir in
20964 .) # No --srcdir option. We are building in place.
20965 ac_srcdir=.
20966 if test -z "$ac_top_builddir"; then
20967 ac_top_srcdir=.
20968 else
20969 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20970 fi ;;
20971 [\\/]* | ?:[\\/]* ) # Absolute path.
20972 ac_srcdir=$srcdir$ac_dir_suffix;
20973 ac_top_srcdir=$srcdir ;;
20974 *) # Relative path.
20975 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20976 ac_top_srcdir=$ac_top_builddir$srcdir ;;
20977esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000020978
20979# Do not use `cd foo && pwd` to compute absolute paths, because
20980# the directories may not exist.
20981case `pwd` in
20982.) ac_abs_builddir="$ac_dir";;
20983*)
20984 case "$ac_dir" in
20985 .) ac_abs_builddir=`pwd`;;
20986 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
20987 *) ac_abs_builddir=`pwd`/"$ac_dir";;
20988 esac;;
20989esac
20990case $ac_abs_builddir in
20991.) ac_abs_top_builddir=${ac_top_builddir}.;;
20992*)
20993 case ${ac_top_builddir}. in
20994 .) ac_abs_top_builddir=$ac_abs_builddir;;
20995 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
20996 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
20997 esac;;
20998esac
20999case $ac_abs_builddir in
21000.) ac_abs_srcdir=$ac_srcdir;;
21001*)
21002 case $ac_srcdir in
21003 .) ac_abs_srcdir=$ac_abs_builddir;;
21004 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
21005 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
21006 esac;;
21007esac
21008case $ac_abs_builddir in
21009.) ac_abs_top_srcdir=$ac_top_srcdir;;
21010*)
21011 case $ac_top_srcdir in
21012 .) ac_abs_top_srcdir=$ac_abs_builddir;;
21013 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
21014 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
21015 esac;;
21016esac
Martin v. Löwis11437992002-04-12 09:54:03 +000021017
21018
21019 case $INSTALL in
21020 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21021 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
21022 esac
21023
Trent Mickc5625ba2004-08-25 23:59:39 +000021024 if test x"$ac_file" != x-; then
21025 { echo "$as_me:$LINENO: creating $ac_file" >&5
21026echo "$as_me: creating $ac_file" >&6;}
21027 rm -f "$ac_file"
21028 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021029 # Let's still pretend it is `configure' which instantiates (i.e., don't
21030 # use $as_me), people would be surprised to read:
21031 # /* config.h. Generated by config.status. */
21032 if test x"$ac_file" = x-; then
21033 configure_input=
21034 else
21035 configure_input="$ac_file. "
21036 fi
21037 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021038 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000021039
21040 # First look for the input files in the build tree, otherwise in the
21041 # src tree.
21042 ac_file_inputs=`IFS=:
21043 for f in $ac_file_in; do
21044 case $f in
21045 -) echo $tmp/stdin ;;
21046 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021047 # Absolute (can't be DOS-style, as IFS=:)
21048 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021049echo "$as_me: error: cannot find input file: $f" >&2;}
21050 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021051 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021052 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021053 if test -f "$f"; then
21054 # Build tree
21055 echo "$f"
21056 elif test -f "$srcdir/$f"; then
21057 # Source tree
21058 echo "$srcdir/$f"
21059 else
21060 # /dev/null tree
21061 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021062echo "$as_me: error: cannot find input file: $f" >&2;}
21063 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021064 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021065 esac
21066 done` || { (exit 1); exit 1; }
21067_ACEOF
21068cat >>$CONFIG_STATUS <<_ACEOF
21069 sed "$ac_vpsub
21070$extrasub
21071_ACEOF
21072cat >>$CONFIG_STATUS <<\_ACEOF
21073:t
21074/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21075s,@configure_input@,$configure_input,;t t
21076s,@srcdir@,$ac_srcdir,;t t
21077s,@abs_srcdir@,$ac_abs_srcdir,;t t
21078s,@top_srcdir@,$ac_top_srcdir,;t t
21079s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
21080s,@builddir@,$ac_builddir,;t t
21081s,@abs_builddir@,$ac_abs_builddir,;t t
21082s,@top_builddir@,$ac_top_builddir,;t t
21083s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
21084s,@INSTALL@,$ac_INSTALL,;t t
21085" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21086 rm -f $tmp/stdin
21087 if test x"$ac_file" != x-; then
21088 mv $tmp/out $ac_file
21089 else
21090 cat $tmp/out
21091 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021092 fi
21093
Martin v. Löwis11437992002-04-12 09:54:03 +000021094done
21095_ACEOF
21096cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021097
Martin v. Löwis11437992002-04-12 09:54:03 +000021098#
21099# CONFIG_HEADER section.
21100#
Guido van Rossum627b2d71993-12-24 10:39:16 +000021101
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021102# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21103# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000021104#
21105# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021106ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21107ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000021108ac_dC=' '
21109ac_dD=',;t'
21110# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000021111ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000021112ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021113ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000021114ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021115
Martin v. Löwis11437992002-04-12 09:54:03 +000021116for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000021117 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000021118 case $ac_file in
21119 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021120 cat >$tmp/stdin
21121 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21122 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021123 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021124 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021125 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021126 esac
21127
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
21129echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021130
Martin v. Löwis11437992002-04-12 09:54:03 +000021131 # First look for the input files in the build tree, otherwise in the
21132 # src tree.
21133 ac_file_inputs=`IFS=:
21134 for f in $ac_file_in; do
21135 case $f in
21136 -) echo $tmp/stdin ;;
21137 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021138 # Absolute (can't be DOS-style, as IFS=:)
21139 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021140echo "$as_me: error: cannot find input file: $f" >&2;}
21141 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021142 # Do quote $f, to prevent DOS paths from being IFS'd.
21143 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021144 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021145 if test -f "$f"; then
21146 # Build tree
21147 echo "$f"
21148 elif test -f "$srcdir/$f"; then
21149 # Source tree
21150 echo "$srcdir/$f"
21151 else
21152 # /dev/null tree
21153 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021154echo "$as_me: error: cannot find input file: $f" >&2;}
21155 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021156 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021157 esac
21158 done` || { (exit 1); exit 1; }
21159 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021160 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021161
Martin v. Löwis11437992002-04-12 09:54:03 +000021162_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021163
Martin v. Löwis11437992002-04-12 09:54:03 +000021164# Transform confdefs.h into two sed scripts, `conftest.defines' and
21165# `conftest.undefs', that substitutes the proper values into
21166# config.h.in to produce config.h. The first handles `#define'
21167# templates, and the second `#undef' templates.
21168# And first: Protect against being on the right side of a sed subst in
21169# config.status. Protect against being in an unquoted here document
21170# in config.status.
21171rm -f conftest.defines conftest.undefs
21172# Using a here document instead of a string reduces the quoting nightmare.
21173# Putting comments in sed scripts is not portable.
21174#
21175# `end' is used to avoid that the second main sed command (meant for
21176# 0-ary CPP macros) applies to n-ary macro definitions.
21177# See the Autoconf documentation for `clear'.
21178cat >confdef2sed.sed <<\_ACEOF
21179s/[\\&,]/\\&/g
21180s,[\\$`],\\&,g
21181t clear
21182: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000021183s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000021184t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000021185s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000021186: end
21187_ACEOF
21188# If some macros were called several times there might be several times
21189# the same #defines, which is useless. Nevertheless, we may not want to
21190# sort them, since we want the *last* AC-DEFINE to be honored.
21191uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
21192sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
21193rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021194
21195# This sed command replaces #undef with comments. This is necessary, for
21196# example, in the case of _POSIX_SOURCE, which is predefined and required
21197# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000021198cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000021199s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000021200_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021201
Martin v. Löwis11437992002-04-12 09:54:03 +000021202# Break up conftest.defines because some shells have a limit on the size
21203# of here documents, and old seds have small limits too (100 cmds).
21204echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000021205echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021206echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
21207echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021208rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000021209while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000021210do
Martin v. Löwis11437992002-04-12 09:54:03 +000021211 # Write a limited-size here document to $tmp/defines.sed.
21212 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
21213 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021214 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021215 # Work around the forget-to-reset-the-flag bug.
21216 echo 't clr' >>$CONFIG_STATUS
21217 echo ': clr' >>$CONFIG_STATUS
21218 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021219 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021220 sed -f $tmp/defines.sed $tmp/in >$tmp/out
21221 rm -f $tmp/in
21222 mv $tmp/out $tmp/in
21223' >>$CONFIG_STATUS
21224 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
21225 rm -f conftest.defines
21226 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000021227done
Martin v. Löwis11437992002-04-12 09:54:03 +000021228rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000021229echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021230echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021231
Martin v. Löwis11437992002-04-12 09:54:03 +000021232# Break up conftest.undefs because some shells have a limit on the size
21233# of here documents, and old seds have small limits too (100 cmds).
21234echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
21235rm -f conftest.tail
21236while grep . conftest.undefs >/dev/null
21237do
21238 # Write a limited-size here document to $tmp/undefs.sed.
21239 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
21240 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021241 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021242 # Work around the forget-to-reset-the-flag bug.
21243 echo 't clr' >>$CONFIG_STATUS
21244 echo ': clr' >>$CONFIG_STATUS
21245 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
21246 echo 'CEOF
21247 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
21248 rm -f $tmp/in
21249 mv $tmp/out $tmp/in
21250' >>$CONFIG_STATUS
21251 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
21252 rm -f conftest.undefs
21253 mv conftest.tail conftest.undefs
21254done
21255rm -f conftest.undefs
21256
21257cat >>$CONFIG_STATUS <<\_ACEOF
21258 # Let's still pretend it is `configure' which instantiates (i.e., don't
21259 # use $as_me), people would be surprised to read:
21260 # /* config.h. Generated by config.status. */
21261 if test x"$ac_file" = x-; then
21262 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000021263 else
Martin v. Löwis11437992002-04-12 09:54:03 +000021264 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000021265 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021266 cat $tmp/in >>$tmp/config.h
21267 rm -f $tmp/in
21268 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021269 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021270 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21271echo "$as_me: $ac_file is unchanged" >&6;}
21272 else
21273 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21274$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021275 X"$ac_file" : 'X\(//\)[^/]' \| \
21276 X"$ac_file" : 'X\(//\)$' \| \
21277 X"$ac_file" : 'X\(/\)' \| \
21278 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021279echo X"$ac_file" |
21280 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21281 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21282 /^X\(\/\/\)$/{ s//\1/; q; }
21283 /^X\(\/\).*/{ s//\1/; q; }
21284 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021285 { if $as_mkdir_p; then
21286 mkdir -p "$ac_dir"
21287 else
21288 as_dir="$ac_dir"
21289 as_dirs=
21290 while test ! -d "$as_dir"; do
21291 as_dirs="$as_dir $as_dirs"
21292 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21293$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021294 X"$as_dir" : 'X\(//\)[^/]' \| \
21295 X"$as_dir" : 'X\(//\)$' \| \
21296 X"$as_dir" : 'X\(/\)' \| \
21297 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021298echo X"$as_dir" |
21299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21300 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21301 /^X\(\/\/\)$/{ s//\1/; q; }
21302 /^X\(\/\).*/{ s//\1/; q; }
21303 s/.*/./; q'`
21304 done
21305 test ! -n "$as_dirs" || mkdir $as_dirs
21306 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21307echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21308 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021309
Martin v. Löwis11437992002-04-12 09:54:03 +000021310 rm -f $ac_file
21311 mv $tmp/config.h $ac_file
21312 fi
21313 else
21314 cat $tmp/config.h
21315 rm -f $tmp/config.h
21316 fi
21317done
21318_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021319
Martin v. Löwis11437992002-04-12 09:54:03 +000021320cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021321
Martin v. Löwis11437992002-04-12 09:54:03 +000021322{ (exit 0); exit 0; }
21323_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021324chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021325ac_clean_files=$ac_clean_files_save
21326
21327
21328# configure is writing to config.log, and then calls config.status.
21329# config.status does its own redirection, appending to config.log.
21330# Unfortunately, on DOS this fails, as config.log is still kept open
21331# by configure, so config.status won't be able to write to it; its
21332# output is simply discarded. So we exec the FD to /dev/null,
21333# effectively closing config.log, so it can be properly (re)opened and
21334# appended to by config.status. When coming back to configure, we
21335# need to make the FD available again.
21336if test "$no_create" != yes; then
21337 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021338 ac_config_status_args=
21339 test "$silent" = yes &&
21340 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000021341 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000021342 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021343 exec 5>>config.log
21344 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21345 # would make configure fail if this is the last instruction.
21346 $ac_cs_success || { (exit 1); exit 1; }
21347fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000021348
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021349
21350echo "creating Setup"
21351if test ! -f Modules/Setup
21352then
21353 cp $srcdir/Modules/Setup.dist Modules/Setup
21354fi
21355
21356echo "creating Setup.local"
21357if test ! -f Modules/Setup.local
21358then
21359 echo "# Edit this file for local setup changes" >Modules/Setup.local
21360fi
21361
21362echo "creating Makefile"
21363$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
21364 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000021365 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000021366mv config.c Modules