blob: ecfdfc402177e68e9f7c7a58ba735d417786bf5d [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl94800df2011-02-25 11:09:02 +00002# From configure.in Revision: 88568 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004# Generated by GNU Autoconf 2.68 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Martin v. Löwiseba40652007-08-30 20:10:57 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Martin v. Löwiseba40652007-08-30 20:10:57 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
37
Skip Montanaro6dead952003-09-25 14:50:04 +000038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Martin v. Löwiseba40652007-08-30 20:10:57 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000095as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000096case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000097 *[\\/]* ) as_myself=$0 ;;
98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000099for as_dir in $PATH
100do
101 IFS=$as_save_IFS
102 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000106
Martin v. Löwiseba40652007-08-30 20:10:57 +0000107 ;;
108esac
109# We did not find ourselves, most probably we were run as `sh COMMAND'
110# in which case we are not to be found in the path.
111if test "x$as_myself" = x; then
112 as_myself=$0
113fi
114if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117fi
118
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000119# Unset variables that we do not need and which cause bugs (e.g. in
120# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
121# suppresses any "Segmentation fault" message there. '((' could
122# trigger a bug in pdksh 5.2.14.
123for as_var in BASH_ENV ENV MAIL MAILPATH
124do eval test x\${$as_var+set} = xset \
125 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000136
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000137# CDPATH.
138(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140if test "x$CONFIG_SHELL" = x; then
141 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142 emulate sh
143 NULLCMD=:
144 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145 # is contrary to our usage. Disable this feature.
146 alias -g '\${1+\"\$@\"}'='\"\$@\"'
147 setopt NO_GLOB_SUBST
148else
149 case \`(set -o) 2>/dev/null\` in #(
150 *posix*) :
151 set -o posix ;; #(
152 *) :
153 ;;
154esac
155fi
156"
157 as_required="as_fn_return () { (exit \$1); }
158as_fn_success () { as_fn_return 0; }
159as_fn_failure () { as_fn_return 1; }
160as_fn_ret_success () { return 0; }
161as_fn_ret_failure () { return 1; }
162
163exitcode=0
164as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170else
171 exitcode=1; echo positional parameters were not saved.
172fi
173test x\$exitcode = x0 || exit 1"
174 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178test \$(( 1 + 1 )) = 2 || exit 1"
179 if (eval "$as_required") 2>/dev/null; then :
180 as_have_required=yes
181else
182 as_have_required=no
183fi
184 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186else
187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188as_found=false
189for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190do
191 IFS=$as_save_IFS
192 test -z "$as_dir" && as_dir=.
193 as_found=:
194 case $as_dir in #(
195 /*)
196 for as_base in sh bash ksh sh5; do
197 # Try only shells that exist, to save several forks.
198 as_shell=$as_dir/$as_base
199 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 CONFIG_SHELL=$as_shell as_have_required=yes
202 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203 break 2
204fi
205fi
206 done;;
207 esac
208 as_found=false
209done
210$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
211 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
212 CONFIG_SHELL=$SHELL as_have_required=yes
213fi; }
214IFS=$as_save_IFS
215
216
217 if test "x$CONFIG_SHELL" != x; then :
218 # We cannot yet assume a decent shell, so we have to provide a
219 # neutralization value for shells without unset; and this also
220 # works around shells that cannot unset nonexistent variables.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000221 # Preserve -v and -x to the replacement shell.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000222 BASH_ENV=/dev/null
223 ENV=/dev/null
224 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
225 export CONFIG_SHELL
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000226 case $- in # ((((
227 *v*x* | *x*v* ) as_opts=-vx ;;
228 *v* ) as_opts=-v ;;
229 *x* ) as_opts=-x ;;
230 * ) as_opts= ;;
231 esac
232 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000233fi
234
235 if test x$as_have_required = xno; then :
236 $as_echo "$0: This script requires a shell more modern than all"
237 $as_echo "$0: the shells that I found on your system."
238 if test x${ZSH_VERSION+set} = xset ; then
239 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241 else
242 $as_echo "$0: Please tell bug-autoconf@gnu.org and
243$0: http://bugs.python.org/ about your system, including
244$0: any error possibly output before this message. Then
245$0: install a modern shell, or manually run the script
246$0: under such a shell if you do have one."
247 fi
248 exit 1
249fi
250fi
251fi
252SHELL=${CONFIG_SHELL-/bin/sh}
253export SHELL
254# Unset more variables known to interfere with behavior of common tools.
255CLICOLOR_FORCE= GREP_OPTIONS=
256unset CLICOLOR_FORCE GREP_OPTIONS
257
258## --------------------- ##
259## M4sh Shell Functions. ##
260## --------------------- ##
261# as_fn_unset VAR
262# ---------------
263# Portably unset VAR.
264as_fn_unset ()
265{
266 { eval $1=; unset $1;}
267}
268as_unset=as_fn_unset
269
270# as_fn_set_status STATUS
271# -----------------------
272# Set $? to STATUS, without forking.
273as_fn_set_status ()
274{
275 return $1
276} # as_fn_set_status
277
278# as_fn_exit STATUS
279# -----------------
280# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281as_fn_exit ()
282{
283 set +e
284 as_fn_set_status $1
285 exit $1
286} # as_fn_exit
287
288# as_fn_mkdir_p
289# -------------
290# Create "$as_dir" as a directory, including parents if necessary.
291as_fn_mkdir_p ()
292{
293
294 case $as_dir in #(
295 -*) as_dir=./$as_dir;;
296 esac
297 test -d "$as_dir" || eval $as_mkdir_p || {
298 as_dirs=
299 while :; do
300 case $as_dir in #(
301 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302 *) as_qdir=$as_dir;;
303 esac
304 as_dirs="'$as_qdir' $as_dirs"
305 as_dir=`$as_dirname -- "$as_dir" ||
306$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307 X"$as_dir" : 'X\(//\)[^/]' \| \
308 X"$as_dir" : 'X\(//\)$' \| \
309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310$as_echo X"$as_dir" |
311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\/\)[^/].*/{
316 s//\1/
317 q
318 }
319 /^X\(\/\/\)$/{
320 s//\1/
321 q
322 }
323 /^X\(\/\).*/{
324 s//\1/
325 q
326 }
327 s/.*/./; q'`
328 test -d "$as_dir" && break
329 done
330 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000332
333
334} # as_fn_mkdir_p
335# as_fn_append VAR VALUE
336# ----------------------
337# Append the text in VALUE to the end of the definition contained in VAR. Take
338# advantage of any shell optimizations that allow amortized linear growth over
339# repeated appends, instead of the typical quadratic growth present in naive
340# implementations.
341if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
342 eval 'as_fn_append ()
343 {
344 eval $1+=\$2
345 }'
346else
347 as_fn_append ()
348 {
349 eval $1=\$$1\$2
350 }
351fi # as_fn_append
352
353# as_fn_arith ARG...
354# ------------------
355# Perform arithmetic evaluation on the ARGs, and store the result in the
356# global $as_val. Take advantage of shells that can avoid forks. The arguments
357# must be portable across $(()) and expr.
358if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359 eval 'as_fn_arith ()
360 {
361 as_val=$(( $* ))
362 }'
363else
364 as_fn_arith ()
365 {
366 as_val=`expr "$@" || test $? -eq 1`
367 }
368fi # as_fn_arith
369
370
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000373# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
374# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000375# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000376as_fn_error ()
377{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000378 as_status=$1; test $as_status -eq 0 && as_status=1
379 if test "$4"; then
380 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
381 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000382 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000383 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000384 as_fn_exit $as_status
385} # as_fn_error
386
Martin v. Löwiseba40652007-08-30 20:10:57 +0000387if expr a : '\(a\)' >/dev/null 2>&1 &&
388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
389 as_expr=expr
390else
391 as_expr=false
392fi
393
394if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
395 as_basename=basename
396else
397 as_basename=false
398fi
399
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000405
Martin v. Löwiseba40652007-08-30 20:10:57 +0000406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000410$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000411 sed '/^.*\/\([^/][^/]*\)\/*$/{
412 s//\1/
413 q
414 }
415 /^X\/\(\/\/\)$/{
416 s//\1/
417 q
418 }
419 /^X\/\(\/\).*/{
420 s//\1/
421 q
422 }
423 s/.*/./; q'`
424
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000425# Avoid depending upon Character Ranges.
426as_cr_letters='abcdefghijklmnopqrstuvwxyz'
427as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
428as_cr_Letters=$as_cr_letters$as_cr_LETTERS
429as_cr_digits='0123456789'
430as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000431
432
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000433 as_lineno_1=$LINENO as_lineno_1a=$LINENO
434 as_lineno_2=$LINENO as_lineno_2a=$LINENO
435 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
436 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
437 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000453 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000454 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000455
456 # Don't try to exec as it changes $[0], causing all sort of problems
457 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000458 # original and so on. Autoconf is especially sensitive to this).
459 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 # Exit status is that of the last command.
461 exit
462}
463
Martin v. Löwiseba40652007-08-30 20:10:57 +0000464ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000465case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000466-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000467 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000472 esac;;
473*)
474 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000476
Martin v. Löwis11437992002-04-12 09:54:03 +0000477rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000482 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000483fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000484if (echo >conf$$.file) 2>/dev/null; then
485 if ln -s conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s='ln -s'
487 # ... but there are two gotchas:
488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
490 # In both cases, we have to default to `cp -p'.
491 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492 as_ln_s='cp -p'
493 elif ln conf$$.file conf$$ 2>/dev/null; then
494 as_ln_s=ln
495 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000498else
499 as_ln_s='cp -p'
500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000501rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
502rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000503
Skip Montanaro6dead952003-09-25 14:50:04 +0000504if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000506else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000507 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000508 as_mkdir_p=false
509fi
510
Martin v. Löwiseba40652007-08-30 20:10:57 +0000511if test -x / >/dev/null 2>&1; then
512 as_test_x='test -x'
513else
514 if ls -dL / >/dev/null 2>&1; then
515 as_ls_L_option=L
516 else
517 as_ls_L_option=
518 fi
519 as_test_x='
520 eval sh -c '\''
521 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524 case $1 in #(
525 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000526 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000528 ???[sx]*):;;*)false;;esac;fi
529 '\'' sh
530 '
531fi
532as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000533
534# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000535as_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 +0000536
537# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000539
540
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000541test -n "$DJDIR" || exec 7<&0 </dev/null
542exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
544# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000545# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000546# so uname gets run too.
547ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
548
Martin v. Löwis11437992002-04-12 09:54:03 +0000549#
550# Initializations.
551#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000552ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000553ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000554ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000556cross_compiling=no
557subdirs=
558MFLAGS=
559MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
Martin v. Löwis11437992002-04-12 09:54:03 +0000561# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000562PACKAGE_NAME='python'
563PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000564PACKAGE_VERSION='2.7'
565PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000566PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000567PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569ac_unique_file="Include/object.h"
570# Factoring default headers for most tests.
571ac_includes_default="\
572#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000574# include <sys/types.h>
575#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000576#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000577# include <sys/stat.h>
578#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000579#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <stdlib.h>
581# include <stddef.h>
582#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000583# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000584# include <stdlib.h>
585# endif
586#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000587#ifdef HAVE_STRING_H
588# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <memory.h>
590# endif
591# include <string.h>
592#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <strings.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef HAVE_STDINT_H
600# include <stdint.h>
601#endif
602#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <unistd.h>
604#endif"
605
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000606ac_subst_vars='LTLIBOBJS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000607SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000608THREADHEADERS
609UNICODE_OBJS
610LIBC
611LIBM
612HAVE_GETHOSTBYNAME
613HAVE_GETHOSTBYNAME_R
614HAVE_GETHOSTBYNAME_R_3_ARG
615HAVE_GETHOSTBYNAME_R_5_ARG
616HAVE_GETHOSTBYNAME_R_6_ARG
617LIBOBJS
618TRUE
619MACHDEP_OBJS
620DYNLOADFILE
621DLINCLDIR
622THREADOBJ
623LDLAST
624USE_THREAD_MODULE
625SIGNAL_OBJS
626USE_SIGNAL_MODULE
627LIBFFI_INCLUDEDIR
628PKG_CONFIG
629SHLIBS
630CFLAGSFORSHARED
631LINKFORSHARED
632CCSHARED
633BLDSHARED
634LDCXXSHARED
635LDSHARED
636SO
637LIBTOOL_CRUFT
638OTHER_LIBTOOL_OPT
639UNIVERSAL_ARCH_FLAGS
640BASECFLAGS
641OPT
642LN
643INSTALL_DATA
644INSTALL_SCRIPT
645INSTALL_PROGRAM
646SVNVERSION
647ARFLAGS
648AR
649RANLIB
650GNULD
651LINKCC
652RUNSHARED
653INSTSONAME
654LDLIBRARYDIR
655BLDLIBRARY
656DLLLIBRARY
657LDLIBRARY
658LIBRARY
659BUILDEXEEXT
660EGREP
661GREP
662CPP
663MAINCC
664CXX
665OBJEXT
666EXEEXT
667ac_ct_CC
668CPPFLAGS
669LDFLAGS
670CFLAGS
671CC
672EXPORT_MACOSX_DEPLOYMENT_TARGET
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXTRAMACHDEPPATH
675EXTRAPLATDIR
676SGI_ABI
677MACHDEP
678FRAMEWORKINSTALLAPPSPREFIX
679FRAMEWORKUNIXTOOLSPREFIX
680FRAMEWORKALTINSTALLLAST
681FRAMEWORKALTINSTALLFIRST
682FRAMEWORKINSTALLLAST
683FRAMEWORKINSTALLFIRST
684PYTHONFRAMEWORKINSTALLDIR
685PYTHONFRAMEWORKPREFIX
686PYTHONFRAMEWORKDIR
687PYTHONFRAMEWORKIDENTIFIER
688PYTHONFRAMEWORK
689LIPO_32BIT_FLAGS
690ARCH_RUN_32BIT
691UNIVERSALSDK
692CONFIG_ARGS
693SOVERSION
694VERSION
695target_alias
696host_alias
697build_alias
698LIBS
699ECHO_T
700ECHO_N
701ECHO_C
702DEFS
703mandir
704localedir
705libdir
706psdir
707pdfdir
708dvidir
709htmldir
710infodir
711docdir
712oldincludedir
713includedir
714localstatedir
715sharedstatedir
716sysconfdir
717datadir
718datarootdir
719libexecdir
720sbindir
721bindir
722program_transform_name
723prefix
724exec_prefix
725PACKAGE_URL
726PACKAGE_BUGREPORT
727PACKAGE_STRING
728PACKAGE_VERSION
729PACKAGE_TARNAME
730PACKAGE_NAME
731PATH_SEPARATOR
732SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000733ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000734ac_user_opts='
735enable_option_checking
736enable_universalsdk
737with_universal_archs
738with_framework_name
739enable_framework
740with_gcc
741with_cxx_main
742with_suffix
743enable_shared
744enable_profiling
745with_pydebug
746enable_toolbox_glue
747with_libs
748with_system_expat
749with_system_ffi
750with_dbmliborder
751with_signal_module
752with_dec_threads
753with_threads
754with_thread
755with_pth
756enable_ipv6
757with_doc_strings
758with_tsc
759with_pymalloc
760with_valgrind
761with_wctype_functions
762with_fpectl
763with_libm
764with_libc
765enable_big_digits
766enable_unicode
767'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000768 ac_precious_vars='build_alias
769host_alias
770target_alias
771CC
772CFLAGS
773LDFLAGS
774LIBS
775CPPFLAGS
776CPP'
777
Guido van Rossum627b2d71993-12-24 10:39:16 +0000778
Guido van Rossum7f43da71994-08-01 12:15:30 +0000779# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000780ac_init_help=
781ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000782ac_unrecognized_opts=
783ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784# The variables have the same names as the options, with
785# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000786cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000789no_recursion=
790prefix=NONE
791program_prefix=NONE
792program_suffix=NONE
793program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798x_includes=NONE
799x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000800
801# Installation directory options.
802# These are left unexpanded so users can "make install exec_prefix=/foo"
803# and all the variables that are supposed to be based on exec_prefix
804# by default will actually change.
805# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000806# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000807bindir='${exec_prefix}/bin'
808sbindir='${exec_prefix}/sbin'
809libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000810datarootdir='${prefix}/share'
811datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812sysconfdir='${prefix}/etc'
813sharedstatedir='${prefix}/com'
814localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815includedir='${prefix}/include'
816oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000817docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
818infodir='${datarootdir}/info'
819htmldir='${docdir}'
820dvidir='${docdir}'
821pdfdir='${docdir}'
822psdir='${docdir}'
823libdir='${exec_prefix}/lib'
824localedir='${datarootdir}/locale'
825mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000826
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000828ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000830do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831 # If the previous option needs an argument, assign it.
832 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000833 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834 ac_prev=
835 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000836 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000839 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
840 *=) ac_optarg= ;;
841 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844 # Accept the important Cygnus configure options, so we can diagnose typos.
845
Martin v. Löwiseba40652007-08-30 20:10:57 +0000846 case $ac_dashdash$ac_option in
847 --)
848 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850 -bindir | --bindir | --bindi | --bind | --bin | --bi)
851 ac_prev=bindir ;;
852 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854
855 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860 -cache-file | --cache-file | --cache-fil | --cache-fi \
861 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
862 ac_prev=cache_file ;;
863 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
864 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000865 cache_file=$ac_optarg ;;
866
867 --config-cache | -C)
868 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869
Martin v. Löwiseba40652007-08-30 20:10:57 +0000870 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000874
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
876 | --dataroo | --dataro | --datar)
877 ac_prev=datarootdir ;;
878 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
879 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
880 datarootdir=$ac_optarg ;;
881
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000883 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000885 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000886 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000887 ac_useropt_orig=$ac_useropt
888 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
889 case $ac_user_opts in
890 *"
891"enable_$ac_useropt"
892"*) ;;
893 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
894 ac_unrecognized_sep=', ';;
895 esac
896 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000897
898 -docdir | --docdir | --docdi | --doc | --do)
899 ac_prev=docdir ;;
900 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
901 docdir=$ac_optarg ;;
902
903 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
904 ac_prev=dvidir ;;
905 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
906 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
908 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000909 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000911 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000912 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000913 ac_useropt_orig=$ac_useropt
914 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
915 case $ac_user_opts in
916 *"
917"enable_$ac_useropt"
918"*) ;;
919 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
920 ac_unrecognized_sep=', ';;
921 esac
922 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
925 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
926 | --exec | --exe | --ex)
927 ac_prev=exec_prefix ;;
928 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
929 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
930 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
933 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 # Obsolete; use --with-gas.
935 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 -help | --help | --hel | --he | -h)
938 ac_init_help=long ;;
939 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
940 ac_init_help=recursive ;;
941 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
942 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
944 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
Martin v. Löwiseba40652007-08-30 20:10:57 +0000949 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
950 ac_prev=htmldir ;;
951 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
952 | --ht=*)
953 htmldir=$ac_optarg ;;
954
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 -includedir | --includedir | --includedi | --included | --include \
956 | --includ | --inclu | --incl | --inc)
957 ac_prev=includedir ;;
958 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
959 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961
962 -infodir | --infodir | --infodi | --infod | --info | --inf)
963 ac_prev=infodir ;;
964 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
967 -libdir | --libdir | --libdi | --libd)
968 ac_prev=libdir ;;
969 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
972 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
973 | --libexe | --libex | --libe)
974 ac_prev=libexecdir ;;
975 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
976 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978
Martin v. Löwiseba40652007-08-30 20:10:57 +0000979 -localedir | --localedir | --localedi | --localed | --locale)
980 ac_prev=localedir ;;
981 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
982 localedir=$ac_optarg ;;
983
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000984 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000985 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986 ac_prev=localstatedir ;;
987 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000988 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990
991 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
992 ac_prev=mandir ;;
993 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997 # Obsolete; use --without-fp.
998 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
1000 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 no_create=yes ;;
1003
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1009 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1010 | --oldin | --oldi | --old | --ol | --o)
1011 ac_prev=oldincludedir ;;
1012 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1013 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1014 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1018 ac_prev=prefix ;;
1019 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1023 | --program-pre | --program-pr | --program-p)
1024 ac_prev=program_prefix ;;
1025 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1026 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1030 | --program-suf | --program-su | --program-s)
1031 ac_prev=program_suffix ;;
1032 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1033 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
1036 -program-transform-name | --program-transform-name \
1037 | --program-transform-nam | --program-transform-na \
1038 | --program-transform-n | --program-transform- \
1039 | --program-transform | --program-transfor \
1040 | --program-transfo | --program-transf \
1041 | --program-trans | --program-tran \
1042 | --progr-tra | --program-tr | --program-t)
1043 ac_prev=program_transform_name ;;
1044 -program-transform-name=* | --program-transform-name=* \
1045 | --program-transform-nam=* | --program-transform-na=* \
1046 | --program-transform-n=* | --program-transform-=* \
1047 | --program-transform=* | --program-transfor=* \
1048 | --program-transfo=* | --program-transf=* \
1049 | --program-trans=* | --program-tran=* \
1050 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052
Martin v. Löwiseba40652007-08-30 20:10:57 +00001053 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1054 ac_prev=pdfdir ;;
1055 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1056 pdfdir=$ac_optarg ;;
1057
1058 -psdir | --psdir | --psdi | --psd | --ps)
1059 ac_prev=psdir ;;
1060 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1061 psdir=$ac_optarg ;;
1062
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1064 | -silent | --silent | --silen | --sile | --sil)
1065 silent=yes ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1068 ac_prev=sbindir ;;
1069 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1070 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1074 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1075 | --sharedst | --shareds | --shared | --share | --shar \
1076 | --sha | --sh)
1077 ac_prev=sharedstatedir ;;
1078 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1079 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1080 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1081 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 -site | --site | --sit)
1085 ac_prev=site ;;
1086 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1090 ac_prev=srcdir ;;
1091 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1095 | --syscon | --sysco | --sysc | --sys | --sy)
1096 ac_prev=sysconfdir ;;
1097 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1098 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1107 verbose=yes ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 -version | --version | --versio | --versi | --vers | -V)
1110 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001113 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001115 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001116 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001117 ac_useropt_orig=$ac_useropt
1118 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1119 case $ac_user_opts in
1120 *"
1121"with_$ac_useropt"
1122"*) ;;
1123 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1124 ac_unrecognized_sep=', ';;
1125 esac
1126 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
1128 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001129 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001131 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001132 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001133 ac_useropt_orig=$ac_useropt
1134 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1135 case $ac_user_opts in
1136 *"
1137"with_$ac_useropt"
1138"*) ;;
1139 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1140 ac_unrecognized_sep=', ';;
1141 esac
1142 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144 --x)
1145 # Obsolete; use --with-x.
1146 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
1148 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1149 | --x-incl | --x-inc | --x-in | --x-i)
1150 ac_prev=x_includes ;;
1151 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1152 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
1155 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1156 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1157 ac_prev=x_libraries ;;
1158 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1159 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001162 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1163Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164 ;;
1165
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 *=*)
1167 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1168 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001169 case $ac_envvar in #(
1170 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001171 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001172 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001173 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 export $ac_envvar ;;
1175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001178 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001180 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001181 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 ;;
1183
1184 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001185done
1186
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001189 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190fi
1191
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001192if test -n "$ac_unrecognized_opts"; then
1193 case $enable_option_checking in
1194 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001195 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001196 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1197 esac
1198fi
1199
1200# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001201for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1202 datadir sysconfdir sharedstatedir localstatedir includedir \
1203 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1204 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001205do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001206 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001207 # Remove trailing slashes.
1208 case $ac_val in
1209 */ )
1210 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1211 eval $ac_var=\$ac_val;;
1212 esac
1213 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001214 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001215 [\\/$]* | ?:[\\/]* ) continue;;
1216 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001218 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001219done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001220
Martin v. Löwis11437992002-04-12 09:54:03 +00001221# There might be people who depend on the old broken behavior: `$host'
1222# used to hold the argument of --host etc.
1223# FIXME: To remove some day.
1224build=$build_alias
1225host=$host_alias
1226target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001227
Martin v. Löwis11437992002-04-12 09:54:03 +00001228# FIXME: To remove some day.
1229if test "x$host_alias" != x; then
1230 if test "x$build_alias" = x; then
1231 cross_compiling=maybe
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001232 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1233 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 elif test "x$build_alias" != "x$host_alias"; then
1235 cross_compiling=yes
1236 fi
1237fi
1238
1239ac_tool_prefix=
1240test -n "$host_alias" && ac_tool_prefix=$host_alias-
1241
1242test "$silent" = yes && exec 6>/dev/null
1243
Guido van Rossum627b2d71993-12-24 10:39:16 +00001244
Martin v. Löwiseba40652007-08-30 20:10:57 +00001245ac_pwd=`pwd` && test -n "$ac_pwd" &&
1246ac_ls_di=`ls -di .` &&
1247ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001248 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001249test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001250 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001251
1252
Guido van Rossum627b2d71993-12-24 10:39:16 +00001253# Find the source files, if location was not specified.
1254if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001256 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001257 ac_confdir=`$as_dirname -- "$as_myself" ||
1258$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1259 X"$as_myself" : 'X\(//\)[^/]' \| \
1260 X"$as_myself" : 'X\(//\)$' \| \
1261 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1262$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001263 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\/\)[^/].*/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\/\)$/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\).*/{
1276 s//\1/
1277 q
1278 }
1279 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001281 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282 srcdir=..
1283 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001284else
1285 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001287if test ! -r "$srcdir/$ac_unique_file"; then
1288 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001289 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001291ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1292ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001293 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001294 pwd)`
1295# When building in place, set srcdir=.
1296if test "$ac_abs_confdir" = "$ac_pwd"; then
1297 srcdir=.
1298fi
1299# Remove unnecessary trailing slashes from srcdir.
1300# Double slashes in file names in object file debugging info
1301# mess up M-x gdb in Emacs.
1302case $srcdir in
1303*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1304esac
1305for ac_var in $ac_precious_vars; do
1306 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1307 eval ac_env_${ac_var}_value=\$${ac_var}
1308 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1309 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1310done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312#
1313# Report the --help message.
1314#
1315if test "$ac_init_help" = "long"; then
1316 # Omit some internal or obsolete options to make the list less imposing.
1317 # This message is too long to be a string in the A/UX 3.1 sh.
1318 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001319\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001320
1321Usage: $0 [OPTION]... [VAR=VALUE]...
1322
1323To assign environment variables (e.g., CC, CFLAGS...), specify them as
1324VAR=VALUE. See below for descriptions of some of the useful variables.
1325
1326Defaults for the options are specified in brackets.
1327
1328Configuration:
1329 -h, --help display this help and exit
1330 --help=short display options specific to this package
1331 --help=recursive display the short help of all the included packages
1332 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001333 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001334 --cache-file=FILE cache test results in FILE [disabled]
1335 -C, --config-cache alias for \`--cache-file=config.cache'
1336 -n, --no-create do not create output files
1337 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1338
Martin v. Löwis11437992002-04-12 09:54:03 +00001339Installation directories:
1340 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001341 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001342 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001343 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001344
1345By default, \`make install' will install all the files in
1346\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1347an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1348for instance \`--prefix=\$HOME'.
1349
1350For better control, use the options below.
1351
1352Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001353 --bindir=DIR user executables [EPREFIX/bin]
1354 --sbindir=DIR system admin executables [EPREFIX/sbin]
1355 --libexecdir=DIR program executables [EPREFIX/libexec]
1356 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1357 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1358 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1359 --libdir=DIR object code libraries [EPREFIX/lib]
1360 --includedir=DIR C header files [PREFIX/include]
1361 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1362 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1363 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1364 --infodir=DIR info documentation [DATAROOTDIR/info]
1365 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1366 --mandir=DIR man documentation [DATAROOTDIR/man]
1367 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1368 --htmldir=DIR html documentation [DOCDIR]
1369 --dvidir=DIR dvi documentation [DOCDIR]
1370 --pdfdir=DIR pdf documentation [DOCDIR]
1371 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001372_ACEOF
1373
1374 cat <<\_ACEOF
1375_ACEOF
1376fi
1377
1378if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001379 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001380 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001381 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 cat <<\_ACEOF
1383
1384Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001385 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1387 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001388 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001389 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001390 --enable-framework[=INSTALLDIR]
1391 Build (MacOSX|Darwin) framework
1392 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001393 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001394 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1395 --enable-ipv6 Enable ipv6 (with ipv4) support
1396 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001397 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001398 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001399 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001400 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402Optional Packages:
1403 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1404 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001405 --with-universal-archs=ARCH
1406 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001407 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001408 --with-framework-name=FRAMEWORK
1409 specify an alternate name of the framework built
1410 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001412 --with-cxx-main=<compiler>
1413 compile main() and link python executable with C++
1414 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --with-suffix=.exe set executable suffix
1416 --with-pydebug build with Py_DEBUG defined
1417 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001418 --with-system-expat build pyexpat module using an installed expat
1419 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001420 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001421 --with-dbmliborder=db1:db2:...
1422 order to check db backends for dbm. Valid value is a
1423 colon separated string with the backend names
1424 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with-signal-module disable/enable signal module
1426 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1427 --with(out)-threads[=DIRECTORY]
1428 disable/enable thread support
1429 --with(out)-thread[=DIRECTORY]
1430 deprecated; use --with(out)-threads
1431 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001433 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001435 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001437 --with-fpectl enable SIGFPE catching
1438 --with-libm=STRING math library
1439 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001440
1441Some influential environment variables:
1442 CC C compiler command
1443 CFLAGS C compiler flags
1444 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1445 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001447 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001448 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001449 CPP C preprocessor
1450
1451Use these variables to override the choices made by `configure' or to help
1452it to find libraries and programs with nonstandard names/locations.
1453
Georg Brandl464432d2009-05-20 18:24:08 +00001454Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001456ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001457fi
1458
1459if test "$ac_init_help" = "recursive"; then
1460 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001462 test -d "$ac_dir" ||
1463 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1464 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 ac_builddir=.
1466
Martin v. Löwiseba40652007-08-30 20:10:57 +00001467case "$ac_dir" in
1468.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1469*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001470 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001471 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001472 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001473 case $ac_top_builddir_sub in
1474 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1475 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1476 esac ;;
1477esac
1478ac_abs_top_builddir=$ac_pwd
1479ac_abs_builddir=$ac_pwd$ac_dir_suffix
1480# for backward compatibility:
1481ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001482
1483case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001484 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001486 ac_top_srcdir=$ac_top_builddir_sub
1487 ac_abs_top_srcdir=$ac_pwd ;;
1488 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001489 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001490 ac_top_srcdir=$srcdir
1491 ac_abs_top_srcdir=$srcdir ;;
1492 *) # Relative name.
1493 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1494 ac_top_srcdir=$ac_top_build_prefix$srcdir
1495 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001496esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001498
Martin v. Löwiseba40652007-08-30 20:10:57 +00001499 cd "$ac_dir" || { ac_status=$?; continue; }
1500 # Check for guested configure.
1501 if test -f "$ac_srcdir/configure.gnu"; then
1502 echo &&
1503 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1504 elif test -f "$ac_srcdir/configure"; then
1505 echo &&
1506 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001507 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001508 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001509 fi || ac_status=$?
1510 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001511 done
1512fi
1513
Martin v. Löwiseba40652007-08-30 20:10:57 +00001514test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001515if $ac_init_version; then
1516 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001517python configure 2.7
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001518generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001519
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001520Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001521This configure script is free software; the Free Software Foundation
1522gives unlimited permission to copy, distribute and modify it.
1523_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001524 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001525fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001526
1527## ------------------------ ##
1528## Autoconf initialization. ##
1529## ------------------------ ##
1530
1531# ac_fn_c_try_compile LINENO
1532# --------------------------
1533# Try to compile conftest.$ac_ext, and return whether this succeeded.
1534ac_fn_c_try_compile ()
1535{
1536 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1537 rm -f conftest.$ac_objext
1538 if { { ac_try="$ac_compile"
1539case "(($ac_try" in
1540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1541 *) ac_try_echo=$ac_try;;
1542esac
1543eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1544$as_echo "$ac_try_echo"; } >&5
1545 (eval "$ac_compile") 2>conftest.err
1546 ac_status=$?
1547 if test -s conftest.err; then
1548 grep -v '^ *+' conftest.err >conftest.er1
1549 cat conftest.er1 >&5
1550 mv -f conftest.er1 conftest.err
1551 fi
1552 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1553 test $ac_status = 0; } && {
1554 test -z "$ac_c_werror_flag" ||
1555 test ! -s conftest.err
1556 } && test -s conftest.$ac_objext; then :
1557 ac_retval=0
1558else
1559 $as_echo "$as_me: failed program was:" >&5
1560sed 's/^/| /' conftest.$ac_ext >&5
1561
1562 ac_retval=1
1563fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001564 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001565 as_fn_set_status $ac_retval
1566
1567} # ac_fn_c_try_compile
1568
1569# ac_fn_c_try_cpp LINENO
1570# ----------------------
1571# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1572ac_fn_c_try_cpp ()
1573{
1574 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1575 if { { ac_try="$ac_cpp conftest.$ac_ext"
1576case "(($ac_try" in
1577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1578 *) ac_try_echo=$ac_try;;
1579esac
1580eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1581$as_echo "$ac_try_echo"; } >&5
1582 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1583 ac_status=$?
1584 if test -s conftest.err; then
1585 grep -v '^ *+' conftest.err >conftest.er1
1586 cat conftest.er1 >&5
1587 mv -f conftest.er1 conftest.err
1588 fi
1589 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001590 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001591 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1592 test ! -s conftest.err
1593 }; then :
1594 ac_retval=0
1595else
1596 $as_echo "$as_me: failed program was:" >&5
1597sed 's/^/| /' conftest.$ac_ext >&5
1598
1599 ac_retval=1
1600fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001601 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001602 as_fn_set_status $ac_retval
1603
1604} # ac_fn_c_try_cpp
1605
1606# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1607# -------------------------------------------------------
1608# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1609# the include files in INCLUDES and setting the cache variable VAR
1610# accordingly.
1611ac_fn_c_check_header_mongrel ()
1612{
1613 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001614 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1616$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001617if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001618 $as_echo_n "(cached) " >&6
1619fi
1620eval ac_res=\$$3
1621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1622$as_echo "$ac_res" >&6; }
1623else
1624 # Is the header compilable?
1625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1626$as_echo_n "checking $2 usability... " >&6; }
1627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1628/* end confdefs.h. */
1629$4
1630#include <$2>
1631_ACEOF
1632if ac_fn_c_try_compile "$LINENO"; then :
1633 ac_header_compiler=yes
1634else
1635 ac_header_compiler=no
1636fi
1637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1639$as_echo "$ac_header_compiler" >&6; }
1640
1641# Is the header present?
1642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1643$as_echo_n "checking $2 presence... " >&6; }
1644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1645/* end confdefs.h. */
1646#include <$2>
1647_ACEOF
1648if ac_fn_c_try_cpp "$LINENO"; then :
1649 ac_header_preproc=yes
1650else
1651 ac_header_preproc=no
1652fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001653rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1655$as_echo "$ac_header_preproc" >&6; }
1656
1657# So? What about this header?
1658case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1659 yes:no: )
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1661$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1663$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1664 ;;
1665 no:yes:* )
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1667$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1669$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1671$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1673$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1675$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001676( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001677## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001678## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001679 ) | sed "s/^/$as_me: WARNING: /" >&2
1680 ;;
1681esac
1682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1683$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001684if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001685 $as_echo_n "(cached) " >&6
1686else
1687 eval "$3=\$ac_header_compiler"
1688fi
1689eval ac_res=\$$3
1690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1691$as_echo "$ac_res" >&6; }
1692fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001693 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001694
1695} # ac_fn_c_check_header_mongrel
1696
1697# ac_fn_c_try_run LINENO
1698# ----------------------
1699# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1700# that executables *can* be run.
1701ac_fn_c_try_run ()
1702{
1703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1704 if { { ac_try="$ac_link"
1705case "(($ac_try" in
1706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1707 *) ac_try_echo=$ac_try;;
1708esac
1709eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1710$as_echo "$ac_try_echo"; } >&5
1711 (eval "$ac_link") 2>&5
1712 ac_status=$?
1713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1714 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1715 { { case "(($ac_try" in
1716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1717 *) ac_try_echo=$ac_try;;
1718esac
1719eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1720$as_echo "$ac_try_echo"; } >&5
1721 (eval "$ac_try") 2>&5
1722 ac_status=$?
1723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1724 test $ac_status = 0; }; }; then :
1725 ac_retval=0
1726else
1727 $as_echo "$as_me: program exited with status $ac_status" >&5
1728 $as_echo "$as_me: failed program was:" >&5
1729sed 's/^/| /' conftest.$ac_ext >&5
1730
1731 ac_retval=$ac_status
1732fi
1733 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001734 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001735 as_fn_set_status $ac_retval
1736
1737} # ac_fn_c_try_run
1738
1739# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1740# -------------------------------------------------------
1741# Tests whether HEADER exists and can be compiled using the include files in
1742# INCLUDES, setting the cache variable VAR accordingly.
1743ac_fn_c_check_header_compile ()
1744{
1745 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1747$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001748if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001749 $as_echo_n "(cached) " >&6
1750else
1751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1752/* end confdefs.h. */
1753$4
1754#include <$2>
1755_ACEOF
1756if ac_fn_c_try_compile "$LINENO"; then :
1757 eval "$3=yes"
1758else
1759 eval "$3=no"
1760fi
1761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1762fi
1763eval ac_res=\$$3
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1765$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001766 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001767
1768} # ac_fn_c_check_header_compile
1769
1770# ac_fn_c_try_link LINENO
1771# -----------------------
1772# Try to link conftest.$ac_ext, and return whether this succeeded.
1773ac_fn_c_try_link ()
1774{
1775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1776 rm -f conftest.$ac_objext conftest$ac_exeext
1777 if { { ac_try="$ac_link"
1778case "(($ac_try" in
1779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1780 *) ac_try_echo=$ac_try;;
1781esac
1782eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1783$as_echo "$ac_try_echo"; } >&5
1784 (eval "$ac_link") 2>conftest.err
1785 ac_status=$?
1786 if test -s conftest.err; then
1787 grep -v '^ *+' conftest.err >conftest.er1
1788 cat conftest.er1 >&5
1789 mv -f conftest.er1 conftest.err
1790 fi
1791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1792 test $ac_status = 0; } && {
1793 test -z "$ac_c_werror_flag" ||
1794 test ! -s conftest.err
1795 } && test -s conftest$ac_exeext && {
1796 test "$cross_compiling" = yes ||
1797 $as_test_x conftest$ac_exeext
1798 }; then :
1799 ac_retval=0
1800else
1801 $as_echo "$as_me: failed program was:" >&5
1802sed 's/^/| /' conftest.$ac_ext >&5
1803
1804 ac_retval=1
1805fi
1806 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1807 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1808 # interfere with the next link command; also delete a directory that is
1809 # left behind by Apple's compiler. We do this before executing the actions.
1810 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001811 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001812 as_fn_set_status $ac_retval
1813
1814} # ac_fn_c_try_link
1815
1816# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1817# -------------------------------------------
1818# Tests whether TYPE exists after having included INCLUDES, setting cache
1819# variable VAR accordingly.
1820ac_fn_c_check_type ()
1821{
1822 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001825if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001826 $as_echo_n "(cached) " >&6
1827else
1828 eval "$3=no"
1829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1830/* end confdefs.h. */
1831$4
1832int
1833main ()
1834{
1835if (sizeof ($2))
1836 return 0;
1837 ;
1838 return 0;
1839}
1840_ACEOF
1841if ac_fn_c_try_compile "$LINENO"; then :
1842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1843/* end confdefs.h. */
1844$4
1845int
1846main ()
1847{
1848if (sizeof (($2)))
1849 return 0;
1850 ;
1851 return 0;
1852}
1853_ACEOF
1854if ac_fn_c_try_compile "$LINENO"; then :
1855
1856else
1857 eval "$3=yes"
1858fi
1859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1860fi
1861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1862fi
1863eval ac_res=\$$3
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1865$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001866 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001867
1868} # ac_fn_c_check_type
1869
1870# ac_fn_c_find_uintX_t LINENO BITS VAR
1871# ------------------------------------
1872# Finds an unsigned integer type with width BITS, setting cache variable VAR
1873# accordingly.
1874ac_fn_c_find_uintX_t ()
1875{
1876 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1878$as_echo_n "checking for uint$2_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001879if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001880 $as_echo_n "(cached) " >&6
1881else
1882 eval "$3=no"
1883 # Order is important - never check a type that is potentially smaller
1884 # than half of the expected target width.
1885 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1886 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888/* end confdefs.h. */
1889$ac_includes_default
1890int
1891main ()
1892{
1893static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1894test_array [0] = 0
1895
1896 ;
1897 return 0;
1898}
1899_ACEOF
1900if ac_fn_c_try_compile "$LINENO"; then :
1901 case $ac_type in #(
1902 uint$2_t) :
1903 eval "$3=yes" ;; #(
1904 *) :
1905 eval "$3=\$ac_type" ;;
1906esac
1907fi
1908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001909 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001910
1911else
1912 break
1913fi
1914 done
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001920
1921} # ac_fn_c_find_uintX_t
1922
1923# ac_fn_c_find_intX_t LINENO BITS VAR
1924# -----------------------------------
1925# Finds a signed integer type with width BITS, setting cache variable VAR
1926# accordingly.
1927ac_fn_c_find_intX_t ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1931$as_echo_n "checking for int$2_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001932if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 # Order is important - never check a type that is potentially smaller
1937 # than half of the expected target width.
1938 for ac_type in int$2_t 'int' 'long int' \
1939 'long long int' 'short int' 'signed char'; do
1940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1941/* end confdefs.h. */
1942$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001943 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001944int
1945main ()
1946{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001947static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001948test_array [0] = 0
1949
1950 ;
1951 return 0;
1952}
1953_ACEOF
1954if ac_fn_c_try_compile "$LINENO"; then :
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001958 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001959int
1960main ()
1961{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001962static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001963 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1964test_array [0] = 0
1965
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970if ac_fn_c_try_compile "$LINENO"; then :
1971
1972else
1973 case $ac_type in #(
1974 int$2_t) :
1975 eval "$3=yes" ;; #(
1976 *) :
1977 eval "$3=\$ac_type" ;;
1978esac
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1981fi
1982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001983 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001984
1985else
1986 break
1987fi
1988 done
1989fi
1990eval ac_res=\$$3
1991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1992$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001993 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001994
1995} # ac_fn_c_find_intX_t
1996
1997# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1998# --------------------------------------------
1999# Tries to find the compile-time value of EXPR in a program that includes
2000# INCLUDES, setting VAR accordingly. Returns whether the value could be
2001# computed
2002ac_fn_c_compute_int ()
2003{
2004 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2005 if test "$cross_compiling" = yes; then
2006 # Depending upon the size, compute the lo and hi bounds.
2007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h. */
2009$4
2010int
2011main ()
2012{
2013static int test_array [1 - 2 * !(($2) >= 0)];
2014test_array [0] = 0
2015
2016 ;
2017 return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021 ac_lo=0 ac_mid=0
2022 while :; do
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$4
2026int
2027main ()
2028{
2029static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2030test_array [0] = 0
2031
2032 ;
2033 return 0;
2034}
2035_ACEOF
2036if ac_fn_c_try_compile "$LINENO"; then :
2037 ac_hi=$ac_mid; break
2038else
2039 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2040 if test $ac_lo -le $ac_mid; then
2041 ac_lo= ac_hi=
2042 break
2043 fi
2044 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2045fi
2046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2047 done
2048else
2049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2050/* end confdefs.h. */
2051$4
2052int
2053main ()
2054{
2055static int test_array [1 - 2 * !(($2) < 0)];
2056test_array [0] = 0
2057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_hi=-1 ac_mid=-1
2064 while :; do
2065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2066/* end confdefs.h. */
2067$4
2068int
2069main ()
2070{
2071static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2072test_array [0] = 0
2073
2074 ;
2075 return 0;
2076}
2077_ACEOF
2078if ac_fn_c_try_compile "$LINENO"; then :
2079 ac_lo=$ac_mid; break
2080else
2081 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2082 if test $ac_mid -le $ac_hi; then
2083 ac_lo= ac_hi=
2084 break
2085 fi
2086 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089 done
2090else
2091 ac_lo= ac_hi=
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096# Binary search between lo and hi bounds.
2097while test "x$ac_lo" != "x$ac_hi"; do
2098 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2100/* end confdefs.h. */
2101$4
2102int
2103main ()
2104{
2105static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2106test_array [0] = 0
2107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112if ac_fn_c_try_compile "$LINENO"; then :
2113 ac_hi=$ac_mid
2114else
2115 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2116fi
2117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118done
2119case $ac_lo in #((
2120?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2121'') ac_retval=1 ;;
2122esac
2123 else
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125/* end confdefs.h. */
2126$4
2127static long int longval () { return $2; }
2128static unsigned long int ulongval () { return $2; }
2129#include <stdio.h>
2130#include <stdlib.h>
2131int
2132main ()
2133{
2134
2135 FILE *f = fopen ("conftest.val", "w");
2136 if (! f)
2137 return 1;
2138 if (($2) < 0)
2139 {
2140 long int i = longval ();
2141 if (i != ($2))
2142 return 1;
2143 fprintf (f, "%ld", i);
2144 }
2145 else
2146 {
2147 unsigned long int i = ulongval ();
2148 if (i != ($2))
2149 return 1;
2150 fprintf (f, "%lu", i);
2151 }
2152 /* Do not output a trailing newline, as this causes \r\n confusion
2153 on some platforms. */
2154 return ferror (f) || fclose (f) != 0;
2155
2156 ;
2157 return 0;
2158}
2159_ACEOF
2160if ac_fn_c_try_run "$LINENO"; then :
2161 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2162else
2163 ac_retval=1
2164fi
2165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2166 conftest.$ac_objext conftest.beam conftest.$ac_ext
2167rm -f conftest.val
2168
2169 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002170 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002171 as_fn_set_status $ac_retval
2172
2173} # ac_fn_c_compute_int
2174
2175# ac_fn_c_check_func LINENO FUNC VAR
2176# ----------------------------------
2177# Tests whether FUNC exists, setting the cache variable VAR accordingly
2178ac_fn_c_check_func ()
2179{
2180 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2182$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002183if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002184 $as_echo_n "(cached) " >&6
2185else
2186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187/* end confdefs.h. */
2188/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2189 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2190#define $2 innocuous_$2
2191
2192/* System header to define __stub macros and hopefully few prototypes,
2193 which can conflict with char $2 (); below.
2194 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2195 <limits.h> exists even on freestanding compilers. */
2196
2197#ifdef __STDC__
2198# include <limits.h>
2199#else
2200# include <assert.h>
2201#endif
2202
2203#undef $2
2204
2205/* Override any GCC internal prototype to avoid an error.
2206 Use char because int might match the return type of a GCC
2207 builtin and then its argument prototype would still apply. */
2208#ifdef __cplusplus
2209extern "C"
2210#endif
2211char $2 ();
2212/* The GNU C library defines this for functions which it implements
2213 to always fail with ENOSYS. Some functions are actually named
2214 something starting with __ and the normal name is an alias. */
2215#if defined __stub_$2 || defined __stub___$2
2216choke me
2217#endif
2218
2219int
2220main ()
2221{
2222return $2 ();
2223 ;
2224 return 0;
2225}
2226_ACEOF
2227if ac_fn_c_try_link "$LINENO"; then :
2228 eval "$3=yes"
2229else
2230 eval "$3=no"
2231fi
2232rm -f core conftest.err conftest.$ac_objext \
2233 conftest$ac_exeext conftest.$ac_ext
2234fi
2235eval ac_res=\$$3
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2237$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002238 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002239
2240} # ac_fn_c_check_func
2241
2242# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2243# ----------------------------------------------------
2244# Tries to find if the field MEMBER exists in type AGGR, after including
2245# INCLUDES, setting cache variable VAR accordingly.
2246ac_fn_c_check_member ()
2247{
2248 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2250$as_echo_n "checking for $2.$3... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002251if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002252 $as_echo_n "(cached) " >&6
2253else
2254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255/* end confdefs.h. */
2256$5
2257int
2258main ()
2259{
2260static $2 ac_aggr;
2261if (ac_aggr.$3)
2262return 0;
2263 ;
2264 return 0;
2265}
2266_ACEOF
2267if ac_fn_c_try_compile "$LINENO"; then :
2268 eval "$4=yes"
2269else
2270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271/* end confdefs.h. */
2272$5
2273int
2274main ()
2275{
2276static $2 ac_aggr;
2277if (sizeof ac_aggr.$3)
2278return 0;
2279 ;
2280 return 0;
2281}
2282_ACEOF
2283if ac_fn_c_try_compile "$LINENO"; then :
2284 eval "$4=yes"
2285else
2286 eval "$4=no"
2287fi
2288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2289fi
2290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2291fi
2292eval ac_res=\$$4
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2294$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002295 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002296
2297} # ac_fn_c_check_member
2298
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002299# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2300# ---------------------------------------------
2301# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2302# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002303ac_fn_c_check_decl ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002306 as_decl_name=`echo $2|sed 's/ *(.*//'`
2307 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2309$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2310if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002311 $as_echo_n "(cached) " >&6
2312else
2313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314/* end confdefs.h. */
2315$4
2316int
2317main ()
2318{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002319#ifndef $as_decl_name
2320#ifdef __cplusplus
2321 (void) $as_decl_use;
2322#else
2323 (void) $as_decl_name;
2324#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002325#endif
2326
2327 ;
2328 return 0;
2329}
2330_ACEOF
2331if ac_fn_c_try_compile "$LINENO"; then :
2332 eval "$3=yes"
2333else
2334 eval "$3=no"
2335fi
2336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337fi
2338eval ac_res=\$$3
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002341 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002342
2343} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002344cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002345This file contains any messages produced by compilers while
2346running configure, to aid debugging if configure makes a mistake.
2347
Martin v. Löwis174440b2008-10-03 08:59:41 +00002348It was created by python $as_me 2.7, which was
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002349generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002350
2351 $ $0 $@
2352
2353_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002354exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002355{
2356cat <<_ASUNAME
2357## --------- ##
2358## Platform. ##
2359## --------- ##
2360
2361hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2362uname -m = `(uname -m) 2>/dev/null || echo unknown`
2363uname -r = `(uname -r) 2>/dev/null || echo unknown`
2364uname -s = `(uname -s) 2>/dev/null || echo unknown`
2365uname -v = `(uname -v) 2>/dev/null || echo unknown`
2366
2367/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2368/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2369
2370/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2371/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2372/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002373/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002374/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2375/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2376/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2377
2378_ASUNAME
2379
2380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2381for as_dir in $PATH
2382do
2383 IFS=$as_save_IFS
2384 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002385 $as_echo "PATH: $as_dir"
2386 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002387IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002388
2389} >&5
2390
2391cat >&5 <<_ACEOF
2392
2393
2394## ----------- ##
2395## Core tests. ##
2396## ----------- ##
2397
2398_ACEOF
2399
2400
2401# Keep a trace of the command line.
2402# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002403# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002404# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002405# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002406ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002407ac_configure_args0=
2408ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002409ac_must_keep_next=false
2410for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002411do
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 for ac_arg
2413 do
2414 case $ac_arg in
2415 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2416 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2417 | -silent | --silent | --silen | --sile | --sil)
2418 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002420 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 esac
2422 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002423 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002425 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002427 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002429 case $ac_arg in
2430 *=* | --config-cache | -C | -disable-* | --disable-* \
2431 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2432 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2433 | -with-* | --with-* | -without-* | --without-* | --x)
2434 case "$ac_configure_args0 " in
2435 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2436 esac
2437 ;;
2438 -* ) ac_must_keep_next=true ;;
2439 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002440 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002441 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002442 ;;
2443 esac
2444 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002445done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002446{ ac_configure_args0=; unset ac_configure_args0;}
2447{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002448
2449# When interrupted or exit'd, cleanup temporary files, and complete
2450# config.log. We remove comments because anyway the quotes in there
2451# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002452# WARNING: Use '\'' to represent an apostrophe within the trap.
2453# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002454trap 'exit_status=$?
2455 # Save into config.log some information that might help in debugging.
2456 {
2457 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002458
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002459 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002460## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002461## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002462 echo
2463 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464(
2465 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2466 eval ac_val=\$$ac_var
2467 case $ac_val in #(
2468 *${as_nl}*)
2469 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002470 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2471$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002472 esac
2473 case $ac_var in #(
2474 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002475 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2476 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002477 esac ;;
2478 esac
2479 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002481 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2482 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002484 "s/'\''/'\''\\\\'\'''\''/g;
2485 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2486 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002487 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002488 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002489 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002490 esac |
2491 sort
2492)
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002494
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002495 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002496## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002497## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 echo
2499 for ac_var in $ac_subst_vars
2500 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002501 eval ac_val=\$$ac_var
2502 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002503 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002504 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002505 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 done | sort
2507 echo
2508
2509 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002510 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002511## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002512## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 echo
2514 for ac_var in $ac_subst_files
2515 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516 eval ac_val=\$$ac_var
2517 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002518 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002519 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002520 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 done | sort
2522 echo
2523 fi
2524
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002526 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002527## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002528## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002530 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 echo
2532 fi
2533 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002534 $as_echo "$as_me: caught signal $ac_signal"
2535 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002537 rm -f core *.core core.conftest.* &&
2538 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002540' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002541for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002542 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002543done
2544ac_signal=0
2545
2546# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002547rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002548
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002549$as_echo "/* confdefs.h */" > confdefs.h
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551# Predefined preprocessor variables.
2552
2553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_NAME "$PACKAGE_NAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_VERSION "$PACKAGE_VERSION"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_STRING "$PACKAGE_STRING"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2571_ACEOF
2572
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_URL "$PACKAGE_URL"
2575_ACEOF
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577
2578# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002579# Prefer an explicitly selected file to automatically selected ones.
2580ac_site_file1=NONE
2581ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002582if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002583 # We do not want a PATH search for config.site.
2584 case $CONFIG_SITE in #((
2585 -*) ac_site_file1=./$CONFIG_SITE;;
2586 */*) ac_site_file1=$CONFIG_SITE;;
2587 *) ac_site_file1=./$CONFIG_SITE;;
2588 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002590 ac_site_file1=$prefix/share/config.site
2591 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002593 ac_site_file1=$ac_default_prefix/share/config.site
2594 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002595fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002596for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002598 test "x$ac_site_file" = xNONE && continue
2599 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2601$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002603 . "$ac_site_file" \
2604 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2605$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2606as_fn_error $? "failed to load site script $ac_site_file
2607See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002608 fi
2609done
2610
2611if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002612 # Some versions of bash will fail to source /dev/null (special files
2613 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2614 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2615 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2616$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002618 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2619 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 esac
2621 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002622else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2624$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 >$cache_file
2626fi
2627
2628# Check that the precious variables saved in the cache have kept the same
2629# value.
2630ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002631for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2633 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002634 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2635 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 case $ac_old_set,$ac_new_set in
2637 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2639$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_cache_corrupted=: ;;
2641 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2643$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 ac_cache_corrupted=: ;;
2645 ,);;
2646 *)
2647 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002648 # differences in whitespace do not lead to failure.
2649 ac_old_val_w=`echo x $ac_old_val`
2650 ac_new_val_w=`echo x $ac_new_val`
2651 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2653$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2654 ac_cache_corrupted=:
2655 else
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2657$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2658 eval $ac_var=\$ac_old_val
2659 fi
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2661$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2663$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 fi;;
2665 esac
2666 # Pass precious variables to config.status.
2667 if test "$ac_new_set" = set; then
2668 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002669 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 *) ac_arg=$ac_var=$ac_new_val ;;
2671 esac
2672 case " $ac_configure_args " in
2673 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002674 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 esac
2676 fi
2677done
2678if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002679 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2682$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002683 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002685## -------------------- ##
2686## Main body of script. ##
2687## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002688
Guido van Rossum7f43da71994-08-01 12:15:30 +00002689ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002691ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2692ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2693ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694
Guido van Rossum627b2d71993-12-24 10:39:16 +00002695
Michael W. Hudson54241132001-12-07 15:38:26 +00002696
Martin v. Löwiseba40652007-08-30 20:10:57 +00002697ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002698
2699
Martin v. Löwis11437992002-04-12 09:54:03 +00002700
Georg Brandlbcd64a32009-03-31 21:45:18 +00002701if test "$prefix" != "/"; then
2702 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2703fi
2704
2705
Martin v. Löwis11437992002-04-12 09:54:03 +00002706
2707
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002708# We don't use PACKAGE_ variables, and they cause conflicts
2709# with other autoconf-based packages that include Python.h
2710grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2711rm confdefs.h
2712mv confdefs.h.new confdefs.h
2713
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002714
Martin v. Löwis174440b2008-10-03 08:59:41 +00002715VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002716
Martin v. Löwis1142de32002-03-29 16:28:31 +00002717
2718SOVERSION=1.0
2719
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002720# The later defininition of _XOPEN_SOURCE disables certain features
2721# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2722
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002723$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002724
2725
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002726# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2727# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2728# them.
2729
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002730$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002731
2732
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002733# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2734# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2735# them.
2736
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002737$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002738
2739
Martin v. Löwisd6320502004-08-12 13:45:08 +00002740# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2741# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2742
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002743$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002744
2745
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002746# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2747# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2748# them.
2749
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002750$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002751
2752
2753
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002754define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002755
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002756# Arguments passed to configure.
2757
2758CONFIG_ARGS="$ac_configure_args"
2759
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2761$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002762# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002763if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002764 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002765 case $enableval in
2766 yes)
2767 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002768 if test ! -d "${enableval}"
2769 then
2770 enableval=/
2771 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002772 ;;
2773 esac
2774 case $enableval in
2775 no)
2776 UNIVERSALSDK=
2777 enable_universalsdk=
2778 ;;
2779 *)
2780 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002781 if test ! -d "${UNIVERSALSDK}"
2782 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002783 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002784 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002785 ;;
2786 esac
2787
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002788
Ronald Oussoren988117f2006-04-29 11:31:35 +00002789else
2790
2791 UNIVERSALSDK=
2792 enable_universalsdk=
2793
Martin v. Löwiseba40652007-08-30 20:10:57 +00002794fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002795
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002796if test -n "${UNIVERSALSDK}"
2797then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2799$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2802$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002803fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002804
Martin v. Löwiseba40652007-08-30 20:10:57 +00002805
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002806
2807
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002808UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002809
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2811$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002812
2813# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002814if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002815 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2817$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002818 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002819 if test "${enable_universalsdk}" ; then
2820 :
2821 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002822 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002823 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002824
2825else
2826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2828$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002829
2830fi
2831
2832
2833
2834
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002835
2836# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002837if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002838 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002839 if test "${enable_framework}"; then
2840 :
2841 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002842 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002843 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002844 PYTHONFRAMEWORK=${withval}
2845 PYTHONFRAMEWORKDIR=${withval}.framework
2846 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2847
2848else
2849
2850 PYTHONFRAMEWORK=Python
2851 PYTHONFRAMEWORKDIR=Python.framework
2852 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2853
2854fi
2855
Martin v. Löwiseba40652007-08-30 20:10:57 +00002856# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002857if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002858 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002859 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002860 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002861 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002862 esac
2863 case $enableval in
2864 no)
2865 PYTHONFRAMEWORK=
2866 PYTHONFRAMEWORKDIR=no-framework
2867 PYTHONFRAMEWORKPREFIX=
2868 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002869 FRAMEWORKINSTALLFIRST=
2870 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002871 FRAMEWORKALTINSTALLFIRST=
2872 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002873 if test "x${prefix}" = "xNONE"; then
2874 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2875 else
2876 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2877 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002878 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002879 ;;
2880 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002881 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002882 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002883 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002884 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002885 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2886 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002887 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002888
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002889 if test "x${prefix}" = "xNONE" ; then
2890 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002891
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002892 else
2893 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2894 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002895
2896 case "${enableval}" in
2897 /System*)
2898 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2899 if test "${prefix}" = "NONE" ; then
2900 # See below
2901 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2902 fi
2903 ;;
2904
2905 /Library*)
2906 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2907 ;;
2908
2909 */Library/Frameworks)
2910 MDIR="`dirname "${enableval}"`"
2911 MDIR="`dirname "${MDIR}"`"
2912 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2913
2914 if test "${prefix}" = "NONE"; then
2915 # User hasn't specified the
2916 # --prefix option, but wants to install
2917 # the framework in a non-default location,
2918 # ensure that the compatibility links get
2919 # installed relative to that prefix as well
2920 # instead of in /usr/local.
2921 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2922 fi
2923 ;;
2924
2925 *)
2926 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2927 ;;
2928 esac
2929
Jack Jansen127e56e2001-09-11 14:41:54 +00002930 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002931
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002932 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002933 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002934 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002935
Martin v. Löwiseba40652007-08-30 20:10:57 +00002936 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002937
Martin v. Löwiseba40652007-08-30 20:10:57 +00002938 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002939
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002940 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2941
2942 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2943
Jack Jansene578a632001-08-15 01:27:14 +00002944 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002945
Guido van Rossum563e7081996-09-10 18:20:48 +00002946else
Martin v. Löwis11437992002-04-12 09:54:03 +00002947
Jack Jansene578a632001-08-15 01:27:14 +00002948 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002949 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002950 PYTHONFRAMEWORKPREFIX=
2951 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002952 FRAMEWORKINSTALLFIRST=
2953 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002954 FRAMEWORKALTINSTALLFIRST=
2955 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002956 if test "x${prefix}" = "xNONE" ; then
2957 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2958 else
2959 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2960 fi
Jack Jansene578a632001-08-15 01:27:14 +00002961 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002962
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002963
Martin v. Löwiseba40652007-08-30 20:10:57 +00002964fi
2965
Michael W. Hudson54241132001-12-07 15:38:26 +00002966
2967
2968
2969
Jack Jansene578a632001-08-15 01:27:14 +00002970
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002971
2972
Ronald Oussoren5b787322006-06-06 19:50:24 +00002973
2974
2975
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002976
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002977
Jack Jansene578a632001-08-15 01:27:14 +00002978##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00002979## AS_HELP_STRING([--with-dyld],
2980## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002981##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002982# Set name for machine-dependent library files
2983
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2985$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002986if test -z "$MACHDEP"
2987then
Guido van Rossum563e7081996-09-10 18:20:48 +00002988 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002989 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002990 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002991 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002992 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002993 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002994 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002995 ac_md_system=`echo $ac_sys_system |
2996 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2997 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002998 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002999 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003000
Guido van Rossum07397971997-04-29 21:49:50 +00003001 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003002 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003003 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003004 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003005 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003006 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003007 esac
3008fi
Guido van Rossum91922671997-10-09 20:24:13 +00003009
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003010# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3011# disable features if it is defined, without any means to access these
3012# features as extensions. For these systems, we skip the definition of
3013# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3014# some feature, make sure there is no alternative way to access this
3015# feature. Also, when using wildcards, make sure you have verified the
3016# need for not defining _XOPEN_SOURCE on all systems matching the
3017# wildcard, and that the wildcard does not include future systems
3018# (which may remove their limitations).
3019case $ac_sys_system/$ac_sys_release in
3020 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3021 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003022 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003023 # In addition, Stefan Krah confirms that issue #1244610 exists through
3024 # OpenBSD 4.6, but is fixed in 4.7.
3025 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003026 define_xopen_source=no
3027 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3028 # also defined. This can be overridden by defining _BSD_SOURCE
3029 # As this has a different meaning on Linux, only define it on OpenBSD
3030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003031$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003032
3033 ;;
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003034 OpenBSD/4.[789])
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003035 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3036 # also defined. This can be overridden by defining _BSD_SOURCE
3037 # As this has a different meaning on Linux, only define it on OpenBSD
3038
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003039$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003040
3041 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003042 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3043 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3044 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003045 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003046 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003047 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3048 # request to enable features supported by the standard as a request
3049 # to disable features not supported by the standard. The best way
3050 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3051 # entirely and define __EXTENSIONS__ instead.
3052 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003053 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003054 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3055 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003056 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003057 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003058 define_xopen_source=no;;
3059 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003060 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003061 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003062 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003063 # On FreeBSD 4, the math functions C89 does not cover are never defined
3064 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3065 FreeBSD/4.*)
3066 define_xopen_source=no;;
3067 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3068 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3069 # identifies itself as Darwin/7.*
3070 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3071 # disables platform specific features beyond repair.
3072 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3073 # has no effect, don't bother defining them
3074 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003075 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003076 Darwin/1[0-9].*)
3077 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003078 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3079 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3080 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003081 AIX/4)
3082 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003083 AIX/5)
3084 if test `uname -r` -eq 1; then
3085 define_xopen_source=no
3086 fi
3087 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003088 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3089 # defining NI_NUMERICHOST.
3090 QNX/6.3.2)
3091 define_xopen_source=no
3092 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003093
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003094esac
3095
3096if test $define_xopen_source = yes
3097then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003098
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003099$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003100
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003101
3102 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3103 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3104 # several APIs are not declared. Since this is also needed in some
3105 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003106
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003107$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003108
3109
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003110
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003111$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003112
3113
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003114fi
3115
Guido van Rossum91922671997-10-09 20:24:13 +00003116#
3117# SGI compilers allow the specification of the both the ABI and the
3118# ISA on the command line. Depending on the values of these switches,
3119# different and often incompatable code will be generated.
3120#
3121# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3122# thus supply support for various ABI/ISA combinations. The MACHDEP
3123# variable is also adjusted.
3124#
3125
3126if test ! -z "$SGI_ABI"
3127then
3128 CC="cc $SGI_ABI"
3129 LDFLAGS="$SGI_ABI $LDFLAGS"
3130 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3131fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3133$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003134
Jack Jansen83f898c2002-12-30 22:23:40 +00003135# And add extra plat-mac for darwin
3136
Jack Jansen7b59b422003-03-17 15:44:10 +00003137
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3139$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003140if test -z "$EXTRAPLATDIR"
3141then
3142 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003143 darwin)
3144 EXTRAPLATDIR="\$(PLATMACDIRS)"
3145 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3146 ;;
3147 *)
3148 EXTRAPLATDIR=""
3149 EXTRAMACHDEPPATH=""
3150 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003151 esac
3152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3154$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003155
Jack Jansen6b08a402004-06-03 12:41:45 +00003156# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3157# it may influence the way we can build extensions, so distutils
3158# needs to check it
3159
Ronald Oussoren988117f2006-04-29 11:31:35 +00003160
Jack Jansen6b08a402004-06-03 12:41:45 +00003161CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003162EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003163
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3165$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003166ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3168$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003169
Guido van Rossum627b2d71993-12-24 10:39:16 +00003170# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003171
3172# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3173# for debug/optimization stuff. BASECFLAGS is for flags that are required
3174# just to get things to compile and link. Users are free to override OPT
3175# when running configure or make. The build should not break if they do.
3176# BASECFLAGS should generally not be messed with, however.
3177
3178# XXX shouldn't some/most/all of this code be merged with the stuff later
3179# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3181$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003182
Martin v. Löwiseba40652007-08-30 20:10:57 +00003183# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003184if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003185 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003186 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003187 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003188 without_gcc=yes;;
3189 yes) CC=gcc
3190 without_gcc=no;;
3191 *) CC=$withval
3192 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003193 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003194else
Martin v. Löwis11437992002-04-12 09:54:03 +00003195
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003196 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003197 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003198 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003199 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003200 case $BE_HOST_CPU in
3201 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003202 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003203 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003204 BASECFLAGS="$BASECFLAGS -export pragma"
3205 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003206 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003207 ;;
3208 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003209 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003210 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003211 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003212 ;;
3213 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003214 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003215 ;;
3216 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003217 AR="\$(srcdir)/Modules/ar_beos"
3218 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003219 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003220 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003221 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003222fi
3223
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3225$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003226
Guido van Rossum8b131c51995-03-09 14:10:13 +00003227# If the user switches compilers, we can't believe the cache
3228if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3229then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003230 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003231(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003232fi
3233
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003234# If the user set CFLAGS, use this instead of the automatically
3235# determined setting
3236preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003237ac_ext=c
3238ac_cpp='$CPP $CPPFLAGS'
3239ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3240ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3241ac_compiler_gnu=$ac_cv_c_compiler_gnu
3242if test -n "$ac_tool_prefix"; then
3243 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3244set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3246$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003247if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003248 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003249else
3250 if test -n "$CC"; then
3251 ac_cv_prog_CC="$CC" # Let the user override the test.
3252else
Martin v. Löwis11437992002-04-12 09:54:03 +00003253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3254for as_dir in $PATH
3255do
3256 IFS=$as_save_IFS
3257 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003258 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003259 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003260 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003261 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003262 break 2
3263 fi
3264done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003265 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003267
Jack Jansendd19cf82001-12-06 22:36:17 +00003268fi
3269fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003270CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003271if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3273$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003274else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3276$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003277fi
3278
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279
Martin v. Löwis11437992002-04-12 09:54:03 +00003280fi
3281if test -z "$ac_cv_prog_CC"; then
3282 ac_ct_CC=$CC
3283 # Extract the first word of "gcc", so it can be a program name with args.
3284set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3286$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003287if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003288 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003289else
3290 if test -n "$ac_ct_CC"; then
3291 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3292else
3293as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3294for as_dir in $PATH
3295do
3296 IFS=$as_save_IFS
3297 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003298 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003299 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003300 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003301 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003302 break 2
3303 fi
3304done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003305 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003307
3308fi
3309fi
3310ac_ct_CC=$ac_cv_prog_ac_ct_CC
3311if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3313$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003314else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3316$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003317fi
3318
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319 if test "x$ac_ct_CC" = x; then
3320 CC=""
3321 else
3322 case $cross_compiling:$ac_tool_warned in
3323yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003326ac_tool_warned=yes ;;
3327esac
3328 CC=$ac_ct_CC
3329 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003330else
3331 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003332fi
3333
Jack Jansendd19cf82001-12-06 22:36:17 +00003334if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003335 if test -n "$ac_tool_prefix"; then
3336 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003337set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3339$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003340if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003341 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003342else
3343 if test -n "$CC"; then
3344 ac_cv_prog_CC="$CC" # Let the user override the test.
3345else
Martin v. Löwis11437992002-04-12 09:54:03 +00003346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3347for as_dir in $PATH
3348do
3349 IFS=$as_save_IFS
3350 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003351 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003352 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003353 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003354 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 break 2
3356 fi
3357done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003358 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003359IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003360
3361fi
3362fi
3363CC=$ac_cv_prog_CC
3364if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3366$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003367else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3369$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003370fi
3371
Martin v. Löwiseba40652007-08-30 20:10:57 +00003372
Martin v. Löwis11437992002-04-12 09:54:03 +00003373 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003374fi
3375if test -z "$CC"; then
3376 # Extract the first word of "cc", so it can be a program name with args.
3377set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3379$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003380if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003381 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003382else
3383 if test -n "$CC"; then
3384 ac_cv_prog_CC="$CC" # Let the user override the test.
3385else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003386 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3388for as_dir in $PATH
3389do
3390 IFS=$as_save_IFS
3391 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003392 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003393 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003394 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3395 ac_prog_rejected=yes
3396 continue
3397 fi
3398 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003400 break 2
3401 fi
3402done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003403 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003404IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003405
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003406if test $ac_prog_rejected = yes; then
3407 # We found a bogon in the path, so make sure we never use it.
3408 set dummy $ac_cv_prog_CC
3409 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003410 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003411 # We chose a different compiler from the bogus one.
3412 # However, it has the same basename, so the bogon will be chosen
3413 # first if we set CC to just the basename; use the full file name.
3414 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003415 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003416 fi
3417fi
3418fi
3419fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003420CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003421if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3423$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3426$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003427fi
3428
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429
Martin v. Löwis11437992002-04-12 09:54:03 +00003430fi
3431if test -z "$CC"; then
3432 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003433 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003434 do
3435 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3436set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3438$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003439if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003440 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003441else
3442 if test -n "$CC"; then
3443 ac_cv_prog_CC="$CC" # 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=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003450 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003451 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003455 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003456done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003457 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003458IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003459
3460fi
3461fi
3462CC=$ac_cv_prog_CC
3463if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3465$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003466else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3468$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003469fi
3470
Martin v. Löwiseba40652007-08-30 20:10:57 +00003471
Martin v. Löwis11437992002-04-12 09:54:03 +00003472 test -n "$CC" && break
3473 done
3474fi
3475if test -z "$CC"; then
3476 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003477 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003478do
3479 # Extract the first word of "$ac_prog", so it can be a program name with args.
3480set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3482$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003483if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003484 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003485else
3486 if test -n "$ac_ct_CC"; then
3487 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3488else
3489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3490for as_dir in $PATH
3491do
3492 IFS=$as_save_IFS
3493 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003494 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003495 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003497 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 break 2
3499 fi
3500done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003501 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003503
Martin v. Löwis11437992002-04-12 09:54:03 +00003504fi
3505fi
3506ac_ct_CC=$ac_cv_prog_ac_ct_CC
3507if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3509$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3512$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003513fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003514
Martin v. Löwiseba40652007-08-30 20:10:57 +00003515
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 test -n "$ac_ct_CC" && break
3517done
Michael W. Hudson54241132001-12-07 15:38:26 +00003518
Martin v. Löwiseba40652007-08-30 20:10:57 +00003519 if test "x$ac_ct_CC" = x; then
3520 CC=""
3521 else
3522 case $cross_compiling:$ac_tool_warned in
3523yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003524{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3525$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526ac_tool_warned=yes ;;
3527esac
3528 CC=$ac_ct_CC
3529 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003530fi
3531
3532fi
3533
3534
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003535test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3536$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003537as_fn_error $? "no acceptable C compiler found in \$PATH
3538See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003539
3540# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003541$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3542set X $ac_compile
3543ac_compiler=$2
3544for ac_option in --version -v -V -qversion; do
3545 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003546case "(($ac_try" in
3547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3548 *) ac_try_echo=$ac_try;;
3549esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003550eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3551$as_echo "$ac_try_echo"; } >&5
3552 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003554 if test -s conftest.err; then
3555 sed '10a\
3556... rest of stderr output deleted ...
3557 10q' conftest.err >conftest.er1
3558 cat conftest.er1 >&5
3559 fi
3560 rm -f conftest.er1 conftest.err
3561 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3562 test $ac_status = 0; }
3563done
Martin v. Löwis11437992002-04-12 09:54:03 +00003564
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003566/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003567
Martin v. Löwis11437992002-04-12 09:54:03 +00003568int
3569main ()
3570{
3571
3572 ;
3573 return 0;
3574}
3575_ACEOF
3576ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003577ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003578# Try to create an executable without -o first, disregard a.out.
3579# It will help us diagnose broken compilers, and finding out an intuition
3580# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3582$as_echo_n "checking whether the C compiler works... " >&6; }
3583ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3584
3585# The possible output files:
3586ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3587
Martin v. Löwiseba40652007-08-30 20:10:57 +00003588ac_rmfiles=
3589for ac_file in $ac_files
3590do
3591 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003592 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003593 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3594 esac
3595done
3596rm -f $ac_rmfiles
3597
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003598if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003599case "(($ac_try" in
3600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3601 *) ac_try_echo=$ac_try;;
3602esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003603eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3604$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003605 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3608 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003609 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3610# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3611# in a Makefile. We should not override ac_cv_exeext if it was cached,
3612# so that the user can short-circuit this test for compilers unknown to
3613# Autoconf.
3614for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003615do
3616 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003618 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003619 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003620 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003621 # We found the default executable, but exeext='' is most
3622 # certainly right.
3623 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003624 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003625 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003626 then :; else
3627 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3628 fi
3629 # We set ac_cv_exeext here because the later test for it is not
3630 # safe: cross compilers may not add the suffix if given an `-o'
3631 # argument, so we may need to know it at that point already.
3632 # Even if this section looks crufty: it has the advantage of
3633 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003634 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003635 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003636 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 esac
3638done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003639test "$ac_cv_exeext" = no && ac_cv_exeext=
3640
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003641else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003642 ac_file=''
3643fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003644if test -z "$ac_file"; then :
3645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3646$as_echo "no" >&6; }
3647$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003648sed 's/^/| /' conftest.$ac_ext >&5
3649
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003650{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3651$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003652as_fn_error 77 "C compiler cannot create executables
3653See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003654else
3655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3656$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003657fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3659$as_echo_n "checking for C compiler default output file name... " >&6; }
3660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3661$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003662ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003663
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003664rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003665ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3667$as_echo_n "checking for suffix of executables... " >&6; }
3668if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003669case "(($ac_try" in
3670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3671 *) ac_try_echo=$ac_try;;
3672esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3674$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003675 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003676 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3678 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3680# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3681# work properly (i.e., refer to `conftest.exe'), while it won't with
3682# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003683for ac_file in conftest.exe conftest conftest.*; do
3684 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003686 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003688 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 * ) break;;
3690 esac
3691done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003695as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3696See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003698rm -f conftest conftest$ac_cv_exeext
3699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3700$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003701
3702rm -f conftest.$ac_ext
3703EXEEXT=$ac_cv_exeext
3704ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3706/* end confdefs.h. */
3707#include <stdio.h>
3708int
3709main ()
3710{
3711FILE *f = fopen ("conftest.out", "w");
3712 return ferror (f) || fclose (f) != 0;
3713
3714 ;
3715 return 0;
3716}
Skip Montanaro6dead952003-09-25 14:50:04 +00003717_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003718ac_clean_files="$ac_clean_files conftest.out"
3719# Check that the compiler produces executables we can run. If not, either
3720# the compiler is broken, or we cross compile.
3721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3722$as_echo_n "checking whether we are cross compiling... " >&6; }
3723if test "$cross_compiling" != yes; then
3724 { { ac_try="$ac_link"
3725case "(($ac_try" in
3726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3727 *) ac_try_echo=$ac_try;;
3728esac
3729eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3730$as_echo "$ac_try_echo"; } >&5
3731 (eval "$ac_link") 2>&5
3732 ac_status=$?
3733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3734 test $ac_status = 0; }
3735 if { ac_try='./conftest$ac_cv_exeext'
3736 { { case "(($ac_try" in
3737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3738 *) ac_try_echo=$ac_try;;
3739esac
3740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3741$as_echo "$ac_try_echo"; } >&5
3742 (eval "$ac_try") 2>&5
3743 ac_status=$?
3744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3745 test $ac_status = 0; }; }; then
3746 cross_compiling=no
3747 else
3748 if test "$cross_compiling" = maybe; then
3749 cross_compiling=yes
3750 else
3751 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003753as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003754If you meant to cross compile, use \`--host'.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003755See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003756 fi
3757 fi
3758fi
3759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3760$as_echo "$cross_compiling" >&6; }
3761
3762rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3763ac_clean_files=$ac_clean_files_save
3764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3765$as_echo_n "checking for suffix of object files... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003766if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003767 $as_echo_n "(cached) " >&6
3768else
3769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003771
Martin v. Löwis11437992002-04-12 09:54:03 +00003772int
3773main ()
3774{
3775
3776 ;
3777 return 0;
3778}
3779_ACEOF
3780rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003781if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003782case "(($ac_try" in
3783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3784 *) ac_try_echo=$ac_try;;
3785esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3787$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003788 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3791 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792 for ac_file in conftest.o conftest.obj conftest.*; do
3793 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003795 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3797 break;;
3798 esac
3799done
3800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003801 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003802sed 's/^/| /' conftest.$ac_ext >&5
3803
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003804{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003806as_fn_error $? "cannot compute suffix of object files: cannot compile
3807See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003808fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003809rm -f conftest.$ac_cv_objext conftest.$ac_ext
3810fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3812$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003813OBJEXT=$ac_cv_objext
3814ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3816$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003817if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003818 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
Martin v. Löwis11437992002-04-12 09:54:03 +00003823int
3824main ()
3825{
3826#ifndef __GNUC__
3827 choke me
3828#endif
3829
3830 ;
3831 return 0;
3832}
3833_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003834if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 ac_compiler_gnu=yes
3836else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003837 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003838fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003840ac_cv_c_compiler_gnu=$ac_compiler_gnu
3841
3842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3844$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3845if test $ac_compiler_gnu = yes; then
3846 GCC=yes
3847else
3848 GCC=
3849fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003850ac_test_CFLAGS=${CFLAGS+set}
3851ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3853$as_echo_n "checking whether $CC accepts -g... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003854if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003855 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003856else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003857 ac_save_c_werror_flag=$ac_c_werror_flag
3858 ac_c_werror_flag=yes
3859 ac_cv_prog_cc_g=no
3860 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003863
Martin v. Löwis11437992002-04-12 09:54:03 +00003864int
3865main ()
3866{
3867
3868 ;
3869 return 0;
3870}
3871_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003872if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003873 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003874else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003875 CFLAGS=""
3876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003877/* end confdefs.h. */
3878
3879int
3880main ()
3881{
3882
3883 ;
3884 return 0;
3885}
3886_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003887if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003889else
3890 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003891 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003893/* end confdefs.h. */
3894
3895int
3896main ()
3897{
3898
3899 ;
3900 return 0;
3901}
3902_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003903if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003904 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3911 ac_c_werror_flag=$ac_save_c_werror_flag
3912fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3914$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003915if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003917elif test $ac_cv_prog_cc_g = yes; then
3918 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003919 CFLAGS="-g -O2"
3920 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003921 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003922 fi
3923else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003924 if test "$GCC" = yes; then
3925 CFLAGS="-O2"
3926 else
3927 CFLAGS=
3928 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3931$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003932if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003933 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003934else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003935 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003936ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003938/* end confdefs.h. */
3939#include <stdarg.h>
3940#include <stdio.h>
3941#include <sys/types.h>
3942#include <sys/stat.h>
3943/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3944struct buf { int x; };
3945FILE * (*rcsopen) (struct buf *, struct stat *, int);
3946static char *e (p, i)
3947 char **p;
3948 int i;
3949{
3950 return p[i];
3951}
3952static char *f (char * (*g) (char **, int), char **p, ...)
3953{
3954 char *s;
3955 va_list v;
3956 va_start (v,p);
3957 s = g (p, va_arg (v,int));
3958 va_end (v);
3959 return s;
3960}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003961
3962/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3963 function prototypes and stuff, but not '\xHH' hex character constants.
3964 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003966 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3967 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003968 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003969int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3970
Martin v. Löwiseba40652007-08-30 20:10:57 +00003971/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3972 inside strings and character constants. */
3973#define FOO(x) 'x'
3974int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3975
Skip Montanaro6dead952003-09-25 14:50:04 +00003976int test (int i, double x);
3977struct s1 {int (*f) (int a);};
3978struct s2 {int (*f) (double a);};
3979int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3980int argc;
3981char **argv;
3982int
3983main ()
3984{
3985return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3986 ;
3987 return 0;
3988}
3989_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003990for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3991 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003992do
3993 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003994 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003995 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003997rm -f core conftest.err conftest.$ac_objext
3998 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003999done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004000rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004001CC=$ac_save_CC
4002
4003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004004# AC_CACHE_VAL
4005case "x$ac_cv_prog_cc_c89" in
4006 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4008$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004009 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4011$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004012 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004013 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4015$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004016esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004017if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004018
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004019fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004020
Martin v. Löwis11437992002-04-12 09:54:03 +00004021ac_ext=c
4022ac_cpp='$CPP $CPPFLAGS'
4023ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4024ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4025ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004026
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004027if test ! -z "$preset_cflags"
4028then
4029 CFLAGS=$preset_cflags
4030fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004031
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004032
4033
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4035$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004036
Martin v. Löwiseba40652007-08-30 20:10:57 +00004037# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004038if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004039 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004040
4041 case $withval in
4042 no) with_cxx_main=no
4043 MAINCC='$(CC)';;
4044 yes) with_cxx_main=yes
4045 MAINCC='$(CXX)';;
4046 *) with_cxx_main=yes
4047 MAINCC=$withval
4048 if test -z "$CXX"
4049 then
4050 CXX=$withval
4051 fi;;
4052 esac
4053else
4054
4055 with_cxx_main=no
4056 MAINCC='$(CC)'
4057
Martin v. Löwiseba40652007-08-30 20:10:57 +00004058fi
4059
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4061$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004062
4063preset_cxx="$CXX"
4064if test -z "$CXX"
4065then
4066 case "$CC" in
4067 gcc) # Extract the first word of "g++", so it can be a program name with args.
4068set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4070$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004071if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004072 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004073else
4074 case $CXX in
4075 [\\/]* | ?:[\\/]*)
4076 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4077 ;;
4078 *)
4079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4080for as_dir in notfound
4081do
4082 IFS=$as_save_IFS
4083 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004084 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004085 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004086 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004088 break 2
4089 fi
4090done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004091 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004092IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004093
4094 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4095 ;;
4096esac
4097fi
4098CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004099if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4101$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004102else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4104$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004106
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004107 ;;
4108 cc) # Extract the first word of "c++", so it can be a program name with args.
4109set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4111$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004112if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004113 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004114else
4115 case $CXX in
4116 [\\/]* | ?:[\\/]*)
4117 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4118 ;;
4119 *)
4120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4121for as_dir in notfound
4122do
4123 IFS=$as_save_IFS
4124 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004125 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004126 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004127 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004129 break 2
4130 fi
4131done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004132 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004133IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004134
4135 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4136 ;;
4137esac
4138fi
4139CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004140if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4142$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004143else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4145$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004147
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004148 ;;
4149 esac
4150 if test "$CXX" = "notfound"
4151 then
4152 CXX=""
4153 fi
4154fi
4155if test -z "$CXX"
4156then
4157 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4158do
4159 # Extract the first word of "$ac_prog", so it can be a program name with args.
4160set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4162$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004163if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004164 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004165else
4166 if test -n "$CXX"; then
4167 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4168else
4169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4170for as_dir in $PATH
4171do
4172 IFS=$as_save_IFS
4173 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004174 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004175 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004176 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004178 break 2
4179 fi
4180done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004181 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004182IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004183
4184fi
4185fi
4186CXX=$ac_cv_prog_CXX
4187if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4189$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004190else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4192$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004193fi
4194
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004196 test -n "$CXX" && break
4197done
4198test -n "$CXX" || CXX="notfound"
4199
4200 if test "$CXX" = "notfound"
4201 then
4202 CXX=""
4203 fi
4204fi
4205if test "$preset_cxx" != "$CXX"
4206then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004208
4209 By default, distutils will build C++ extension modules with \"$CXX\".
4210 If this is not intended, then set CXX on the configure command line.
4211 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004212$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004213
4214 By default, distutils will build C++ extension modules with \"$CXX\".
4215 If this is not intended, then set CXX on the configure command line.
4216 " >&2;}
4217fi
4218
4219
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004220# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004221
4222ac_ext=c
4223ac_cpp='$CPP $CPPFLAGS'
4224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4226ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4228$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004229# On Suns, sometimes $CPP names a directory.
4230if test -n "$CPP" && test -d "$CPP"; then
4231 CPP=
4232fi
4233if test -z "$CPP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004234 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004235 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004236else
Martin v. Löwis11437992002-04-12 09:54:03 +00004237 # Double quotes because CPP needs to be expanded
4238 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4239 do
4240 ac_preproc_ok=false
4241for ac_c_preproc_warn_flag in '' yes
4242do
4243 # Use a header file that comes with gcc, so configuring glibc
4244 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004245 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4246 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004247 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004250/* end confdefs.h. */
4251#ifdef __STDC__
4252# include <limits.h>
4253#else
4254# include <assert.h>
4255#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004256 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004257_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004258if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004260else
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # Broken: fails on valid input.
4262continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004263fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004264rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004265
Martin v. Löwiseba40652007-08-30 20:10:57 +00004266 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004270#include <ac_nonexistent.h>
4271_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004272if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # Broken: success on invalid input.
4274continue
4275else
Martin v. Löwis11437992002-04-12 09:54:03 +00004276 # Passes both tests.
4277ac_preproc_ok=:
4278break
4279fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004280rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004281
4282done
4283# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004284rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004285if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004286 break
4287fi
4288
4289 done
4290 ac_cv_prog_CPP=$CPP
4291
4292fi
4293 CPP=$ac_cv_prog_CPP
4294else
4295 ac_cv_prog_CPP=$CPP
4296fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4298$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004299ac_preproc_ok=false
4300for ac_c_preproc_warn_flag in '' yes
4301do
4302 # Use a header file that comes with gcc, so configuring glibc
4303 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004304 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4305 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 # On the NeXT, cc -E runs the code through the compiler's parser,
4307 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004309/* end confdefs.h. */
4310#ifdef __STDC__
4311# include <limits.h>
4312#else
4313# include <assert.h>
4314#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004315 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004316_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004317if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004318
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004319else
Martin v. Löwis11437992002-04-12 09:54:03 +00004320 # Broken: fails on valid input.
4321continue
4322fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004323rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004324
Martin v. Löwiseba40652007-08-30 20:10:57 +00004325 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004326 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004329#include <ac_nonexistent.h>
4330_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004331if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004332 # Broken: success on invalid input.
4333continue
4334else
Martin v. Löwis11437992002-04-12 09:54:03 +00004335 # Passes both tests.
4336ac_preproc_ok=:
4337break
4338fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004339rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004340
4341done
4342# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004343rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004344if $ac_preproc_ok; then :
4345
Martin v. Löwis11437992002-04-12 09:54:03 +00004346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004347 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4348$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004349as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4350See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004351fi
4352
4353ac_ext=c
4354ac_cpp='$CPP $CPPFLAGS'
4355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4357ac_compiler_gnu=$ac_cv_c_compiler_gnu
4358
4359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4361$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004362if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004363 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004365 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004366 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004367 # Loop through the user's path and test for each of PROGNAME-LIST
4368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004369for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4370do
4371 IFS=$as_save_IFS
4372 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004373 for ac_prog in grep ggrep; do
4374 for ac_exec_ext in '' $ac_executable_extensions; do
4375 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4376 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4377# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004378 # Check for GNU $ac_path_GREP
4379case `"$ac_path_GREP" --version 2>&1` in
4380*GNU*)
4381 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4382*)
4383 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004384 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004385 while :
4386 do
4387 cat "conftest.in" "conftest.in" >"conftest.tmp"
4388 mv "conftest.tmp" "conftest.in"
4389 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004390 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4392 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004393 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004394 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4395 # Best one so far, save it but keep looking for a better one
4396 ac_cv_path_GREP="$ac_path_GREP"
4397 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004398 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004399 # 10*(2^10) chars as input seems more than enough
4400 test $ac_count -gt 10 && break
4401 done
4402 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4403esac
4404
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004405 $ac_path_GREP_found && break 3
4406 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004407 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004408 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004409IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004410 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004411 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004412 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004413else
4414 ac_cv_path_GREP=$GREP
4415fi
4416
Martin v. Löwiseba40652007-08-30 20:10:57 +00004417fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4419$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004420 GREP="$ac_cv_path_GREP"
4421
4422
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4424$as_echo_n "checking for egrep... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004425if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004426 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004427else
4428 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4429 then ac_cv_path_EGREP="$GREP -E"
4430 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004431 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004432 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004433 # Loop through the user's path and test for each of PROGNAME-LIST
4434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004435for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4436do
4437 IFS=$as_save_IFS
4438 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004439 for ac_prog in egrep; do
4440 for ac_exec_ext in '' $ac_executable_extensions; do
4441 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4442 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4443# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004444 # Check for GNU $ac_path_EGREP
4445case `"$ac_path_EGREP" --version 2>&1` in
4446*GNU*)
4447 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4448*)
4449 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004450 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004451 while :
4452 do
4453 cat "conftest.in" "conftest.in" >"conftest.tmp"
4454 mv "conftest.tmp" "conftest.in"
4455 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004456 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004457 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4458 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004459 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004460 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4461 # Best one so far, save it but keep looking for a better one
4462 ac_cv_path_EGREP="$ac_path_EGREP"
4463 ac_path_EGREP_max=$ac_count
4464 fi
4465 # 10*(2^10) chars as input seems more than enough
4466 test $ac_count -gt 10 && break
4467 done
4468 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4469esac
4470
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004471 $ac_path_EGREP_found && break 3
4472 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004473 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004474 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004475IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004476 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004477 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004478 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004479else
4480 ac_cv_path_EGREP=$EGREP
4481fi
4482
Martin v. Löwiseba40652007-08-30 20:10:57 +00004483 fi
4484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4486$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004487 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004488
4489
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4491$as_echo_n "checking for ANSI C header files... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004492if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004493 $as_echo_n "(cached) " >&6
4494else
4495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004496/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004497#include <stdlib.h>
4498#include <stdarg.h>
4499#include <string.h>
4500#include <float.h>
4501
4502int
4503main ()
4504{
4505
4506 ;
4507 return 0;
4508}
4509_ACEOF
4510if ac_fn_c_try_compile "$LINENO"; then :
4511 ac_cv_header_stdc=yes
4512else
4513 ac_cv_header_stdc=no
4514fi
4515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4516
4517if test $ac_cv_header_stdc = yes; then
4518 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4520/* end confdefs.h. */
4521#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004522
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004523_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004525 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004527else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004528 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004529fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004530rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004532fi
4533
4534if test $ac_cv_header_stdc = yes; then
4535 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4537/* end confdefs.h. */
4538#include <stdlib.h>
4539
4540_ACEOF
4541if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4542 $EGREP "free" >/dev/null 2>&1; then :
4543
4544else
4545 ac_cv_header_stdc=no
4546fi
4547rm -f conftest*
4548
4549fi
4550
4551if test $ac_cv_header_stdc = yes; then
4552 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4553 if test "$cross_compiling" = yes; then :
4554 :
4555else
4556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4557/* end confdefs.h. */
4558#include <ctype.h>
4559#include <stdlib.h>
4560#if ((' ' & 0x0FF) == 0x020)
4561# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4562# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4563#else
4564# define ISLOWER(c) \
4565 (('a' <= (c) && (c) <= 'i') \
4566 || ('j' <= (c) && (c) <= 'r') \
4567 || ('s' <= (c) && (c) <= 'z'))
4568# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4569#endif
4570
4571#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4572int
4573main ()
4574{
4575 int i;
4576 for (i = 0; i < 256; i++)
4577 if (XOR (islower (i), ISLOWER (i))
4578 || toupper (i) != TOUPPER (i))
4579 return 2;
4580 return 0;
4581}
4582_ACEOF
4583if ac_fn_c_try_run "$LINENO"; then :
4584
4585else
4586 ac_cv_header_stdc=no
4587fi
4588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4589 conftest.$ac_objext conftest.beam conftest.$ac_ext
4590fi
4591
4592fi
4593fi
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4595$as_echo "$ac_cv_header_stdc" >&6; }
4596if test $ac_cv_header_stdc = yes; then
4597
4598$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4599
4600fi
4601
4602# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4603for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4604 inttypes.h stdint.h unistd.h
4605do :
4606 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4607ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4608"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004609if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004610 cat >>confdefs.h <<_ACEOF
4611#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4612_ACEOF
4613
4614fi
4615
4616done
4617
4618
4619
4620 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004621if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004622 MINIX=yes
4623else
4624 MINIX=
4625fi
4626
4627
4628 if test "$MINIX" = yes; then
4629
4630$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4631
4632
4633$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4634
4635
4636$as_echo "#define _MINIX 1" >>confdefs.h
4637
4638 fi
4639
4640
4641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4642$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004643if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004644 $as_echo_n "(cached) " >&6
4645else
4646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4647/* end confdefs.h. */
4648
4649# define __EXTENSIONS__ 1
4650 $ac_includes_default
4651int
4652main ()
4653{
4654
4655 ;
4656 return 0;
4657}
4658_ACEOF
4659if ac_fn_c_try_compile "$LINENO"; then :
4660 ac_cv_safe_to_define___extensions__=yes
4661else
4662 ac_cv_safe_to_define___extensions__=no
4663fi
4664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4665fi
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4667$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4668 test $ac_cv_safe_to_define___extensions__ = yes &&
4669 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4670
4671 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4672
4673 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4674
4675 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4676
4677 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4678
4679
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004680
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004681# Check for unsupported systems
4682case $ac_sys_system/$ac_sys_release in
4683atheos*|Linux*/1*)
4684 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4685 echo See README for details.
4686 exit 1;;
4687esac
4688
4689
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4691$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004692
4693# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004694if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004695 withval=$with_suffix;
4696 case $withval in
4697 no) EXEEXT=;;
4698 yes) EXEEXT=.exe;;
4699 *) EXEEXT=$withval;;
4700 esac
4701fi
4702
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4704$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004705
4706# Test whether we're running on a non-case-sensitive system, in which
4707# case we give a warning if no ext is given
4708
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4710$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004711if test ! -d CaseSensitiveTestDir; then
4712mkdir CaseSensitiveTestDir
4713fi
4714
4715if test -d casesensitivetestdir
4716then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4718$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004719 BUILDEXEEXT=.exe
4720else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4722$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004723 BUILDEXEEXT=$EXEEXT
4724fi
4725rmdir CaseSensitiveTestDir
4726
4727case $MACHDEP in
4728bsdos*)
4729 case $CC in
4730 gcc) CC="$CC -D_HAVE_BSDI";;
4731 esac;;
4732esac
4733
4734case $ac_sys_system in
4735hp*|HP*)
4736 case $CC in
4737 cc|*/cc) CC="$CC -Ae";;
4738 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004739SunOS*)
4740 # Some functions have a prototype only with that define, e.g. confstr
4741
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004742$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004743
4744 ;;
4745esac
4746
4747
4748
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4750$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004751if test -z "$LIBRARY"
4752then
4753 LIBRARY='libpython$(VERSION).a'
4754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4756$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004757
4758# LDLIBRARY is the name of the library to link against (as opposed to the
4759# name of the library into which to insert object files). BLDLIBRARY is also
4760# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4761# is blank as the main program is not linked directly against LDLIBRARY.
4762# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4763# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4764# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4765# DLLLIBRARY is the shared (i.e., DLL) library.
4766#
4767# RUNSHARED is used to run shared python without installed libraries
4768#
4769# INSTSONAME is the name of the shared library that will be use to install
4770# on the system - some systems like version suffix, others don't
4771
4772
4773
4774
4775
4776
4777LDLIBRARY="$LIBRARY"
4778BLDLIBRARY='$(LDLIBRARY)'
4779INSTSONAME='$(LDLIBRARY)'
4780DLLLIBRARY=''
4781LDLIBRARYDIR=''
4782RUNSHARED=''
4783
4784# LINKCC is the command that links the python executable -- default is $(CC).
4785# If CXX is set, and if it is needed to link a main function that was
4786# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4787# python might then depend on the C++ runtime
4788# This is altered for AIX in order to build the export list before
4789# linking.
4790
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4792$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004793if test -z "$LINKCC"
4794then
4795 LINKCC='$(PURIFY) $(MAINCC)'
4796 case $ac_sys_system in
4797 AIX*)
4798 exp_extra="\"\""
4799 if test $ac_sys_release -ge 5 -o \
4800 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4801 exp_extra="."
4802 fi
4803 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004804 QNX*)
4805 # qcc must be used because the other compilers do not
4806 # support -N.
4807 LINKCC=qcc;;
4808 esac
4809fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4811$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004812
4813# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4814# make sure we default having it set to "no": this is used by
4815# distutils.unixccompiler to know if it should add --enable-new-dtags
4816# to linker command lines, and failing to detect GNU ld simply results
4817# in the same bahaviour as before.
4818
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4820$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004821ac_prog=ld
4822if test "$GCC" = yes; then
4823 ac_prog=`$CC -print-prog-name=ld`
4824fi
4825case `"$ac_prog" -V 2>&1 < /dev/null` in
4826 *GNU*)
4827 GNULD=yes;;
4828 *)
4829 GNULD=no;;
4830esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4832$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004833
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4835$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004836# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004837if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004838 enableval=$enable_shared;
4839fi
4840
4841
4842if test -z "$enable_shared"
4843then
4844 case $ac_sys_system in
4845 CYGWIN* | atheos*)
4846 enable_shared="yes";;
4847 *)
4848 enable_shared="no";;
4849 esac
4850fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4852$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004853
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4855$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004856# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004857if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004858 enableval=$enable_profiling; ac_save_cc="$CC"
4859 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004860 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004861 ac_enable_profiling="no"
4862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004864/* end confdefs.h. */
4865int main() { return 0; }
4866_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004867if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004868 ac_enable_profiling="yes"
4869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004870 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004874fi
4875
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004876 CC="$ac_save_cc"
4877fi
4878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4880$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004881
4882case "$ac_enable_profiling" in
4883 "yes")
4884 BASECFLAGS="-pg $BASECFLAGS"
4885 LDFLAGS="-pg $LDFLAGS"
4886 ;;
4887esac
4888
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4890$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004891
4892# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4893# library that we build, but we do not want to link against it (we
4894# will find it with a -framework option). For this reason there is an
4895# extra variable BLDLIBRARY against which Python and the extension
4896# modules are linked, BLDLIBRARY. This is normally the same as
4897# LDLIBRARY, but empty for MacOSX framework builds.
4898if test "$enable_framework"
4899then
4900 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4901 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4902 BLDLIBRARY=''
4903else
4904 BLDLIBRARY='$(LDLIBRARY)'
4905fi
4906
4907# Other platforms follow
4908if test $enable_shared = "yes"; then
4909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004910$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004911
4912 case $ac_sys_system in
4913 BeOS*)
4914 LDLIBRARY='libpython$(VERSION).so'
4915 ;;
4916 CYGWIN*)
4917 LDLIBRARY='libpython$(VERSION).dll.a'
4918 DLLLIBRARY='libpython$(VERSION).dll'
4919 ;;
4920 SunOS*)
4921 LDLIBRARY='libpython$(VERSION).so'
4922 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4923 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4924 INSTSONAME="$LDLIBRARY".$SOVERSION
4925 ;;
4926 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4927 LDLIBRARY='libpython$(VERSION).so'
4928 BLDLIBRARY='-L. -lpython$(VERSION)'
4929 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4930 case $ac_sys_system in
4931 FreeBSD*)
4932 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4933 ;;
4934 esac
4935 INSTSONAME="$LDLIBRARY".$SOVERSION
4936 ;;
4937 hp*|HP*)
4938 case `uname -m` in
4939 ia64)
4940 LDLIBRARY='libpython$(VERSION).so'
4941 ;;
4942 *)
4943 LDLIBRARY='libpython$(VERSION).sl'
4944 ;;
4945 esac
4946 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4947 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4948 ;;
4949 OSF*)
4950 LDLIBRARY='libpython$(VERSION).so'
4951 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4952 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4953 ;;
4954 atheos*)
4955 LDLIBRARY='libpython$(VERSION).so'
4956 BLDLIBRARY='-L. -lpython$(VERSION)'
4957 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4958 ;;
4959 Darwin*)
4960 LDLIBRARY='libpython$(VERSION).dylib'
4961 BLDLIBRARY='-L. -lpython$(VERSION)'
4962 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4963 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00004964 AIX*)
4965 LDLIBRARY='libpython$(VERSION).so'
4966 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4967 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004968
4969 esac
4970else # shared is disabled
4971 case $ac_sys_system in
4972 CYGWIN*)
4973 BLDLIBRARY='$(LIBRARY)'
4974 LDLIBRARY='libpython$(VERSION).dll.a'
4975 ;;
4976 esac
4977fi
4978
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4980$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004981
4982if test -n "$ac_tool_prefix"; then
4983 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4984set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4986$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004987if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004988 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004989else
4990 if test -n "$RANLIB"; then
4991 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4992else
4993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4994for as_dir in $PATH
4995do
4996 IFS=$as_save_IFS
4997 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004998 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004999 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5000 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005002 break 2
5003 fi
5004done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005005 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005006IFS=$as_save_IFS
5007
5008fi
5009fi
5010RANLIB=$ac_cv_prog_RANLIB
5011if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5013$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005014else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5016$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005017fi
5018
5019
5020fi
5021if test -z "$ac_cv_prog_RANLIB"; then
5022 ac_ct_RANLIB=$RANLIB
5023 # Extract the first word of "ranlib", so it can be a program name with args.
5024set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005027if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005028 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005029else
5030 if test -n "$ac_ct_RANLIB"; then
5031 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5032else
5033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in $PATH
5035do
5036 IFS=$as_save_IFS
5037 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005038 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005039 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5040 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005042 break 2
5043 fi
5044done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005045 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005046IFS=$as_save_IFS
5047
5048fi
5049fi
5050ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5051if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5053$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5056$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005057fi
5058
5059 if test "x$ac_ct_RANLIB" = x; then
5060 RANLIB=":"
5061 else
5062 case $cross_compiling:$ac_tool_warned in
5063yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005064{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5065$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005066ac_tool_warned=yes ;;
5067esac
5068 RANLIB=$ac_ct_RANLIB
5069 fi
5070else
5071 RANLIB="$ac_cv_prog_RANLIB"
5072fi
5073
5074
5075for ac_prog in ar aal
5076do
5077 # Extract the first word of "$ac_prog", so it can be a program name with args.
5078set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5080$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005081if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005082 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005083else
5084 if test -n "$AR"; then
5085 ac_cv_prog_AR="$AR" # Let the user override the test.
5086else
5087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5088for as_dir in $PATH
5089do
5090 IFS=$as_save_IFS
5091 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005092 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005093 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5094 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005095 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005096 break 2
5097 fi
5098done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005099 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005100IFS=$as_save_IFS
5101
5102fi
5103fi
5104AR=$ac_cv_prog_AR
5105if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5107$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5110$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005111fi
5112
5113
5114 test -n "$AR" && break
5115done
5116test -n "$AR" || AR="ar"
5117
5118
5119# tweak ARFLAGS only if the user didn't set it on the command line
5120
5121if test -z "$ARFLAGS"
5122then
5123 ARFLAGS="rc"
5124fi
5125
5126
5127# Extract the first word of "svnversion", so it can be a program name with args.
5128set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005131if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005132 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005133else
5134 if test -n "$SVNVERSION"; then
5135 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5136else
5137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140 IFS=$as_save_IFS
5141 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005142 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005143 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5144 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005146 break 2
5147 fi
5148done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005149 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005150IFS=$as_save_IFS
5151
5152 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5153fi
5154fi
5155SVNVERSION=$ac_cv_prog_SVNVERSION
5156if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5158$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005162fi
5163
5164
5165if test $SVNVERSION = found
5166then
5167 SVNVERSION="svnversion \$(srcdir)"
5168else
5169 SVNVERSION="echo Unversioned directory"
5170fi
5171
5172case $MACHDEP in
5173bsdos*|hp*|HP*)
5174 # install -d does not work on BSDI or HP-UX
5175 if test -z "$INSTALL"
5176 then
5177 INSTALL="${srcdir}/install-sh -c"
5178 fi
5179esac
5180ac_aux_dir=
5181for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005182 if test -f "$ac_dir/install-sh"; then
5183 ac_aux_dir=$ac_dir
5184 ac_install_sh="$ac_aux_dir/install-sh -c"
5185 break
5186 elif test -f "$ac_dir/install.sh"; then
5187 ac_aux_dir=$ac_dir
5188 ac_install_sh="$ac_aux_dir/install.sh -c"
5189 break
5190 elif test -f "$ac_dir/shtool"; then
5191 ac_aux_dir=$ac_dir
5192 ac_install_sh="$ac_aux_dir/shtool install -c"
5193 break
5194 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005195done
5196if test -z "$ac_aux_dir"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005197 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198fi
5199
5200# These three variables are undocumented and unsupported,
5201# and are intended to be withdrawn in a future Autoconf release.
5202# They can cause serious problems if a builder's source tree is in a directory
5203# whose full name contains unusual characters.
5204ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5205ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5206ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5207
5208
5209# Find a good install program. We prefer a C program (faster),
5210# so one script is as good as another. But avoid the broken or
5211# incompatible versions:
5212# SysV /etc/install, /usr/sbin/install
5213# SunOS /usr/etc/install
5214# IRIX /sbin/install
5215# AIX /bin/install
5216# AmigaOS /C/install, which installs bootblocks on floppy discs
5217# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5218# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5219# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5220# OS/2's system install, which has a completely different semantic
5221# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005222# Reject install programs that cannot install multiple files.
5223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5224$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005225if test -z "$INSTALL"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005226if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005227 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005228else
5229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5230for as_dir in $PATH
5231do
5232 IFS=$as_save_IFS
5233 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005234 # Account for people who put trailing slashes in PATH elements.
5235case $as_dir/ in #((
5236 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005237 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005238 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005239 /usr/ucb/* ) ;;
5240 *)
5241 # OSF1 and SCO ODT 3.0 have their own names for install.
5242 # Don't use installbsd from OSF since it installs stuff as root
5243 # by default.
5244 for ac_prog in ginstall scoinst install; do
5245 for ac_exec_ext in '' $ac_executable_extensions; do
5246 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5247 if test $ac_prog = install &&
5248 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5249 # AIX install. It has an incompatible calling convention.
5250 :
5251 elif test $ac_prog = install &&
5252 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5253 # program-specific install script used by HP pwplus--don't use.
5254 :
5255 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005256 rm -rf conftest.one conftest.two conftest.dir
5257 echo one > conftest.one
5258 echo two > conftest.two
5259 mkdir conftest.dir
5260 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5261 test -s conftest.one && test -s conftest.two &&
5262 test -s conftest.dir/conftest.one &&
5263 test -s conftest.dir/conftest.two
5264 then
5265 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5266 break 3
5267 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005268 fi
5269 fi
5270 done
5271 done
5272 ;;
5273esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005274
5275 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005276IFS=$as_save_IFS
5277
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005278rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005279
5280fi
5281 if test "${ac_cv_path_install+set}" = set; then
5282 INSTALL=$ac_cv_path_install
5283 else
5284 # As a last resort, use the slow shell script. Don't cache a
5285 # value for INSTALL within a source directory, because that will
5286 # break other packages using the cache if that directory is
5287 # removed, or if the value is a relative name.
5288 INSTALL=$ac_install_sh
5289 fi
5290fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5292$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005293
5294# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5295# It thinks the first close brace ends the variable substitution.
5296test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5297
5298test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5299
5300test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5301
5302
5303# Not every filesystem supports hard links
5304
5305if test -z "$LN" ; then
5306 case $ac_sys_system in
5307 BeOS*) LN="ln -s";;
5308 CYGWIN*) LN="ln -s";;
5309 atheos*) LN="ln -s";;
5310 *) LN=ln;;
5311 esac
5312fi
5313
5314# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5316$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005317
5318# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005319if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005320 withval=$with_pydebug;
5321if test "$withval" != no
5322then
5323
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005324$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5327$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005328 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005329else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005331fi
5332else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5334$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005335fi
5336
5337
5338# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5339# merged with this chunk of code?
5340
5341# Optimizer/debugger flags
5342# ------------------------
5343# (The following bit of code is complicated enough - please keep things
5344# indented properly. Just pretend you're editing Python code. ;-)
5345
5346# There are two parallel sets of case statements below, one that checks to
5347# see if OPT was set and one that does BASECFLAGS setting based upon
5348# compiler and platform. BASECFLAGS tweaks need to be made even if the
5349# user set OPT.
5350
5351# tweak OPT based on compiler and platform, only if the user didn't set
5352# it on the command line
5353
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005354if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005355then
5356 case $GCC in
5357 yes)
5358 if test "$CC" != 'g++' ; then
5359 STRICT_PROTO="-Wstrict-prototypes"
5360 fi
5361 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5362 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5363 WRAP="-fwrapv"
5364 fi
5365 case $ac_cv_prog_cc_g in
5366 yes)
5367 if test "$Py_DEBUG" = 'true' ; then
5368 # Optimization messes up debuggers, so turn it off for
5369 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005370 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005371 else
5372 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5373 fi
5374 ;;
5375 *)
5376 OPT="-O3 -Wall $STRICT_PROTO"
5377 ;;
5378 esac
5379 case $ac_sys_system in
5380 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5381 ;;
5382 esac
5383 ;;
5384
5385 *)
5386 OPT="-O"
5387 ;;
5388 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005389fi
5390
5391
5392
5393# The -arch flags for universal builds on OSX
5394UNIVERSAL_ARCH_FLAGS=
5395
5396
5397# tweak BASECFLAGS based on compiler and platform
5398case $GCC in
5399yes)
5400 # Python violates C99 rules, by casting between incompatible
5401 # pointer types. GCC may generate bad code as a result of that,
5402 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5404$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005405 ac_save_cc="$CC"
5406 CC="$CC -fno-strict-aliasing"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005407 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005408 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005411/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005412
5413int
5414main ()
5415{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005416
Gregory P. Smith373469a2009-11-01 21:03:38 +00005417 ;
5418 return 0;
5419}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005420_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005421if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005422 ac_cv_no_strict_aliasing_ok=yes
5423else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005424 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005425fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005427fi
5428
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005429 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5431$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005432 if test $ac_cv_no_strict_aliasing_ok = yes
5433 then
5434 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5435 fi
5436
5437 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5438 # support. Without this, treatment of subnormals doesn't follow
5439 # the standard.
5440 case $ac_sys_machine in
5441 alpha*)
5442 BASECFLAGS="$BASECFLAGS -mieee"
5443 ;;
5444 esac
5445
5446 case $ac_sys_system in
5447 SCO_SV*)
5448 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5449 ;;
5450 # is there any other compiler on Darwin besides gcc?
5451 Darwin*)
5452 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5453 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005454 if test "${CC}" = gcc
5455 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5457$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005458 case "${UNIVERSALSDK}" in
5459 */MacOSX10.4u.sdk)
5460 # Build using 10.4 SDK, force usage of gcc when the
5461 # compiler is gcc, otherwise the user will get very
5462 # confusing error messages when building on OSX 10.6
5463 CC=gcc-4.0
5464 CPP=cpp-4.0
5465 ;;
5466 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5468$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005469 fi
5470
5471 # Calculate the right deployment target for this build.
5472 #
5473 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5474 if test ${cur_target} '>' 10.2; then
5475 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005476 if test ${enable_universalsdk}; then
5477 if test "${UNIVERSAL_ARCHS}" = "all"; then
5478 # Ensure that the default platform for a
5479 # 4-way universal build is OSX 10.5,
5480 # that's the first OS release where
5481 # 4-way builds make sense.
5482 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005483
5484 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5485 cur_target='10.5'
5486
5487 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5488 cur_target='10.5'
5489
5490 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5491 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005492 fi
5493 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005494 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005495 # On Intel macs default to a deployment
5496 # target of 10.4, that's the first OSX
5497 # release with Intel support.
5498 cur_target="10.4"
5499 fi
5500 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005501 fi
5502 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5503
5504 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5505 # environment with a value that is the same as what we'll use
5506 # in the Makefile to ensure that we'll get the same compiler
5507 # environment during configure and build time.
5508 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5509 export MACOSX_DEPLOYMENT_TARGET
5510 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5511
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005512 if test "${enable_universalsdk}"; then
5513 UNIVERSAL_ARCH_FLAGS=""
5514 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5515 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5516 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005517 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005518
5519 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5520 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5521 LIPO_32BIT_FLAGS=""
5522 ARCH_RUN_32BIT="true"
5523
5524 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5525 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5526 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005527 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005528
5529 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5530 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5531 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005532 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005533
5534 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5535 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5536 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005537 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005538
5539 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005540 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005541
5542 fi
5543
5544
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005545 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5546 if test "${UNIVERSALSDK}" != "/"
5547 then
5548 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5549 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5550 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005551 fi
5552
5553 fi
5554
5555
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005556 ;;
5557 OSF*)
5558 BASECFLAGS="$BASECFLAGS -mieee"
5559 ;;
5560 esac
5561 ;;
5562
5563*)
5564 case $ac_sys_system in
5565 OpenUNIX*|UnixWare*)
5566 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5567 ;;
5568 OSF*)
5569 BASECFLAGS="$BASECFLAGS -ieee -std"
5570 ;;
5571 SCO_SV*)
5572 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5573 ;;
5574 esac
5575 ;;
5576esac
5577
5578if test "$Py_DEBUG" = 'true'; then
5579 :
5580else
5581 OPT="-DNDEBUG $OPT"
5582fi
5583
5584if test "$ac_arch_flags"
5585then
5586 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5587fi
5588
5589# disable check for icc since it seems to pass, but generates a warning
5590if test "$CC" = icc
5591then
5592 ac_cv_opt_olimit_ok=no
5593fi
5594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5596$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005597if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005598 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005599else
5600 ac_save_cc="$CC"
5601CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005603/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005604
5605int
5606main ()
5607{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005608
Gregory P. Smith373469a2009-11-01 21:03:38 +00005609 ;
5610 return 0;
5611}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005613if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005614 ac_cv_opt_olimit_ok=yes
5615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005616 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005617
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005618fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005620CC="$ac_save_cc"
5621fi
5622
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5624$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005625if test $ac_cv_opt_olimit_ok = yes; then
5626 case $ac_sys_system in
5627 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5628 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5629 # environment?
5630 Darwin*)
5631 ;;
5632 *)
5633 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5634 ;;
5635 esac
5636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5638$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005639 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005640 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005641else
5642 ac_save_cc="$CC"
5643 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005645/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005646
5647int
5648main ()
5649{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005650
Gregory P. Smith373469a2009-11-01 21:03:38 +00005651 ;
5652 return 0;
5653}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005654_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005655if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005656 ac_cv_olimit_ok=yes
5657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005658 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005659
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005660fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005662 CC="$ac_save_cc"
5663fi
5664
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5666$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005667 if test $ac_cv_olimit_ok = yes; then
5668 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5669 fi
5670fi
5671
5672# Check whether GCC supports PyArg_ParseTuple format
5673if test "$GCC" = "yes"
5674then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5676$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005677 save_CFLAGS=$CFLAGS
5678 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005680/* end confdefs.h. */
5681
5682 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005683int
5684main ()
5685{
5686
5687 ;
5688 return 0;
5689}
Matthias Klosec511b472010-05-08 11:01:39 +00005690
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005691_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005692if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005693
Matthias Klosec511b472010-05-08 11:01:39 +00005694
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005695$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005696
Matthias Klosec511b472010-05-08 11:01:39 +00005697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005698$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005699
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005700else
Matthias Klosec511b472010-05-08 11:01:39 +00005701
5702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005703$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005704
5705fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5707 CFLAGS=$save_CFLAGS
5708fi
5709
5710# On some compilers, pthreads are available without further options
5711# (e.g. MacOS X). On some of these systems, the compiler will not
5712# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5713# So we have to see first whether pthreads are available without
5714# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5716$as_echo_n "checking whether pthreads are available without options... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005717if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005718 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005719else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005720 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005721 ac_cv_pthread_is_default=no
5722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005724/* end confdefs.h. */
5725
5726#include <pthread.h>
5727
5728void* routine(void* p){return NULL;}
5729
5730int main(){
5731 pthread_t p;
5732 if(pthread_create(&p,NULL,routine,NULL)!=0)
5733 return 1;
5734 (void)pthread_detach(p);
5735 return 0;
5736}
5737
5738_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005739if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005740
5741 ac_cv_pthread_is_default=yes
5742 ac_cv_kthread=no
5743 ac_cv_pthread=no
5744
5745else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005746 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005747fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005750fi
5751
5752
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005753fi
5754
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5756$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005757
5758
5759if test $ac_cv_pthread_is_default = yes
5760then
5761 ac_cv_kpthread=no
5762else
5763# -Kpthread, if available, provides the right #defines
5764# and linker options to make pthread_create available
5765# Some compilers won't report that they do not support -Kpthread,
5766# so we need to run a program to see whether it really made the
5767# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5769$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005770if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005771 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005772else
5773 ac_save_cc="$CC"
5774CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005775if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005776 ac_cv_kpthread=no
5777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005779/* end confdefs.h. */
5780
5781#include <pthread.h>
5782
5783void* routine(void* p){return NULL;}
5784
5785int main(){
5786 pthread_t p;
5787 if(pthread_create(&p,NULL,routine,NULL)!=0)
5788 return 1;
5789 (void)pthread_detach(p);
5790 return 0;
5791}
5792
5793_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005794if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005795 ac_cv_kpthread=yes
5796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005797 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005801fi
5802
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005803CC="$ac_save_cc"
5804fi
5805
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5807$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005808fi
5809
5810if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5811then
5812# -Kthread, if available, provides the right #defines
5813# and linker options to make pthread_create available
5814# Some compilers won't report that they do not support -Kthread,
5815# so we need to run a program to see whether it really made the
5816# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5818$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005819if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005820 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005821else
5822 ac_save_cc="$CC"
5823CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005824if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005825 ac_cv_kthread=no
5826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005828/* end confdefs.h. */
5829
5830#include <pthread.h>
5831
5832void* routine(void* p){return NULL;}
5833
5834int main(){
5835 pthread_t p;
5836 if(pthread_create(&p,NULL,routine,NULL)!=0)
5837 return 1;
5838 (void)pthread_detach(p);
5839 return 0;
5840}
5841
5842_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005843if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005844 ac_cv_kthread=yes
5845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005846 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005850fi
5851
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005852CC="$ac_save_cc"
5853fi
5854
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5856$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005857fi
5858
5859if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5860then
5861# -pthread, if available, provides the right #defines
5862# and linker options to make pthread_create available
5863# Some compilers won't report that they do not support -pthread,
5864# so we need to run a program to see whether it really made the
5865# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5867$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005868if ${ac_cv_thread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005869 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005870else
5871 ac_save_cc="$CC"
5872CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005873if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005874 ac_cv_pthread=no
5875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005877/* end confdefs.h. */
5878
5879#include <pthread.h>
5880
5881void* routine(void* p){return NULL;}
5882
5883int main(){
5884 pthread_t p;
5885 if(pthread_create(&p,NULL,routine,NULL)!=0)
5886 return 1;
5887 (void)pthread_detach(p);
5888 return 0;
5889}
5890
5891_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005892if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005893 ac_cv_pthread=yes
5894else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005895 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005896fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005899fi
5900
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005901CC="$ac_save_cc"
5902fi
5903
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5905$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005906fi
5907
5908# If we have set a CC compiler flag for thread support then
5909# check if it works for CXX, too.
5910ac_cv_cxx_thread=no
5911if test ! -z "$CXX"
5912then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5914$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005915ac_save_cxx="$CXX"
5916
5917if test "$ac_cv_kpthread" = "yes"
5918then
5919 CXX="$CXX -Kpthread"
5920 ac_cv_cxx_thread=yes
5921elif test "$ac_cv_kthread" = "yes"
5922then
5923 CXX="$CXX -Kthread"
5924 ac_cv_cxx_thread=yes
5925elif test "$ac_cv_pthread" = "yes"
5926then
5927 CXX="$CXX -pthread"
5928 ac_cv_cxx_thread=yes
5929fi
5930
5931if test $ac_cv_cxx_thread = yes
5932then
5933 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5934 $CXX -c conftest.$ac_ext 2>&5
5935 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5936 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5937 then
5938 ac_cv_cxx_thread=yes
5939 else
5940 ac_cv_cxx_thread=no
5941 fi
5942 rm -fr conftest*
5943fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5945$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005946fi
5947CXX="$ac_save_cxx"
5948
5949
5950# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5952$as_echo_n "checking for ANSI C header files... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005953if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005954 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005955else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005957/* end confdefs.h. */
5958#include <stdlib.h>
5959#include <stdarg.h>
5960#include <string.h>
5961#include <float.h>
5962
5963int
5964main ()
5965{
5966
5967 ;
5968 return 0;
5969}
5970_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005971if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005972 ac_cv_header_stdc=yes
5973else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005974 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005975fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5977
5978if test $ac_cv_header_stdc = yes; then
5979 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005981/* end confdefs.h. */
5982#include <string.h>
5983
5984_ACEOF
5985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005986 $EGREP "memchr" >/dev/null 2>&1; then :
5987
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005988else
5989 ac_cv_header_stdc=no
5990fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005991rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005992
5993fi
5994
5995if test $ac_cv_header_stdc = yes; then
5996 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005998/* end confdefs.h. */
5999#include <stdlib.h>
6000
6001_ACEOF
6002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006003 $EGREP "free" >/dev/null 2>&1; then :
6004
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006005else
6006 ac_cv_header_stdc=no
6007fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006008rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006009
6010fi
6011
6012if test $ac_cv_header_stdc = yes; then
6013 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006014 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006015 :
6016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006018/* end confdefs.h. */
6019#include <ctype.h>
6020#include <stdlib.h>
6021#if ((' ' & 0x0FF) == 0x020)
6022# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6023# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6024#else
6025# define ISLOWER(c) \
6026 (('a' <= (c) && (c) <= 'i') \
6027 || ('j' <= (c) && (c) <= 'r') \
6028 || ('s' <= (c) && (c) <= 'z'))
6029# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6030#endif
6031
6032#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6033int
6034main ()
6035{
6036 int i;
6037 for (i = 0; i < 256; i++)
6038 if (XOR (islower (i), ISLOWER (i))
6039 || toupper (i) != TOUPPER (i))
6040 return 2;
6041 return 0;
6042}
6043_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006044if ac_fn_c_try_run "$LINENO"; then :
6045
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006047 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006048fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006051fi
6052
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006053fi
6054fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6056$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006057if test $ac_cv_header_stdc = yes; then
6058
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006059$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006060
6061fi
6062
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006063for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6064fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006065ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006066shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006067unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006068sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6069sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006070sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006071sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006072sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00006073sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006074bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006075do :
6076 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6077ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006078if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006079 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006080#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006081_ACEOF
6082
6083fi
6084
Guido van Rossum627b2d71993-12-24 10:39:16 +00006085done
6086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006087ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006088for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006089 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6091$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006092if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006093 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006096/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006097#include <sys/types.h>
6098#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006099
Martin v. Löwis11437992002-04-12 09:54:03 +00006100int
6101main ()
6102{
6103if ((DIR *) 0)
6104return 0;
6105 ;
6106 return 0;
6107}
6108_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006109if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006110 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006112 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006115fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006116eval ac_res=\$$as_ac_Header
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6118$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006119if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006120 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006121#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006122_ACEOF
6123
6124ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006125fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006127done
6128# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6129if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6131$as_echo_n "checking for library containing opendir... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006132if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006133 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006134else
Martin v. Löwis11437992002-04-12 09:54:03 +00006135 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006138
Martin v. Löwiseba40652007-08-30 20:10:57 +00006139/* Override any GCC internal prototype to avoid an error.
6140 Use char because int might match the return type of a GCC
6141 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006142#ifdef __cplusplus
6143extern "C"
6144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006145char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006146int
6147main ()
6148{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006149return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006150 ;
6151 return 0;
6152}
6153_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006154for ac_lib in '' dir; do
6155 if test -z "$ac_lib"; then
6156 ac_res="none required"
6157 else
6158 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006159 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006160 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006161 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006162 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006163fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006164rm -f core conftest.err conftest.$ac_objext \
6165 conftest$ac_exeext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006166 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006167 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006169done
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006170if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006171
Martin v. Löwiseba40652007-08-30 20:10:57 +00006172else
6173 ac_cv_search_opendir=no
6174fi
6175rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006176LIBS=$ac_func_search_save_LIBS
6177fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6179$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006180ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006181if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006182 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006183
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006184fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006185
Michael W. Hudson54241132001-12-07 15:38:26 +00006186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6188$as_echo_n "checking for library containing opendir... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006189if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006190 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006191else
6192 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006195
Martin v. Löwiseba40652007-08-30 20:10:57 +00006196/* Override any GCC internal prototype to avoid an error.
6197 Use char because int might match the return type of a GCC
6198 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006199#ifdef __cplusplus
6200extern "C"
6201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006202char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006203int
6204main ()
6205{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006207 ;
6208 return 0;
6209}
6210_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006211for ac_lib in '' x; do
6212 if test -z "$ac_lib"; then
6213 ac_res="none required"
6214 else
6215 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006216 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006217 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006218 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006219 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006220fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006221rm -f core conftest.err conftest.$ac_objext \
6222 conftest$ac_exeext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006223 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006224 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006226done
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006227if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006228
Martin v. Löwiseba40652007-08-30 20:10:57 +00006229else
6230 ac_cv_search_opendir=no
6231fi
6232rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006233LIBS=$ac_func_search_save_LIBS
6234fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6236$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006237ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006238if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006239 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006240
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006241fi
6242
6243fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006244
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6246$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006247if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006248 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006251/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253int
6254main ()
6255{
6256return makedev(0, 0);
6257 ;
6258 return 0;
6259}
6260_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006261if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006262 ac_cv_header_sys_types_h_makedev=yes
6263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006264 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006266rm -f core conftest.err conftest.$ac_objext \
6267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006268
6269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6271$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272
6273if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006274ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006275if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006276
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006277$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278
6279fi
6280
6281
6282
6283 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006284 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006285if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006286
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006287$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288
6289fi
6290
6291
6292 fi
6293fi
6294
Michael W. Hudson54241132001-12-07 15:38:26 +00006295
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006296# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006297for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006298do :
6299 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006300#ifdef HAVE_CURSES_H
6301#include <curses.h>
6302#endif
6303
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006304"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006305if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006306 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006307#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006308_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006309
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006310fi
6311
6312done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006313
6314
Martin v. Löwis11017b12006-01-14 18:12:57 +00006315# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006316for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006317do :
6318 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006319#ifdef HAVE_ASM_TYPES_H
6320#include <asm/types.h>
6321#endif
6322#ifdef HAVE_SYS_SOCKET_H
6323#include <sys/socket.h>
6324#endif
6325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006327if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006328 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006329#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006330_ACEOF
6331
6332fi
6333
6334done
6335
6336
Guido van Rossum627b2d71993-12-24 10:39:16 +00006337# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006338was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6340$as_echo_n "checking for clock_t in time.h... " >&6; }
6341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006342/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006343#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006344
6345_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006347 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006348 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006349else
Martin v. Löwis11437992002-04-12 09:54:03 +00006350
6351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006352$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006353
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006354
Guido van Rossum627b2d71993-12-24 10:39:16 +00006355fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006356rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006357
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6359$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006360
Neal Norwitz11690112002-07-30 01:08:28 +00006361# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6363$as_echo_n "checking for makedev... " >&6; }
6364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006365/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006366
6367#if defined(MAJOR_IN_MKDEV)
6368#include <sys/mkdev.h>
6369#elif defined(MAJOR_IN_SYSMACROS)
6370#include <sys/sysmacros.h>
6371#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006372#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006373#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006374int
6375main ()
6376{
6377 makedev(0, 0)
6378 ;
6379 return 0;
6380}
6381_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006382if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006383 ac_cv_has_makedev=yes
6384else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006385 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006386fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006387rm -f core conftest.err conftest.$ac_objext \
6388 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006389if test "$ac_cv_has_makedev" = "no"; then
6390 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006392/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006393
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006394#define _OSF_SOURCE 1
6395#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006396
Neal Norwitz11690112002-07-30 01:08:28 +00006397int
6398main ()
6399{
6400 makedev(0, 0)
6401 ;
6402 return 0;
6403}
6404_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006405if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006406 ac_cv_has_makedev=yes
6407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006408 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006409fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006410rm -f core conftest.err conftest.$ac_objext \
6411 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006412 if test "$ac_cv_has_makedev" = "yes"; then
6413
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006414$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006415
6416 fi
6417fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6419$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006420if test "$ac_cv_has_makedev" = "yes"; then
6421
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006422$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006423
6424fi
6425
Martin v. Löwis399a6892002-10-04 10:22:02 +00006426# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6427# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6428# defined, but the compiler does not support pragma redefine_extname,
6429# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6430# structures (such as rlimit64) without declaring them. As a
6431# work-around, disable LFS on such configurations
6432
6433use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6435$as_echo_n "checking Solaris LFS bug... " >&6; }
6436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006437/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006438
6439#define _LARGEFILE_SOURCE 1
6440#define _FILE_OFFSET_BITS 64
6441#include <sys/resource.h>
6442
Martin v. Löwis399a6892002-10-04 10:22:02 +00006443int
6444main ()
6445{
6446struct rlimit foo;
6447 ;
6448 return 0;
6449}
6450_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006452 sol_lfs_bug=no
6453else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006454 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6458$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006459if test "$sol_lfs_bug" = "yes"; then
6460 use_lfs=no
6461fi
6462
6463if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006464# Two defines needed to enable largefile support on various platforms
6465# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006466case $ac_sys_system/$ac_sys_release in
6467AIX*)
6468
6469$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6470
6471 ;;
6472esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006473
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006474$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006475
6476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006477$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006478
Martin v. Löwis399a6892002-10-04 10:22:02 +00006479fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006480
Guido van Rossum84e7b241996-08-19 21:59:00 +00006481# Add some code to confdefs.h so that the test for off_t works on SCO
6482cat >> confdefs.h <<\EOF
6483#if defined(SCO_DS)
6484#undef _OFF_T
6485#endif
6486EOF
6487
Guido van Rossumef2255b2000-03-10 22:30:29 +00006488# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006489ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006490if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006491
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006492else
Martin v. Löwis11437992002-04-12 09:54:03 +00006493
6494cat >>confdefs.h <<_ACEOF
6495#define mode_t int
6496_ACEOF
6497
6498fi
6499
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006500ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006501if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006502
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006503else
Martin v. Löwis11437992002-04-12 09:54:03 +00006504
6505cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006506#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006507_ACEOF
6508
6509fi
6510
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006511ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006512if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006513
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006514else
Martin v. Löwis11437992002-04-12 09:54:03 +00006515
6516cat >>confdefs.h <<_ACEOF
6517#define pid_t int
6518_ACEOF
6519
6520fi
6521
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006522
Martin v. Löwis11437992002-04-12 09:54:03 +00006523cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006524#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006525_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006526
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006527ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006528if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006529
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006530else
Martin v. Löwis11437992002-04-12 09:54:03 +00006531
6532cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006533#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006534_ACEOF
6535
6536fi
6537
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6539$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006540if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006541 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006542else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006544/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006545#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006546
6547_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006548if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006549 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006550 ac_cv_type_uid_t=yes
6551else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006552 ac_cv_type_uid_t=no
6553fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006554rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006555
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006556fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6558$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006559if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006560
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006561$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006562
6563
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006564$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006565
6566fi
6567
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006568ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6569case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006570 no|yes) ;; #(
6571 *)
6572
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006573$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006574
6575
6576cat >>confdefs.h <<_ACEOF
6577#define uint32_t $ac_cv_c_uint32_t
6578_ACEOF
6579;;
6580 esac
6581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006582ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6583case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006584 no|yes) ;; #(
6585 *)
6586
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006587$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006588
6589
6590cat >>confdefs.h <<_ACEOF
6591#define uint64_t $ac_cv_c_uint64_t
6592_ACEOF
6593;;
6594 esac
6595
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006596ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6597case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006598 no|yes) ;; #(
6599 *)
6600
6601cat >>confdefs.h <<_ACEOF
6602#define int32_t $ac_cv_c_int32_t
6603_ACEOF
6604;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006605esac
6606
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006607ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6608case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006609 no|yes) ;; #(
6610 *)
6611
6612cat >>confdefs.h <<_ACEOF
6613#define int64_t $ac_cv_c_int64_t
6614_ACEOF
6615;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006616esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006617
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006618ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006619if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006620
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006621$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006622
6623fi
6624
Jack Jansendd19cf82001-12-06 22:36:17 +00006625
Michael W. Hudson54241132001-12-07 15:38:26 +00006626# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006627# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006628# The cast to long int works around a bug in the HP C Compiler
6629# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6630# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6631# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6633$as_echo_n "checking size of int... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006634if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006635 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006637 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006638
Martin v. Löwis11437992002-04-12 09:54:03 +00006639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006640 if test "$ac_cv_type_int" = yes; then
6641 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006643as_fn_error 77 "cannot compute sizeof (int)
6644See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006645 else
6646 ac_cv_sizeof_int=0
6647 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006648fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006649
Martin v. Löwis11437992002-04-12 09:54:03 +00006650fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6652$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006653
6654
6655
Martin v. Löwis11437992002-04-12 09:54:03 +00006656cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006657#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006658_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006659
6660
Martin v. Löwiseba40652007-08-30 20:10:57 +00006661# The cast to long int works around a bug in the HP C Compiler
6662# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6663# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6664# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6666$as_echo_n "checking size of long... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006667if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006668 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006669else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006670 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006671
Martin v. Löwis11437992002-04-12 09:54:03 +00006672else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006673 if test "$ac_cv_type_long" = yes; then
6674 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006676as_fn_error 77 "cannot compute sizeof (long)
6677See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006678 else
6679 ac_cv_sizeof_long=0
6680 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006681fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006682
Martin v. Löwis11437992002-04-12 09:54:03 +00006683fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6685$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006686
6687
6688
Martin v. Löwis11437992002-04-12 09:54:03 +00006689cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006690#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006691_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006692
6693
Martin v. Löwiseba40652007-08-30 20:10:57 +00006694# The cast to long int works around a bug in the HP C Compiler
6695# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6696# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6697# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6699$as_echo_n "checking size of void *... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006700if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006701 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006702else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006703 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006704
Martin v. Löwis11437992002-04-12 09:54:03 +00006705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006706 if test "$ac_cv_type_void_p" = yes; then
6707 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006709as_fn_error 77 "cannot compute sizeof (void *)
6710See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006711 else
6712 ac_cv_sizeof_void_p=0
6713 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006714fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006715
Martin v. Löwis11437992002-04-12 09:54:03 +00006716fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6718$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006719
6720
6721
Martin v. Löwis11437992002-04-12 09:54:03 +00006722cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006723#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006724_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006725
6726
Martin v. Löwiseba40652007-08-30 20:10:57 +00006727# The cast to long int works around a bug in the HP C Compiler
6728# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6729# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6730# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6732$as_echo_n "checking size of short... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006733if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006734 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006735else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006736 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006737
Martin v. Löwis11437992002-04-12 09:54:03 +00006738else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006739 if test "$ac_cv_type_short" = yes; then
6740 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6741$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006742as_fn_error 77 "cannot compute sizeof (short)
6743See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006744 else
6745 ac_cv_sizeof_short=0
6746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006747fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006748
Martin v. Löwis11437992002-04-12 09:54:03 +00006749fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6751$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006752
6753
6754
Martin v. Löwis11437992002-04-12 09:54:03 +00006755cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006756#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006757_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006758
6759
Martin v. Löwiseba40652007-08-30 20:10:57 +00006760# The cast to long int works around a bug in the HP C Compiler
6761# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6762# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6763# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6765$as_echo_n "checking size of float... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006766if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006767 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006769 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006770
Martin v. Löwis11437992002-04-12 09:54:03 +00006771else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006772 if test "$ac_cv_type_float" = yes; then
6773 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006775as_fn_error 77 "cannot compute sizeof (float)
6776See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777 else
6778 ac_cv_sizeof_float=0
6779 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006780fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006781
Martin v. Löwis11437992002-04-12 09:54:03 +00006782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6784$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006785
6786
6787
Martin v. Löwis11437992002-04-12 09:54:03 +00006788cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006789#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006790_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006791
6792
Martin v. Löwiseba40652007-08-30 20:10:57 +00006793# The cast to long int works around a bug in the HP C Compiler
6794# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6795# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6796# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6798$as_echo_n "checking size of double... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006799if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006800 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006802 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006803
Martin v. Löwis11437992002-04-12 09:54:03 +00006804else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006805 if test "$ac_cv_type_double" = yes; then
6806 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6807$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006808as_fn_error 77 "cannot compute sizeof (double)
6809See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006810 else
6811 ac_cv_sizeof_double=0
6812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006813fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006814
Martin v. Löwis11437992002-04-12 09:54:03 +00006815fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6817$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006818
6819
6820
Martin v. Löwis11437992002-04-12 09:54:03 +00006821cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006822#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006823_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006824
6825
Martin v. Löwiseba40652007-08-30 20:10:57 +00006826# The cast to long int works around a bug in the HP C Compiler
6827# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6828# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6829# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6831$as_echo_n "checking size of fpos_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006832if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006833 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006834else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006835 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006836
Martin v. Löwis11437992002-04-12 09:54:03 +00006837else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006838 if test "$ac_cv_type_fpos_t" = yes; then
6839 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6840$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006841as_fn_error 77 "cannot compute sizeof (fpos_t)
6842See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006843 else
6844 ac_cv_sizeof_fpos_t=0
6845 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006847
Martin v. Löwis11437992002-04-12 09:54:03 +00006848fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6850$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006851
6852
6853
Martin v. Löwis11437992002-04-12 09:54:03 +00006854cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006855#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006856_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006857
Michael W. Hudson54241132001-12-07 15:38:26 +00006858
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859# The cast to long int works around a bug in the HP C Compiler
6860# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6861# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6862# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6864$as_echo_n "checking size of size_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006865if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006866 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006868 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00006869
Martin v. Löwis18e16552006-02-15 17:27:45 +00006870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006871 if test "$ac_cv_type_size_t" = yes; then
6872 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006874as_fn_error 77 "cannot compute sizeof (size_t)
6875See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006876 else
6877 ac_cv_sizeof_size_t=0
6878 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006879fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006880
Martin v. Löwis18e16552006-02-15 17:27:45 +00006881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6883$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006884
6885
6886
Martin v. Löwis18e16552006-02-15 17:27:45 +00006887cat >>confdefs.h <<_ACEOF
6888#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6889_ACEOF
6890
6891
Christian Heimes951cc0f2008-01-31 23:08:23 +00006892# The cast to long int works around a bug in the HP C Compiler
6893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6895# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6897$as_echo_n "checking size of pid_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006898if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006899 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00006900else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006901 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes951cc0f2008-01-31 23:08:23 +00006902
Christian Heimes951cc0f2008-01-31 23:08:23 +00006903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006904 if test "$ac_cv_type_pid_t" = yes; then
6905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006907as_fn_error 77 "cannot compute sizeof (pid_t)
6908See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006909 else
6910 ac_cv_sizeof_pid_t=0
6911 fi
6912fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006913
Christian Heimes951cc0f2008-01-31 23:08:23 +00006914fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6916$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006917
6918
6919
6920cat >>confdefs.h <<_ACEOF
6921#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6922_ACEOF
6923
6924
Michael W. Hudson54241132001-12-07 15:38:26 +00006925
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6927$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006928have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006930/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006931
Martin v. Löwis11437992002-04-12 09:54:03 +00006932int
6933main ()
6934{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006935long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006936 ;
6937 return 0;
6938}
6939_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006940if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006941
6942
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006944
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006945 have_long_long=yes
6946
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6950$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006951if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006952# The cast to long int 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.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6957$as_echo_n "checking size of long long... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006958if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006959 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006961 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006962
Martin v. Löwis11437992002-04-12 09:54:03 +00006963else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006964 if test "$ac_cv_type_long_long" = yes; then
6965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006967as_fn_error 77 "cannot compute sizeof (long long)
6968See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006969 else
6970 ac_cv_sizeof_long_long=0
6971 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006973
Martin v. Löwis11437992002-04-12 09:54:03 +00006974fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6976$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006977
6978
6979
Martin v. Löwis11437992002-04-12 09:54:03 +00006980cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006981#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006982_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006983
Michael W. Hudson54241132001-12-07 15:38:26 +00006984
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006985fi
6986
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6988$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006989have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006991/* end confdefs.h. */
6992
6993int
6994main ()
6995{
Matthias Klosec511b472010-05-08 11:01:39 +00006996long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006997 ;
6998 return 0;
6999}
7000_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007001if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007002
7003
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007004$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007005
7006 have_long_double=yes
7007
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007008fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7011$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007012if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007013# The cast to long int works around a bug in the HP C Compiler
7014# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7015# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7016# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7018$as_echo_n "checking size of long double... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007019if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007020 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007022 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007023
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007025 if test "$ac_cv_type_long_double" = yes; then
7026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007028as_fn_error 77 "cannot compute sizeof (long double)
7029See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007030 else
7031 ac_cv_sizeof_long_double=0
7032 fi
7033fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007034
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007035fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7037$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007038
7039
7040
7041cat >>confdefs.h <<_ACEOF
7042#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7043_ACEOF
7044
7045
7046fi
7047
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7049$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007050have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007052/* end confdefs.h. */
7053
7054int
7055main ()
7056{
7057_Bool x; x = (_Bool)0;
7058 ;
7059 return 0;
7060}
7061_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007062if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007063
7064
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007065$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007066
7067 have_c99_bool=yes
7068
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7072$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007073if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007074# The cast to long int works around a bug in the HP C Compiler
7075# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7076# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7077# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7079$as_echo_n "checking size of _Bool... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007080if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007081 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007083 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007084
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007086 if test "$ac_cv_type__Bool" = yes; then
7087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007089as_fn_error 77 "cannot compute sizeof (_Bool)
7090See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007091 else
7092 ac_cv_sizeof__Bool=0
7093 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007094fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007095
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007096fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7098$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007099
7100
7101
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007102cat >>confdefs.h <<_ACEOF
7103#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7104_ACEOF
7105
7106
7107fi
7108
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007109ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007110 #include <stdint.h>
7111 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007112 #ifdef HAVE_INTTYPES_H
7113 #include <inttypes.h>
7114 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007115"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007116if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007117
7118cat >>confdefs.h <<_ACEOF
7119#define HAVE_UINTPTR_T 1
7120_ACEOF
7121
Martin v. Löwiseba40652007-08-30 20:10:57 +00007122# The cast to long int works around a bug in the HP C Compiler
7123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7125# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7127$as_echo_n "checking size of uintptr_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007128if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007129 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007131 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007132
Martin v. Löwis11437992002-04-12 09:54:03 +00007133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007134 if test "$ac_cv_type_uintptr_t" = yes; then
7135 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007137as_fn_error 77 "cannot compute sizeof (uintptr_t)
7138See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007139 else
7140 ac_cv_sizeof_uintptr_t=0
7141 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007143
Martin v. Löwis11437992002-04-12 09:54:03 +00007144fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7146$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007147
7148
7149
Martin v. Löwis11437992002-04-12 09:54:03 +00007150cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007151#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007152_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007153
Michael W. Hudson54241132001-12-07 15:38:26 +00007154
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007155fi
7156
Martin v. Löwisebe26702006-10-02 14:55:51 +00007157
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007158# The cast to long int works around a bug in the HP C Compiler
7159# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7160# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7161# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7163$as_echo_n "checking size of off_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007164if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007167 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007168#ifdef HAVE_SYS_TYPES_H
7169#include <sys/types.h>
7170#endif
7171
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007172"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007173
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007174else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007175 if test "$ac_cv_type_off_t" = yes; then
7176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007178as_fn_error 77 "cannot compute sizeof (off_t)
7179See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007180 else
7181 ac_cv_sizeof_off_t=0
7182 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007183fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007184
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007185fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7187$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007188
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007189
7190
Martin v. Löwis11437992002-04-12 09:54:03 +00007191cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007192#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007193_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007194
Michael W. Hudson54241132001-12-07 15:38:26 +00007195
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007196
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7198$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007199if test "$have_long_long" = yes
7200then
7201if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007202 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007203
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007204$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007205
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7207$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7210$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007211fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7214$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007215fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007216
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007217# The cast to long int works around a bug in the HP C Compiler
7218# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7219# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7220# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7222$as_echo_n "checking size of time_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007223if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007224 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007225else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007226 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007227#ifdef HAVE_SYS_TYPES_H
7228#include <sys/types.h>
7229#endif
7230#ifdef HAVE_TIME_H
7231#include <time.h>
7232#endif
7233
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007234"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007235
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007236else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007237 if test "$ac_cv_type_time_t" = yes; then
7238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007240as_fn_error 77 "cannot compute sizeof (time_t)
7241See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007242 else
7243 ac_cv_sizeof_time_t=0
7244 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007245fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007246
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007247fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7249$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007250
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007251
7252
Martin v. Löwis11437992002-04-12 09:54:03 +00007253cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007254#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007255_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007256
Michael W. Hudson54241132001-12-07 15:38:26 +00007257
7258
Trent Mick635f6fb2000-08-23 21:33:05 +00007259# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007260ac_save_cc="$CC"
7261if test "$ac_cv_kpthread" = "yes"
7262then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007263elif test "$ac_cv_kthread" = "yes"
7264then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007265elif test "$ac_cv_pthread" = "yes"
7266then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007267fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7269$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007270have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007272/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007273
7274 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007275int
7276main ()
7277{
Guido van Rossum12580492000-09-24 16:47:19 +00007278pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007279 ;
7280 return 0;
7281}
Matthias Klosec511b472010-05-08 11:01:39 +00007282
Martin v. Löwis11437992002-04-12 09:54:03 +00007283_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007284if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007285 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7289$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007290if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007292# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7293# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7294# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7296$as_echo_n "checking size of pthread_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007297if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007298 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007299else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007300 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007301#ifdef HAVE_PTHREAD_H
7302#include <pthread.h>
7303#endif
7304
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007305"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007306
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007308 if test "$ac_cv_type_pthread_t" = yes; then
7309 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7310$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007311as_fn_error 77 "cannot compute sizeof (pthread_t)
7312See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007313 else
7314 ac_cv_sizeof_pthread_t=0
7315 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007316fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007317
Trent Mick635f6fb2000-08-23 21:33:05 +00007318fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7320$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007321
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007322
7323
Martin v. Löwis11437992002-04-12 09:54:03 +00007324cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007325#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007326_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007327
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007328
Trent Mick635f6fb2000-08-23 21:33:05 +00007329fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007330CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7333$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007334# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007335if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007336 enableval=$enable_toolbox_glue;
7337fi
Jack Jansene578a632001-08-15 01:27:14 +00007338
7339
7340if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007341then
Jack Jansene578a632001-08-15 01:27:14 +00007342 case $ac_sys_system/$ac_sys_release in
7343 Darwin/*)
7344 enable_toolbox_glue="yes";;
7345 *)
7346 enable_toolbox_glue="no";;
7347 esac
7348fi
7349case "$enable_toolbox_glue" in
7350yes)
Jack Jansene578a632001-08-15 01:27:14 +00007351 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007352 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007353
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007354$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007355
7356 ;;
7357*)
Jack Jansene578a632001-08-15 01:27:14 +00007358 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007359 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007360 ;;
7361esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7363$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007364
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007365
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007366
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007367case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007368 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007369 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7370 ;;
7371 Darwin/*)
7372 OTHER_LIBTOOL_OPT=""
7373 ;;
7374esac
7375
7376
Ronald Oussoren25967582009-09-06 10:00:26 +00007377ARCH_RUN_32BIT=""
7378
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007379case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007380 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007381 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7382 if test "${enable_universalsdk}"; then
7383 :
7384 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007385 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007386 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007387 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007388 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007389 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007390 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007391 if test ${gcc_version} '<' 4.0
7392 then
7393 LIBTOOL_CRUFT="-lcc_dynamic"
7394 else
7395 LIBTOOL_CRUFT=""
7396 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007397 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007398 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007399else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007401/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007402
Ronald Oussoren25967582009-09-06 10:00:26 +00007403 #include <unistd.h>
7404 int main(int argc, char*argv[])
7405 {
7406 if (sizeof(long) == 4) {
7407 return 0;
7408 } else {
7409 return 1;
7410 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007411 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007412
Ronald Oussoren25967582009-09-06 10:00:26 +00007413_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007414if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007415 ac_osx_32bit=yes
7416else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007417 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007418fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7420 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007421fi
7422
7423
Ronald Oussoren25967582009-09-06 10:00:26 +00007424 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007425 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007426 i386)
7427 MACOSX_DEFAULT_ARCH="i386"
7428 ;;
7429 ppc)
7430 MACOSX_DEFAULT_ARCH="ppc"
7431 ;;
7432 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007433 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007434 ;;
7435 esac
7436 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007437 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007438 i386)
7439 MACOSX_DEFAULT_ARCH="x86_64"
7440 ;;
7441 ppc)
7442 MACOSX_DEFAULT_ARCH="ppc64"
7443 ;;
7444 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007445 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007446 ;;
7447 esac
7448
7449 #ARCH_RUN_32BIT="true"
7450 fi
7451
7452 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007453 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007454 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007455esac
7456
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7458$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007459if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007460then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007461 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007462 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007463 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007464
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007465$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007466
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7468$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007469 if test $enable_shared = "yes"
7470 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007471 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." "$LINENO" 5
Ronald Oussoren450d5612009-06-08 21:12:41 +00007472 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7475$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007476fi
7477
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7479$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007480case $ac_sys_system/$ac_sys_release in
7481 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007482
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007484
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7486$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007487 ;;
7488 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7490$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007491 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007492esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007493
Guido van Rossum0a516c91994-09-12 10:58:40 +00007494# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007495
Michael W. Hudson54241132001-12-07 15:38:26 +00007496
7497
7498
7499
Ronald Oussoren75912852010-04-08 08:13:31 +00007500
Guido van Rossum0a516c91994-09-12 10:58:40 +00007501# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007502# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7504$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007505if test -z "$SO"
7506then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007507 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007508 hp*|HP*)
7509 case `uname -m` in
7510 ia64) SO=.so;;
7511 *) SO=.sl;;
7512 esac
7513 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007514 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007515 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007516 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007517else
7518 # this might also be a termcap variable, see #610332
7519 echo
7520 echo '====================================================================='
7521 echo '+ +'
7522 echo '+ WARNING: You have set SO in your environment. +'
7523 echo '+ Do you really mean to change the extension for shared libraries? +'
7524 echo '+ Continuing in 10 seconds to let you to ponder. +'
7525 echo '+ +'
7526 echo '====================================================================='
7527 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007528fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7530$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007531
Ronald Oussoren79f90492009-01-02 10:44:46 +00007532
Neal Norwitz58e28882006-05-19 07:00:58 +00007533cat >>confdefs.h <<_ACEOF
7534#define SHLIB_EXT "$SO"
7535_ACEOF
7536
Guido van Rossum0a516c91994-09-12 10:58:40 +00007537# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007538# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007539# (Shared libraries in this instance are shared modules to be loaded into
7540# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7542$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007543if test -z "$LDSHARED"
7544then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007545 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007546 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007547 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007548 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007549 ;;
7550 BeOS*)
7551 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007552 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007553 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007554 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007555 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007556 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007557 if test "$GCC" = "yes" ; then
7558 LDSHARED='$(CC) -shared'
7559 LDCXXSHARED='$(CXX) -shared'
7560 else
7561 LDSHARED='$(CC) -G'
7562 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007563 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007564 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007565 if test "$GCC" = "yes" ; then
7566 LDSHARED='$(CC) -shared'
7567 LDCXXSHARED='$(CXX) -shared'
7568 else
7569 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007570 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007571 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007572 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007573 LDSHARED='$(CC) -bundle'
7574 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007575 if test "$enable_framework" ; then
7576 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007577 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7578 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007579 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007580 else
7581 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007582 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007583 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007584 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007585 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007586 LDSHARED='$(CC) -bundle'
7587 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007588 if test "$enable_framework" ; then
7589 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007590 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7591 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007592 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007593 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007594 # No framework, use the Python app as bundle-loader
7595 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007596 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007597 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007598 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007599 Darwin/*)
7600 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7601 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007602
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007603 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007604 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007605 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007606 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007607 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007608 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7609 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007610 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007611 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007612 LDSHARED='$(CC) -bundle'
7613 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007614 if test "$enable_framework" ; then
7615 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007616 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7617 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007618 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007619 else
7620 # No framework, use the Python app as bundle-loader
7621 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7622 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007623 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007624 fi
7625 fi
7626 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007627 Linux*|GNU*|QNX*)
7628 LDSHARED='$(CC) -shared'
7629 LDCXXSHARED='$(CXX) -shared';;
7630 BSD/OS*/4*)
7631 LDSHARED="gcc -shared"
7632 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007633 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007634 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007635 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007636 LDSHARED='$(CC) -shared'
7637 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007638 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007639 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007640 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007641 OpenBSD*)
7642 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7643 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007644 LDSHARED='$(CC) -shared $(CCSHARED)'
7645 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007646 else
7647 case `uname -r` in
7648 [01].* | 2.[0-7] | 2.[0-7].*)
7649 LDSHARED="ld -Bshareable ${LDFLAGS}"
7650 ;;
7651 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007652 LDSHARED='$(CC) -shared $(CCSHARED)'
7653 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007654 ;;
7655 esac
7656 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007657 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007658 LDSHARED='$(CC) -shared'
7659 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007660 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007661 if test "$GCC" = "yes" ; then
7662 LDSHARED='$(CC) -shared'
7663 LDCXXSHARED='$(CXX) -shared'
7664 else
7665 LDSHARED='$(CC) -G'
7666 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007667 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007668 SCO_SV*)
7669 LDSHARED='$(CC) -Wl,-G,-Bexport'
7670 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7671 CYGWIN*)
7672 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7673 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7674 atheos*)
7675 LDSHARED="gcc -shared"
7676 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007677 *) LDSHARED="ld";;
7678 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007679fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7681$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007682LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007683BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007684# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007685# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7687$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007688if test -z "$CCSHARED"
7689then
Guido van Rossum07397971997-04-29 21:49:50 +00007690 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007691 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007692 then CCSHARED="-fPIC";
7693 elif test `uname -p` = sparc;
7694 then CCSHARED="-xcode=pic32";
7695 else CCSHARED="-Kpic";
7696 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007697 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007698 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007699 else CCSHARED="+z";
7700 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007701 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007702 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007703 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007704 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007705 if test "$GCC" = "yes"
7706 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007707 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007708 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007709 SCO_SV*)
7710 if test "$GCC" = "yes"
7711 then CCSHARED="-fPIC"
7712 else CCSHARED="-Kpic -belf"
7713 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007714 IRIX*/6*) case $CC in
7715 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007716 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007717 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007718 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007719 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007720fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7722$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007723# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007724# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7726$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007727if test -z "$LINKFORSHARED"
7728then
Guido van Rossum07397971997-04-29 21:49:50 +00007729 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007730 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007731 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007732 LINKFORSHARED="-Wl,-E -Wl,+s";;
7733# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007734 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007735 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007736 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007738 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7739 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007740 # not used by the core itself but which needs to be in the core so
7741 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007742 # -prebind is no longer used, because it actually seems to give a
7743 # slowdown in stead of a speedup, maybe due to the large number of
7744 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007745
7746 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007747 if test "$enable_framework"
7748 then
Jack Jansenda49e192005-01-07 13:08:22 +00007749 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007750 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007751 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007752 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007753 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007754 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007755 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007756 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7757 then
7758 LINKFORSHARED="-Wl,--export-dynamic"
7759 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007760 SunOS/5*) case $CC in
7761 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007762 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007763 then
7764 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007765 fi;;
7766 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007767 CYGWIN*)
7768 if test $enable_shared = "no"
7769 then
7770 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7771 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007772 QNX*)
7773 # -Wl,-E causes the symbols to be added to the dynamic
7774 # symbol table so that they can be found when a module
7775 # is loaded. -N 2048K causes the stack size to be set
7776 # to 2048 kilobytes so that the stack doesn't overflow
7777 # when running test_compile.py.
7778 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007779 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007780fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7782$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007783
Michael W. Hudson54241132001-12-07 15:38:26 +00007784
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007785
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7787$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007788if test ! "$LIBRARY" = "$LDLIBRARY"
7789then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007790 case $ac_sys_system in
7791 CYGWIN*)
7792 # Cygwin needs CCSHARED when building extension DLLs
7793 # but not when building the interpreter DLL.
7794 CFLAGSFORSHARED='';;
7795 *)
7796 CFLAGSFORSHARED='$(CCSHARED)'
7797 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7800$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007801
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007802# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7803# library (with --enable-shared).
7804# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007805# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7806# if it is not required, since it creates a dependency of the shared library
7807# to LIBS. This, in turn, means that applications linking the shared libpython
7808# don't need to link LIBS explicitly. The default should be only changed
7809# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007810
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7812$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007813case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007814 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007815 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007816esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7818$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007819
7820
Guido van Rossum627b2d71993-12-24 10:39:16 +00007821# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7823$as_echo_n "checking for dlopen in -ldl... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007824if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007825 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007826else
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007828LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007831
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832/* Override any GCC internal prototype to avoid an error.
7833 Use char because int might match the return type of a GCC
7834 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007835#ifdef __cplusplus
7836extern "C"
7837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007838char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007839int
7840main ()
7841{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007842return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007843 ;
7844 return 0;
7845}
7846_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007847if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007850 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007851fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007852rm -f core conftest.err conftest.$ac_objext \
7853 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007854LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007855fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7857$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007858if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 cat >>confdefs.h <<_ACEOF
7860#define HAVE_LIBDL 1
7861_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007862
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007863 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007864
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007865fi
7866 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7868$as_echo_n "checking for shl_load in -ldld... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007869if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007870 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007871else
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007873LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007876
Martin v. Löwiseba40652007-08-30 20:10:57 +00007877/* Override any GCC internal prototype to avoid an error.
7878 Use char because int might match the return type of a GCC
7879 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007880#ifdef __cplusplus
7881extern "C"
7882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007883char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007884int
7885main ()
7886{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007887return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007888 ;
7889 return 0;
7890}
7891_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007892if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007894else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007895 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007896fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007897rm -f core conftest.err conftest.$ac_objext \
7898 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007899LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007900fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7902$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007903if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 cat >>confdefs.h <<_ACEOF
7905#define HAVE_LIBDLD 1
7906_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007907
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007908 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007909
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007910fi
7911 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007912
Ronald Oussoren79f90492009-01-02 10:44:46 +00007913# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007914if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7916$as_echo_n "checking for library containing sem_init... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007917if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007918 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007919else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007920 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007923
Martin v. Löwiseba40652007-08-30 20:10:57 +00007924/* Override any GCC internal prototype to avoid an error.
7925 Use char because int might match the return type of a GCC
7926 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927#ifdef __cplusplus
7928extern "C"
7929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007930char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007931int
7932main ()
7933{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007934return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007935 ;
7936 return 0;
7937}
7938_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007939for ac_lib in '' pthread rt posix4; do
7940 if test -z "$ac_lib"; then
7941 ac_res="none required"
7942 else
7943 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007944 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007945 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007946 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007947 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007948fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007949rm -f core conftest.err conftest.$ac_objext \
7950 conftest$ac_exeext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007951 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007952 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007954done
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007955if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007956
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957else
7958 ac_cv_search_sem_init=no
7959fi
7960rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007961LIBS=$ac_func_search_save_LIBS
7962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7964$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007965ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007966if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007967 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007968
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007969fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007970 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007971 # posix4 on Solaris 2.6
7972 # pthread (first!) on Linux
7973fi
7974
Martin v. Löwis19d17342003-06-14 21:03:05 +00007975# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7977$as_echo_n "checking for textdomain in -lintl... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007978if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007979 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007980else
7981 ac_check_lib_save_LIBS=$LIBS
7982LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007984/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007985
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986/* Override any GCC internal prototype to avoid an error.
7987 Use char because int might match the return type of a GCC
7988 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007989#ifdef __cplusplus
7990extern "C"
7991#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007992char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007993int
7994main ()
7995{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007996return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007997 ;
7998 return 0;
7999}
8000_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008001if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008002 ac_cv_lib_intl_textdomain=yes
8003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008004 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008005fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008006rm -f core conftest.err conftest.$ac_objext \
8007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008008LIBS=$ac_check_lib_save_LIBS
8009fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8011$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008012if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008013
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008014$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008015
8016fi
8017
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008018
8019# checks for system dependent C++ extensions support
8020case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008021 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8022$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008024/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008025
Georg Brandl94800df2011-02-25 11:09:02 +00008026 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008027int
8028main ()
8029{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008030loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008031 ;
8032 return 0;
8033}
Matthias Klosec511b472010-05-08 11:01:39 +00008034
Martin v. Löwis11437992002-04-12 09:54:03 +00008035_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008036if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008037
Matthias Klosec511b472010-05-08 11:01:39 +00008038
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008040
Matthias Klosec511b472010-05-08 11:01:39 +00008041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008042$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008043
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008044else
Matthias Klosec511b472010-05-08 11:01:39 +00008045
8046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008047$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008048
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008049fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008050rm -f core conftest.err conftest.$ac_objext \
8051 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008052 *) ;;
8053esac
8054
Guido van Rossum70c7f481998-03-26 18:44:10 +00008055# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008056# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8058$as_echo_n "checking for t_open in -lnsl... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008059if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008060 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008061else
Martin v. Löwis11437992002-04-12 09:54:03 +00008062 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008063LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008066
Martin v. Löwiseba40652007-08-30 20:10:57 +00008067/* Override any GCC internal prototype to avoid an error.
8068 Use char because int might match the return type of a GCC
8069 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008070#ifdef __cplusplus
8071extern "C"
8072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008073char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008074int
8075main ()
8076{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008077return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 ;
8079 return 0;
8080}
8081_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008082if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008084else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008085 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008086fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008087rm -f core conftest.err conftest.$ac_objext \
8088 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008089LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8092$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008093if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008094 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008095fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008096 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8098$as_echo_n "checking for socket in -lsocket... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008099if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008100 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008101else
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008103LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008106
Martin v. Löwiseba40652007-08-30 20:10:57 +00008107/* Override any GCC internal prototype to avoid an error.
8108 Use char because int might match the return type of a GCC
8109 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008110#ifdef __cplusplus
8111extern "C"
8112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008113char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008114int
8115main ()
8116{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008117return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 ;
8119 return 0;
8120}
8121_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008122if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008124else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008125 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008126fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008127rm -f core conftest.err conftest.$ac_objext \
8128 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008129LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008130fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8132$as_echo "$ac_cv_lib_socket_socket" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008133if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008134 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008135fi
8136 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008137
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008138case "$ac_sys_system" in
8139BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8141$as_echo_n "checking for socket in -lnet... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008142if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008143 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008144else
Martin v. Löwis11437992002-04-12 09:54:03 +00008145 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008146LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008149
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150/* Override any GCC internal prototype to avoid an error.
8151 Use char because int might match the return type of a GCC
8152 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008153#ifdef __cplusplus
8154extern "C"
8155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008156char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008157int
8158main ()
8159{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008160return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 ;
8162 return 0;
8163}
8164_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008165if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008166 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008167else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008168 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008169fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008170rm -f core conftest.err conftest.$ac_objext \
8171 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008172LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008173fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8175$as_echo "$ac_cv_lib_net_socket" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008176if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008177 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008178fi
8179 # BeOS
8180;;
8181esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008182
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8184$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008185
Martin v. Löwiseba40652007-08-30 20:10:57 +00008186# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008187if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8190$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008191LIBS="$withval $LIBS"
8192
8193else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8195$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008196fi
8197
Guido van Rossum7f43da71994-08-01 12:15:30 +00008198
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008199if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008200 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8201set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8203$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008204if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008205 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008206else
8207 case $PKG_CONFIG in
8208 [\\/]* | ?:[\\/]*)
8209 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8210 ;;
8211 *)
8212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213for as_dir in $PATH
8214do
8215 IFS=$as_save_IFS
8216 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008217 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8219 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008221 break 2
8222 fi
8223done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008224 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008225IFS=$as_save_IFS
8226
8227 ;;
8228esac
8229fi
8230PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8231if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8233$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8236$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008237fi
8238
8239
8240fi
8241if test -z "$ac_cv_path_PKG_CONFIG"; then
8242 ac_pt_PKG_CONFIG=$PKG_CONFIG
8243 # Extract the first word of "pkg-config", so it can be a program name with args.
8244set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8246$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008247if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008248 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008249else
8250 case $ac_pt_PKG_CONFIG in
8251 [\\/]* | ?:[\\/]*)
8252 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8253 ;;
8254 *)
8255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8256for as_dir in $PATH
8257do
8258 IFS=$as_save_IFS
8259 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008260 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008261 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8262 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008263 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008264 break 2
8265 fi
8266done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008267 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008268IFS=$as_save_IFS
8269
8270 ;;
8271esac
8272fi
8273ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8274if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8276$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008277else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8279$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008280fi
8281
8282 if test "x$ac_pt_PKG_CONFIG" = x; then
8283 PKG_CONFIG=""
8284 else
8285 case $cross_compiling:$ac_tool_warned in
8286yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8288$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008289ac_tool_warned=yes ;;
8290esac
8291 PKG_CONFIG=$ac_pt_PKG_CONFIG
8292 fi
8293else
8294 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8295fi
8296
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008297
8298# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8300$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008301
8302# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008303if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008304 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008305else
8306 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008307fi
8308
8309
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8311$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008312
8313# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8315$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008316
8317# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008318if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008319 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008320else
8321 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008322fi
8323
8324
8325if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008326 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8327else
8328 LIBFFI_INCLUDEDIR=""
8329fi
8330
8331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8333$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008334
Benjamin Peterson867475c2009-04-29 20:36:25 +00008335# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8337$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008338
8339# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008340if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008341 withval=$with_dbmliborder;
8342if test x$with_dbmliborder = xyes
8343then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008344as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008345else
8346 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8347 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8348 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008349 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008350 fi
8351 done
8352fi
8353fi
8354
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8356$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008357
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008358# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008359
8360
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8362$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008363
Martin v. Löwiseba40652007-08-30 20:10:57 +00008364# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008365if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008366 withval=$with_signal_module;
8367fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008368
8369
8370if test -z "$with_signal_module"
8371then with_signal_module="yes"
8372fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8374$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008375
8376if test "${with_signal_module}" = "yes"; then
8377 USE_SIGNAL_MODULE=""
8378 SIGNAL_OBJS=""
8379else
8380 USE_SIGNAL_MODULE="#"
8381 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8382fi
8383
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008384# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008385
Barry Warsawc0d24d82000-06-29 16:12:00 +00008386USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008387
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8389$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008390
Guido van Rossumec2f0731997-01-22 20:54:01 +00008391
Martin v. Löwiseba40652007-08-30 20:10:57 +00008392# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008393if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008394 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8396$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008397LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008398if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008399 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008400fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008401else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8403$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008404fi
8405
Martin v. Löwis11437992002-04-12 09:54:03 +00008406
8407# Templates for things AC_DEFINEd more than once.
8408# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008409
8410
Martin v. Löwis11437992002-04-12 09:54:03 +00008411
8412
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8414$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008415
Martin v. Löwiseba40652007-08-30 20:10:57 +00008416# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008417if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008418 withval=$with_threads;
8419fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008420
8421
Barry Warsawc0d24d82000-06-29 16:12:00 +00008422# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008423
Martin v. Löwiseba40652007-08-30 20:10:57 +00008424# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008425if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008426 withval=$with_thread; with_threads=$with_thread
8427fi
8428
Barry Warsawc0d24d82000-06-29 16:12:00 +00008429
8430if test -z "$with_threads"
8431then with_threads="yes"
8432fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8434$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008435
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008436
Barry Warsawc0d24d82000-06-29 16:12:00 +00008437if test "$with_threads" = "no"
8438then
8439 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008440elif test "$ac_cv_pthread_is_default" = yes
8441then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008442 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008443
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008444 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008445 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008446
8447 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008448 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008449elif test "$ac_cv_kpthread" = "yes"
8450then
8451 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008452 if test "$ac_cv_cxx_thread" = "yes"; then
8453 CXX="$CXX -Kpthread"
8454 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008455 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008456
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008457 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008458 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008459elif test "$ac_cv_kthread" = "yes"
8460then
8461 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008462 if test "$ac_cv_cxx_thread" = "yes"; then
8463 CXX="$CXX -Kthread"
8464 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008465 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008466
8467 posix_threads=yes
8468 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008469elif test "$ac_cv_pthread" = "yes"
8470then
8471 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008472 if test "$ac_cv_cxx_thread" = "yes"; then
8473 CXX="$CXX -pthread"
8474 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008475 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008476
8477 posix_threads=yes
8478 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008479else
8480 if test ! -z "$with_threads" -a -d "$with_threads"
8481 then LDFLAGS="$LDFLAGS -L$with_threads"
8482 fi
8483 if test ! -z "$withval" -a -d "$withval"
8484 then LDFLAGS="$LDFLAGS -L$withval"
8485 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008486
8487 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008488 # define _POSIX_THREADS in unistd.h. Some apparently don't
8489 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8491$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008493/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008494
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008495#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008496#ifdef _POSIX_THREADS
8497yes
8498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008499
8500_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008502 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008503 unistd_defines_pthreads=yes
8504else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008505 unistd_defines_pthreads=no
8506fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008507rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008508
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8510$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008511
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008512 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008513
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008514 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008515if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008516 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008517
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008518 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008519
Martin v. Löwis11437992002-04-12 09:54:03 +00008520
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008521$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008522
8523 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008524 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008525else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008526
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008527 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008528if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008529 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008530
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008531 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008532
Martin v. Löwis11437992002-04-12 09:54:03 +00008533
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008534$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008535
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008536 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008537else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008538
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8540$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008541
Martin v. Löwiseba40652007-08-30 20:10:57 +00008542# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008543if test "${with_pth+set}" = set; then :
8544 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8545$as_echo "$withval" >&6; }
8546 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
8548
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008549$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008550
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008551 LIBS="-lpth $LIBS"
8552 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008553else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8555$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008556
8557 # Just looking for pthread_create in libpthread is not enough:
8558 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8559 # So we really have to include pthread.h, and then link.
8560 _libs=$LIBS
8561 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8563$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008565/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008566#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008567
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008568void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008569int
8570main ()
8571{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008572
8573pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 ;
8575 return 0;
8576}
8577_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008578if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008579
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8581$as_echo "yes" >&6; }
8582 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008583
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008584 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008585 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008586else
Martin v. Löwis11437992002-04-12 09:54:03 +00008587
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008588 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008589 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008590if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008591 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008592
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008593 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008594 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008595else
Guido van Rossumad678af1998-10-02 14:42:15 +00008596
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008597 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008598if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008599 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008600
8601
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008602$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008603
8604 THREADOBJ="Python/thread.o"
8605else
8606
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008607 ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008608if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008609 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008610
8611
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008612$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008613
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008614 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008615else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008616
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8618$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008619if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008620 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008621else
Martin v. Löwis11437992002-04-12 09:54:03 +00008622 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008623LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008626
Martin v. Löwiseba40652007-08-30 20:10:57 +00008627/* Override any GCC internal prototype to avoid an error.
8628 Use char because int might match the return type of a GCC
8629 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008630#ifdef __cplusplus
8631extern "C"
8632#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008633char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008634int
8635main ()
8636{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008637return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ;
8639 return 0;
8640}
8641_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008642if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008645 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008646fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008647rm -f core conftest.err conftest.$ac_objext \
8648 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008649LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008650fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8652$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008653if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008654 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008655
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008656 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008657 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008658 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008659else
Greg Steinadf63d62000-07-05 10:38:09 +00008660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8662$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008663if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008664 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008665else
Martin v. Löwis11437992002-04-12 09:54:03 +00008666 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008667LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008670
Martin v. Löwiseba40652007-08-30 20:10:57 +00008671/* Override any GCC internal prototype to avoid an error.
8672 Use char because int might match the return type of a GCC
8673 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008674#ifdef __cplusplus
8675extern "C"
8676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008677char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008678int
8679main ()
8680{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008681return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 ;
8683 return 0;
8684}
8685_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008686if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008687 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008688else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008689 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008690fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008691rm -f core conftest.err conftest.$ac_objext \
8692 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008693LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008694fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8696$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008697if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008698 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008699
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008700 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008701 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008702 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008703else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008704
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8706$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008707if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008708 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008709else
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008711LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008714
Martin v. Löwiseba40652007-08-30 20:10:57 +00008715/* Override any GCC internal prototype to avoid an error.
8716 Use char because int might match the return type of a GCC
8717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008718#ifdef __cplusplus
8719extern "C"
8720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008721char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008722int
8723main ()
8724{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008725return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ;
8727 return 0;
8728}
8729_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008730if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008732else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008733 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008734fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008735rm -f core conftest.err conftest.$ac_objext \
8736 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008737LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008738fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8740$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008741if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008742 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008743
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008744 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008745 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008746 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008747else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008748
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8750$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008751if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008752 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008753else
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008755LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008758
Martin v. Löwiseba40652007-08-30 20:10:57 +00008759/* Override any GCC internal prototype to avoid an error.
8760 Use char because int might match the return type of a GCC
8761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008762#ifdef __cplusplus
8763extern "C"
8764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008765char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008766int
8767main ()
8768{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008769return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 ;
8771 return 0;
8772}
8773_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008776else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008777 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008778fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008779rm -f core conftest.err conftest.$ac_objext \
8780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008781LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8784$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008785if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008786 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008787
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008788 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008789 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008790 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008791else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008792
Martin v. Löwis130fb172001-07-19 11:00:41 +00008793 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008794fi
8795
Guido van Rossum627b2d71993-12-24 10:39:16 +00008796
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008797fi
8798
Guido van Rossum0be3e491997-05-22 20:33:33 +00008799fi
8800
Guido van Rossum49545951997-12-02 19:28:29 +00008801fi
8802
Guido van Rossumb93a8621998-05-07 13:27:32 +00008803fi
8804
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008805
Michael W. Hudson54241132001-12-07 15:38:26 +00008806fi
8807
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008808
8809fi
8810
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008811fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008812rm -f core conftest.err conftest.$ac_objext \
8813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008814fi
8815
Martin v. Löwis11437992002-04-12 09:54:03 +00008816fi
8817
8818
8819fi
8820
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008821
Michael W. Hudson54241132001-12-07 15:38:26 +00008822
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8824$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008825if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008826 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008827else
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008829LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008832
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833/* Override any GCC internal prototype to avoid an error.
8834 Use char because int might match the return type of a GCC
8835 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008836#ifdef __cplusplus
8837extern "C"
8838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008839char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008840int
8841main ()
8842{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008843return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 ;
8845 return 0;
8846}
8847_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008848if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008851 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008852fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008853rm -f core conftest.err conftest.$ac_objext \
8854 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008855LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008856fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8858$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008859if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008860 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008861
Martin v. Löwis130fb172001-07-19 11:00:41 +00008862 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008863 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008864 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008865fi
8866
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008867
Neal Norwitza978ab02002-11-02 16:58:05 +00008868 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8870$as_echo_n "checking for thr_create in -lthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008871if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008872 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008873else
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008875LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008878
Martin v. Löwiseba40652007-08-30 20:10:57 +00008879/* Override any GCC internal prototype to avoid an error.
8880 Use char because int might match the return type of a GCC
8881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008882#ifdef __cplusplus
8883extern "C"
8884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008885char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008886int
8887main ()
8888{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008889return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 ;
8891 return 0;
8892}
8893_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008896else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008897 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008898fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008899rm -f core conftest.err conftest.$ac_objext \
8900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008901LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008902fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8904$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008905if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008906 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008907
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008908 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008909 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008910 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008911fi
8912
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008913 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008914
Martin v. Löwis130fb172001-07-19 11:00:41 +00008915 if test "$USE_THREAD_MODULE" != "#"
8916 then
8917 # If the above checks didn't disable threads, (at least) OSF1
8918 # needs this '-threads' argument during linking.
8919 case $ac_sys_system in
8920 OSF1) LDLAST=-threads;;
8921 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008922 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008923fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008924
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008925if test "$posix_threads" = "yes"; then
8926 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008927
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008928$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008929
8930 fi
8931
8932 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8933 case $ac_sys_system/$ac_sys_release in
8934 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008935$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008936
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008937 ;;
8938 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008939$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008940
8941 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +00008942 AIX/5)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008943$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00008944
8945 ;;
Antoine Pitroub41947b2010-08-30 14:55:30 +00008946 AIX/6)
8947$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8948
8949 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008950 esac
8951
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8953$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008954 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008955 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008957 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008958 ac_cv_pthread_system_supported=no
8959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008961/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008962#include <pthread.h>
8963 void *foo(void *parm) {
8964 return NULL;
8965 }
8966 main() {
8967 pthread_attr_t attr;
8968 pthread_t id;
8969 if (pthread_attr_init(&attr)) exit(-1);
8970 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8971 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8972 exit(0);
8973 }
8974_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008975if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008976 ac_cv_pthread_system_supported=yes
8977else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008978 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008979fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8981 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008982fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008983
Martin v. Löwiseba40652007-08-30 20:10:57 +00008984
Guido van Rossum627b2d71993-12-24 10:39:16 +00008985fi
8986
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8988$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008989 if test "$ac_cv_pthread_system_supported" = "yes"; then
8990
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008991$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008992
8993 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008994 for ac_func in pthread_sigmask
8995do :
8996 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008997if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008998 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008999#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009000_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009001 case $ac_sys_system in
9002 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009003
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009004$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009005
9006 ;;
9007 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009008fi
9009done
9010
9011fi
9012
9013
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009015
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9017$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009018# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009019if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009020 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9023$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024 ipv6=no
9025 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009026 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9027$as_echo "yes" >&6; }
9028 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029
9030 ipv6=yes
9031 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009033else
Martin v. Löwis11437992002-04-12 09:54:03 +00009034
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009035 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009036
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9038$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039 ipv6=no
9040
9041else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009043/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009044 /* AF_INET6 available check */
9045#include <sys/types.h>
9046#include <sys/socket.h>
9047main()
9048{
9049 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9050 exit(1);
9051 else
9052 exit(0);
9053}
9054
Martin v. Löwis11437992002-04-12 09:54:03 +00009055_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009056if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009057
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9059$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009061
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009062else
Matthias Klosec511b472010-05-08 11:01:39 +00009063
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9065$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009067
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9070 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071fi
9072
Martin v. Löwiseba40652007-08-30 20:10:57 +00009073
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009074if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9076$as_echo_n "checking if RFC2553 API is available... " >&6; }
9077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009078/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009079
9080 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009081#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009082int
9083main ()
9084{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009085struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009086 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 ;
9088 return 0;
9089}
Matthias Klosec511b472010-05-08 11:01:39 +00009090
Martin v. Löwis11437992002-04-12 09:54:03 +00009091_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009092if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009093
9094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009095$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009096 ipv6=yes
9097
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009098else
Matthias Klosec511b472010-05-08 11:01:39 +00009099
9100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009101$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009102 ipv6=no
9103
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009106fi
9107
9108if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009109 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009110
9111fi
9112
Martin v. Löwiseba40652007-08-30 20:10:57 +00009113fi
9114
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009115
9116ipv6type=unknown
9117ipv6lib=none
9118ipv6trylibc=no
9119
9120if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9122$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009123 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9124 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009125 case $i in
9126 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009128/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009129
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009130#include <netinet/in.h>
9131#ifdef IPV6_INRIA_VERSION
9132yes
9133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009134_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009136 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009137 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009138fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009139rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009140
9141 ;;
9142 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009144/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009145
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009146#include <netinet/in.h>
9147#ifdef __KAME__
9148yes
9149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009150_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009151if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009152 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009153 ipv6type=$i;
9154 ipv6lib=inet6
9155 ipv6libdir=/usr/local/v6/lib
9156 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009157fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009158rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009159
9160 ;;
9161 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009163/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009164
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009165#include <features.h>
9166#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9167yes
9168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009169_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009171 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009172 ipv6type=$i;
9173 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009174fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009175rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009176
9177 ;;
9178 linux-inet6)
9179 if test -d /usr/inet6; then
9180 ipv6type=$i
9181 ipv6lib=inet6
9182 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009183 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009184 fi
9185 ;;
9186 solaris)
9187 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009188 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009189 ipv6type=$i
9190 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009191 fi
9192 fi
9193 ;;
9194 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009196/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009197
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009198#include <sys/param.h>
9199#ifdef _TOSHIBA_INET6
9200yes
9201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009202_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009203if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009204 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009205 ipv6type=$i;
9206 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009207 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009208fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009209rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009210
9211 ;;
9212 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009214/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009215
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009216#include </usr/local/v6/include/sys/v6config.h>
9217#ifdef __V6D__
9218yes
9219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009220_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009222 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009223 ipv6type=$i;
9224 ipv6lib=v6;
9225 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009226 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009227fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009228rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009229
9230 ;;
9231 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009233/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009234
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009235#include <sys/param.h>
9236#ifdef _ZETA_MINAMI_INET6
9237yes
9238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009239_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009240if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009241 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009242 ipv6type=$i;
9243 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009244 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009245fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009246rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009247
9248 ;;
9249 esac
9250 if test "$ipv6type" != "unknown"; then
9251 break
9252 fi
9253 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9255$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009256fi
9257
9258if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9259 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9260 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9261 echo "using lib$ipv6lib"
9262 else
9263 if test $ipv6trylibc = "yes"; then
9264 echo "using libc"
9265 else
9266 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9267 echo "You need to fetch lib$ipv6lib.a from appropriate"
9268 echo 'ipv6 kit and compile beforehand.'
9269 exit 1
9270 fi
9271 fi
9272fi
9273
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9275$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009277/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009278
9279 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009280int
9281main ()
9282{
9283FSIORefNum fRef = 0
9284 ;
9285 return 0;
9286}
Mark Dickinson0712b562010-05-08 19:13:21 +00009287
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009288_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009289if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009290
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009291
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009292$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009293
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9295$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009296
Mark Dickinson0712b562010-05-08 19:13:21 +00009297else
9298
9299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9300$as_echo "no" >&6; }
9301
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009302fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9304
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009305# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9307$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009308
Martin v. Löwiseba40652007-08-30 20:10:57 +00009309# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009310if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009311 withval=$with_doc_strings;
9312fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009313
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009314
9315if test -z "$with_doc_strings"
9316then with_doc_strings="yes"
9317fi
9318if test "$with_doc_strings" != "no"
9319then
9320
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009321$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009322
9323fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9325$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009326
Neil Schemenauera35c6882001-02-27 04:45:05 +00009327# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9329$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009330
Martin v. Löwiseba40652007-08-30 20:10:57 +00009331# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009332if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009333 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009334if test "$withval" != no
9335then
9336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009337$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009338
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9340$as_echo "yes" >&6; }
9341else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9342$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009343fi
9344else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9346$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009347fi
9348
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009349
9350# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9352$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009353
Martin v. Löwiseba40652007-08-30 20:10:57 +00009354# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009355if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009356 withval=$with_pymalloc;
9357fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009358
Neil Schemenauera35c6882001-02-27 04:45:05 +00009359
Neil Schemenauer16c22972002-03-22 15:34:49 +00009360if test -z "$with_pymalloc"
9361then with_pymalloc="yes"
9362fi
9363if test "$with_pymalloc" != "no"
9364then
Martin v. Löwis11437992002-04-12 09:54:03 +00009365
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009366$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009367
9368fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9370$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009371
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009372# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9374$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009375
9376# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009377if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009378 withval=$with_valgrind;
9379else
9380 with_valgrind=no
9381fi
9382
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9384$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009385if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009386 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009387if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009388
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009389$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009390
9391else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009392 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009393
9394fi
9395
9396
9397fi
9398
Barry Warsawef82cd72000-06-30 16:21:01 +00009399# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9401$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009402
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009404if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009405 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009406if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009407then
9408
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009409$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9412$as_echo "yes" >&6; }
9413else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9414$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009415fi
9416else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9418$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009419fi
9420
Barry Warsawef82cd72000-06-30 16:21:01 +00009421
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009422# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009423
Guido van Rossum98935bf2001-09-05 19:13:16 +00009424DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009425
Guido van Rossume97ee181999-12-20 21:27:22 +00009426# the dlopen() function means we might want to use dynload_shlib.o. some
9427# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009428for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009429do :
9430 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009431if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009433#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009434_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009435
Guido van Rossume97ee181999-12-20 21:27:22 +00009436fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009437done
Guido van Rossume97ee181999-12-20 21:27:22 +00009438
Michael W. Hudson54241132001-12-07 15:38:26 +00009439
Guido van Rossume97ee181999-12-20 21:27:22 +00009440# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9441# loading of modules.
9442
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9444$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009445if test -z "$DYNLOADFILE"
9446then
9447 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009448 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9449 if test "$ac_cv_func_dlopen" = yes
9450 then DYNLOADFILE="dynload_shlib.o"
9451 else DYNLOADFILE="dynload_aix.o"
9452 fi
9453 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009454 BeOS*) DYNLOADFILE="dynload_beos.o";;
9455 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009456 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9457 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009458 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009459 *)
9460 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9461 # out any dynamic loading
9462 if test "$ac_cv_func_dlopen" = yes
9463 then DYNLOADFILE="dynload_shlib.o"
9464 else DYNLOADFILE="dynload_stub.o"
9465 fi
9466 ;;
9467 esac
9468fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9470$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009471if test "$DYNLOADFILE" != "dynload_stub.o"
9472then
Martin v. Löwis11437992002-04-12 09:54:03 +00009473
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009474$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009475
9476fi
9477
Neil Schemenauer4e425612001-06-19 15:44:15 +00009478# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9479
Michael W. Hudson54241132001-12-07 15:38:26 +00009480
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9482$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009483if test -z "$MACHDEP_OBJS"
9484then
Jack Jansene578a632001-08-15 01:27:14 +00009485 MACHDEP_OBJS=$extra_machdep_objs
9486else
9487 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009488fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9490$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009491
Guido van Rossum627b2d71993-12-24 10:39:16 +00009492# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009493for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9494 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009495 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009496 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009497 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009498 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009499 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009500 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9501 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009502 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009503 setlocale setregid setreuid setresuid setresgid \
9504 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009505 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009506 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009507 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009508do :
9509 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9510ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009511if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009513#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009514_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009515
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009516fi
9517done
9518
Michael W. Hudson54241132001-12-07 15:38:26 +00009519
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009520# For some functions, having a definition is not sufficient, since
9521# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9523$as_echo_n "checking for chroot... " >&6; }
9524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009525/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009526#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009527int
9528main ()
9529{
9530void *x=chroot
9531 ;
9532 return 0;
9533}
9534_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009536
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009537$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009538
Matthias Klosec511b472010-05-08 11:01:39 +00009539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009540$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009541else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9543$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009544
9545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9548$as_echo_n "checking for link... " >&6; }
9549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009550/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009551#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009552int
9553main ()
9554{
9555void *x=link
9556 ;
9557 return 0;
9558}
9559_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009560if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009561
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009562$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009563
Matthias Klosec511b472010-05-08 11:01:39 +00009564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009565$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009566else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9568$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009569
9570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9573$as_echo_n "checking for symlink... " >&6; }
9574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009575/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009576#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009577int
9578main ()
9579{
9580void *x=symlink
9581 ;
9582 return 0;
9583}
9584_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009585if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009586
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009587$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009588
Matthias Klosec511b472010-05-08 11:01:39 +00009589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009590$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009591else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9593$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009594
9595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9598$as_echo_n "checking for fchdir... " >&6; }
9599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009600/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009601#include <unistd.h>
9602int
9603main ()
9604{
9605void *x=fchdir
9606 ;
9607 return 0;
9608}
9609_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009610if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009611
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009613
Matthias Klosec511b472010-05-08 11:01:39 +00009614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009615$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9618$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009619
9620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9623$as_echo_n "checking for fsync... " >&6; }
9624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009625/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009626#include <unistd.h>
9627int
9628main ()
9629{
9630void *x=fsync
9631 ;
9632 return 0;
9633}
9634_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009636
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009637$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009638
Matthias Klosec511b472010-05-08 11:01:39 +00009639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009640$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009641else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9643$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009644
9645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9648$as_echo_n "checking for fdatasync... " >&6; }
9649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009650/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009651#include <unistd.h>
9652int
9653main ()
9654{
9655void *x=fdatasync
9656 ;
9657 return 0;
9658}
9659_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009660if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009661
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009662$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009663
Matthias Klosec511b472010-05-08 11:01:39 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009665$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009666else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9668$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009669
9670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9673$as_echo_n "checking for epoll... " >&6; }
9674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009675/* end confdefs.h. */
9676#include <sys/epoll.h>
9677int
9678main ()
9679{
9680void *x=epoll_create
9681 ;
9682 return 0;
9683}
9684_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009685if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009686
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009687$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009688
Matthias Klosec511b472010-05-08 11:01:39 +00009689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009690$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9693$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009694
9695fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9698$as_echo_n "checking for kqueue... " >&6; }
9699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009700/* end confdefs.h. */
9701
9702#include <sys/types.h>
9703#include <sys/event.h>
9704
9705int
9706main ()
9707{
9708int x=kqueue()
9709 ;
9710 return 0;
9711}
9712_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009714
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009715$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009716
Matthias Klosec511b472010-05-08 11:01:39 +00009717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009718$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009719else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9721$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009722
9723fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009725# On some systems (eg. FreeBSD 5), we would find a definition of the
9726# functions ctermid_r, setgroups in the library, but no prototype
9727# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9728# address to avoid compiler warnings and potential miscompilations
9729# because of the missing prototypes.
9730
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9732$as_echo_n "checking for ctermid_r... " >&6; }
9733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009734/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009735
Martin v. Löwisd5843682002-11-21 20:41:28 +00009736#include <stdio.h>
9737
Martin v. Löwisd5843682002-11-21 20:41:28 +00009738int
9739main ()
9740{
9741void* p = ctermid_r
9742 ;
9743 return 0;
9744}
9745_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009746if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009747
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009748$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009749
Matthias Klosec511b472010-05-08 11:01:39 +00009750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009751$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9754$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009755
9756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9758
Antoine Pitroub170f172010-09-10 18:47:36 +00009759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9760$as_echo_n "checking for flock declaration... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009761if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009762 $as_echo_n "(cached) " >&6
9763else
9764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009765/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009766#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009767int
9768main ()
9769{
9770void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009771
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009772 ;
9773 return 0;
9774}
9775_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009776if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009777 ac_cv_flock_decl=yes
9778else
9779 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009780
9781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009783
Antoine Pitroub170f172010-09-10 18:47:36 +00009784fi
9785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9786$as_echo "$ac_cv_flock_decl" >&6; }
9787if test "x${ac_cv_flock_decl}" = xyes; then
9788 for ac_func in flock
9789do :
9790 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009791if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009792 cat >>confdefs.h <<_ACEOF
9793#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009794_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009795
Antoine Pitrou85729812010-09-07 14:55:24 +00009796else
Antoine Pitroub170f172010-09-10 18:47:36 +00009797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009798$as_echo_n "checking for flock in -lbsd... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009799if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009800 $as_echo_n "(cached) " >&6
9801else
9802 ac_check_lib_save_LIBS=$LIBS
9803LIBS="-lbsd $LIBS"
9804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9805/* end confdefs.h. */
9806
9807/* Override any GCC internal prototype to avoid an error.
9808 Use char because int might match the return type of a GCC
9809 builtin and then its argument prototype would still apply. */
9810#ifdef __cplusplus
9811extern "C"
9812#endif
9813char flock ();
9814int
9815main ()
9816{
9817return flock ();
9818 ;
9819 return 0;
9820}
9821_ACEOF
9822if ac_fn_c_try_link "$LINENO"; then :
9823 ac_cv_lib_bsd_flock=yes
9824else
9825 ac_cv_lib_bsd_flock=no
9826fi
9827rm -f core conftest.err conftest.$ac_objext \
9828 conftest$ac_exeext conftest.$ac_ext
9829LIBS=$ac_check_lib_save_LIBS
9830fi
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9832$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009833if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009834 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009835
9836
9837$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9838
9839
9840fi
9841
9842
9843fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009844done
9845
Antoine Pitrou85729812010-09-07 14:55:24 +00009846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009847
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9849$as_echo_n "checking for getpagesize... " >&6; }
9850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009851/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009852
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009853#include <unistd.h>
9854
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009855int
9856main ()
9857{
9858void* p = getpagesize
9859 ;
9860 return 0;
9861}
9862_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009863if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009864
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009865$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009866
Matthias Klosec511b472010-05-08 11:01:39 +00009867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009868$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9871$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009872
9873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009875
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009876for ac_prog in true
9877do
9878 # Extract the first word of "$ac_prog", so it can be a program name with args.
9879set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9881$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009882if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009883 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009884else
9885 if test -n "$TRUE"; then
9886 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9887else
9888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9889for as_dir in $PATH
9890do
9891 IFS=$as_save_IFS
9892 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009893 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009895 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009897 break 2
9898 fi
9899done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009900 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00009901IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009902
9903fi
9904fi
9905TRUE=$ac_cv_prog_TRUE
9906if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9908$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009909else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9911$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009912fi
9913
Martin v. Löwiseba40652007-08-30 20:10:57 +00009914
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009915 test -n "$TRUE" && break
9916done
9917test -n "$TRUE" || TRUE="/bin/true"
9918
9919
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9921$as_echo_n "checking for inet_aton in -lc... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009922if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009923 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009924else
9925 ac_check_lib_save_LIBS=$LIBS
9926LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009928/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009929
Martin v. Löwiseba40652007-08-30 20:10:57 +00009930/* Override any GCC internal prototype to avoid an error.
9931 Use char because int might match the return type of a GCC
9932 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009933#ifdef __cplusplus
9934extern "C"
9935#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009936char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009937int
9938main ()
9939{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009940return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009941 ;
9942 return 0;
9943}
9944_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009945if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009946 ac_cv_lib_c_inet_aton=yes
9947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009948 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009949fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009950rm -f core conftest.err conftest.$ac_objext \
9951 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009952LIBS=$ac_check_lib_save_LIBS
9953fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9955$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009956if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009957 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009958else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9960$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009961if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009962 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009963else
9964 ac_check_lib_save_LIBS=$LIBS
9965LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009967/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009968
Martin v. Löwiseba40652007-08-30 20:10:57 +00009969/* Override any GCC internal prototype to avoid an error.
9970 Use char because int might match the return type of a GCC
9971 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009972#ifdef __cplusplus
9973extern "C"
9974#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009975char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009976int
9977main ()
9978{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009979return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009980 ;
9981 return 0;
9982}
9983_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009984if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009985 ac_cv_lib_resolv_inet_aton=yes
9986else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009987 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009988fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009989rm -f core conftest.err conftest.$ac_objext \
9990 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009991LIBS=$ac_check_lib_save_LIBS
9992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9994$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009995if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009996 cat >>confdefs.h <<_ACEOF
9997#define HAVE_LIBRESOLV 1
9998_ACEOF
9999
10000 LIBS="-lresolv $LIBS"
10001
10002fi
10003
10004
10005fi
10006
10007
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010008# On Tru64, chflags seems to be present, but calling it will
10009# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10011$as_echo_n "checking for chflags... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010012if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010013 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010014else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010015 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010016 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010019/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000010020[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010021#include <sys/stat.h>
10022#include <unistd.h>
10023int main(int argc, char*argv[])
10024{
10025 if(chflags(argv[0], 0) != 0)
10026 return 1;
10027 return 0;
10028}
Gregory P. Smith49437c22009-11-02 01:38:35 +000010029]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010031if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010032 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010034 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010035fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010038fi
10039
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010040
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010041fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10043$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010044if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010045 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010046if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010047 ac_cv_have_chflags="yes"
10048else
10049 ac_cv_have_chflags="no"
10050fi
10051
10052fi
10053if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010054
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010056
10057fi
10058
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10060$as_echo_n "checking for lchflags... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010061if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010062 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010063else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010064 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010065 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010068/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000010069[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010070#include <sys/stat.h>
10071#include <unistd.h>
10072int main(int argc, char*argv[])
10073{
10074 if(lchflags(argv[0], 0) != 0)
10075 return 1;
10076 return 0;
10077}
Gregory P. Smith49437c22009-11-02 01:38:35 +000010078]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010079_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010080if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010081 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010083 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010084fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10086 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010087fi
10088
10089
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10092$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010093if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010094 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010095if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010096 ac_cv_have_lchflags="yes"
10097else
10098 ac_cv_have_lchflags="no"
10099fi
10100
10101fi
10102if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010103
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010104$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010105
10106fi
10107
Ronald Oussorenf8752642006-07-06 10:13:35 +000010108case $ac_sys_system/$ac_sys_release in
10109Darwin/*)
10110 _CUR_CFLAGS="${CFLAGS}"
10111 _CUR_LDFLAGS="${LDFLAGS}"
10112 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10113 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10114 ;;
10115esac
10116
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10118$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010119if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010120 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010121else
10122 ac_check_lib_save_LIBS=$LIBS
10123LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010125/* end confdefs.h. */
10126
Martin v. Löwiseba40652007-08-30 20:10:57 +000010127/* Override any GCC internal prototype to avoid an error.
10128 Use char because int might match the return type of a GCC
10129 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010130#ifdef __cplusplus
10131extern "C"
10132#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010133char inflateCopy ();
10134int
10135main ()
10136{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010137return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010138 ;
10139 return 0;
10140}
10141_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010142if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010143 ac_cv_lib_z_inflateCopy=yes
10144else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010145 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010146fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010147rm -f core conftest.err conftest.$ac_objext \
10148 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010149LIBS=$ac_check_lib_save_LIBS
10150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10152$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010153if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010154
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010155$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010156
10157fi
10158
10159
Ronald Oussorenf8752642006-07-06 10:13:35 +000010160case $ac_sys_system/$ac_sys_release in
10161Darwin/*)
10162 CFLAGS="${_CUR_CFLAGS}"
10163 LDFLAGS="${_CUR_LDFLAGS}"
10164 ;;
10165esac
10166
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10168$as_echo_n "checking for hstrerror... " >&6; }
10169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010170/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010171
Martin v. Löwise9416172003-05-03 10:12:45 +000010172#include <netdb.h>
10173
Martin v. Löwise9416172003-05-03 10:12:45 +000010174int
10175main ()
10176{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010177void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010178 ;
10179 return 0;
10180}
10181_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010182if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010183
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010184$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010185
Matthias Klosec511b472010-05-08 11:01:39 +000010186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010187$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10190$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010191
10192fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010193rm -f core conftest.err conftest.$ac_objext \
10194 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010195
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10197$as_echo_n "checking for inet_aton... " >&6; }
10198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010199/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010200
Martin v. Löwis86d66262006-02-17 08:40:11 +000010201#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010202#include <sys/socket.h>
10203#include <netinet/in.h>
10204#include <arpa/inet.h>
10205
Martin v. Löwise9416172003-05-03 10:12:45 +000010206int
10207main ()
10208{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010209void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010210 ;
10211 return 0;
10212}
10213_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010214if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010215
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010216$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010217
Matthias Klosec511b472010-05-08 11:01:39 +000010218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010223
10224fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010225rm -f core conftest.err conftest.$ac_objext \
10226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010227
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10229$as_echo_n "checking for inet_pton... " >&6; }
10230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010231/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010232
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010233#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010234#include <sys/socket.h>
10235#include <netinet/in.h>
10236#include <arpa/inet.h>
10237
Martin v. Löwise9416172003-05-03 10:12:45 +000010238int
10239main ()
10240{
10241void* p = inet_pton
10242 ;
10243 return 0;
10244}
10245_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010248$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010249
Matthias Klosec511b472010-05-08 11:01:39 +000010250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010251$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010252else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010255
10256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010258
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010259# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10261$as_echo_n "checking for setgroups... " >&6; }
10262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010263/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010264
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010265#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010266#ifdef HAVE_GRP_H
10267#include <grp.h>
10268#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010269
Martin v. Löwisd5843682002-11-21 20:41:28 +000010270int
10271main ()
10272{
10273void* p = setgroups
10274 ;
10275 return 0;
10276}
10277_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010280$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010281
Matthias Klosec511b472010-05-08 11:01:39 +000010282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010283$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010284else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10286$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010287
10288fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010290
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010291# check for openpty and forkpty
10292
10293for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010294do :
10295 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010296if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010299_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010300
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010301else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10303$as_echo_n "checking for openpty in -lutil... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010304if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010305 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010306else
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010308LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010310/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010311
Martin v. Löwiseba40652007-08-30 20:10:57 +000010312/* Override any GCC internal prototype to avoid an error.
10313 Use char because int might match the return type of a GCC
10314 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010315#ifdef __cplusplus
10316extern "C"
10317#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010318char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010319int
10320main ()
10321{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ;
10324 return 0;
10325}
10326_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010327if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010329else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010330 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010331fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332rm -f core conftest.err conftest.$ac_objext \
10333 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010334LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010335fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10337$as_echo "$ac_cv_lib_util_openpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010338if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010339 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010340 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10343$as_echo_n "checking for openpty in -lbsd... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010344if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010345 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010346else
10347 ac_check_lib_save_LIBS=$LIBS
10348LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010350/* end confdefs.h. */
10351
Martin v. Löwiseba40652007-08-30 20:10:57 +000010352/* Override any GCC internal prototype to avoid an error.
10353 Use char because int might match the return type of a GCC
10354 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010355#ifdef __cplusplus
10356extern "C"
10357#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010358char openpty ();
10359int
10360main ()
10361{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010362return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010363 ;
10364 return 0;
10365}
10366_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010367if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010368 ac_cv_lib_bsd_openpty=yes
10369else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010370 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010371fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010372rm -f core conftest.err conftest.$ac_objext \
10373 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010374LIBS=$ac_check_lib_save_LIBS
10375fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10377$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010378if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010379 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010380 LIBS="$LIBS -lbsd"
10381fi
10382
10383
10384fi
10385
Fred Drake8cef4cf2000-06-28 16:40:38 +000010386
10387fi
10388done
10389
10390for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010391do :
10392 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010393if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010395#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010396_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010397
Fred Drake8cef4cf2000-06-28 16:40:38 +000010398else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10400$as_echo_n "checking for forkpty in -lutil... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010401if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010402 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010403else
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010405LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010408
Martin v. Löwiseba40652007-08-30 20:10:57 +000010409/* Override any GCC internal prototype to avoid an error.
10410 Use char because int might match the return type of a GCC
10411 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010412#ifdef __cplusplus
10413extern "C"
10414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010415char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010416int
10417main ()
10418{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010419return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010420 ;
10421 return 0;
10422}
10423_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010424if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010426else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010427 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010428fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010429rm -f core conftest.err conftest.$ac_objext \
10430 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010431LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010432fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10434$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010435if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010436 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010437 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10440$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010441if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010442 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010443else
10444 ac_check_lib_save_LIBS=$LIBS
10445LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010447/* end confdefs.h. */
10448
Martin v. Löwiseba40652007-08-30 20:10:57 +000010449/* Override any GCC internal prototype to avoid an error.
10450 Use char because int might match the return type of a GCC
10451 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010452#ifdef __cplusplus
10453extern "C"
10454#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010455char forkpty ();
10456int
10457main ()
10458{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010459return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010460 ;
10461 return 0;
10462}
10463_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010464if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010465 ac_cv_lib_bsd_forkpty=yes
10466else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010467 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010468fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010469rm -f core conftest.err conftest.$ac_objext \
10470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010471LIBS=$ac_check_lib_save_LIBS
10472fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10474$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010475if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010476 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010477 LIBS="$LIBS -lbsd"
10478fi
10479
10480
10481fi
10482
Fred Drake8cef4cf2000-06-28 16:40:38 +000010483
10484fi
10485done
10486
Jack Jansendd19cf82001-12-06 22:36:17 +000010487
Brett Cannonaa5778d2008-03-18 04:09:00 +000010488# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010489for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010490do :
10491 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010492if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010493 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010494#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010495_ACEOF
10496
10497fi
10498done
10499
10500
Michael W. Hudson54241132001-12-07 15:38:26 +000010501# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010502for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010503do :
10504 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10505ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010506if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010508#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010509_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010510
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010511fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010512done
10513
Michael W. Hudson54241132001-12-07 15:38:26 +000010514
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010515ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10516if test "x$ac_cv_func_dup2" = xyes; then :
10517 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010518
Martin v. Löwis1142de32002-03-29 16:28:31 +000010519else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010520 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010521 *" dup2.$ac_objext "* ) ;;
10522 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010523 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010524esac
10525
Martin v. Löwis1142de32002-03-29 16:28:31 +000010526fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010527
10528ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10529if test "x$ac_cv_func_getcwd" = xyes; then :
10530 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10531
10532else
10533 case " $LIBOBJS " in
10534 *" getcwd.$ac_objext "* ) ;;
10535 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10536 ;;
10537esac
10538
10539fi
10540
10541ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10542if test "x$ac_cv_func_strdup" = xyes; then :
10543 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10544
10545else
10546 case " $LIBOBJS " in
10547 *" strdup.$ac_objext "* ) ;;
10548 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10549 ;;
10550esac
10551
10552fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010553
10554
10555for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010556do :
10557 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010558if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010560#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010561_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010563/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010564#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010565int
10566main ()
10567{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010568getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010569 ;
10570 return 0;
10571}
10572_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010573if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010575$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010576
Guido van Rossum627b2d71993-12-24 10:39:16 +000010577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010579
Guido van Rossum627b2d71993-12-24 10:39:16 +000010580fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010581done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010582
Jack Jansen150753c2003-03-29 22:07:47 +000010583for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010584do :
10585 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010586if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010587 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010588#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010589_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010591/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010592#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010593int
10594main ()
10595{
10596setpgrp(0,0);
10597 ;
10598 return 0;
10599}
10600_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010601if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010602
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010603$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010604
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010607
10608fi
10609done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010610
Thomas Wouters3a584202000-08-05 23:28:51 +000010611for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612do :
10613 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010614if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010615 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010616#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010617_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010619/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010620#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010621int
10622main ()
10623{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010624gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010625 ;
10626 return 0;
10627}
10628_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010629if ac_fn_c_try_compile "$LINENO"; then :
10630
Guido van Rossum627b2d71993-12-24 10:39:16 +000010631else
Skip Montanaro6dead952003-09-25 14:50:04 +000010632
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010633$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010634
Martin v. Löwis11437992002-04-12 09:54:03 +000010635
Guido van Rossum627b2d71993-12-24 10:39:16 +000010636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010638
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010639fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010640done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010641
Michael W. Hudson54241132001-12-07 15:38:26 +000010642
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10644$as_echo_n "checking for major... " >&6; }
10645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010646/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010647
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010648#if defined(MAJOR_IN_MKDEV)
10649#include <sys/mkdev.h>
10650#elif defined(MAJOR_IN_SYSMACROS)
10651#include <sys/sysmacros.h>
10652#else
10653#include <sys/types.h>
10654#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010655
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010656int
10657main ()
10658{
10659
10660 makedev(major(0),minor(0));
10661
10662 ;
10663 return 0;
10664}
10665_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010666if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010667
10668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010669$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010670
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10672$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010673
10674else
Skip Montanaro6dead952003-09-25 14:50:04 +000010675
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10677$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010678
10679fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680rm -f core conftest.err conftest.$ac_objext \
10681 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010682
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010683# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010684# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10686$as_echo_n "checking for getaddrinfo... " >&6; }
10687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010688/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010689
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010690#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010691#include <sys/socket.h>
10692#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010693#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010694
Martin v. Löwis11437992002-04-12 09:54:03 +000010695int
10696main ()
10697{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010698getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010699 ;
10700 return 0;
10701}
10702_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010703if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010704 have_getaddrinfo=yes
10705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010706 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010707fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010708rm -f core conftest.err conftest.$ac_objext \
10709 conftest$ac_exeext conftest.$ac_ext
10710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10711$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010712if test $have_getaddrinfo = yes
10713then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10715$as_echo_n "checking getaddrinfo bug... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010716 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010717 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010719 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010720 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010723/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010724
10725#include <sys/types.h>
10726#include <netdb.h>
10727#include <string.h>
10728#include <sys/socket.h>
10729#include <netinet/in.h>
10730
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010731int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010732{
10733 int passive, gaierr, inet4 = 0, inet6 = 0;
10734 struct addrinfo hints, *ai, *aitop;
10735 char straddr[INET6_ADDRSTRLEN], strport[16];
10736
10737 for (passive = 0; passive <= 1; passive++) {
10738 memset(&hints, 0, sizeof(hints));
10739 hints.ai_family = AF_UNSPEC;
10740 hints.ai_flags = passive ? AI_PASSIVE : 0;
10741 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010742 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010743 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10744 (void)gai_strerror(gaierr);
10745 goto bad;
10746 }
10747 for (ai = aitop; ai; ai = ai->ai_next) {
10748 if (ai->ai_addr == NULL ||
10749 ai->ai_addrlen == 0 ||
10750 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10751 straddr, sizeof(straddr), strport, sizeof(strport),
10752 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10753 goto bad;
10754 }
10755 switch (ai->ai_family) {
10756 case AF_INET:
10757 if (strcmp(strport, "54321") != 0) {
10758 goto bad;
10759 }
10760 if (passive) {
10761 if (strcmp(straddr, "0.0.0.0") != 0) {
10762 goto bad;
10763 }
10764 } else {
10765 if (strcmp(straddr, "127.0.0.1") != 0) {
10766 goto bad;
10767 }
10768 }
10769 inet4++;
10770 break;
10771 case AF_INET6:
10772 if (strcmp(strport, "54321") != 0) {
10773 goto bad;
10774 }
10775 if (passive) {
10776 if (strcmp(straddr, "::") != 0) {
10777 goto bad;
10778 }
10779 } else {
10780 if (strcmp(straddr, "::1") != 0) {
10781 goto bad;
10782 }
10783 }
10784 inet6++;
10785 break;
10786 case AF_UNSPEC:
10787 goto bad;
10788 break;
10789 default:
10790 /* another family support? */
10791 break;
10792 }
10793 }
10794 }
10795
10796 if (!(inet4 == 0 || inet4 == 2))
10797 goto bad;
10798 if (!(inet6 == 0 || inet6 == 2))
10799 goto bad;
10800
10801 if (aitop)
10802 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010803 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010804
10805 bad:
10806 if (aitop)
10807 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010808 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010809}
10810
Martin v. Löwis11437992002-04-12 09:54:03 +000010811_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010812if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010813 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010814else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010815 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010820
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010821fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010822
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010824
Benjamin Peterson75fed812010-11-01 01:47:19 +000010825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10826$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10827
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010828if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010829then
10830 if test $ipv6 = yes
10831 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010832 echo 'Fatal: You must get working getaddrinfo() function.'
10833 echo ' or you can specify "--disable-ipv6"'.
10834 exit 1
10835 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010836else
Martin v. Löwis11437992002-04-12 09:54:03 +000010837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010838$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010839
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010840fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000010841
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010842for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010843do :
10844 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010845if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010846 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010847#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010848_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010849
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010850fi
10851done
10852
Michael W. Hudson54241132001-12-07 15:38:26 +000010853
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010854# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10856$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010857if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010858 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010861/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010862#include <sys/types.h>
10863#include <sys/time.h>
10864#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010865
Martin v. Löwis11437992002-04-12 09:54:03 +000010866int
10867main ()
10868{
10869if ((struct tm *) 0)
10870return 0;
10871 ;
10872 return 0;
10873}
10874_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010875if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010876 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010877else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010878 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10883$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010884if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010885
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010886$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010887
10888fi
10889
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10891$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010892if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010893 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010894else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010896/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010897#include <sys/types.h>
10898#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010899
Martin v. Löwis11437992002-04-12 09:54:03 +000010900int
10901main ()
10902{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010903struct tm tm;
10904 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010905 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010906 ;
10907 return 0;
10908}
10909_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010910if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010911 ac_cv_struct_tm=time.h
10912else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010913 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010916fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10918$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010919if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010920
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010921$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010922
10923fi
10924
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010925ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010926#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010928"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010929if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010930
10931cat >>confdefs.h <<_ACEOF
10932#define HAVE_STRUCT_TM_TM_ZONE 1
10933_ACEOF
10934
10935
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010936fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010937
Martin v. Löwis11437992002-04-12 09:54:03 +000010938if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010940$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010941
10942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010943 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10944"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010945if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000010947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000010949fi
10950
Martin v. Löwiseba40652007-08-30 20:10:57 +000010951cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010952#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000010953_ACEOF
10954
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10956$as_echo_n "checking for tzname... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010957if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010958 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000010959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010961/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010962#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000010963#if !HAVE_DECL_TZNAME
10964extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010966
Martin v. Löwis11437992002-04-12 09:54:03 +000010967int
10968main ()
10969{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010970return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010971 ;
10972 return 0;
10973}
10974_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010975if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010976 ac_cv_var_tzname=yes
10977else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010978 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010979fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010980rm -f core conftest.err conftest.$ac_objext \
10981 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010982fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10984$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010985 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010987$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010988
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010989 fi
10990fi
10991
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010993if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010994
10995cat >>confdefs.h <<_ACEOF
10996#define HAVE_STRUCT_STAT_ST_RDEV 1
10997_ACEOF
10998
10999
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011000fi
11001
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011002ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011003if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011004
Martin v. Löwis11437992002-04-12 09:54:03 +000011005cat >>confdefs.h <<_ACEOF
11006#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11007_ACEOF
11008
11009
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011010fi
11011
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011012ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011013if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011014
11015cat >>confdefs.h <<_ACEOF
11016#define HAVE_STRUCT_STAT_ST_FLAGS 1
11017_ACEOF
11018
11019
11020fi
11021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011022ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011023if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011024
11025cat >>confdefs.h <<_ACEOF
11026#define HAVE_STRUCT_STAT_ST_GEN 1
11027_ACEOF
11028
11029
11030fi
11031
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011032ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011033if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011034
11035cat >>confdefs.h <<_ACEOF
11036#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11037_ACEOF
11038
11039
11040fi
11041
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011042ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011043if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011044
Martin v. Löwis11437992002-04-12 09:54:03 +000011045cat >>confdefs.h <<_ACEOF
11046#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11047_ACEOF
11048
11049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011050$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011051
11052else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011053 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011054 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011055 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11056 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011057esac
11058
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011059fi
11060
Michael W. Hudson54241132001-12-07 15:38:26 +000011061
Martin v. Löwis11437992002-04-12 09:54:03 +000011062
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11064$as_echo_n "checking for time.h that defines altzone... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011065if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011066 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011067else
Matthias Klosec511b472010-05-08 11:01:39 +000011068
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011070/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011071#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011072int
11073main ()
11074{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011075return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011076 ;
11077 return 0;
11078}
11079_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011080if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011081 ac_cv_header_time_altzone=yes
11082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011083 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011086
Martin v. Löwiseba40652007-08-30 20:10:57 +000011087fi
11088
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11090$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011091if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011093$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011094
11095fi
11096
Guido van Rossumda88dad1995-01-26 00:46:29 +000011097was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11099$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011102
11103#include <sys/types.h>
11104#include <sys/select.h>
11105#include <sys/time.h>
11106
Martin v. Löwis11437992002-04-12 09:54:03 +000011107int
11108main ()
11109{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011110;
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 ;
11112 return 0;
11113}
11114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011115if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011116
11117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011118$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011119
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011120 was_it_defined=yes
11121
Martin v. Löwiseba40652007-08-30 20:10:57 +000011122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11125$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011126
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11128$as_echo_n "checking for addrinfo... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011129if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011130 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011131else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011133/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011134#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011135int
11136main ()
11137{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011138struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 ;
11140 return 0;
11141}
11142_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011144 ac_cv_struct_addrinfo=yes
11145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011146 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11149fi
11150
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11152$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011153if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011154
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011155$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011156
11157fi
11158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11160$as_echo_n "checking for sockaddr_storage... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011161if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011162 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011163else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011165/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011166
11167# include <sys/types.h>
11168# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011169int
11170main ()
11171{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011172struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 ;
11174 return 0;
11175}
11176_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011178 ac_cv_struct_sockaddr_storage=yes
11179else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011180 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11183fi
11184
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11186$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011187if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011188
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011189$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011190
11191fi
11192
Guido van Rossum627b2d71993-12-24 10:39:16 +000011193# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011194
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11196$as_echo_n "checking whether char is unsigned... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011197if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011198 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011202$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011203int
11204main ()
11205{
11206static int test_array [1 - 2 * !(((char) -1) < 0)];
11207test_array [0] = 0
11208
11209 ;
11210 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011211}
Martin v. Löwis11437992002-04-12 09:54:03 +000011212_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011213if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011214 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011216 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011219fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11221$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011222if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011223 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011224
11225fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11228$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011229if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011230 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011233/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011234
Martin v. Löwis11437992002-04-12 09:54:03 +000011235int
11236main ()
11237{
11238/* FIXME: Include the comments suggested by Paul. */
11239#ifndef __cplusplus
11240 /* Ultrix mips cc rejects this. */
11241 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011242 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011244 char const *const *pcpcc;
11245 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011246 /* NEC SVR4.0.2 mips cc rejects this. */
11247 struct point {int x, y;};
11248 static struct point const zero = {0,0};
11249 /* AIX XL C 1.02.0.0 rejects this.
11250 It does not let you subtract one const X* pointer from another in
11251 an arm of an if-expression whose if-part is not a constant
11252 expression */
11253 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011254 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011256 ++pcpcc;
11257 ppc = (char**) pcpcc;
11258 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 { /* SCO 3.2v4 cc rejects this. */
11260 char *t;
11261 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011262
Martin v. Löwis11437992002-04-12 09:54:03 +000011263 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011264 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 }
11266 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11267 int x[] = {25, 17};
11268 const int *foo = &x[0];
11269 ++foo;
11270 }
11271 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11272 typedef const int *iptr;
11273 iptr p = 0;
11274 ++p;
11275 }
11276 { /* AIX XL C 1.02.0.0 rejects this saying
11277 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11278 struct s { int j; const int *ap[3]; };
11279 struct s *b; b->j = 5;
11280 }
11281 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11282 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011283 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011284 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011285 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011286#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011287
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 ;
11289 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011290}
Martin v. Löwis11437992002-04-12 09:54:03 +000011291_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011292if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011293 ac_cv_c_const=yes
11294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011295 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011298fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11300$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011301if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011302
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011303$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011304
11305fi
11306
Michael W. Hudson54241132001-12-07 15:38:26 +000011307
Guido van Rossumda88dad1995-01-26 00:46:29 +000011308works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11310$as_echo_n "checking for working volatile... " >&6; }
11311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011312/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011313
Martin v. Löwis11437992002-04-12 09:54:03 +000011314int
11315main ()
11316{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011317volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 ;
11319 return 0;
11320}
11321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011322if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011323 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011324else
Skip Montanaro6dead952003-09-25 14:50:04 +000011325
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011326$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011327
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011328
Guido van Rossum627b2d71993-12-24 10:39:16 +000011329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11332$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011333
Guido van Rossumda88dad1995-01-26 00:46:29 +000011334works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11336$as_echo_n "checking for working signed char... " >&6; }
11337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011338/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011339
Martin v. Löwis11437992002-04-12 09:54:03 +000011340int
11341main ()
11342{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011343signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 ;
11345 return 0;
11346}
11347_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011348if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011349 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011350else
Skip Montanaro6dead952003-09-25 14:50:04 +000011351
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011352$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011353
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011354
Guido van Rossum7f43da71994-08-01 12:15:30 +000011355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11358$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011359
Guido van Rossumda88dad1995-01-26 00:46:29 +000011360have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11362$as_echo_n "checking for prototypes... " >&6; }
11363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011364/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011365int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011366int
11367main ()
11368{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011369return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011370 ;
11371 return 0;
11372}
11373_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011375
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011376$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011377
Matthias Klosec511b472010-05-08 11:01:39 +000011378 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11382$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011383
Guido van Rossumda88dad1995-01-26 00:46:29 +000011384works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11386$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011388/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011389
11390#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011391int foo(int x, ...) {
11392 va_list va;
11393 va_start(va, x);
11394 va_arg(va, int);
11395 va_arg(va, char *);
11396 va_arg(va, double);
11397 return 0;
11398}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011399
Martin v. Löwis11437992002-04-12 09:54:03 +000011400int
11401main ()
11402{
Guido van Rossum90eea071996-08-30 20:58:57 +000011403return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ;
11405 return 0;
11406}
11407_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011409
11410
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011411$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011412
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011413 works=yes
11414
Guido van Rossum627b2d71993-12-24 10:39:16 +000011415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11418$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011419
Martin v. Löwisd6320502004-08-12 13:45:08 +000011420# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11422$as_echo_n "checking for socketpair... " >&6; }
11423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011424/* end confdefs.h. */
11425
11426#include <sys/types.h>
11427#include <sys/socket.h>
11428
11429int
11430main ()
11431{
11432void *x=socketpair
11433 ;
11434 return 0;
11435}
11436_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011438
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011439$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011440
Matthias Klosec511b472010-05-08 11:01:39 +000011441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011442$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011443else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11445$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011446
11447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011449
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011450# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11452$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011454/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011455#include <sys/types.h>
11456#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011457int
11458main ()
11459{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011460struct sockaddr x;
11461x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011462 ;
11463 return 0;
11464}
11465_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011466if ac_fn_c_try_compile "$LINENO"; then :
11467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11468$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011469
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011470$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011471
11472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11474$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011475
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011478
Guido van Rossumda88dad1995-01-26 00:46:29 +000011479va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11481$as_echo_n "checking whether va_list is an array... " >&6; }
11482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011483/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011484
11485#ifdef HAVE_STDARG_PROTOTYPES
11486#include <stdarg.h>
11487#else
11488#include <varargs.h>
11489#endif
11490
Martin v. Löwis11437992002-04-12 09:54:03 +000011491int
11492main ()
11493{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011494va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 ;
11496 return 0;
11497}
11498_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011499if ac_fn_c_try_compile "$LINENO"; then :
11500
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011501else
Skip Montanaro6dead952003-09-25 14:50:04 +000011502
Martin v. Löwis11437992002-04-12 09:54:03 +000011503
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011504$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011505
Guido van Rossumda88dad1995-01-26 00:46:29 +000011506 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011507
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11511$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011512
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011513# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011514
11515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011516ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011517if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011518
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011519 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11522$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011523 OLD_CFLAGS=$CFLAGS
11524 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011526/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011527
11528# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011529
Martin v. Löwis11437992002-04-12 09:54:03 +000011530int
11531main ()
11532{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011533
11534 char *name;
11535 struct hostent *he, *res;
11536 char buffer[2048];
11537 int buflen = 2048;
11538 int h_errnop;
11539
11540 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011541
11542 ;
11543 return 0;
11544}
11545_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011546if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011547
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011548 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011549
Martin v. Löwis11437992002-04-12 09:54:03 +000011550
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011551$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011552
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11554$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011555
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011556else
Skip Montanaro6dead952003-09-25 14:50:04 +000011557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11559$as_echo "no" >&6; }
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11561$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011563/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011564
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011565# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
Martin v. Löwis11437992002-04-12 09:54:03 +000011567int
11568main ()
11569{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011570
11571 char *name;
11572 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011573 char buffer[2048];
11574 int buflen = 2048;
11575 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011576
Matthias Klosec511b472010-05-08 11:01:39 +000011577 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011578
11579 ;
11580 return 0;
11581}
11582_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011583if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011585 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011586
Martin v. Löwis11437992002-04-12 09:54:03 +000011587
Matthias Klosec511b472010-05-08 11:01:39 +000011588$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11591$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011592
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011593else
Skip Montanaro6dead952003-09-25 14:50:04 +000011594
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11596$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11598$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11600/* end confdefs.h. */
11601
11602# include <netdb.h>
11603
11604int
11605main ()
11606{
11607
11608 char *name;
11609 struct hostent *he;
11610 struct hostent_data data;
11611
11612 (void) gethostbyname_r(name, he, &data);
11613
11614 ;
11615 return 0;
11616}
11617_ACEOF
11618if ac_fn_c_try_compile "$LINENO"; then :
11619
11620 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11621
11622
11623$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11624
11625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11626$as_echo "yes" >&6; }
11627
11628else
11629
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11631$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011632
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011638
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011641 CFLAGS=$OLD_CFLAGS
11642
11643else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011644
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011645 for ac_func in gethostbyname
11646do :
11647 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011648if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011650#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011651_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011652
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011653fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011654done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011655
Michael W. Hudson54241132001-12-07 15:38:26 +000011656
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011657fi
11658
Michael W. Hudson54241132001-12-07 15:38:26 +000011659
11660
11661
11662
11663
11664
Guido van Rossum627b2d71993-12-24 10:39:16 +000011665# checks for system services
11666# (none yet)
11667
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011668# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011669ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011670if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011671
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011672else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11674$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011675if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011676 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011677else
Martin v. Löwis11437992002-04-12 09:54:03 +000011678 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011679LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011682
Martin v. Löwiseba40652007-08-30 20:10:57 +000011683/* Override any GCC internal prototype to avoid an error.
11684 Use char because int might match the return type of a GCC
11685 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011686#ifdef __cplusplus
11687extern "C"
11688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011689char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011690int
11691main ()
11692{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011693return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 ;
11695 return 0;
11696}
11697_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011698if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011699 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011701 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011702fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011703rm -f core conftest.err conftest.$ac_objext \
11704 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011705LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011706fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11708$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011709if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011710 cat >>confdefs.h <<_ACEOF
11711#define HAVE_LIBIEEE 1
11712_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011713
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011714 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011715
Guido van Rossum627b2d71993-12-24 10:39:16 +000011716fi
11717
Michael W. Hudson54241132001-12-07 15:38:26 +000011718
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011719fi
11720
Michael W. Hudson54241132001-12-07 15:38:26 +000011721
Guido van Rossum7f253911997-05-09 02:42:48 +000011722# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11724$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Martin v. Löwiseba40652007-08-30 20:10:57 +000011726# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011727if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011728 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011729if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011730then
11731
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011732$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011733
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11735$as_echo "yes" >&6; }
11736else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11737$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011738fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011739else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11741$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011742fi
11743
Guido van Rossum7f253911997-05-09 02:42:48 +000011744
Guido van Rossum7f43da71994-08-01 12:15:30 +000011745# check for --with-libm=...
11746
Guido van Rossum563e7081996-09-10 18:20:48 +000011747case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011748Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011749BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011750*) LIBM=-lm
11751esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11753$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011754
Martin v. Löwiseba40652007-08-30 20:10:57 +000011755# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011756if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011757 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011758if test "$withval" = no
11759then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11761$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011762elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011763then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11765$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011766else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011767fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11770$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011771fi
11772
Guido van Rossum7f43da71994-08-01 12:15:30 +000011773
11774# check for --with-libc=...
11775
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11777$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011778
Martin v. Löwiseba40652007-08-30 20:10:57 +000011779# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011780if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011781 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011782if test "$withval" = no
11783then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11785$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011786elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011787then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11789$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011790else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011791fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011792else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11794$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011795fi
11796
Guido van Rossum7f43da71994-08-01 12:15:30 +000011797
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011798# **************************************************
11799# * Check for various properties of floating point *
11800# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11803$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011804if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011805 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011806else
11807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011808if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011809 ac_cv_little_endian_double=no
11810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011812/* end confdefs.h. */
11813
11814#include <string.h>
11815int main() {
11816 double x = 9006104071832581.0;
11817 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11818 return 0;
11819 else
11820 return 1;
11821}
11822
11823_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011824if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011825 ac_cv_little_endian_double=yes
11826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011827 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011831fi
11832
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011833fi
11834
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11836$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011837if test "$ac_cv_little_endian_double" = yes
11838then
11839
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011840$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011841
11842fi
11843
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11845$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011846if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011847 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011848else
11849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011850if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011851 ac_cv_big_endian_double=no
11852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011854/* end confdefs.h. */
11855
11856#include <string.h>
11857int main() {
11858 double x = 9006104071832581.0;
11859 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11860 return 0;
11861 else
11862 return 1;
11863}
11864
11865_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011866if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011867 ac_cv_big_endian_double=yes
11868else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011869 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11872 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011873fi
11874
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011875fi
11876
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11878$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011879if test "$ac_cv_big_endian_double" = yes
11880then
11881
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011882$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011883
11884fi
11885
11886# Some ARM platforms use a mixed-endian representation for doubles.
11887# While Python doesn't currently have full support for these platforms
11888# (see e.g., issue 1762561), we can at least make sure that float <-> string
11889# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11891$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011892if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011893 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011894else
11895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011896if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011897 ac_cv_mixed_endian_double=no
11898else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011900/* end confdefs.h. */
11901
11902#include <string.h>
11903int main() {
11904 double x = 9006104071832581.0;
11905 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11906 return 0;
11907 else
11908 return 1;
11909}
11910
11911_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011912if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011913 ac_cv_mixed_endian_double=yes
11914else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011916fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011919fi
11920
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011921fi
11922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11924$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011925if test "$ac_cv_mixed_endian_double" = yes
11926then
11927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011928$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011929
11930fi
11931
11932# The short float repr introduced in Python 3.1 requires the
11933# correctly-rounded string <-> double conversion functions from
11934# Python/dtoa.c, which in turn require that the FPU uses 53-bit
11935# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000011936# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011937# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000011938
11939# This inline assembler syntax may also work for suncc and icc,
11940# so we try it on all platforms.
11941
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11943$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011945/* end confdefs.h. */
11946
11947int
11948main ()
11949{
11950
Mark Dickinsona548dee2009-11-15 13:12:43 +000011951 unsigned short cw;
11952 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11953 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011954
11955 ;
11956 return 0;
11957}
11958_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011959if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011960 have_gcc_asm_for_x87=yes
11961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011962 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011963fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11966$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000011967if test "$have_gcc_asm_for_x87" = yes
11968then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011970$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011971
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011972fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000011973
Mark Dickinson04b27232009-01-04 12:29:36 +000011974# Detect whether system arithmetic is subject to x87-style double
11975# rounding issues. The result of this test has little meaning on non
11976# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11977# mode is round-to-nearest and double rounding issues are present, and
11978# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11980$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000011981# $BASECFLAGS may affect the result
11982ac_save_cc="$CC"
11983CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011984if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000011985 ac_cv_x87_double_rounding=no
11986else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000011988/* end confdefs.h. */
11989
11990#include <stdlib.h>
11991#include <math.h>
11992int main() {
11993 volatile double x, y, z;
11994 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11995 x = 0.99999999999999989; /* 1-2**-53 */
11996 y = 1./x;
11997 if (y != 1.)
11998 exit(0);
11999 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12000 x = 1e16;
12001 y = 2.99999;
12002 z = x + y;
12003 if (z != 1e16+4.)
12004 exit(0);
12005 /* both tests show evidence of double rounding */
12006 exit(1);
12007}
12008
12009_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012010if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012011 ac_cv_x87_double_rounding=no
12012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012014fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012015rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12016 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012017fi
12018
Mark Dickinson99abd142009-10-24 13:44:16 +000012019CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12021$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012022if test "$ac_cv_x87_double_rounding" = yes
12023then
12024
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012025$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012026
12027fi
12028
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012029# ************************************
12030# * Check for mathematical functions *
12031# ************************************
12032
12033LIBS_SAVE=$LIBS
12034LIBS="$LIBS $LIBM"
12035
Mark Dickinson265d7382008-04-21 22:32:24 +000012036# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12037# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12039$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012040if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012041 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012042else
12043
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012044if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012045 ac_cv_tanh_preserves_zero_sign=no
12046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012048/* end confdefs.h. */
12049
12050#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012051#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012052int main() {
12053 /* return 0 if either negative zeros don't exist
12054 on this platform or if negative zeros exist
12055 and tanh(-0.) == -0. */
12056 if (atan2(0., -1.) == atan2(-0., -1.) ||
12057 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12058 else exit(1);
12059}
12060
12061_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012062if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012063 ac_cv_tanh_preserves_zero_sign=yes
12064else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012065 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012066fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012067rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12068 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012069fi
12070
Mark Dickinson265d7382008-04-21 22:32:24 +000012071fi
12072
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12074$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012075if test "$ac_cv_tanh_preserves_zero_sign" = yes
12076then
12077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012078$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012079
12080fi
12081
Mark Dickinson65898e02009-09-05 10:27:00 +000012082for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083do :
12084 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12085ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012086if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012087 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012088#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012089_ACEOF
12090
12091fi
12092done
12093
Mark Dickinson65898e02009-09-05 10:27:00 +000012094for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012095do :
12096 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12097ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012098if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012099 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012100#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012101_ACEOF
12102
12103fi
12104done
12105
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012106ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12107"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012108if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012109 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012111 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012112fi
12113
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012114cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012115#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012116_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012117ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12118"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012119if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012120 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012121else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012122 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012123fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012124
12125cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012126#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012127_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012128ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12129"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012130if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012131 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012132else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012133 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012134fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012135
12136cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012137#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012138_ACEOF
12139
12140
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012141LIBS=$LIBS_SAVE
12142
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012143# For multiprocessing module, check that sem_open
12144# actually works. For FreeBSD versions <= 7.2,
12145# the kernel module that provides POSIX semaphores
12146# isn't loaded by default, so an attempt to call
12147# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12149$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012150if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012151 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012152else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012153 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012154 ac_cv_posix_semaphores_enabled=yes
12155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012157/* end confdefs.h. */
12158
12159#include <unistd.h>
12160#include <fcntl.h>
12161#include <stdio.h>
12162#include <semaphore.h>
12163#include <sys/stat.h>
12164
12165int main(void) {
12166 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12167 if (a == SEM_FAILED) {
12168 perror("sem_open");
12169 return 1;
12170 }
12171 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012172 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012173 return 0;
12174}
12175
12176_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012177if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012178 ac_cv_posix_semaphores_enabled=yes
12179else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012180 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012181fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12183 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012184fi
12185
12186
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012187fi
12188
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12190$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012191if test $ac_cv_posix_semaphores_enabled = no
12192then
12193
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012194$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012195
12196fi
12197
12198# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12200$as_echo_n "checking for broken sem_getvalue... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012201if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012202 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012203else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012204 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012205 ac_cv_broken_sem_getvalue=yes
12206else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012208/* end confdefs.h. */
12209
12210#include <unistd.h>
12211#include <fcntl.h>
12212#include <stdio.h>
12213#include <semaphore.h>
12214#include <sys/stat.h>
12215
12216int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012217 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012218 int count;
12219 int res;
12220 if(a==SEM_FAILED){
12221 perror("sem_open");
12222 return 1;
12223
12224 }
12225 res = sem_getvalue(a, &count);
12226 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012227 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012228 return res==-1 ? 1 : 0;
12229}
12230
12231_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012232if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012233 ac_cv_broken_sem_getvalue=no
12234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012235 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012236fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12238 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012239fi
12240
12241
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012242fi
12243
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12245$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012246if test $ac_cv_broken_sem_getvalue = yes
12247then
12248
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012249$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012250
12251fi
12252
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012253# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12255$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012256# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012257if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012258 enableval=$enable_big_digits; case $enable_big_digits in
12259yes)
12260 enable_big_digits=30 ;;
12261no)
12262 enable_big_digits=15 ;;
1226315|30)
12264 ;;
12265*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012266 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012267esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12269$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012270
12271cat >>confdefs.h <<_ACEOF
12272#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12273_ACEOF
12274
12275
12276else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12278$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012279fi
12280
12281
Guido van Rossumef2255b2000-03-10 22:30:29 +000012282# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012283ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012284if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012285
12286
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012287$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012288
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012289 wchar_h="yes"
12290
Guido van Rossumef2255b2000-03-10 22:30:29 +000012291else
Martin v. Löwis11437992002-04-12 09:54:03 +000012292 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012293
12294fi
12295
Michael W. Hudson54241132001-12-07 15:38:26 +000012296
Martin v. Löwis11437992002-04-12 09:54:03 +000012297
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012298# determine wchar_t size
12299if test "$wchar_h" = yes
12300then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012301 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012302# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12303# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12304# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12306$as_echo_n "checking size of wchar_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012307if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012308 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012309else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012310 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12311"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012312
Martin v. Löwis11437992002-04-12 09:54:03 +000012313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012314 if test "$ac_cv_type_wchar_t" = yes; then
12315 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12316$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012317as_fn_error 77 "cannot compute sizeof (wchar_t)
12318See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012319 else
12320 ac_cv_sizeof_wchar_t=0
12321 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012322fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012323
Martin v. Löwis11437992002-04-12 09:54:03 +000012324fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12326$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012327
12328
12329
Martin v. Löwis11437992002-04-12 09:54:03 +000012330cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012331#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012332_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012333
Michael W. Hudson54241132001-12-07 15:38:26 +000012334
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012335fi
12336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12338$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012339have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012341/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012342
12343#include <tcl.h>
12344#if TCL_UTF_MAX != 6
12345# error "NOT UCS4_TCL"
12346#endif
12347int
12348main ()
12349{
12350
12351 ;
12352 return 0;
12353}
12354_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012355if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012356
12357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012358$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012359
12360 have_ucs4_tcl=yes
12361
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12365$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012366
Skip Montanaro6dead952003-09-25 14:50:04 +000012367# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012368if test "$wchar_h" = yes
12369then
12370 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12372$as_echo_n "checking whether wchar_t is signed... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012373 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012374 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012375else
12376
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012377 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012378 ac_cv_wchar_t_signed=yes
12379else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012381/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012382
12383 #include <wchar.h>
12384 int main()
12385 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012386 /* Success: exit code 0 */
12387 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012388 }
12389
12390_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012391if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012392 ac_cv_wchar_t_signed=yes
12393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012394 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012395fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12397 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012398fi
12399
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012400fi
12401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12403$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012404fi
12405
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12407$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012408# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012409if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012410 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012411else
12412 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012413fi
12414
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012415
12416if test $enable_unicode = yes
12417then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012418 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012419 case "$have_ucs4_tcl" in
12420 yes) enable_unicode="ucs4"
12421 ;;
12422 *) enable_unicode="ucs2"
12423 ;;
12424 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012425fi
12426
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012427
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012428case "$enable_unicode" in
12429ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012430 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012431
12432 ;;
12433ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012434 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012435
12436 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012437*) as_fn_error $? "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012438esac
12439
Michael W. Hudson54241132001-12-07 15:38:26 +000012440
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
12442
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012443if test "$enable_unicode" = "no"
12444then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012445 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12447$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012448else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012449 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012450
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012451$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012452
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012453
12454 # wchar_t is only usable if it maps to an unsigned type
12455 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012456 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012457 then
12458 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012459
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012460$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012461
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012462 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012463
12464 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12465 then
12466 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012467 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012468
12469 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12470 then
12471 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012472 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012473
12474 else
12475 PY_UNICODE_TYPE="no type found"
12476 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12478$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012479fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012480
12481# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12483$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012484if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012485 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012486else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012487 ac_cv_c_bigendian=unknown
12488 # See if we're dealing with a universal compiler.
12489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12490/* end confdefs.h. */
12491#ifndef __APPLE_CC__
12492 not a universal capable compiler
12493 #endif
12494 typedef int dummy;
12495
Skip Montanaro6dead952003-09-25 14:50:04 +000012496_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012497if ac_fn_c_try_compile "$LINENO"; then :
12498
12499 # Check for potential -arch flags. It is not universal unless
12500 # there are at least two -arch flags with different values.
12501 ac_arch=
12502 ac_prev=
12503 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12504 if test -n "$ac_prev"; then
12505 case $ac_word in
12506 i?86 | x86_64 | ppc | ppc64)
12507 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12508 ac_arch=$ac_word
12509 else
12510 ac_cv_c_bigendian=universal
12511 break
12512 fi
12513 ;;
12514 esac
12515 ac_prev=
12516 elif test "x$ac_word" = "x-arch"; then
12517 ac_prev=arch
12518 fi
12519 done
12520fi
12521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12522 if test $ac_cv_c_bigendian = unknown; then
12523 # See if sys/param.h defines the BYTE_ORDER macro.
12524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012525/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012526#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012527 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012528
Martin v. Löwis11437992002-04-12 09:54:03 +000012529int
12530main ()
12531{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012532#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12533 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12534 && LITTLE_ENDIAN)
12535 bogus endian macros
12536 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012537
12538 ;
12539 return 0;
12540}
12541_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012542if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012543 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012545/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012546#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012547 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012548
Martin v. Löwis11437992002-04-12 09:54:03 +000012549int
12550main ()
12551{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012552#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012553 not big endian
12554 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
12556 ;
12557 return 0;
12558}
12559_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012560if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012561 ac_cv_c_bigendian=yes
12562else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012563 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012566fi
12567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12568 fi
12569 if test $ac_cv_c_bigendian = unknown; then
12570 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012572/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012573#include <limits.h>
12574
Martin v. Löwis11437992002-04-12 09:54:03 +000012575int
12576main ()
12577{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012578#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12579 bogus endian macros
12580 #endif
12581
Martin v. Löwis11437992002-04-12 09:54:03 +000012582 ;
12583 return 0;
12584}
12585_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012586if ac_fn_c_try_compile "$LINENO"; then :
12587 # It does; now see whether it defined to _BIG_ENDIAN or not.
12588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12589/* end confdefs.h. */
12590#include <limits.h>
12591
12592int
12593main ()
12594{
12595#ifndef _BIG_ENDIAN
12596 not big endian
12597 #endif
12598
12599 ;
12600 return 0;
12601}
12602_ACEOF
12603if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012604 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012605else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012606 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012607fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12609fi
12610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12611 fi
12612 if test $ac_cv_c_bigendian = unknown; then
12613 # Compile a test program.
12614 if test "$cross_compiling" = yes; then :
12615 # Try to guess by grepping values from an object file.
12616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12617/* end confdefs.h. */
12618short int ascii_mm[] =
12619 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12620 short int ascii_ii[] =
12621 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12622 int use_ascii (int i) {
12623 return ascii_mm[i] + ascii_ii[i];
12624 }
12625 short int ebcdic_ii[] =
12626 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12627 short int ebcdic_mm[] =
12628 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12629 int use_ebcdic (int i) {
12630 return ebcdic_mm[i] + ebcdic_ii[i];
12631 }
12632 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012634int
12635main ()
12636{
12637return use_ascii (foo) == use_ebcdic (foo);
12638 ;
12639 return 0;
12640}
12641_ACEOF
12642if ac_fn_c_try_compile "$LINENO"; then :
12643 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12644 ac_cv_c_bigendian=yes
12645 fi
12646 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12647 if test "$ac_cv_c_bigendian" = unknown; then
12648 ac_cv_c_bigendian=no
12649 else
12650 # finding both strings is unlikely to happen, but who knows?
12651 ac_cv_c_bigendian=unknown
12652 fi
12653 fi
12654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012658/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012659$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012660int
12661main ()
12662{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012664 /* Are we little or big endian? From Harbison&Steele. */
12665 union
12666 {
12667 long int l;
12668 char c[sizeof (long int)];
12669 } u;
12670 u.l = 1;
12671 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012672
12673 ;
12674 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012675}
Martin v. Löwis11437992002-04-12 09:54:03 +000012676_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012677if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012678 ac_cv_c_bigendian=no
12679else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012680 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012681fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012685
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012686 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012687fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12689$as_echo "$ac_cv_c_bigendian" >&6; }
12690 case $ac_cv_c_bigendian in #(
12691 yes)
12692 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12693;; #(
12694 no)
12695 ;; #(
12696 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012697
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012698$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012699
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012700 ;; #(
12701 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012702 as_fn_error $? "unknown endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012703 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12704 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012705
Michael W. Hudson54241132001-12-07 15:38:26 +000012706
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012707# Check whether right shifting a negative integer extends the sign bit
12708# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12710$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012711if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012712 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012713else
Martin v. Löwis11437992002-04-12 09:54:03 +000012714
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012715if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012716 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012719/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012720
12721int main()
12722{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012723 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012724}
12725
Martin v. Löwis11437992002-04-12 09:54:03 +000012726_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012727if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012728 ac_cv_rshift_extends_sign=yes
12729else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012730 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012731fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012734fi
12735
Martin v. Löwiseba40652007-08-30 20:10:57 +000012736fi
12737
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12739$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012740if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012741then
Martin v. Löwis11437992002-04-12 09:54:03 +000012742
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012743$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012744
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012745fi
12746
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012747# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12749$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012750if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012751 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012752else
Martin v. Löwis11437992002-04-12 09:54:03 +000012753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012755/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012756#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012757int
12758main ()
12759{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012760
12761 FILE *f = fopen("/dev/null", "r");
12762 flockfile(f);
12763 getc_unlocked(f);
12764 funlockfile(f);
12765
Martin v. Löwis11437992002-04-12 09:54:03 +000012766 ;
12767 return 0;
12768}
12769_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012770if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012771 ac_cv_have_getc_unlocked=yes
12772else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012773 ac_cv_have_getc_unlocked=no
12774fi
12775rm -f core conftest.err conftest.$ac_objext \
12776 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12780$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012781if test "$ac_cv_have_getc_unlocked" = yes
12782then
Martin v. Löwis11437992002-04-12 09:54:03 +000012783
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012785
12786fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012787
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012788# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012789# save the value of LIBS so we don't actually link Python with readline
12790LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012791
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012792# On some systems we need to link readline to a termcap compatible
12793# library. NOTE: Keep the precedence of listed libraries synchronised
12794# with setup.py.
12795py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12797$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012798for py_libtermcap in "" ncursesw ncurses curses termcap; do
12799 if test -z "$py_libtermcap"; then
12800 READLINE_LIBS="-lreadline"
12801 else
12802 READLINE_LIBS="-lreadline -l$py_libtermcap"
12803 fi
12804 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012806/* end confdefs.h. */
12807
Martin v. Löwiseba40652007-08-30 20:10:57 +000012808/* Override any GCC internal prototype to avoid an error.
12809 Use char because int might match the return type of a GCC
12810 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012811#ifdef __cplusplus
12812extern "C"
12813#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012814char readline ();
12815int
12816main ()
12817{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012818return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012819 ;
12820 return 0;
12821}
12822_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012824 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012825fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012826rm -f core conftest.err conftest.$ac_objext \
12827 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012828 if test $py_cv_lib_readline = yes; then
12829 break
12830 fi
12831done
12832# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12833#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012834if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12836$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012837else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12839$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012840
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012841$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012842
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012843fi
12844
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012845# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12847$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012848if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012849 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012850else
12851 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012852LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012854/* end confdefs.h. */
12855
Martin v. Löwiseba40652007-08-30 20:10:57 +000012856/* Override any GCC internal prototype to avoid an error.
12857 Use char because int might match the return type of a GCC
12858 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012859#ifdef __cplusplus
12860extern "C"
12861#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012862char rl_callback_handler_install ();
12863int
12864main ()
12865{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012867 ;
12868 return 0;
12869}
12870_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012871if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012872 ac_cv_lib_readline_rl_callback_handler_install=yes
12873else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012874 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012875fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012876rm -f core conftest.err conftest.$ac_objext \
12877 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012878LIBS=$ac_check_lib_save_LIBS
12879fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12881$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012882if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012883
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012884$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012885
12886fi
12887
12888
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012889# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012891/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012892#include <readline/readline.h>
12893_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012894if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012895 have_readline=yes
12896else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012897 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000012898
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012899fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012900rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012901if test $have_readline = yes
12902then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012904/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012905#include <readline/readline.h>
12906
12907_ACEOF
12908if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012909 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012910
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012911$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012912
12913fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012914rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012915
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012917/* end confdefs.h. */
12918#include <readline/readline.h>
12919
12920_ACEOF
12921if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012922 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012923
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012924$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012925
12926fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012927rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012928
12929fi
12930
Martin v. Löwis0daad592001-09-30 21:09:59 +000012931# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12933$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012934if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012935 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012936else
Martin v. Löwis11437992002-04-12 09:54:03 +000012937 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012938LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012941
Martin v. Löwiseba40652007-08-30 20:10:57 +000012942/* Override any GCC internal prototype to avoid an error.
12943 Use char because int might match the return type of a GCC
12944 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012945#ifdef __cplusplus
12946extern "C"
12947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012948char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012949int
12950main ()
12951{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012952return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 ;
12954 return 0;
12955}
12956_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012957if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012958 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012960 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012961fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012962rm -f core conftest.err conftest.$ac_objext \
12963 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012964LIBS=$ac_check_lib_save_LIBS
12965fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12967$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012968if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012970$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012971
Martin v. Löwis0daad592001-09-30 21:09:59 +000012972fi
12973
Michael W. Hudson54241132001-12-07 15:38:26 +000012974
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012975# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12977$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012978if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012979 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012980else
12981 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012982LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012984/* end confdefs.h. */
12985
12986/* Override any GCC internal prototype to avoid an error.
12987 Use char because int might match the return type of a GCC
12988 builtin and then its argument prototype would still apply. */
12989#ifdef __cplusplus
12990extern "C"
12991#endif
12992char rl_completion_display_matches_hook ();
12993int
12994main ()
12995{
12996return rl_completion_display_matches_hook ();
12997 ;
12998 return 0;
12999}
13000_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013001if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013002 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013004 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013005fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013006rm -f core conftest.err conftest.$ac_objext \
13007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013008LIBS=$ac_check_lib_save_LIBS
13009fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13011$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013012if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013013
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013014$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013015
13016fi
13017
13018
Martin v. Löwis0daad592001-09-30 21:09:59 +000013019# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13021$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013022if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013023 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013024else
Martin v. Löwis11437992002-04-12 09:54:03 +000013025 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013026LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013029
Martin v. Löwiseba40652007-08-30 20:10:57 +000013030/* Override any GCC internal prototype to avoid an error.
13031 Use char because int might match the return type of a GCC
13032 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013033#ifdef __cplusplus
13034extern "C"
13035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013036char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013037int
13038main ()
13039{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013040return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013041 ;
13042 return 0;
13043}
13044_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013045if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013046 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013048 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013049fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013050rm -f core conftest.err conftest.$ac_objext \
13051 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013052LIBS=$ac_check_lib_save_LIBS
13053fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13055$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013056if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013057
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013058$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013059
Guido van Rossum353ae582001-07-10 16:45:32 +000013060fi
13061
Jack Jansendd19cf82001-12-06 22:36:17 +000013062
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013063# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013065/* end confdefs.h. */
13066#include <readline/readline.h>
13067_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013068if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013069 have_readline=yes
13070else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013071 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013072
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013073fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013074rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013075if test $have_readline = yes
13076then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013078/* end confdefs.h. */
13079#include <readline/readline.h>
13080
13081_ACEOF
13082if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013083 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013084
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013085$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013086
13087fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013088rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013089
13090fi
13091
Martin v. Löwis82bca632006-02-10 20:49:30 +000013092# End of readline checks: restore LIBS
13093LIBS=$LIBS_no_readline
13094
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13096$as_echo_n "checking for broken nice()... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013097if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013098 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013099else
Martin v. Löwis11437992002-04-12 09:54:03 +000013100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013101if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013102 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013103else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013105/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013106
13107int main()
13108{
13109 int val1 = nice(1);
13110 if (val1 != -1 && val1 == nice(2))
13111 exit(0);
13112 exit(1);
13113}
13114
Martin v. Löwis11437992002-04-12 09:54:03 +000013115_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013116if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013117 ac_cv_broken_nice=yes
13118else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013119 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013120fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13122 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013123fi
13124
Martin v. Löwiseba40652007-08-30 20:10:57 +000013125fi
13126
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13128$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013129if test "$ac_cv_broken_nice" = yes
13130then
Martin v. Löwis11437992002-04-12 09:54:03 +000013131
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013132$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013133
13134fi
13135
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13137$as_echo_n "checking for broken poll()... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013138if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013139 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013142 ac_cv_broken_poll=no
13143else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013145/* end confdefs.h. */
13146
13147#include <poll.h>
13148
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013149int main()
13150{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013151 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013152 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013153
13154 close (42);
13155
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013156 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013157 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013158 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013159 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013160 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013161 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013162 return 1;
13163}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013164
13165_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013166if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013167 ac_cv_broken_poll=yes
13168else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013169 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013170fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13172 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013174
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013175fi
13176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13178$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013179if test "$ac_cv_broken_poll" = yes
13180then
13181
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013182$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013183
13184fi
13185
Brett Cannon43802422005-02-10 20:48:03 +000013186# Before we can test tzset, we need to check if struct tm has a tm_zone
Martin v. Löwis1d459062005-03-14 21:23:33 +000013187# (which is not required by ISO C or UNIX spec) and/or if we support
13188# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Brett Cannon43802422005-02-10 20:48:03 +000013190#include <$ac_cv_struct_tm>
13191
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013192"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013193if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013194
13195cat >>confdefs.h <<_ACEOF
13196#define HAVE_STRUCT_TM_TM_ZONE 1
13197_ACEOF
13198
13199
13200fi
13201
13202if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13203
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013204$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013205
13206else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013207 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13208"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013209if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013210 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013212 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013213fi
13214
Martin v. Löwiseba40652007-08-30 20:10:57 +000013215cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013216#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013217_ACEOF
13218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13220$as_echo_n "checking for tzname... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013221if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013222 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013225/* end confdefs.h. */
13226#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013227#if !HAVE_DECL_TZNAME
13228extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013229#endif
13230
13231int
13232main ()
13233{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013234return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013235 ;
13236 return 0;
13237}
13238_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013239if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013240 ac_cv_var_tzname=yes
13241else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013242 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013243fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013244rm -f core conftest.err conftest.$ac_objext \
13245 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013246fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13248$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013249 if test $ac_cv_var_tzname = yes; then
13250
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013252
13253 fi
13254fi
13255
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013256
Martin v. Löwis1d459062005-03-14 21:23:33 +000013257# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13259$as_echo_n "checking for working tzset()... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013260if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013261 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013262else
13263
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013264if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013265 ac_cv_working_tzset=no
13266else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013268/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013269
13270#include <stdlib.h>
13271#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013272#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013273
13274#if HAVE_TZNAME
13275extern char *tzname[];
13276#endif
13277
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013278int main()
13279{
Brett Cannon18367812003-09-19 00:59:16 +000013280 /* Note that we need to ensure that not only does tzset(3)
13281 do 'something' with localtime, but it works as documented
13282 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013283 This includes making sure that tzname is set properly if
13284 tm->tm_zone does not exist since it is the alternative way
13285 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013286
13287 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013288 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013289 */
13290
Martin v. Löwis1d459062005-03-14 21:23:33 +000013291 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013292 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13293
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013294 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013295 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013296 if (localtime(&groundhogday)->tm_hour != 0)
13297 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013298#if HAVE_TZNAME
13299 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13300 if (strcmp(tzname[0], "UTC") ||
13301 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13302 exit(1);
13303#endif
Brett Cannon18367812003-09-19 00:59:16 +000013304
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013305 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013306 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013307 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013308 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013309#if HAVE_TZNAME
13310 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13311 exit(1);
13312#endif
Brett Cannon18367812003-09-19 00:59:16 +000013313
13314 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13315 tzset();
13316 if (localtime(&groundhogday)->tm_hour != 11)
13317 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013318#if HAVE_TZNAME
13319 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13320 exit(1);
13321#endif
13322
13323#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013324 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13325 exit(1);
13326 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13327 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013328#endif
Brett Cannon18367812003-09-19 00:59:16 +000013329
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013330 exit(0);
13331}
13332
13333_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013334if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013335 ac_cv_working_tzset=yes
13336else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013337 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013338fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013341fi
13342
Martin v. Löwiseba40652007-08-30 20:10:57 +000013343fi
13344
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13346$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013347if test "$ac_cv_working_tzset" = yes
13348then
13349
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013350$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013351
13352fi
13353
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013354# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13356$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013357if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013358 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013359else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013361/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013362#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013363int
13364main ()
13365{
13366
13367struct stat st;
13368st.st_mtim.tv_nsec = 1;
13369
13370 ;
13371 return 0;
13372}
13373_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013375 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013376else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013377 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13380fi
13381
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13383$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013384if test "$ac_cv_stat_tv_nsec" = yes
13385then
13386
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013387$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013388
13389fi
13390
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013391# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13393$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013394if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013395 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013396else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013398/* end confdefs.h. */
13399#include <sys/stat.h>
13400int
13401main ()
13402{
13403
13404struct stat st;
13405st.st_mtimespec.tv_nsec = 1;
13406
13407 ;
13408 return 0;
13409}
13410_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013412 ac_cv_stat_tv_nsec2=yes
13413else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013414 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13417fi
13418
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13420$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013421if test "$ac_cv_stat_tv_nsec2" = yes
13422then
13423
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013424$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013425
13426fi
13427
Jack Jansen666b1e72001-10-31 12:11:48 +000013428# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13430$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013431if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013432 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013435/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013436#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013437int
13438main ()
13439{
Jack Jansen666b1e72001-10-31 12:11:48 +000013440
13441 int rtn;
13442 rtn = mvwdelch(0,0,0);
13443
Martin v. Löwis11437992002-04-12 09:54:03 +000013444 ;
13445 return 0;
13446}
13447_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013448if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013449 ac_cv_mvwdelch_is_expression=yes
13450else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013451 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13454fi
13455
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13457$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013458
13459if test "$ac_cv_mvwdelch_is_expression" = yes
13460then
Martin v. Löwis11437992002-04-12 09:54:03 +000013461
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013462$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013463
13464fi
13465
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13467$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013468if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013469 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013472/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013473#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013474int
13475main ()
13476{
Jack Jansen666b1e72001-10-31 12:11:48 +000013477
13478 WINDOW *w;
13479 w->_flags = 0;
13480
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 ;
13482 return 0;
13483}
13484_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013485if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013486 ac_cv_window_has_flags=yes
13487else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013488 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13491fi
13492
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13494$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013495
Jack Jansen666b1e72001-10-31 12:11:48 +000013496
13497if test "$ac_cv_window_has_flags" = yes
13498then
Martin v. Löwis11437992002-04-12 09:54:03 +000013499
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013501
13502fi
13503
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13505$as_echo_n "checking for is_term_resized... " >&6; }
13506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013507/* end confdefs.h. */
13508#include <curses.h>
13509int
13510main ()
13511{
13512void *x=is_term_resized
13513 ;
13514 return 0;
13515}
13516_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013517if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013518
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013519$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013520
Matthias Klosec511b472010-05-08 11:01:39 +000013521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013522$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13525$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013526
13527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13529
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13531$as_echo_n "checking for resize_term... " >&6; }
13532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013533/* end confdefs.h. */
13534#include <curses.h>
13535int
13536main ()
13537{
13538void *x=resize_term
13539 ;
13540 return 0;
13541}
13542_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013543if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013544
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013545$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013546
Matthias Klosec511b472010-05-08 11:01:39 +000013547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013548$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13551$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013552
13553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13557$as_echo_n "checking for resizeterm... " >&6; }
13558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013559/* end confdefs.h. */
13560#include <curses.h>
13561int
13562main ()
13563{
13564void *x=resizeterm
13565 ;
13566 return 0;
13567}
13568_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013569if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013570
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013571$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013572
Matthias Klosec511b472010-05-08 11:01:39 +000013573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013574$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013575else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13577$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013578
13579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13581
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13583$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013584
13585if test -r /dev/ptmx
13586then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13588$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013590$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013591
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13594$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013595fi
13596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13598$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013599
13600if test -r /dev/ptc
13601then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13603$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013604
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013605$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013606
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13609$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013610fi
13611
Mark Dickinson82864d12009-11-15 16:18:58 +000013612if test "$have_long_long" = yes
13613then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13615$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013616 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013617 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013620 ac_cv_have_long_long_format=no
13621else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013623/* end confdefs.h. */
13624
13625 #include <stdio.h>
13626 #include <stddef.h>
13627 #include <string.h>
13628
13629 #ifdef HAVE_SYS_TYPES_H
13630 #include <sys/types.h>
13631 #endif
13632
13633 int main()
13634 {
13635 char buffer[256];
13636
13637 if (sprintf(buffer, "%lld", (long long)123) < 0)
13638 return 1;
13639 if (strcmp(buffer, "123"))
13640 return 1;
13641
13642 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13643 return 1;
13644 if (strcmp(buffer, "-123"))
13645 return 1;
13646
13647 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13648 return 1;
13649 if (strcmp(buffer, "123"))
13650 return 1;
13651
13652 return 0;
13653 }
13654
13655_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013656if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013657 ac_cv_have_long_long_format=yes
13658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013659 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013660fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13662 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013663fi
13664
13665
Mark Dickinson82864d12009-11-15 16:18:58 +000013666fi
13667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13669$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013670fi
13671
Mark Dickinson5ce84742009-12-31 20:48:04 +000013672if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013673then
13674
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013675$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013676
13677fi
13678
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013679if test $ac_sys_system = Darwin
13680then
13681 LIBS="$LIBS -framework CoreFoundation"
13682fi
13683
Mark Dickinson82864d12009-11-15 16:18:58 +000013684
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13686$as_echo_n "checking for %zd printf() format support... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013687if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013688 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013689else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013690 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013691 ac_cv_have_size_t_format="cross -- assuming yes"
13692
Brett Cannon09d12362006-05-11 05:11:33 +000013693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013695/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013696
Brett Cannon09d12362006-05-11 05:11:33 +000013697#include <stdio.h>
13698#include <stddef.h>
13699#include <string.h>
13700
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013701#ifdef HAVE_SYS_TYPES_H
13702#include <sys/types.h>
13703#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013704
13705#ifdef HAVE_SSIZE_T
13706typedef ssize_t Py_ssize_t;
13707#elif SIZEOF_VOID_P == SIZEOF_LONG
13708typedef long Py_ssize_t;
13709#else
13710typedef int Py_ssize_t;
13711#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013712
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013713int main()
13714{
13715 char buffer[256];
13716
Brett Cannon09d12362006-05-11 05:11:33 +000013717 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13718 return 1;
13719
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013720 if (strcmp(buffer, "123"))
13721 return 1;
13722
13723 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13724 return 1;
13725
13726 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013727 return 1;
13728
13729 return 0;
13730}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013731
Brett Cannon09d12362006-05-11 05:11:33 +000013732_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013733if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013734 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013735else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013736 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013737fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13739 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013740fi
13741
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013742fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13744$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013745if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013746
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013747$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013748
13749fi
13750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013751ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013752#ifdef HAVE_SYS_TYPES_H
13753#include <sys/types.h>
13754#endif
13755#ifdef HAVE_SYS_SOCKET_H
13756#include <sys/socket.h>
13757#endif
13758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013759"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013760if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013761
Martin v. Löwis11437992002-04-12 09:54:03 +000013762else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013764$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013765
13766fi
13767
Michael W. Hudson54241132001-12-07 15:38:26 +000013768
Benjamin Peterson7497e912010-10-16 00:53:39 +000013769case $ac_sys_system in
13770AIX*)
13771
13772$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13773 ;;
13774esac
13775
13776
Michael W. Hudson54241132001-12-07 15:38:26 +000013777
13778
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013779for h in `(cd $srcdir;echo Python/thread_*.h)`
13780do
13781 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13782done
13783
Michael W. Hudson54241132001-12-07 15:38:26 +000013784
Neal Norwitzd24499d2005-12-18 21:36:39 +000013785SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13787$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013788for dir in $SRCDIRS; do
13789 if test ! -d $dir; then
13790 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013791 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013792done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13794$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013795
Guido van Rossum627b2d71993-12-24 10:39:16 +000013796# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013797ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013798
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013799ac_config_files="$ac_config_files Modules/ld_so_aix"
13800
Martin v. Löwis11437992002-04-12 09:54:03 +000013801cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802# This file is a shell script that caches the results of configure
13803# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013804# scripts and configure runs, see configure's option --config-cache.
13805# It is not useful on other systems. If it contains results you don't
13806# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013807#
Martin v. Löwis11437992002-04-12 09:54:03 +000013808# config.status only pays attention to the cache file if you give it
13809# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013810#
Skip Montanaro6dead952003-09-25 14:50:04 +000013811# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013812# loading this file, other *unset* `ac_cv_foo' will be assigned the
13813# following values.
13814
13815_ACEOF
13816
Guido van Rossumf78abae1997-01-21 22:02:36 +000013817# The following way of writing the cache mishandles newlines in values,
13818# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013819# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013820# Ultrix sh set writes to stderr and can't be redirected directly,
13821# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013822(
13823 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13824 eval ac_val=\$$ac_var
13825 case $ac_val in #(
13826 *${as_nl}*)
13827 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013828 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13829$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013830 esac
13831 case $ac_var in #(
13832 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013833 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13834 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013835 esac ;;
13836 esac
13837 done
13838
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013840 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13841 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013842 # `set' does not quote correctly, so add quotes: double-quote
13843 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013844 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013845 "s/'/'\\\\''/g;
13846 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013847 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013848 *)
13849 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013850 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013852 esac |
13853 sort
13854) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013855 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013856 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013857 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013858 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013859 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13860 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013861 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13862 :end' >>confcache
13863if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13864 if test -w "$cache_file"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013865 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013866 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13867$as_echo "$as_me: updating cache $cache_file" >&6;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013868 if test ! -f "$cache_file" || test -h "$cache_file"; then
13869 cat confcache >"$cache_file"
13870 else
13871 case $cache_file in #(
13872 */* | ?:*)
13873 mv -f confcache "$cache_file"$$ &&
13874 mv -f "$cache_file"$$ "$cache_file" ;; #(
13875 *)
13876 mv -f confcache "$cache_file" ;;
13877 esac
13878 fi
13879 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013880 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013881 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13882$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013883 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013884fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013885rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013886
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013887test "x$prefix" = xNONE && prefix=$ac_default_prefix
13888# Let make expand exec_prefix.
13889test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013890
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013891DEFS=-DHAVE_CONFIG_H
13892
Skip Montanaro6dead952003-09-25 14:50:04 +000013893ac_libobjs=
13894ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013895U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013896for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13897 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013898 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013899 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000013900 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13901 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013902 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13903 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013904done
13905LIBOBJS=$ac_libobjs
13906
13907LTLIBOBJS=$ac_ltlibobjs
13908
13909
Martin v. Löwis11437992002-04-12 09:54:03 +000013910
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013911
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013912: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013913ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013914ac_clean_files_save=$ac_clean_files
13915ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013916{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13917$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13918as_write_fail=0
13919cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013920#! $SHELL
13921# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013922# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013923# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013924# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013925
Martin v. Löwis11437992002-04-12 09:54:03 +000013926debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013927ac_cs_recheck=false
13928ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013929
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013930SHELL=\${CONFIG_SHELL-$SHELL}
13931export SHELL
13932_ASEOF
13933cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13934## -------------------- ##
13935## M4sh Initialization. ##
13936## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013937
Martin v. Löwiseba40652007-08-30 20:10:57 +000013938# Be more Bourne compatible
13939DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013940if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013941 emulate sh
13942 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013943 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013944 # is contrary to our usage. Disable this feature.
13945 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013946 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000013947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013948 case `(set -o) 2>/dev/null` in #(
13949 *posix*) :
13950 set -o posix ;; #(
13951 *) :
13952 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013953esac
Martin v. Löwis11437992002-04-12 09:54:03 +000013954fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013955
Skip Montanaro6dead952003-09-25 14:50:04 +000013956
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013957as_nl='
13958'
13959export as_nl
13960# Printing a long string crashes Solaris 7 /usr/bin/printf.
13961as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13962as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13963as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13964# Prefer a ksh shell builtin over an external printf program on Solaris,
13965# but without wasting forks for bash or zsh.
13966if test -z "$BASH_VERSION$ZSH_VERSION" \
13967 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13968 as_echo='print -r --'
13969 as_echo_n='print -rn --'
13970elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13971 as_echo='printf %s\n'
13972 as_echo_n='printf %s'
13973else
13974 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13975 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13976 as_echo_n='/usr/ucb/echo -n'
13977 else
13978 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13979 as_echo_n_body='eval
13980 arg=$1;
13981 case $arg in #(
13982 *"$as_nl"*)
13983 expr "X$arg" : "X\\(.*\\)$as_nl";
13984 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13985 esac;
13986 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13987 '
13988 export as_echo_n_body
13989 as_echo_n='sh -c $as_echo_n_body as_echo'
13990 fi
13991 export as_echo_body
13992 as_echo='sh -c $as_echo_body as_echo'
13993fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013994
13995# The user is always right.
13996if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013997 PATH_SEPARATOR=:
13998 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13999 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14000 PATH_SEPARATOR=';'
14001 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014002fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014003
Martin v. Löwiseba40652007-08-30 20:10:57 +000014004
14005# IFS
14006# We need space, tab and new line, in precisely that order. Quoting is
14007# there to prevent editors from complaining about space-tab.
14008# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14009# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014010IFS=" "" $as_nl"
14011
14012# Find who we are. Look in the path if we contain no directory separator.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014013as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014014case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014015 *[\\/]* ) as_myself=$0 ;;
14016 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014017for as_dir in $PATH
14018do
14019 IFS=$as_save_IFS
14020 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014021 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14022 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014023IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014024
Martin v. Löwiseba40652007-08-30 20:10:57 +000014025 ;;
14026esac
14027# We did not find ourselves, most probably we were run as `sh COMMAND'
14028# in which case we are not to be found in the path.
14029if test "x$as_myself" = x; then
14030 as_myself=$0
14031fi
14032if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014033 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14034 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014035fi
14036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014037# Unset variables that we do not need and which cause bugs (e.g. in
14038# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14039# suppresses any "Segmentation fault" message there. '((' could
14040# trigger a bug in pdksh 5.2.14.
14041for as_var in BASH_ENV ENV MAIL MAILPATH
14042do eval test x\${$as_var+set} = xset \
14043 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014044done
14045PS1='$ '
14046PS2='> '
14047PS4='+ '
14048
14049# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014050LC_ALL=C
14051export LC_ALL
14052LANGUAGE=C
14053export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014054
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014055# CDPATH.
14056(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14057
14058
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014059# as_fn_error STATUS ERROR [LINENO LOG_FD]
14060# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014061# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14062# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014063# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014064as_fn_error ()
14065{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014066 as_status=$1; test $as_status -eq 0 && as_status=1
14067 if test "$4"; then
14068 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14069 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014070 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014071 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014072 as_fn_exit $as_status
14073} # as_fn_error
14074
14075
14076# as_fn_set_status STATUS
14077# -----------------------
14078# Set $? to STATUS, without forking.
14079as_fn_set_status ()
14080{
14081 return $1
14082} # as_fn_set_status
14083
14084# as_fn_exit STATUS
14085# -----------------
14086# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14087as_fn_exit ()
14088{
14089 set +e
14090 as_fn_set_status $1
14091 exit $1
14092} # as_fn_exit
14093
14094# as_fn_unset VAR
14095# ---------------
14096# Portably unset VAR.
14097as_fn_unset ()
14098{
14099 { eval $1=; unset $1;}
14100}
14101as_unset=as_fn_unset
14102# as_fn_append VAR VALUE
14103# ----------------------
14104# Append the text in VALUE to the end of the definition contained in VAR. Take
14105# advantage of any shell optimizations that allow amortized linear growth over
14106# repeated appends, instead of the typical quadratic growth present in naive
14107# implementations.
14108if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14109 eval 'as_fn_append ()
14110 {
14111 eval $1+=\$2
14112 }'
14113else
14114 as_fn_append ()
14115 {
14116 eval $1=\$$1\$2
14117 }
14118fi # as_fn_append
14119
14120# as_fn_arith ARG...
14121# ------------------
14122# Perform arithmetic evaluation on the ARGs, and store the result in the
14123# global $as_val. Take advantage of shells that can avoid forks. The arguments
14124# must be portable across $(()) and expr.
14125if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14126 eval 'as_fn_arith ()
14127 {
14128 as_val=$(( $* ))
14129 }'
14130else
14131 as_fn_arith ()
14132 {
14133 as_val=`expr "$@" || test $? -eq 1`
14134 }
14135fi # as_fn_arith
14136
14137
Martin v. Löwiseba40652007-08-30 20:10:57 +000014138if expr a : '\(a\)' >/dev/null 2>&1 &&
14139 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14140 as_expr=expr
14141else
14142 as_expr=false
14143fi
14144
14145if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14146 as_basename=basename
14147else
14148 as_basename=false
14149fi
14150
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014151if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14152 as_dirname=dirname
14153else
14154 as_dirname=false
14155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014156
Martin v. Löwiseba40652007-08-30 20:10:57 +000014157as_me=`$as_basename -- "$0" ||
14158$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14159 X"$0" : 'X\(//\)$' \| \
14160 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014161$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014162 sed '/^.*\/\([^/][^/]*\)\/*$/{
14163 s//\1/
14164 q
14165 }
14166 /^X\/\(\/\/\)$/{
14167 s//\1/
14168 q
14169 }
14170 /^X\/\(\/\).*/{
14171 s//\1/
14172 q
14173 }
14174 s/.*/./; q'`
14175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014176# Avoid depending upon Character Ranges.
14177as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14178as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14179as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14180as_cr_digits='0123456789'
14181as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014182
14183ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014184case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014185-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014186 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014187 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014188 xy) ECHO_C='\c';;
14189 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14190 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014191 esac;;
14192*)
14193 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014195
Martin v. Löwis11437992002-04-12 09:54:03 +000014196rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014197if test -d conf$$.dir; then
14198 rm -f conf$$.dir/conf$$.file
14199else
14200 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014201 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014202fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014203if (echo >conf$$.file) 2>/dev/null; then
14204 if ln -s conf$$.file conf$$ 2>/dev/null; then
14205 as_ln_s='ln -s'
14206 # ... but there are two gotchas:
14207 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14208 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14209 # In both cases, we have to default to `cp -p'.
14210 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14211 as_ln_s='cp -p'
14212 elif ln conf$$.file conf$$ 2>/dev/null; then
14213 as_ln_s=ln
14214 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014215 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014216 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014217else
14218 as_ln_s='cp -p'
14219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014220rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14221rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014222
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014223
14224# as_fn_mkdir_p
14225# -------------
14226# Create "$as_dir" as a directory, including parents if necessary.
14227as_fn_mkdir_p ()
14228{
14229
14230 case $as_dir in #(
14231 -*) as_dir=./$as_dir;;
14232 esac
14233 test -d "$as_dir" || eval $as_mkdir_p || {
14234 as_dirs=
14235 while :; do
14236 case $as_dir in #(
14237 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14238 *) as_qdir=$as_dir;;
14239 esac
14240 as_dirs="'$as_qdir' $as_dirs"
14241 as_dir=`$as_dirname -- "$as_dir" ||
14242$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14243 X"$as_dir" : 'X\(//\)[^/]' \| \
14244 X"$as_dir" : 'X\(//\)$' \| \
14245 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14246$as_echo X"$as_dir" |
14247 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14248 s//\1/
14249 q
14250 }
14251 /^X\(\/\/\)[^/].*/{
14252 s//\1/
14253 q
14254 }
14255 /^X\(\/\/\)$/{
14256 s//\1/
14257 q
14258 }
14259 /^X\(\/\).*/{
14260 s//\1/
14261 q
14262 }
14263 s/.*/./; q'`
14264 test -d "$as_dir" && break
14265 done
14266 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014267 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014268
14269
14270} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014271if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014272 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014273else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014274 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014275 as_mkdir_p=false
14276fi
14277
Martin v. Löwiseba40652007-08-30 20:10:57 +000014278if test -x / >/dev/null 2>&1; then
14279 as_test_x='test -x'
14280else
14281 if ls -dL / >/dev/null 2>&1; then
14282 as_ls_L_option=L
14283 else
14284 as_ls_L_option=
14285 fi
14286 as_test_x='
14287 eval sh -c '\''
14288 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014289 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014290 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014291 case $1 in #(
14292 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014293 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014294 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014295 ???[sx]*):;;*)false;;esac;fi
14296 '\'' sh
14297 '
14298fi
14299as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014300
14301# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014302as_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 +000014303
14304# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014305as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014306
14307
Martin v. Löwis11437992002-04-12 09:54:03 +000014308exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014309## ----------------------------------- ##
14310## Main body of $CONFIG_STATUS script. ##
14311## ----------------------------------- ##
14312_ASEOF
14313test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014314
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014315cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14316# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014317# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014318# values after options handling.
14319ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014320This file was extended by python $as_me 2.7, which was
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014321generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014322
14323 CONFIG_FILES = $CONFIG_FILES
14324 CONFIG_HEADERS = $CONFIG_HEADERS
14325 CONFIG_LINKS = $CONFIG_LINKS
14326 CONFIG_COMMANDS = $CONFIG_COMMANDS
14327 $ $0 $@
14328
Martin v. Löwiseba40652007-08-30 20:10:57 +000014329on `(hostname || uname -n) 2>/dev/null | sed 1q`
14330"
14331
Martin v. Löwis11437992002-04-12 09:54:03 +000014332_ACEOF
14333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014334case $ac_config_files in *"
14335"*) set x $ac_config_files; shift; ac_config_files=$*;;
14336esac
14337
14338case $ac_config_headers in *"
14339"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14340esac
14341
14342
14343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014344# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014345config_files="$ac_config_files"
14346config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014347
Martin v. Löwiseba40652007-08-30 20:10:57 +000014348_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014349
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014350cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014351ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014352\`$as_me' instantiates files and other configuration actions
14353from templates according to the current configuration. Unless the files
14354and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014355
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014356Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014357
14358 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014359 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014360 --config print configuration, then exit
14361 -q, --quiet, --silent
14362 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 -d, --debug don't remove temporary files
14364 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014365 --file=FILE[:TEMPLATE]
14366 instantiate the configuration file FILE
14367 --header=FILE[:TEMPLATE]
14368 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014369
14370Configuration files:
14371$config_files
14372
14373Configuration headers:
14374$config_headers
14375
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014376Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014377
Martin v. Löwiseba40652007-08-30 20:10:57 +000014378_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014379cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14380ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014381ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014382python config.status 2.7
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014383configured by $0, generated by GNU Autoconf 2.68,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014384 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014385
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014386Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014387This config.status script is free software; the Free Software Foundation
14388gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014389
14390ac_pwd='$ac_pwd'
14391srcdir='$srcdir'
14392INSTALL='$INSTALL'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014393test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014394_ACEOF
14395
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014396cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14397# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014398ac_need_defaults=:
14399while test $# != 0
14400do
14401 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014402 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014403 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14404 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014405 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014406 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014407 --*=)
14408 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14409 ac_optarg=
14410 ac_shift=:
14411 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014412 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014413 ac_option=$1
14414 ac_optarg=$2
14415 ac_shift=shift
14416 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014417 esac
14418
Skip Montanaro6dead952003-09-25 14:50:04 +000014419 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014421 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14422 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014423 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014424 $as_echo "$ac_cs_version"; exit ;;
14425 --config | --confi | --conf | --con | --co | --c )
14426 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014427 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014428 debug=: ;;
14429 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014430 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014431 case $ac_optarg in
14432 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014433 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014434 esac
14435 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 ac_need_defaults=false;;
14437 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014438 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014439 case $ac_optarg in
14440 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14441 esac
14442 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014443 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014444 --he | --h)
14445 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014446 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014447Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014448 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014449 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014450 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14451 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14452 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014453
14454 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014455 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014456Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014457
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014458 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014459 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014460
14461 esac
14462 shift
14463done
14464
Skip Montanaro6dead952003-09-25 14:50:04 +000014465ac_configure_extra_args=
14466
14467if $ac_cs_silent; then
14468 exec 6>/dev/null
14469 ac_configure_extra_args="$ac_configure_extra_args --silent"
14470fi
14471
14472_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014473cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014474if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014475 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14476 shift
14477 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14478 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014479 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014480 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014481fi
14482
Martin v. Löwis11437992002-04-12 09:54:03 +000014483_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014484cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014485exec 5>>config.log
14486{
14487 echo
14488 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14489## Running $as_me. ##
14490_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014491 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014492} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014493
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014495cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014496_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014497
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014498cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014499
14500# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014501for ac_config_target in $ac_config_targets
14502do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014503 case $ac_config_target in
14504 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14505 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14506 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14507 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014508 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14509 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014510 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14511 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014512 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014513 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014514
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014515 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 esac
14517done
14518
Martin v. Löwiseba40652007-08-30 20:10:57 +000014519
Martin v. Löwis11437992002-04-12 09:54:03 +000014520# If the user did not use the arguments to specify the items to instantiate,
14521# then the envvar interface is used. Set only those that are not.
14522# We use the long form for the default assignment because of an extremely
14523# bizarre bug on SunOS 4.1.3.
14524if $ac_need_defaults; then
14525 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14526 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14527fi
14528
Skip Montanaro6dead952003-09-25 14:50:04 +000014529# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014530# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014531# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014532# Hook for its removal unless debugging.
14533# Note that there is a small window in which the directory will not be cleaned:
14534# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014535$debug ||
14536{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014537 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014538 trap 'exit_status=$?
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014539 : "${ac_tmp:=$tmp}"
14540 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014541' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014542 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014543}
Martin v. Löwis11437992002-04-12 09:54:03 +000014544# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014545
Martin v. Löwis11437992002-04-12 09:54:03 +000014546{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014547 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014548 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014549} ||
14550{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014551 tmp=./conf$$-$RANDOM
14552 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014553} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14554ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014556# Set up the scripts for CONFIG_FILES section.
14557# No need to generate them if there are no CONFIG_FILES.
14558# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014559if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014561
14562ac_cr=`echo X | tr X '\015'`
14563# On cygwin, bash can eat \r inside `` if the user requested igncr.
14564# But we know of no other shell where ac_cr would be empty at this
14565# point, so we can use a bashism as a fallback.
14566if test "x$ac_cr" = x; then
14567 eval ac_cr=\$\'\\r\'
14568fi
14569ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14570if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014571 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014572else
14573 ac_cs_awk_cr=$ac_cr
14574fi
14575
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014576echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014577_ACEOF
14578
Martin v. Löwiseba40652007-08-30 20:10:57 +000014579
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014580{
14581 echo "cat >conf$$subs.awk <<_ACEOF" &&
14582 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14583 echo "_ACEOF"
14584} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014585 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14586ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014587ac_delim='%!_!# '
14588for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014589 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014590 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014591
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014592 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14593 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014594 break
14595 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014596 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014597 else
14598 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014599 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014600done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014601rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014602
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014603cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014604cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014605_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014606sed -n '
14607h
14608s/^/S["/; s/!.*/"]=/
14609p
14610g
14611s/^[^!]*!//
14612:repl
14613t repl
14614s/'"$ac_delim"'$//
14615t delim
14616:nl
14617h
14618s/\(.\{148\}\)..*/\1/
14619t more1
14620s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14621p
14622n
14623b repl
14624:more1
14625s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14626p
14627g
14628s/.\{148\}//
14629t nl
14630:delim
14631h
14632s/\(.\{148\}\)..*/\1/
14633t more2
14634s/["\\]/\\&/g; s/^/"/; s/$/"/
14635p
14636b
14637:more2
14638s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14639p
14640g
14641s/.\{148\}//
14642t delim
14643' <conf$$subs.awk | sed '
14644/^[^""]/{
14645 N
14646 s/\n//
14647}
14648' >>$CONFIG_STATUS || ac_write_fail=1
14649rm -f conf$$subs.awk
14650cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14651_ACAWK
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014652cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014653 for (key in S) S_is_set[key] = 1
14654 FS = ""
14655
14656}
14657{
14658 line = $ 0
14659 nfields = split(line, field, "@")
14660 substed = 0
14661 len = length(field[1])
14662 for (i = 2; i < nfields; i++) {
14663 key = field[i]
14664 keylen = length(key)
14665 if (S_is_set[key]) {
14666 value = S[key]
14667 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14668 len += length(value) + length(field[++i])
14669 substed = 1
14670 } else
14671 len += 1 + keylen
14672 }
14673
14674 print line
14675}
14676
14677_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014678_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14680if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14681 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14682else
14683 cat
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014684fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14685 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014686_ACEOF
14687
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014688# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14689# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014690# trailing colons and then remove the whole line if VPATH becomes empty
14691# (actually we leave an empty line to preserve line numbers).
14692if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014693 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14694h
14695s///
14696s/^/:/
14697s/[ ]*$/:/
14698s/:\$(srcdir):/:/g
14699s/:\${srcdir}:/:/g
14700s/:@srcdir@:/:/g
14701s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014702s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014703x
14704s/\(=[ ]*\).*/\1/
14705G
14706s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014707s/^[^=]*=[ ]*$//
14708}'
14709fi
14710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014711cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014712fi # test -n "$CONFIG_FILES"
14713
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014714# Set up the scripts for CONFIG_HEADERS section.
14715# No need to generate them if there are no CONFIG_HEADERS.
14716# This happens for instance with `./config.status Makefile'.
14717if test -n "$CONFIG_HEADERS"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014718cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014719BEGIN {
14720_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014721
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014722# Transform confdefs.h into an awk script `defines.awk', embedded as
14723# here-document in config.status, that substitutes the proper values into
14724# config.h.in to produce config.h.
14725
14726# Create a delimiter string that does not exist in confdefs.h, to ease
14727# handling of long lines.
14728ac_delim='%!_!# '
14729for ac_last_try in false false :; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014730 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14731 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014732 break
14733 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014734 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014735 else
14736 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14737 fi
14738done
14739
14740# For the awk script, D is an array of macro values keyed by name,
14741# likewise P contains macro parameters if any. Preserve backslash
14742# newline sequences.
14743
14744ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14745sed -n '
14746s/.\{148\}/&'"$ac_delim"'/g
14747t rset
14748:rset
14749s/^[ ]*#[ ]*define[ ][ ]*/ /
14750t def
14751d
14752:def
14753s/\\$//
14754t bsnl
14755s/["\\]/\\&/g
14756s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14757D["\1"]=" \3"/p
14758s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14759d
14760:bsnl
14761s/["\\]/\\&/g
14762s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14763D["\1"]=" \3\\\\\\n"\\/p
14764t cont
14765s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14766t cont
14767d
14768:cont
14769n
14770s/.\{148\}/&'"$ac_delim"'/g
14771t clear
14772:clear
14773s/\\$//
14774t bsnlc
14775s/["\\]/\\&/g; s/^/"/; s/$/"/p
14776d
14777:bsnlc
14778s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14779b cont
14780' <confdefs.h | sed '
14781s/'"$ac_delim"'/"\\\
14782"/g' >>$CONFIG_STATUS || ac_write_fail=1
14783
14784cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14785 for (key in D) D_is_set[key] = 1
14786 FS = ""
14787}
14788/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14789 line = \$ 0
14790 split(line, arg, " ")
14791 if (arg[1] == "#") {
14792 defundef = arg[2]
14793 mac1 = arg[3]
14794 } else {
14795 defundef = substr(arg[1], 2)
14796 mac1 = arg[2]
14797 }
14798 split(mac1, mac2, "(") #)
14799 macro = mac2[1]
14800 prefix = substr(line, 1, index(line, defundef) - 1)
14801 if (D_is_set[macro]) {
14802 # Preserve the white space surrounding the "#".
14803 print prefix "define", macro P[macro] D[macro]
14804 next
14805 } else {
14806 # Replace #undef with comments. This is necessary, for example,
14807 # in the case of _POSIX_SOURCE, which is predefined and required
14808 # on some systems where configure will not decide to define it.
14809 if (defundef == "undef") {
14810 print "/*", prefix defundef, macro, "*/"
14811 next
14812 }
14813 }
14814}
14815{ print }
14816_ACAWK
14817_ACEOF
14818cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014819 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014820fi # test -n "$CONFIG_HEADERS"
14821
14822
14823eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14824shift
14825for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014826do
14827 case $ac_tag in
14828 :[FHLC]) ac_mode=$ac_tag; continue;;
14829 esac
14830 case $ac_mode$ac_tag in
14831 :[FHL]*:*);;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014832 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014833 :[FH]-) ac_tag=-:-;;
14834 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14835 esac
14836 ac_save_IFS=$IFS
14837 IFS=:
14838 set x $ac_tag
14839 IFS=$ac_save_IFS
14840 shift
14841 ac_file=$1
14842 shift
14843
14844 case $ac_mode in
14845 :L) ac_source=$1;;
14846 :[FH])
14847 ac_file_inputs=
14848 for ac_f
14849 do
14850 case $ac_f in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014851 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014852 *) # Look for the file first in the build tree, then in the source tree
14853 # (if the path is not absolute). The absolute path cannot be DOS-style,
14854 # because $ac_f cannot contain `:'.
14855 test -f "$ac_f" ||
14856 case $ac_f in
14857 [\\/$]*) false;;
14858 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14859 esac ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014860 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014861 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014862 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14863 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014864 done
14865
14866 # Let's still pretend it is `configure' which instantiates (i.e., don't
14867 # use $as_me), people would be surprised to read:
14868 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014869 configure_input='Generated from '`
14870 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14871 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014872 if test x"$ac_file" != x-; then
14873 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014874 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14875$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014876 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014877 # Neutralize special characters interpreted by sed in replacement strings.
14878 case $configure_input in #(
14879 *\&* | *\|* | *\\* )
14880 ac_sed_conf_input=`$as_echo "$configure_input" |
14881 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14882 *) ac_sed_conf_input=$configure_input;;
14883 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014884
14885 case $ac_tag in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014886 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14887 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014888 esac
14889 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 esac
14891
Martin v. Löwiseba40652007-08-30 20:10:57 +000014892 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014893$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014894 X"$ac_file" : 'X\(//\)[^/]' \| \
14895 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000014896 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014897$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014898 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14899 s//\1/
14900 q
14901 }
14902 /^X\(\/\/\)[^/].*/{
14903 s//\1/
14904 q
14905 }
14906 /^X\(\/\/\)$/{
14907 s//\1/
14908 q
14909 }
14910 /^X\(\/\).*/{
14911 s//\1/
14912 q
14913 }
14914 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014915 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 ac_builddir=.
14917
Martin v. Löwiseba40652007-08-30 20:10:57 +000014918case "$ac_dir" in
14919.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14920*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014921 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014922 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014923 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014924 case $ac_top_builddir_sub in
14925 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14926 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14927 esac ;;
14928esac
14929ac_abs_top_builddir=$ac_pwd
14930ac_abs_builddir=$ac_pwd$ac_dir_suffix
14931# for backward compatibility:
14932ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014933
14934case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014935 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014937 ac_top_srcdir=$ac_top_builddir_sub
14938 ac_abs_top_srcdir=$ac_pwd ;;
14939 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014940 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014941 ac_top_srcdir=$srcdir
14942 ac_abs_top_srcdir=$srcdir ;;
14943 *) # Relative name.
14944 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14945 ac_top_srcdir=$ac_top_build_prefix$srcdir
14946 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014947esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014948ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014949
Martin v. Löwis11437992002-04-12 09:54:03 +000014950
Martin v. Löwiseba40652007-08-30 20:10:57 +000014951 case $ac_mode in
14952 :F)
14953 #
14954 # CONFIG_FILE
14955 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014956
14957 case $INSTALL in
14958 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014959 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 esac
Brett Cannon19fab762007-06-02 03:02:29 +000014961_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014962
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014963cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014964# If the template does not know about datarootdir, expand it.
14965# FIXME: This hack should be removed a few years after 2.60.
14966ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014967ac_sed_dataroot='
14968/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000014969 p
14970 q
14971}
14972/@datadir@/p
14973/@docdir@/p
14974/@infodir@/p
14975/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014976/@mandir@/p'
14977case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014978*datarootdir*) ac_datarootdir_seen=yes;;
14979*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014980 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14981$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014982_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014983cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014984 ac_datarootdir_hack='
14985 s&@datadir@&$datadir&g
14986 s&@docdir@&$docdir&g
14987 s&@infodir@&$infodir&g
14988 s&@localedir@&$localedir&g
14989 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014990 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014991esac
14992_ACEOF
14993
14994# Neutralize VPATH when `$srcdir' = `.'.
14995# Shell code in configure.ac might set extrasub.
14996# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014997cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14998ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014999$extrasub
15000_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015001cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015002:t
15003/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015004s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015005s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015006s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015007s&@srcdir@&$ac_srcdir&;t t
15008s&@abs_srcdir@&$ac_abs_srcdir&;t t
15009s&@top_srcdir@&$ac_top_srcdir&;t t
15010s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15011s&@builddir@&$ac_builddir&;t t
15012s&@abs_builddir@&$ac_abs_builddir&;t t
15013s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15014s&@INSTALL@&$ac_INSTALL&;t t
15015$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015016"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015017eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15018 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015019
Martin v. Löwiseba40652007-08-30 20:10:57 +000015020test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015021 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15022 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15023 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015024 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015025which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015026$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015027which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015028
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015029 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015030 case $ac_file in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015031 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15032 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015033 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015034 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035 ;;
15036 :H)
15037 #
15038 # CONFIG_HEADER
15039 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015041 {
15042 $as_echo "/* $configure_input */" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015043 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15044 } >"$ac_tmp/config.h" \
15045 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15046 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015047 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15048$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015050 rm -f "$ac_file"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015051 mv "$ac_tmp/config.h" "$ac_file" \
15052 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015053 fi
15054 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015055 $as_echo "/* $configure_input */" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015056 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15057 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015059 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015060
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061
15062 esac
15063
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015064
15065 case $ac_file$ac_mode in
15066 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15067
15068 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015069done # for ac_tag
15070
Guido van Rossum627b2d71993-12-24 10:39:16 +000015071
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015072as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015073_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015074ac_clean_files=$ac_clean_files_save
15075
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015076test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015077 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015078
Martin v. Löwis11437992002-04-12 09:54:03 +000015079
15080# configure is writing to config.log, and then calls config.status.
15081# config.status does its own redirection, appending to config.log.
15082# Unfortunately, on DOS this fails, as config.log is still kept open
15083# by configure, so config.status won't be able to write to it; its
15084# output is simply discarded. So we exec the FD to /dev/null,
15085# effectively closing config.log, so it can be properly (re)opened and
15086# appended to by config.status. When coming back to configure, we
15087# need to make the FD available again.
15088if test "$no_create" != yes; then
15089 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015090 ac_config_status_args=
15091 test "$silent" = yes &&
15092 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015093 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015094 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 exec 5>>config.log
15096 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15097 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015098 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015099fi
15100if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15101 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15102$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015103fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015104
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015105
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015106echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015107if test ! -f Modules/Setup
15108then
15109 cp $srcdir/Modules/Setup.dist Modules/Setup
15110fi
15111
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015112echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015113if test ! -f Modules/Setup.local
15114then
15115 echo "# Edit this file for local setup changes" >Modules/Setup.local
15116fi
15117
15118echo "creating Makefile"
15119$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15120 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015121 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015122
15123case $ac_sys_system in
15124BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015125 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015126
15127 Support for BeOS is deprecated as of Python 2.6.
15128 See PEP 11 for the gory details.
15129 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015130$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015131
15132 Support for BeOS is deprecated as of Python 2.6.
15133 See PEP 11 for the gory details.
15134 " >&2;}
15135 ;;
15136*) ;;
15137esac
15138
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015139mv config.c Modules